• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

A multilingual input method framework


Commit MetaInfo

Revisionfd4e4aa4fc5a2b2b5f965fca4e2ddd7d4e9b09cb (tree)
Time2014-04-19 16:54:22
Authorshitamo <shitamo@user...>
Commitershitamo

Log Message

toolbar
configurable command

Change Summary

Incremental Difference

--- a/gtk2/toolbar/common-gtk.c
+++ b/gtk2/toolbar/common-gtk.c
@@ -76,8 +76,9 @@ struct _CommandEntry {
7676 const gchar *desc;
7777 const gchar *label;
7878 const gchar *icon;
79- const gchar *command;
79+ gchar *command;
8080 const gchar *custom_button_show_symbol;
81+ const gchar *custom_button_command_symbol;
8182 uim_bool show_button;
8283 };
8384
@@ -93,6 +94,7 @@ static struct _CommandEntry command_entry[] = {
9394 "uim-im-switcher-gtk",
9495 #endif
9596 "toolbar-show-switcher-button?",
97+ NULL,
9698 UIM_FALSE
9799 },
98100
@@ -106,6 +108,7 @@ static struct _CommandEntry command_entry[] = {
106108 "uim-pref-gtk",
107109 #endif
108110 "toolbar-show-pref-button?",
111+ "toolbar-pref-command",
109112 UIM_FALSE
110113 },
111114
@@ -119,6 +122,7 @@ static struct _CommandEntry command_entry[] = {
119122 "uim-dict-gtk",
120123 #endif
121124 "toolbar-show-dict-button?",
125+ "toolbar-dict-command",
122126 UIM_FALSE
123127 },
124128
@@ -132,6 +136,7 @@ static struct _CommandEntry command_entry[] = {
132136 "uim-input-pad-ja",
133137 #endif
134138 "toolbar-show-input-pad-button?",
139+ "toolbar-input-pad-command",
135140 UIM_FALSE
136141 },
137142
@@ -145,6 +150,7 @@ static struct _CommandEntry command_entry[] = {
145150 #endif
146151 "uim-tomoe-gtk",
147152 "toolbar-show-handwriting-input-pad-button?",
153+ "toolbar-handwriting-input-pad-command",
148154 UIM_FALSE
149155 },
150156
@@ -154,6 +160,7 @@ static struct _CommandEntry command_entry[] = {
154160 GTK_STOCK_HELP,
155161 "uim-help",
156162 "toolbar-show-help-button?",
163+ "toolbar-help-command",
157164 UIM_FALSE
158165 }
159166 };
@@ -912,9 +919,16 @@ helper_toolbar_check_custom()
912919 {
913920 guint i;
914921
915- for (i = 0; i < command_entry_len; i++)
922+ for (i = 0; i < command_entry_len; i++) {
916923 command_entry[i].show_button =
917924 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+ }
918932
919933 with_dark_bg =
920934 uim_scm_symbol_value_bool("toolbar-icon-for-dark-background?");