A multilingual input method framework
Revisão | fd4e4aa4fc5a2b2b5f965fca4e2ddd7d4e9b09cb (tree) |
---|---|
Hora | 2014-04-19 16:54:22 |
Autor | shitamo <shitamo@user...> |
Commiter | shitamo |
toolbar
configurable command
@@ -76,8 +76,9 @@ struct _CommandEntry { | ||
76 | 76 | const gchar *desc; |
77 | 77 | const gchar *label; |
78 | 78 | const gchar *icon; |
79 | - const gchar *command; | |
79 | + gchar *command; | |
80 | 80 | const gchar *custom_button_show_symbol; |
81 | + const gchar *custom_button_command_symbol; | |
81 | 82 | uim_bool show_button; |
82 | 83 | }; |
83 | 84 |
@@ -93,6 +94,7 @@ static struct _CommandEntry command_entry[] = { | ||
93 | 94 | "uim-im-switcher-gtk", |
94 | 95 | #endif |
95 | 96 | "toolbar-show-switcher-button?", |
97 | + NULL, | |
96 | 98 | UIM_FALSE |
97 | 99 | }, |
98 | 100 |
@@ -106,6 +108,7 @@ static struct _CommandEntry command_entry[] = { | ||
106 | 108 | "uim-pref-gtk", |
107 | 109 | #endif |
108 | 110 | "toolbar-show-pref-button?", |
111 | + "toolbar-pref-command", | |
109 | 112 | UIM_FALSE |
110 | 113 | }, |
111 | 114 |
@@ -119,6 +122,7 @@ static struct _CommandEntry command_entry[] = { | ||
119 | 122 | "uim-dict-gtk", |
120 | 123 | #endif |
121 | 124 | "toolbar-show-dict-button?", |
125 | + "toolbar-dict-command", | |
122 | 126 | UIM_FALSE |
123 | 127 | }, |
124 | 128 |
@@ -132,6 +136,7 @@ static struct _CommandEntry command_entry[] = { | ||
132 | 136 | "uim-input-pad-ja", |
133 | 137 | #endif |
134 | 138 | "toolbar-show-input-pad-button?", |
139 | + "toolbar-input-pad-command", | |
135 | 140 | UIM_FALSE |
136 | 141 | }, |
137 | 142 |
@@ -145,6 +150,7 @@ static struct _CommandEntry command_entry[] = { | ||
145 | 150 | #endif |
146 | 151 | "uim-tomoe-gtk", |
147 | 152 | "toolbar-show-handwriting-input-pad-button?", |
153 | + "toolbar-handwriting-input-pad-command", | |
148 | 154 | UIM_FALSE |
149 | 155 | }, |
150 | 156 |
@@ -154,6 +160,7 @@ static struct _CommandEntry command_entry[] = { | ||
154 | 160 | GTK_STOCK_HELP, |
155 | 161 | "uim-help", |
156 | 162 | "toolbar-show-help-button?", |
163 | + "toolbar-help-command", | |
157 | 164 | UIM_FALSE |
158 | 165 | } |
159 | 166 | }; |
@@ -912,9 +919,16 @@ helper_toolbar_check_custom() | ||
912 | 919 | { |
913 | 920 | guint i; |
914 | 921 | |
915 | - for (i = 0; i < command_entry_len; i++) | |
922 | + for (i = 0; i < command_entry_len; i++) { | |
916 | 923 | command_entry[i].show_button = |
917 | 924 | uim_scm_symbol_value_bool(command_entry[i].custom_button_show_symbol); |
925 | + if (command_entry[i].custom_button_command_symbol) { | |
926 | + if (uim_scm_symbol_value_str(command_entry[i].custom_button_command_symbol)) { | |
927 | + command_entry[i].command = | |
928 | + uim_scm_symbol_value_str(command_entry[i].custom_button_command_symbol); | |
929 | + } | |
930 | + } | |
931 | + } | |
918 | 932 | |
919 | 933 | with_dark_bg = |
920 | 934 | uim_scm_symbol_value_bool("toolbar-icon-for-dark-background?"); |