summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStafford Mitchell Horne <shorne@gmail.com>2007-01-27 05:30:33 +0000
committerStafford Mitchell Horne <shorne@gmail.com>2007-01-27 05:30:33 +0000
commitae453dc42aa4beeaf46418dd28ea7d4fa38e4532 (patch)
tree5ca1fce20c421549a0307f73ca81f0cbe5a52eb7
parent81a98e1708a6212d3cbb866ddfe540778f9e74db (diff)
Update IMC changes which have been sitting around
* Icon is available for IMCs with setup_exec * Setup options available * Disable IMC available SVN revision: 28130
-rw-r--r--src/bin/Makefile.am6
-rw-r--r--src/bin/e_int_config_fonts.c2
-rw-r--r--src/bin/e_int_config_imc.c239
-rw-r--r--src/bin/e_intl.c3
-rw-r--r--src/bin/e_intl.h13
5 files changed, 215 insertions, 48 deletions
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 70d3ba7f7..15b1ff2cb 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -367,10 +367,10 @@ e_start_main.c
367enlightenment_start_LDFLAGS = @dlopen_libs@ 367enlightenment_start_LDFLAGS = @dlopen_libs@
368 368
369enlightenment_thumb_SOURCES = \ 369enlightenment_thumb_SOURCES = \
370e.h \
370e_thumb_main.c \ 371e_thumb_main.c \
371e_sha1.c \ 372$(enlightenment_src)
372e_sha1.h 373
373
374enlightenment_thumb_LDFLAGS = @e_libs@ @dlopen_libs@ 374enlightenment_thumb_LDFLAGS = @e_libs@ @dlopen_libs@
375 375
376enlightenment_sys_SOURCES = \ 376enlightenment_sys_SOURCES = \
diff --git a/src/bin/e_int_config_fonts.c b/src/bin/e_int_config_fonts.c
index dd2551847..4a5842a42 100644
--- a/src/bin/e_int_config_fonts.c
+++ b/src/bin/e_int_config_fonts.c
@@ -323,7 +323,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
323 char *f; 323 char *f;
324 324
325 f = fonts->data; 325 f = fonts->data;
326 if (strstr(f, ":")) continue; 326// if (strstr(f, ":")) continue;
327 l = evas_list_append(l, strdup(f)); 327 l = evas_list_append(l, strdup(f));
328 } 328 }
329 if (l) 329 if (l)
diff --git a/src/bin/e_int_config_imc.c b/src/bin/e_int_config_imc.c
index d0d2ea77f..9765329c2 100644
--- a/src/bin/e_int_config_imc.c
+++ b/src/bin/e_int_config_imc.c
@@ -16,6 +16,7 @@ static Evas_Object *_advanced_create_widgets (E_Config_Dialog *cfd, Evas *evas,
16static int _basic_list_sort_cb (void *d1, void *d2); 16static int _basic_list_sort_cb (void *d1, void *d2);
17static void _e_imc_disable_change_cb (void *data, Evas_Object *obj); 17static void _e_imc_disable_change_cb (void *data, Evas_Object *obj);
18static void _e_imc_list_change_cb (void *data, Evas_Object *obj); 18static void _e_imc_list_change_cb (void *data, Evas_Object *obj);
19static void _e_imc_setup_cb (void *data, void *data2);
19 20
20/* Advanced Callbacks */ 21/* Advanced Callbacks */
21static void _cb_dir (void *data, Evas_Object *obj); 22static void _cb_dir (void *data, Evas_Object *obj);
@@ -27,6 +28,7 @@ static void _cb_files_selection_change(void *data, Evas_Object *obj, voi
27static void _cb_files_files_changed (void *data, Evas_Object *obj, void *event_info); 28static void _cb_files_files_changed (void *data, Evas_Object *obj, void *event_info);
28static void _cb_files_selected (void *data, Evas_Object *obj, void *event_info); 29static void _cb_files_selected (void *data, Evas_Object *obj, void *event_info);
29static void _cb_files_files_deleted (void *data, Evas_Object *obj, void *event_info); 30static void _cb_files_files_deleted (void *data, Evas_Object *obj, void *event_info);
31static void _e_imc_adv_setup_cb (void *data, void *data2);
30 32
31static void _e_imc_change_enqueue (E_Config_Dialog_Data *cfdata); 33static void _e_imc_change_enqueue (E_Config_Dialog_Data *cfdata);
32static void _e_imc_entry_change_cb (void *data, Evas_Object *obj); 34static void _e_imc_entry_change_cb (void *data, Evas_Object *obj);
@@ -47,13 +49,17 @@ struct _E_Config_Dialog_Data
47 Evas_Object *o_frame; /* scrollpane for file manager*/ 49 Evas_Object *o_frame; /* scrollpane for file manager*/
48 50
49 char *imc_current; 51 char *imc_current;
52 Evas_Hash *imc_basic_map;
53
50 int imc_disable; /* 0=enable, 1=disable */ 54 int imc_disable; /* 0=enable, 1=disable */
51 int fmdir; /* 0=Local, 1=System*/ 55 int fmdir; /* 0=Local, 1=System*/
52 struct 56 struct
53 { 57 {
54 int dirty; 58 int dirty;
55 char *e_im_name; 59 char *e_im_name;
56 char *e_im_exec; 60 char *e_im_exec;
61 char *e_im_setup_exec;
62
57 char *gtk_im_module; 63 char *gtk_im_module;
58 char *qt_im_module; 64 char *qt_im_module;
59 char *xmodifiers; 65 char *xmodifiers;
@@ -65,8 +71,14 @@ struct _E_Config_Dialog_Data
65 { 71 {
66 Evas_Object *imc_basic_list; 72 Evas_Object *imc_basic_list;
67 Evas_Object *imc_basic_disable; 73 Evas_Object *imc_basic_disable;
74 Evas_Object *imc_basic_setup;
75
76 Evas_Object *imc_advanced_disable;
77 Evas_Object *imc_advanced_setup;
78
68 Evas_Object *e_im_name; 79 Evas_Object *e_im_name;
69 Evas_Object *e_im_exec; 80 Evas_Object *e_im_exec;
81 Evas_Object *e_im_setup_exec;
70 Evas_Object *gtk_im_module; 82 Evas_Object *gtk_im_module;
71 Evas_Object *qt_im_module; 83 Evas_Object *qt_im_module;
72 Evas_Object *xmodifiers; 84 Evas_Object *xmodifiers;
@@ -144,7 +156,13 @@ _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
144 if (cfdata->win_import) 156 if (cfdata->win_import)
145 e_int_config_imc_import_del(cfdata->win_import); 157 e_int_config_imc_import_del(cfdata->win_import);
146 E_FREE(cfdata->imc_current); 158 E_FREE(cfdata->imc_current);
147 159
160 if (cfdata->imc_basic_map)
161 {
162 evas_hash_foreach(cfdata->imc_basic_map, _change_hash_free_cb, NULL);
163 evas_hash_free(cfdata->imc_basic_map);
164 }
165
148 if (cfdata->imc_change_map) 166 if (cfdata->imc_change_map)
149 { 167 {
150 evas_hash_foreach(cfdata->imc_change_map, _change_hash_free_cb, NULL); 168 evas_hash_foreach(cfdata->imc_change_map, _change_hash_free_cb, NULL);
@@ -154,6 +172,7 @@ _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
154 172
155 E_FREE(cfdata->imc.e_im_name); 173 E_FREE(cfdata->imc.e_im_name);
156 E_FREE(cfdata->imc.e_im_exec); 174 E_FREE(cfdata->imc.e_im_exec);
175 E_FREE(cfdata->imc.e_im_setup_exec);
157 E_FREE(cfdata->imc.gtk_im_module); 176 E_FREE(cfdata->imc.gtk_im_module);
158 E_FREE(cfdata->imc.qt_im_module); 177 E_FREE(cfdata->imc.qt_im_module);
159 E_FREE(cfdata->imc.xmodifiers); 178 E_FREE(cfdata->imc.xmodifiers);
@@ -199,13 +218,73 @@ _e_imc_disable_change_cb(void *data, Evas_Object *obj)
199 cfdata = data; 218 cfdata = data;
200} 219}
201 220
221void
222_e_imc_setup_button_toggle(Evas_Object *button, E_Input_Method_Config *imc)
223{
224 if (imc)
225 {
226 int flag;
227
228 flag = ( imc->e_im_setup_exec == NULL ) ||
229 ( imc->e_im_setup_exec[0] == 0 );
230 e_widget_disabled_set(button, flag);
231 }
232 else
233 {
234 e_widget_disabled_set(button, 1);
235 }
236
237}
238
202static void 239static void
203_e_imc_list_change_cb(void *data, Evas_Object *obj) 240_e_imc_list_change_cb(void *data, Evas_Object *obj)
204{ 241{
205 E_Config_Dialog_Data *cfdata; 242 E_Config_Dialog_Data *cfdata;
243 E_Input_Method_Config *imc;
206 244
207 cfdata = data; 245 cfdata = data;
208 e_widget_check_checked_set(cfdata->gui.imc_basic_disable, 0); 246 e_widget_check_checked_set(cfdata->gui.imc_basic_disable, 0);
247
248 if (cfdata->imc_current)
249 {
250 imc = evas_hash_find(cfdata->imc_basic_map, cfdata->imc_current);
251 _e_imc_setup_button_toggle(cfdata->gui.imc_basic_setup, imc);
252 }
253}
254
255static void
256_e_imc_setup_cb(void *data, void *data2)
257{
258 E_Config_Dialog_Data *cfdata;
259
260 cfdata = data;
261 if (cfdata->imc_current && cfdata->imc_basic_map)
262 {
263 E_Input_Method_Config *imc;
264
265 imc = evas_hash_find(cfdata->imc_basic_map, cfdata->imc_current);
266
267 if (imc && imc->e_im_setup_exec)
268 {
269 Ecore_Exe *exe;
270 char *cmd;
271
272 cmd = imc->e_im_setup_exec;
273
274 e_util_library_path_strip();
275 exe = ecore_exe_run(cmd, NULL);
276 e_util_library_path_restore();
277
278 if (!exe)
279 {
280 e_util_dialog_show(_("Run Error"),
281 _( "Enlightenment was unable to fork a child process:<br>"
282 "<br>"
283 "%s<br>"),
284 cmd);
285 }
286 }
287 }
209} 288}
210 289
211static Evas_Object * 290static Evas_Object *
@@ -219,15 +298,16 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
219 298
220 of = e_widget_frametable_add(evas, _("Input Method Selector"), 1); 299 of = e_widget_frametable_add(evas, _("Input Method Selector"), 1);
221 300
222 /* Disable everything checkbox */ 301 /* Disable imc checkbox */
223 ob = e_widget_check_add(evas, _("Use no Input Method"), &(cfdata->imc_disable)); 302 ob = e_widget_check_add(evas, _("Use No Input Method"), &(cfdata->imc_disable));
224 e_widget_disabled_set(ob, 0); 303 cfdata->gui.imc_basic_disable = ob;
225 e_widget_on_change_hook_set(ob, _e_imc_disable_change_cb, cfdata); 304 e_widget_frametable_object_append(of, ob, 0, 0, 2, 1, 1, 1, 1, 1);
226 e_widget_check_checked_set(ob, cfdata->imc_disable); 305
227 e_widget_change(ob); 306 /* Configure imc button */
228 cfdata->gui.imc_basic_disable = ob; 307 ob = e_widget_button_add(evas, _("Setup Selected Input Method"), "widget/setup", _e_imc_setup_cb, cfdata, NULL);
229 e_widget_frametable_object_append(of, ob, 0, 0, 2, 1, 1, 1, 1, 1); 308 cfdata->gui.imc_basic_setup = ob;
230 309 e_widget_frametable_object_append(of, ob, 0, 7, 2, 1, 1, 1, 1, 1);
310
231 /* Input method List */ 311 /* Input method List */
232 ob = e_widget_ilist_add(evas, 16, 16, &(cfdata->imc_current)); 312 ob = e_widget_ilist_add(evas, 16, 16, &(cfdata->imc_current));
233 e_widget_on_change_hook_set(ob, _e_imc_list_change_cb, cfdata); 313 e_widget_on_change_hook_set(ob, _e_imc_list_change_cb, cfdata);
@@ -244,6 +324,13 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
244 evas_list_count(imc_basic_list), 324 evas_list_count(imc_basic_list),
245 _basic_list_sort_cb); 325 _basic_list_sort_cb);
246 326
327 if (cfdata->imc_basic_map)
328 {
329 evas_hash_foreach(cfdata->imc_basic_map, _change_hash_free_cb, NULL);
330 evas_hash_free(cfdata->imc_basic_map);
331 cfdata->imc_basic_map = NULL;
332 }
333
247 i = 0; 334 i = 0;
248 while(imc_basic_list) 335 while(imc_basic_list)
249 { 336 {
@@ -260,17 +347,31 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
260 347
261 if (imc && imc->e_im_name) 348 if (imc && imc->e_im_name)
262 { 349 {
263 e_widget_ilist_append(cfdata->gui.imc_basic_list, NULL, imc->e_im_name, NULL, NULL, imc_path); 350 Evas_Object *icon;
351
352 icon = NULL;
353 if (imc->e_im_setup_exec)
354 {
355 E_App *eap;
356 eap = e_app_exe_find(imc->e_im_setup_exec);
357 if (eap)
358 icon = e_app_icon_add(eap, evas);
359 }
360
361 e_widget_ilist_append(cfdata->gui.imc_basic_list, icon, imc->e_im_name, NULL, NULL, imc_path);
264 if (cfdata->imc_current && !strncmp(imc_path, cfdata->imc_current, strlen(cfdata->imc_current))) 362 if (cfdata->imc_current && !strncmp(imc_path, cfdata->imc_current, strlen(cfdata->imc_current)))
265 e_widget_ilist_selected_set(cfdata->gui.imc_basic_list, i); 363 e_widget_ilist_selected_set(cfdata->gui.imc_basic_list, i);
266 i++; 364 i++;
365
366 cfdata->imc_basic_map = evas_hash_add(cfdata->imc_basic_map, imc_path, imc);
267 } 367 }
268 e_intl_input_method_config_free(imc);
269 } 368 }
270 free(imc_path); 369 free(imc_path);
271 imc_basic_list = evas_list_remove_list(imc_basic_list, imc_basic_list); 370 imc_basic_list = evas_list_remove_list(imc_basic_list, imc_basic_list);
272 } 371 }
273 372
373 _e_imc_setup_button_toggle(cfdata->gui.imc_basic_setup, evas_hash_find(cfdata->imc_basic_map, cfdata->imc_current));
374
274 e_widget_ilist_go(ob); 375 e_widget_ilist_go(ob);
275 e_widget_ilist_thaw(ob); 376 e_widget_ilist_thaw(ob);
276 edje_thaw(); 377 edje_thaw();
@@ -292,28 +393,29 @@ _change_hash_apply_cb(Evas_Hash *hash, const char *key, void *data, void *fdata)
292 Eet_File *ef; 393 Eet_File *ef;
293 394
294 imc = data; 395 imc = data;
295 ef = eet_open(key, EET_FILE_MODE_WRITE); 396
296 if (ef) 397 if (ecore_file_exists(key))
297 { 398 {
298 e_intl_input_method_config_write(ef, imc); 399 ef = eet_open(key, EET_FILE_MODE_WRITE);
299 eet_close(ef); 400 if (ef)
401 {
402 e_intl_input_method_config_write(ef, imc);
403 eet_close(ef);
404 }
300 } 405 }
406
301 e_intl_input_method_config_free(imc); 407 e_intl_input_method_config_free(imc);
408
302 return 1; 409 return 1;
303} 410}
304 411
305static int 412static int
306_advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) 413_advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
307{ 414{
308 if (cfdata->imc_current) 415 /* inherit basic apply functionality */
309 { 416 _basic_apply_data(cfd, cfdata);
310 if (e_config->input_method) evas_stringshare_del(e_config->input_method);
311 e_config->input_method = evas_stringshare_add(cfdata->imc_current);
312 e_intl_input_method_set(e_config->input_method);
313 }
314
315 e_config_save_queue();
316 417
418 /* Save all file changes */
317 if (cfdata->imc_current) 419 if (cfdata->imc_current)
318 _e_imc_change_enqueue(cfdata); 420 _e_imc_change_enqueue(cfdata);
319 421
@@ -393,6 +495,35 @@ _cb_new(void *data, void *data2)
393 } 495 }
394 free(imc_new); 496 free(imc_new);
395} 497}
498
499static void
500_e_imc_adv_setup_cb(void *data, void *data2)
501{
502 E_Config_Dialog_Data *cfdata;
503
504 cfdata = data;
505 if (cfdata->imc.e_im_setup_exec)
506 {
507 Ecore_Exe *exe;
508 char *cmd;
509
510 cmd = cfdata->imc.e_im_setup_exec;
511
512 e_util_library_path_strip();
513 exe = ecore_exe_run(cmd, NULL);
514 e_util_library_path_restore();
515
516 if (!exe)
517 {
518 e_util_dialog_show(_("Run Error"),
519 _( "Enlightenment was unable to fork a child process:<br>"
520 "<br>"
521 "%s<br>"),
522 cmd);
523 }
524 }
525}
526
396/** End Button Callbacks **/ 527/** End Button Callbacks **/
397 528
398/** Start IMC FM2 Callbacks **/ 529/** Start IMC FM2 Callbacks **/
@@ -537,7 +668,11 @@ _e_imc_form_fill(E_Config_Dialog_Data *cfdata)
537 E_Input_Method_Config *imc; 668 E_Input_Method_Config *imc;
538 int imc_free; 669 int imc_free;
539 670
540 if (!cfdata->imc_current) return; 671 if (!cfdata->imc_current)
672 {
673 e_widget_disabled_set(cfdata->gui.imc_advanced_setup, 1);
674 return;
675 }
541 676
542 imc_free = 0; 677 imc_free = 0;
543 imc = evas_hash_find(cfdata->imc_change_map, cfdata->imc_current); 678 imc = evas_hash_find(cfdata->imc_change_map, cfdata->imc_current);
@@ -552,22 +687,27 @@ _e_imc_form_fill(E_Config_Dialog_Data *cfdata)
552 eet_close(imc_file); 687 eet_close(imc_file);
553 } 688 }
554 } 689 }
555 690
691 _e_imc_setup_button_toggle(cfdata->gui.imc_advanced_setup, imc);
692
556 if (imc) 693 if (imc)
557 { 694 {
558 e_widget_entry_text_set(cfdata->gui.e_im_name, imc->e_im_name); 695 e_widget_entry_text_set(cfdata->gui.e_im_name, imc->e_im_name);
559 e_widget_entry_text_set(cfdata->gui.e_im_exec, imc->e_im_exec); 696 e_widget_entry_text_set(cfdata->gui.e_im_exec, imc->e_im_exec);
697 e_widget_entry_text_set(cfdata->gui.e_im_setup_exec, imc->e_im_setup_exec);
560 e_widget_entry_text_set(cfdata->gui.gtk_im_module, imc->gtk_im_module); 698 e_widget_entry_text_set(cfdata->gui.gtk_im_module, imc->gtk_im_module);
561 e_widget_entry_text_set(cfdata->gui.qt_im_module, imc->qt_im_module); 699 e_widget_entry_text_set(cfdata->gui.qt_im_module, imc->qt_im_module);
562 e_widget_entry_text_set(cfdata->gui.xmodifiers, imc->xmodifiers); 700 e_widget_entry_text_set(cfdata->gui.xmodifiers, imc->xmodifiers);
563 701
564 e_widget_entry_readonly_set(cfdata->gui.e_im_name, cfdata->fmdir); 702 e_widget_entry_readonly_set(cfdata->gui.e_im_name, cfdata->fmdir);
565 e_widget_entry_readonly_set(cfdata->gui.e_im_exec, cfdata->fmdir); 703 e_widget_entry_readonly_set(cfdata->gui.e_im_exec, cfdata->fmdir);
704 e_widget_entry_readonly_set(cfdata->gui.e_im_setup_exec, cfdata->fmdir);
566 e_widget_entry_readonly_set(cfdata->gui.gtk_im_module, cfdata->fmdir); 705 e_widget_entry_readonly_set(cfdata->gui.gtk_im_module, cfdata->fmdir);
567 e_widget_entry_readonly_set(cfdata->gui.qt_im_module, cfdata->fmdir); 706 e_widget_entry_readonly_set(cfdata->gui.qt_im_module, cfdata->fmdir);
568 e_widget_entry_readonly_set(cfdata->gui.xmodifiers, cfdata->fmdir); 707 e_widget_entry_readonly_set(cfdata->gui.xmodifiers, cfdata->fmdir);
569 if (imc_free) e_intl_input_method_config_free(imc); 708 if (imc_free) e_intl_input_method_config_free(imc);
570 } 709 }
710 e_widget_check_checked_set(cfdata->gui.imc_advanced_disable, 0);
571 cfdata->imc.dirty = 0; 711 cfdata->imc.dirty = 0;
572} 712}
573 713
@@ -585,17 +725,18 @@ _e_imc_change_enqueue(E_Config_Dialog_Data *cfdata)
585 imc_update->version = E_INTL_INPUT_METHOD_CONFIG_VERSION; 725 imc_update->version = E_INTL_INPUT_METHOD_CONFIG_VERSION;
586 726
587 /* TODO: need to only add if the string is not empty */ 727 /* TODO: need to only add if the string is not empty */
588 imc_update->e_im_name = evas_stringshare_add(cfdata->imc.e_im_name); 728 imc_update->e_im_name = (char *) evas_stringshare_add(cfdata->imc.e_im_name);
589 imc_update->e_im_exec = evas_stringshare_add(cfdata->imc.e_im_exec); 729 imc_update->e_im_exec = (char *) evas_stringshare_add(cfdata->imc.e_im_exec);
590 imc_update->gtk_im_module = evas_stringshare_add(cfdata->imc.gtk_im_module); 730 imc_update->e_im_setup_exec = (char *) evas_stringshare_add(cfdata->imc.e_im_setup_exec);
591 imc_update->qt_im_module = evas_stringshare_add(cfdata->imc.qt_im_module); 731 imc_update->gtk_im_module = (char *) evas_stringshare_add(cfdata->imc.gtk_im_module);
592 imc_update->xmodifiers = evas_stringshare_add(cfdata->imc.xmodifiers); 732 imc_update->qt_im_module = (char *) evas_stringshare_add(cfdata->imc.qt_im_module);
733 imc_update->xmodifiers = (char *) evas_stringshare_add(cfdata->imc.xmodifiers);
593 734
594 /* look for changes to this file and remove them */ 735 /* look for changes to this file and remove them */
595 imc_update_old = evas_hash_find(cfdata->imc_change_map, cfdata->imc_current); 736 imc_update_old = evas_hash_find(cfdata->imc_change_map, cfdata->imc_current);
596 if (imc_update_old) 737 if (imc_update_old)
597 { 738 {
598 evas_hash_del(cfdata->imc_change_map, cfdata->imc_current, NULL); 739 cfdata->imc_change_map = evas_hash_del(cfdata->imc_change_map, cfdata->imc_current, NULL);
599 e_intl_input_method_config_free(imc_update_old); 740 e_intl_input_method_config_free(imc_update_old);
600 741
601 } 742 }
@@ -744,13 +885,24 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
744 e_widget_table_object_append(ot, ol, 0, 0, 1, 1, 1, 1, 1, 1); 885 e_widget_table_object_append(ot, ol, 0, 0, 1, 1, 1, 1, 1, 1);
745 886
746 of = e_widget_list_add(evas, 0, 0); 887 of = e_widget_list_add(evas, 0, 0);
888
889 /* Disable imc checkbox */
890 /* il( o[Check], ol( o[Button], o[Button] ) ) */
891 il = e_widget_list_add(evas, 0, 1);
892
893 o = e_widget_check_add(evas, _("Use No Input Method"), &(cfdata->imc_disable));
894 e_widget_on_change_hook_set(o, _e_imc_disable_change_cb, cfdata);
895 cfdata->gui.imc_advanced_disable = o;
896 e_widget_list_object_append(il, o, 1, 0, 0.5);
897
747 ol = e_widget_list_add(evas, 1, 1); 898 ol = e_widget_list_add(evas, 1, 1);
748 899
749 o = e_widget_button_add(evas, _("New"), "enlightenment/new", _cb_new, cfdata, NULL); 900 o = e_widget_button_add(evas, _("New"), "enlightenment/new", _cb_new, cfdata, NULL);
750 e_widget_list_object_append(ol, o, 1, 0, 0.5); 901 e_widget_list_object_append(ol, o, 1, 0, 0.5);
751 o = e_widget_button_add(evas, _("Import..."), "enlightenment/import", _cb_import, cfdata, NULL); 902 o = e_widget_button_add(evas, _("Import..."), "enlightenment/imc", _cb_import, cfdata, NULL);
752 e_widget_list_object_append(ol, o, 1, 0, 0.5); 903 e_widget_list_object_append(ol, o, 1, 0, 0.5);
753 e_widget_list_object_append(of, ol, 1, 0, 0.0); 904 e_widget_list_object_append(il, ol, 1, 0, 0.5);
905 e_widget_list_object_append(of, il, 1, 0, 0.0);
754 906
755 ol = e_widget_frametable_add(evas, _("Input Method Parameters"), 1); 907 ol = e_widget_frametable_add(evas, _("Input Method Parameters"), 1);
756 908
@@ -767,6 +919,13 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
767 e_widget_on_change_hook_set(o, _e_imc_entry_change_cb, cfdata); 919 e_widget_on_change_hook_set(o, _e_imc_entry_change_cb, cfdata);
768 cfdata->gui.e_im_exec = o; 920 cfdata->gui.e_im_exec = o;
769 e_widget_frametable_object_append(ol, o, 1, 1, 1, 1, 1, 1, 1, 1); 921 e_widget_frametable_object_append(ol, o, 1, 1, 1, 1, 1, 1, 1, 1);
922
923 o = e_widget_label_add(evas, _("Setup Command"));
924 e_widget_frametable_object_append(ol, o, 0, 2, 1, 1, 1, 1, 1, 1);
925 o = e_widget_entry_add(evas, &(cfdata->imc.e_im_setup_exec));
926 e_widget_on_change_hook_set(o, _e_imc_entry_change_cb, cfdata);
927 cfdata->gui.e_im_setup_exec = o;
928 e_widget_frametable_object_append(ol, o, 1, 2, 1, 1, 1, 1, 1, 1);
770 929
771 e_widget_list_object_append(of, ol, 0, 1, 0.5); 930 e_widget_list_object_append(of, ol, 0, 1, 0.5);
772 931
@@ -795,7 +954,13 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
795 954
796 e_widget_list_object_append(of, ol, 0, 1, 0.5); 955 e_widget_list_object_append(of, ol, 0, 1, 0.5);
797 e_widget_table_object_append(ot, of, 1, 0, 1, 1, 1, 1, 1, 1); 956 e_widget_table_object_append(ot, of, 1, 0, 1, 1, 1, 1, 1, 1);
798 e_dialog_resizable_set(cfd->dia, 1); 957
958 o = e_widget_button_add(evas, _("Setup Selected Input Method"), "widget/setup", _e_imc_adv_setup_cb, cfdata, NULL);
959 e_widget_table_object_append(ot, o, 0, 1, 1, 1, 1, 1, 1, 1);
960 cfdata->gui.imc_advanced_setup = o;
961
962 e_dialog_resizable_set(cfd->dia, 1);
963
799 _e_imc_form_fill(cfdata); 964 _e_imc_form_fill(cfdata);
800 return ot; 965 return ot;
801} 966}
diff --git a/src/bin/e_intl.c b/src/bin/e_intl.c
index 76f42d5b2..c41c33709 100644
--- a/src/bin/e_intl.c
+++ b/src/bin/e_intl.c
@@ -67,7 +67,7 @@ e_intl_init(void)
67 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, qt_im_module, STR); 67 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, qt_im_module, STR);
68 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, xmodifiers, STR); 68 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, xmodifiers, STR);
69 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, e_im_exec, STR); 69 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, e_im_exec, STR);
70 70 E_CONFIG_VAL(_e_intl_input_method_config_edd, E_Input_Method_Config, e_im_setup_exec, STR);
71 71
72 if ((s = getenv("LC_MESSAGES"))) _e_intl_orig_lc_messages = strdup(s); 72 if ((s = getenv("LC_MESSAGES"))) _e_intl_orig_lc_messages = strdup(s);
73 if ((s = getenv("LANGUAGE"))) _e_intl_orig_language = strdup(s); 73 if ((s = getenv("LANGUAGE"))) _e_intl_orig_language = strdup(s);
@@ -476,6 +476,7 @@ e_intl_input_method_config_free(E_Input_Method_Config *imc)
476 if (imc->qt_im_module) evas_stringshare_del(imc->qt_im_module); 476 if (imc->qt_im_module) evas_stringshare_del(imc->qt_im_module);
477 if (imc->xmodifiers) evas_stringshare_del(imc->xmodifiers); 477 if (imc->xmodifiers) evas_stringshare_del(imc->xmodifiers);
478 if (imc->e_im_exec) evas_stringshare_del(imc->e_im_exec); 478 if (imc->e_im_exec) evas_stringshare_del(imc->e_im_exec);
479 if (imc->e_im_setup_exec) evas_stringshare_del(imc->e_im_setup_exec);
479 E_FREE(imc); 480 E_FREE(imc);
480 } 481 }
481} 482}
diff --git a/src/bin/e_intl.h b/src/bin/e_intl.h
index 94c9b4b17..aa71f67a5 100644
--- a/src/bin/e_intl.h
+++ b/src/bin/e_intl.h
@@ -20,7 +20,7 @@ typedef struct _E_Locale_Parts E_Locale_Parts;
20#define E_INTL_H 20#define E_INTL_H
21 21
22#define E_INTL_LANGUAGE_PACK_VERSION 1 22#define E_INTL_LANGUAGE_PACK_VERSION 1
23#define E_INTL_INPUT_METHOD_CONFIG_VERSION 1 23#define E_INTL_INPUT_METHOD_CONFIG_VERSION 2
24 24
25#define E_INTL_LOC_CODESET 1 << 0 25#define E_INTL_LOC_CODESET 1 << 0
26#define E_INTL_LOC_REGION 1 << 1 26#define E_INTL_LOC_REGION 1 << 1
@@ -39,11 +39,12 @@ struct _E_Language_Pack
39struct _E_Input_Method_Config 39struct _E_Input_Method_Config
40{ 40{
41 int version; 41 int version;
42 const char *e_im_name; 42 char *e_im_name;
43 const char *gtk_im_module; 43 char *gtk_im_module;
44 const char *qt_im_module; 44 char *qt_im_module;
45 const char *xmodifiers; 45 char *xmodifiers;
46 const char *e_im_exec; 46 char *e_im_exec;
47 char *e_im_setup_exec;
47}; 48};
48 49
49struct _E_Locale_Parts 50struct _E_Locale_Parts