Lines 28-35
typedef struct _DasherActionSpeechPrivat
Link Here
|
28 |
|
28 |
|
29 |
G_DEFINE_TYPE(DasherActionSpeech, dasher_action_speech, TYPE_DASHER_ACTION); |
29 |
G_DEFINE_TYPE(DasherActionSpeech, dasher_action_speech, TYPE_DASHER_ACTION); |
30 |
|
30 |
|
31 |
static gboolean dasher_action_speech_execute(DasherAction *pSelf, DasherEditorInternal *pEditor, int iIdx); |
31 |
static gboolean dasher_action_speech_execute(DasherAction *pSelf, DasherEditor *pEditor, int iIdx); |
32 |
static gboolean dasher_action_speech_preview(DasherAction *pSelf, DasherEditorInternal *pEditor); |
32 |
static gboolean dasher_action_speech_preview(DasherAction *pSelf, DasherEditor *pEditor); |
33 |
static const gchar *dasher_action_speech_get_name(DasherAction *pSelf); |
33 |
static const gchar *dasher_action_speech_get_name(DasherAction *pSelf); |
34 |
static int dasher_action_speech_get_sub_count(DasherAction *pSelf); |
34 |
static int dasher_action_speech_get_sub_count(DasherAction *pSelf); |
35 |
static const gchar *dasher_action_speech_get_sub_name(DasherAction *pSelf, int iIdx); |
35 |
static const gchar *dasher_action_speech_get_sub_name(DasherAction *pSelf, int iIdx); |
Lines 66-82
dasher_action_speech_new() {
Link Here
|
66 |
} |
66 |
} |
67 |
|
67 |
|
68 |
static gboolean |
68 |
static gboolean |
69 |
dasher_action_speech_execute(DasherAction *pSelf, DasherEditorInternal *pEditor, int iIdx) { |
69 |
dasher_action_speech_execute(DasherAction *pSelf, DasherEditor *pEditor, int iIdx) { |
70 |
DasherActionSpeechPrivate *pDasherActionSpeechPrivate = DASHER_ACTION_SPEECH_GET_PRIVATE(pSelf); |
70 |
DasherActionSpeechPrivate *pDasherActionSpeechPrivate = DASHER_ACTION_SPEECH_GET_PRIVATE(pSelf); |
71 |
|
71 |
|
72 |
const char *szData; |
72 |
const char *szData; |
73 |
|
73 |
|
74 |
switch(iIdx) { |
74 |
switch(iIdx) { |
75 |
case 0: |
75 |
case 0: |
76 |
szData = dasher_editor_internal_get_all_text(pEditor); |
76 |
szData = dasher_editor_get_all_text(pEditor); |
77 |
break; |
77 |
break; |
78 |
case 1: |
78 |
case 1: |
79 |
szData = dasher_editor_internal_get_new_text(pEditor); |
79 |
szData = dasher_editor_get_new_text(pEditor); |
80 |
break; |
80 |
break; |
81 |
case 2: |
81 |
case 2: |
82 |
szData = pDasherActionSpeechPrivate->szLast; |
82 |
szData = pDasherActionSpeechPrivate->szLast; |
Lines 107-114
dasher_action_speech_execute(DasherActio
Link Here
|
107 |
} |
107 |
} |
108 |
|
108 |
|
109 |
static gboolean |
109 |
static gboolean |
110 |
dasher_action_speech_preview(DasherAction *pSelf, DasherEditorInternal *pEditor) { |
110 |
dasher_action_speech_preview(DasherAction *pSelf, DasherEditor *pEditor) { |
111 |
const gchar *szData = dasher_editor_internal_get_all_text(pEditor); |
111 |
const gchar *szData = dasher_editor_get_all_text(pEditor); |
112 |
|
112 |
|
113 |
if(!szData) |
113 |
if(!szData) |
114 |
return false; |
114 |
return false; |