2006-11-30 08:35:56 -08:00
|
|
|
#include "e.h"
|
2012-11-30 06:38:34 -08:00
|
|
|
#include "e_mod_main.h"
|
2006-11-30 08:35:56 -08:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
typedef struct _E_Imc_Update_Data E_Imc_Update_Data;
|
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
static void *_create_data(E_Config_Dialog *cfd);
|
|
|
|
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
|
|
|
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
|
|
|
static int _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
|
|
|
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
|
|
|
static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
2006-11-30 08:35:56 -08:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
/* Basic Callbacks */
|
2012-06-13 23:55:01 -07:00
|
|
|
static int _basic_list_sort_cb(const void *d1, const void *d2);
|
|
|
|
static void _e_imc_list_change_cb(void *data, Evas_Object *obj);
|
|
|
|
static void _e_imc_setup_cb(void *data, void *data2);
|
2006-11-30 08:35:56 -08:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
/* Advanced Callbacks */
|
2012-06-13 23:55:01 -07:00
|
|
|
static void _cb_dir(void *data, Evas_Object *obj);
|
|
|
|
static void _cb_button_up(void *data1, void *data2);
|
|
|
|
static void _cb_new(void *data, void *data2);
|
2006-12-17 03:24:59 -08:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
static void _cb_files_changed(void *data, Evas_Object *obj, void *event_info);
|
2006-12-17 03:24:59 -08:00
|
|
|
static void _cb_files_selection_change(void *data, Evas_Object *obj, void *event_info);
|
2012-06-13 23:55:01 -07:00
|
|
|
static void _cb_files_files_changed(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
static void _cb_files_files_deleted(void *data, Evas_Object *obj, void *event_info);
|
|
|
|
static void _e_imc_adv_setup_cb(void *data, void *data2);
|
2006-12-17 03:24:59 -08:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
static void _e_imc_change_enqueue(E_Config_Dialog_Data *cfdata);
|
|
|
|
static void _e_imc_entry_change_cb(void *data, Evas_Object *obj);
|
|
|
|
static void _e_imc_form_fill(E_Config_Dialog_Data *cfdata);
|
|
|
|
static const char *_e_imc_file_name_new_get(void);
|
|
|
|
static Eina_Bool _change_hash_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__);
|
|
|
|
static Eina_Bool _change_hash_apply_cb(const Eina_Hash *hash __UNUSED__, const void *key, void *data, void *fdata __UNUSED__);
|
2006-12-17 03:24:59 -08:00
|
|
|
|
2006-11-30 08:35:56 -08:00
|
|
|
struct _E_Config_Dialog_Data
|
|
|
|
{
|
|
|
|
E_Config_Dialog *cfd;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
/* Maluable Widgets */
|
2012-06-13 23:55:01 -07:00
|
|
|
Evas_Object *o_personal;
|
|
|
|
Evas_Object *o_system;
|
|
|
|
Evas_Object *o_up_button;
|
|
|
|
Evas_Object *o_fm; /* File manager */
|
|
|
|
Evas_Object *o_frame; /* scrollpane for file manager*/
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
const char *imc_current;
|
|
|
|
Eina_Hash *imc_basic_map;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
int imc_disable; /* 0=enable, 1=disable */
|
|
|
|
int fmdir; /* 0=Local, 1=System*/
|
2006-12-17 03:24:59 -08:00
|
|
|
struct
|
2012-06-13 23:55:01 -07:00
|
|
|
{
|
|
|
|
int dirty;
|
|
|
|
char *e_im_name;
|
|
|
|
char *e_im_exec;
|
|
|
|
char *e_im_setup_exec;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
char *gtk_im_module;
|
|
|
|
char *qt_im_module;
|
|
|
|
char *xmodifiers;
|
|
|
|
} imc;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2008-12-17 07:33:43 -08:00
|
|
|
Eina_Hash *imc_change_map;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-11-30 08:35:56 -08:00
|
|
|
struct
|
2012-06-13 23:55:01 -07:00
|
|
|
{
|
|
|
|
Evas_Object *imc_basic_list;
|
|
|
|
Evas_Object *imc_basic_disable;
|
|
|
|
Evas_Object *imc_basic_setup;
|
|
|
|
|
|
|
|
Evas_Object *imc_advanced_disable;
|
|
|
|
Evas_Object *imc_advanced_setup;
|
|
|
|
|
|
|
|
Evas_Object *e_im_name;
|
|
|
|
Evas_Object *e_im_exec;
|
|
|
|
Evas_Object *e_im_setup_exec;
|
|
|
|
Evas_Object *gtk_im_module;
|
|
|
|
Evas_Object *qt_im_module;
|
|
|
|
Evas_Object *xmodifiers;
|
|
|
|
} gui;
|
2006-12-17 03:24:59 -08:00
|
|
|
|
|
|
|
E_Win *win_import;
|
2006-11-30 08:35:56 -08:00
|
|
|
};
|
|
|
|
|
2010-01-22 12:28:39 -08:00
|
|
|
E_Config_Dialog *
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
e_int_config_imc(E_Comp *comp, const char *params __UNUSED__)
|
2006-11-30 08:35:56 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog *cfd;
|
|
|
|
E_Config_Dialog_View *v;
|
|
|
|
|
2009-12-04 14:37:18 -08:00
|
|
|
if (e_config_dialog_find("E", "language/input_method_settings")) return NULL;
|
2006-11-30 08:35:56 -08:00
|
|
|
v = E_NEW(E_Config_Dialog_View, 1);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2009-12-02 20:22:29 -08:00
|
|
|
v->create_cfdata = _create_data;
|
|
|
|
v->free_cfdata = _free_data;
|
2006-12-17 03:24:59 -08:00
|
|
|
v->advanced.create_widgets = _advanced_create_widgets;
|
2009-12-02 20:22:29 -08:00
|
|
|
v->advanced.apply_cfdata = _advanced_apply_data;
|
|
|
|
v->basic.create_widgets = _basic_create_widgets;
|
2012-06-13 23:55:01 -07:00
|
|
|
v->basic.apply_cfdata = _basic_apply_data;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
cfd = e_config_dialog_new(comp,
|
2012-06-13 23:55:01 -07:00
|
|
|
_("Input Method Settings"),
|
|
|
|
"E", "language/input_method_settings",
|
|
|
|
"preferences-imc", 0, v, NULL);
|
2006-11-30 08:35:56 -08:00
|
|
|
return cfd;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_fill_data(E_Config_Dialog_Data *cfdata)
|
|
|
|
{
|
2013-02-18 00:05:59 -08:00
|
|
|
cfdata->imc_current = eina_stringshare_ref(e_config->input_method);
|
2006-12-17 03:24:59 -08:00
|
|
|
|
|
|
|
if (cfdata->imc_current)
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
const char *path;
|
2006-12-17 03:24:59 -08:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
path = e_intl_imc_system_path_get();
|
|
|
|
if (!strncmp(cfdata->imc_current, path, strlen(path)))
|
|
|
|
cfdata->fmdir = 1;
|
2007-01-05 13:27:23 -08:00
|
|
|
}
|
2013-02-18 00:05:59 -08:00
|
|
|
cfdata->imc_disable = !cfdata->imc_current;
|
2006-11-30 08:35:56 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void *
|
|
|
|
_create_data(E_Config_Dialog *cfd)
|
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
|
|
|
|
|
|
|
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
|
|
|
cfdata->cfd = cfd;
|
|
|
|
_fill_data(cfdata);
|
|
|
|
return cfdata;
|
|
|
|
}
|
|
|
|
|
2008-12-17 07:33:43 -08:00
|
|
|
static Eina_Bool
|
|
|
|
_change_hash_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
|
|
|
E_Input_Method_Config *imc;
|
|
|
|
|
|
|
|
imc = data;
|
|
|
|
e_intl_input_method_config_free(imc);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2006-11-30 08:35:56 -08:00
|
|
|
static void
|
2010-08-19 10:38:40 -07:00
|
|
|
_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
2006-11-30 08:35:56 -08:00
|
|
|
{
|
2008-09-23 22:58:55 -07:00
|
|
|
if (cfdata->win_import)
|
|
|
|
e_int_config_imc_import_del(cfdata->win_import);
|
2009-03-11 08:13:42 -07:00
|
|
|
eina_stringshare_del(cfdata->imc_current);
|
2007-01-26 21:30:33 -08:00
|
|
|
|
|
|
|
if (cfdata->imc_basic_map)
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
eina_hash_foreach(cfdata->imc_basic_map, _change_hash_free_cb, NULL);
|
|
|
|
eina_hash_free(cfdata->imc_basic_map);
|
2007-01-26 21:30:33 -08:00
|
|
|
}
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
if (cfdata->imc_change_map)
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
eina_hash_foreach(cfdata->imc_change_map, _change_hash_free_cb, NULL);
|
|
|
|
eina_hash_free(cfdata->imc_change_map);
|
2006-11-30 09:20:36 -08:00
|
|
|
}
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata->imc_change_map = NULL;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
E_FREE(cfdata->imc.e_im_name);
|
|
|
|
E_FREE(cfdata->imc.e_im_exec);
|
2007-01-26 21:30:33 -08:00
|
|
|
E_FREE(cfdata->imc.e_im_setup_exec);
|
2006-12-17 03:24:59 -08:00
|
|
|
E_FREE(cfdata->imc.gtk_im_module);
|
|
|
|
E_FREE(cfdata->imc.qt_im_module);
|
|
|
|
E_FREE(cfdata->imc.xmodifiers);
|
2007-01-15 09:43:19 -08:00
|
|
|
E_FREE(cfdata);
|
2008-09-23 22:58:55 -07:00
|
|
|
}
|
2006-12-17 03:24:59 -08:00
|
|
|
|
|
|
|
/*** Start Basic Dialog Logic ***/
|
2006-11-30 08:35:56 -08:00
|
|
|
static int
|
2010-08-19 10:38:40 -07:00
|
|
|
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
2008-09-23 22:58:55 -07:00
|
|
|
{
|
2013-02-18 00:05:59 -08:00
|
|
|
eina_stringshare_replace(&e_config->input_method, NULL);
|
|
|
|
if (!cfdata->imc_disable)
|
|
|
|
e_config->input_method = eina_stringshare_ref(cfdata->imc_current);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2013-02-18 00:05:59 -08:00
|
|
|
e_intl_input_method_set(e_config->input_method);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-11-30 08:35:56 -08:00
|
|
|
e_config_save_queue();
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
2008-10-27 03:46:43 -07:00
|
|
|
_basic_list_sort_cb(const void *d1, const void *d2)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
|
|
|
if (!d1) return 1;
|
|
|
|
if (!d2) return -1;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
return strcmp((const char *)d1, (const char *)d2);
|
2006-11-30 08:35:56 -08:00
|
|
|
}
|
|
|
|
|
2007-01-26 21:30:33 -08:00
|
|
|
void
|
|
|
|
_e_imc_setup_button_toggle(Evas_Object *button, E_Input_Method_Config *imc)
|
2008-09-23 22:58:55 -07:00
|
|
|
{
|
|
|
|
if (imc)
|
2007-01-26 21:30:33 -08:00
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
int flag;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
flag = (!imc->e_im_setup_exec) || (!imc->e_im_setup_exec[0]);
|
|
|
|
e_widget_disabled_set(button, flag);
|
2008-09-23 22:58:55 -07:00
|
|
|
}
|
2007-01-26 21:30:33 -08:00
|
|
|
else
|
2007-03-24 12:18:20 -07:00
|
|
|
e_widget_disabled_set(button, 1);
|
2007-01-26 21:30:33 -08:00
|
|
|
}
|
|
|
|
|
2007-01-05 13:27:23 -08:00
|
|
|
static void
|
2010-08-19 10:38:40 -07:00
|
|
|
_e_imc_list_change_cb(void *data, Evas_Object *obj __UNUSED__)
|
2007-01-05 13:27:23 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2007-01-26 21:30:33 -08:00
|
|
|
E_Input_Method_Config *imc;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2007-01-05 13:27:23 -08:00
|
|
|
cfdata = data;
|
|
|
|
e_widget_check_checked_set(cfdata->gui.imc_basic_disable, 0);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2007-01-26 21:30:33 -08:00
|
|
|
if (cfdata->imc_current)
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
imc = eina_hash_find(cfdata->imc_basic_map, cfdata->imc_current);
|
|
|
|
_e_imc_setup_button_toggle(cfdata->gui.imc_basic_setup, imc);
|
2007-01-26 21:30:33 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-06-14 03:23:50 -07:00
|
|
|
static void
|
|
|
|
_e_imc_imc_toggle(void *data, Evas_Object *obj __UNUSED__)
|
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
|
|
|
|
|
|
|
cfdata = data;
|
2014-08-21 11:07:40 -07:00
|
|
|
|
2012-06-14 03:23:50 -07:00
|
|
|
if (cfdata->imc_disable)
|
2014-08-21 11:07:40 -07:00
|
|
|
{
|
|
|
|
e_widget_ilist_unselect(cfdata->gui.imc_basic_list);
|
|
|
|
e_widget_disabled_set(cfdata->gui.imc_basic_list, 1);
|
|
|
|
e_widget_disabled_set(cfdata->gui.imc_basic_setup, 1);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
e_widget_disabled_set(cfdata->gui.imc_basic_list, 0);
|
|
|
|
e_widget_disabled_set(cfdata->gui.imc_basic_setup, 0);
|
|
|
|
}
|
2012-06-14 03:23:50 -07:00
|
|
|
}
|
|
|
|
|
2007-01-26 21:30:33 -08:00
|
|
|
static void
|
2010-08-19 10:38:40 -07:00
|
|
|
_e_imc_setup_cb(void *data, void *data2 __UNUSED__)
|
2007-01-26 21:30:33 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
|
|
|
cfdata = data;
|
2007-01-26 21:30:33 -08:00
|
|
|
if (cfdata->imc_current && cfdata->imc_basic_map)
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
E_Input_Method_Config *imc;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
imc = eina_hash_find(cfdata->imc_basic_map, cfdata->imc_current);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
if ((imc) && (imc->e_im_setup_exec))
|
|
|
|
{
|
|
|
|
Ecore_Exe *exe;
|
|
|
|
const char *cmd;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
cmd = imc->e_im_setup_exec;
|
2007-01-26 21:30:33 -08:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
exe = ecore_exe_run(cmd, NULL);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
if (!exe)
|
|
|
|
{
|
|
|
|
e_util_dialog_show(_("Run Error"),
|
|
|
|
_("Enlightenment was unable to fork a child process:<br>"
|
|
|
|
"<br>%s<br>"),
|
|
|
|
cmd);
|
|
|
|
}
|
|
|
|
}
|
2008-09-23 22:58:55 -07:00
|
|
|
}
|
2007-01-05 13:27:23 -08:00
|
|
|
}
|
|
|
|
|
2006-11-30 08:35:56 -08:00
|
|
|
static Evas_Object *
|
2012-12-03 01:24:12 -08:00
|
|
|
_basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata)
|
2006-11-30 08:35:56 -08:00
|
|
|
{
|
|
|
|
Evas_Object *o, *of, *ob;
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *imc_basic_list;
|
2010-05-05 09:42:16 -07:00
|
|
|
int i;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-11-30 08:35:56 -08:00
|
|
|
o = e_widget_list_add(evas, 0, 0);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2007-04-17 03:38:55 -07:00
|
|
|
of = e_widget_frametable_add(evas, _("Input Method Selector"), 0);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2007-01-26 21:30:33 -08:00
|
|
|
/* Disable imc checkbox */
|
2012-06-13 23:55:01 -07:00
|
|
|
ob = e_widget_check_add(evas, _("Use No Input Method"),
|
|
|
|
&(cfdata->imc_disable));
|
2012-06-14 03:23:50 -07:00
|
|
|
e_widget_on_change_hook_set(ob, _e_imc_imc_toggle, cfdata);
|
2008-09-23 22:58:55 -07:00
|
|
|
cfdata->gui.imc_basic_disable = ob;
|
2007-04-17 03:38:55 -07:00
|
|
|
e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 0, 1, 0);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2007-01-26 21:30:33 -08:00
|
|
|
/* Configure imc button */
|
2012-06-13 23:55:01 -07:00
|
|
|
ob = e_widget_button_add(evas, _("Setup Selected Input Method"),
|
|
|
|
"configure", _e_imc_setup_cb, cfdata, NULL);
|
2007-01-26 21:30:33 -08:00
|
|
|
cfdata->gui.imc_basic_setup = ob;
|
2007-04-17 03:38:55 -07:00
|
|
|
e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 1, 1, 0);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
|
|
|
/* Input method List */
|
2006-11-30 08:35:56 -08:00
|
|
|
ob = e_widget_ilist_add(evas, 16, 16, &(cfdata->imc_current));
|
2007-01-05 13:27:23 -08:00
|
|
|
e_widget_on_change_hook_set(ob, _e_imc_list_change_cb, cfdata);
|
2009-09-01 06:34:42 -07:00
|
|
|
e_widget_size_min_set(ob, 175, 175);
|
2006-11-30 08:35:56 -08:00
|
|
|
cfdata->gui.imc_basic_list = ob;
|
2013-02-18 00:05:59 -08:00
|
|
|
_e_imc_imc_toggle(cfdata, NULL);
|
2006-11-30 08:35:56 -08:00
|
|
|
|
|
|
|
evas_event_freeze(evas_object_evas_get(ob));
|
|
|
|
edje_freeze();
|
|
|
|
e_widget_ilist_freeze(ob);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
imc_basic_list = e_intl_input_method_list();
|
2008-09-23 22:58:55 -07:00
|
|
|
/* Sort basic input method list */
|
2008-10-22 04:49:33 -07:00
|
|
|
imc_basic_list = eina_list_sort(imc_basic_list,
|
2012-06-13 23:55:01 -07:00
|
|
|
eina_list_count(imc_basic_list),
|
|
|
|
_basic_list_sort_cb);
|
2006-12-17 03:24:59 -08:00
|
|
|
|
2007-01-26 21:30:33 -08:00
|
|
|
if (cfdata->imc_basic_map)
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
eina_hash_foreach(cfdata->imc_basic_map, _change_hash_free_cb, NULL);
|
|
|
|
eina_hash_free(cfdata->imc_basic_map);
|
|
|
|
cfdata->imc_basic_map = NULL;
|
2007-01-26 21:30:33 -08:00
|
|
|
}
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-11-30 08:35:56 -08:00
|
|
|
i = 0;
|
2008-09-23 22:58:55 -07:00
|
|
|
while (imc_basic_list)
|
2006-11-30 08:35:56 -08:00
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
E_Input_Method_Config *imc;
|
|
|
|
Eet_File *imc_ef;
|
|
|
|
char *imc_path;
|
|
|
|
|
|
|
|
imc_path = imc_basic_list->data;
|
|
|
|
imc_ef = eet_open(imc_path, EET_FILE_MODE_READ);
|
|
|
|
if (imc_ef)
|
|
|
|
{
|
|
|
|
imc = e_intl_input_method_config_read(imc_ef);
|
|
|
|
eet_close(imc_ef);
|
|
|
|
|
|
|
|
if ((imc) && (imc->e_im_name))
|
|
|
|
{
|
|
|
|
Evas_Object *icon = NULL;
|
|
|
|
|
|
|
|
if (imc->e_im_setup_exec)
|
|
|
|
{
|
|
|
|
Efreet_Desktop *desktop;
|
|
|
|
|
|
|
|
desktop = efreet_util_desktop_exec_find(imc->e_im_setup_exec);
|
|
|
|
if (desktop)
|
|
|
|
{
|
|
|
|
icon = e_util_desktop_icon_add(desktop, 48, evas);
|
|
|
|
efreet_desktop_free(desktop);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
e_widget_ilist_append(cfdata->gui.imc_basic_list, icon, imc->e_im_name, NULL, NULL, imc_path);
|
|
|
|
if ((cfdata->imc_current) &&
|
|
|
|
(!strncmp(imc_path, cfdata->imc_current,
|
|
|
|
eina_stringshare_strlen(cfdata->imc_current))))
|
|
|
|
e_widget_ilist_selected_set(cfdata->gui.imc_basic_list, i);
|
|
|
|
i++;
|
|
|
|
|
|
|
|
if (!cfdata->imc_basic_map)
|
|
|
|
cfdata->imc_basic_map = eina_hash_string_superfast_new(NULL);
|
|
|
|
eina_hash_add(cfdata->imc_basic_map, imc_path, imc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
free(imc_path);
|
|
|
|
imc_basic_list = eina_list_remove_list(imc_basic_list, imc_basic_list);
|
2006-11-30 08:35:56 -08:00
|
|
|
}
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-14 03:09:22 -07:00
|
|
|
if (cfdata->imc_current)
|
|
|
|
_e_imc_setup_button_toggle(cfdata->gui.imc_basic_setup,
|
|
|
|
eina_hash_find(cfdata->imc_basic_map,
|
|
|
|
cfdata->imc_current));
|
2007-01-26 21:30:33 -08:00
|
|
|
|
2006-11-30 08:35:56 -08:00
|
|
|
e_widget_ilist_go(ob);
|
|
|
|
e_widget_ilist_thaw(ob);
|
|
|
|
edje_thaw();
|
|
|
|
evas_event_thaw(evas_object_evas_get(ob));
|
|
|
|
|
2007-04-17 03:38:55 -07:00
|
|
|
e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 1);
|
2008-09-23 22:58:55 -07:00
|
|
|
e_widget_framelist_content_align_set(of, 0.0, 0.0);
|
2006-11-30 08:35:56 -08:00
|
|
|
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
|
|
|
return o;
|
|
|
|
}
|
2012-06-13 23:55:01 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
/*** End Basic Dialog Logic ***/
|
|
|
|
|
|
|
|
/*** Start Advanced Dialog Logic ***/
|
2008-12-17 07:33:43 -08:00
|
|
|
static Eina_Bool
|
|
|
|
_change_hash_apply_cb(const Eina_Hash *hash __UNUSED__, const void *key, void *data, void *fdata __UNUSED__)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
|
|
|
E_Input_Method_Config *imc;
|
|
|
|
Eet_File *ef;
|
|
|
|
|
2008-09-23 22:58:55 -07:00
|
|
|
imc = data;
|
2007-01-26 21:30:33 -08:00
|
|
|
|
|
|
|
if (ecore_file_exists(key))
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
ef = eet_open(key, EET_FILE_MODE_WRITE);
|
|
|
|
if (ef)
|
|
|
|
{
|
|
|
|
e_intl_input_method_config_write(ef, imc);
|
|
|
|
eet_close(ef);
|
|
|
|
}
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
e_intl_input_method_config_free(imc);
|
2007-01-26 21:30:33 -08:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2006-11-30 08:35:56 -08:00
|
|
|
static int
|
2006-12-17 03:24:59 -08:00
|
|
|
_advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
2008-09-23 22:58:55 -07:00
|
|
|
{
|
2007-01-26 21:30:33 -08:00
|
|
|
/* inherit basic apply functionality */
|
|
|
|
_basic_apply_data(cfd, cfdata);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2007-01-26 21:30:33 -08:00
|
|
|
/* Save all file changes */
|
2008-09-23 22:58:55 -07:00
|
|
|
if (cfdata->imc_current)
|
2007-01-07 15:23:44 -08:00
|
|
|
_e_imc_change_enqueue(cfdata);
|
2006-12-17 03:24:59 -08:00
|
|
|
|
|
|
|
if (cfdata->imc_change_map)
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
eina_hash_foreach(cfdata->imc_change_map, _change_hash_apply_cb, NULL);
|
|
|
|
eina_hash_free(cfdata->imc_change_map);
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
|
|
|
cfdata->imc_change_map = NULL;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Start Button Callbacks **/
|
|
|
|
|
|
|
|
/* Radio Toggled */
|
|
|
|
static void
|
2010-08-19 10:38:40 -07:00
|
|
|
_cb_dir(void *data, Evas_Object *obj __UNUSED__)
|
2006-11-30 08:35:56 -08:00
|
|
|
{
|
2006-12-17 03:24:59 -08:00
|
|
|
E_Config_Dialog_Data *cfdata;
|
|
|
|
const char *path;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata = data;
|
|
|
|
if (cfdata->fmdir == 1)
|
2007-01-07 15:23:44 -08:00
|
|
|
path = e_intl_imc_system_path_get();
|
2006-12-17 03:24:59 -08:00
|
|
|
else
|
2007-01-07 15:23:44 -08:00
|
|
|
path = e_intl_imc_personal_path_get();
|
2006-12-17 03:24:59 -08:00
|
|
|
e_fm2_path_set(cfdata->o_fm, path, "/");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Directory Navigator */
|
|
|
|
static void
|
2010-08-19 10:38:40 -07:00
|
|
|
_cb_button_up(void *data, void *data2 __UNUSED__)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata = data;
|
|
|
|
if (cfdata->o_fm)
|
|
|
|
e_fm2_parent_go(cfdata->o_fm);
|
|
|
|
if (cfdata->o_frame)
|
|
|
|
e_widget_scrollframe_child_pos_set(cfdata->o_frame, 0, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Entry chagned */
|
|
|
|
static void
|
2010-08-19 10:38:40 -07:00
|
|
|
_e_imc_entry_change_cb(void *data, Evas_Object *obj __UNUSED__)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata = data;
|
|
|
|
cfdata->imc.dirty = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Creating a new IMC */
|
2008-09-23 22:58:55 -07:00
|
|
|
static void
|
2010-08-19 10:38:40 -07:00
|
|
|
_cb_new(void *data, void *data2 __UNUSED__)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
|
|
|
E_Input_Method_Config *imc_new;
|
|
|
|
Eet_File *ef;
|
|
|
|
const char *file;
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata = data;
|
|
|
|
imc_new = E_NEW(E_Input_Method_Config, 1);
|
|
|
|
imc_new->version = E_INTL_INPUT_METHOD_CONFIG_VERSION;
|
|
|
|
|
|
|
|
file = _e_imc_file_name_new_get();
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
if (file)
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
ef = eet_open(file, EET_FILE_MODE_WRITE);
|
|
|
|
if (ef)
|
|
|
|
{
|
|
|
|
e_intl_input_method_config_write(ef, imc_new);
|
|
|
|
eet_close(ef);
|
|
|
|
e_int_config_imc_update(cfdata->cfd, file);
|
|
|
|
}
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
|
|
|
free(imc_new);
|
|
|
|
}
|
2007-01-26 21:30:33 -08:00
|
|
|
|
|
|
|
static void
|
2010-08-19 10:38:40 -07:00
|
|
|
_e_imc_adv_setup_cb(void *data, void *data2 __UNUSED__)
|
2007-01-26 21:30:33 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
|
|
|
cfdata = data;
|
2007-01-26 21:30:33 -08:00
|
|
|
if (cfdata->imc.e_im_setup_exec)
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
Ecore_Exe *exe;
|
|
|
|
char *cmd;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
cmd = cfdata->imc.e_im_setup_exec;
|
2007-01-26 21:30:33 -08:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
exe = ecore_exe_run(cmd, NULL);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
if (!exe)
|
|
|
|
{
|
|
|
|
e_util_dialog_show(_("Run Error"),
|
|
|
|
_("Enlightenment was unable to fork a child process:<br>"
|
|
|
|
"<br>%s<br>"), cmd);
|
|
|
|
}
|
2008-09-23 22:58:55 -07:00
|
|
|
}
|
2007-01-26 21:30:33 -08:00
|
|
|
}
|
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
/** End Button Callbacks **/
|
|
|
|
|
|
|
|
/** Start IMC FM2 Callbacks **/
|
|
|
|
static void
|
2010-08-19 10:38:40 -07:00
|
|
|
_cb_files_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata = data;
|
|
|
|
if (!cfdata->o_fm) return;
|
|
|
|
if (!e_fm2_has_parent_get(cfdata->o_fm))
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
if (cfdata->o_up_button)
|
|
|
|
e_widget_disabled_set(cfdata->o_up_button, 1);
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
if (cfdata->o_up_button)
|
|
|
|
e_widget_disabled_set(cfdata->o_up_button, 0);
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
|
|
|
if (cfdata->o_frame)
|
|
|
|
e_widget_scrollframe_child_pos_set(cfdata->o_frame, 0, 0);
|
|
|
|
}
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
static void
|
2010-08-19 10:38:40 -07:00
|
|
|
_cb_files_selection_change(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *selected;
|
2006-12-17 03:24:59 -08:00
|
|
|
E_Fm2_Icon_Info *ici;
|
2012-05-04 02:38:52 -07:00
|
|
|
const char *real_path;
|
2010-05-05 09:42:16 -07:00
|
|
|
char buf[PATH_MAX];
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata = data;
|
|
|
|
if (!cfdata->o_fm) return;
|
2010-05-05 09:42:16 -07:00
|
|
|
if (!(selected = e_fm2_selected_list_get(cfdata->o_fm))) return;
|
2006-12-17 03:24:59 -08:00
|
|
|
|
2008-09-23 22:58:55 -07:00
|
|
|
if (cfdata->imc_current)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
_e_imc_change_enqueue(cfdata);
|
|
|
|
eina_stringshare_del(cfdata->imc_current);
|
|
|
|
cfdata->imc_current = NULL;
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
ici = selected->data;
|
2012-05-04 02:38:52 -07:00
|
|
|
real_path = e_fm2_real_path_get(cfdata->o_fm);
|
|
|
|
if (!strcmp(real_path, "/"))
|
2006-12-17 03:24:59 -08:00
|
|
|
snprintf(buf, sizeof(buf), "/%s", ici->file);
|
|
|
|
else
|
2012-05-04 02:38:52 -07:00
|
|
|
snprintf(buf, sizeof(buf), "%s/%s", real_path, ici->file);
|
2008-10-22 04:49:33 -07:00
|
|
|
eina_list_free(selected);
|
2006-12-17 03:24:59 -08:00
|
|
|
if (ecore_file_is_dir(buf)) return;
|
2009-03-11 08:13:42 -07:00
|
|
|
cfdata->imc_current = eina_stringshare_add(buf);
|
2006-12-17 03:24:59 -08:00
|
|
|
_e_imc_form_fill(cfdata);
|
|
|
|
if (cfdata->o_frame)
|
|
|
|
e_widget_change(cfdata->o_frame);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2010-08-19 10:38:40 -07:00
|
|
|
_cb_files_files_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
|
|
|
const char *buf;
|
|
|
|
const char *p;
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata = data;
|
|
|
|
if (!cfdata->imc_current) return;
|
|
|
|
if (!cfdata->o_fm) return;
|
|
|
|
p = e_fm2_real_path_get(cfdata->o_fm);
|
|
|
|
if (p)
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
if (strncmp(p, cfdata->imc_current, strlen(p))) return;
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
buf = e_intl_imc_personal_path_get();
|
|
|
|
if (!strncmp(cfdata->imc_current, buf, strlen(buf)))
|
|
|
|
p = cfdata->imc_current + strlen(buf) + 1;
|
|
|
|
else
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
buf = e_intl_imc_system_path_get();
|
|
|
|
if (!strncmp(cfdata->imc_current, buf, strlen(buf)))
|
|
|
|
p = cfdata->imc_current + strlen(buf) + 1;
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
|
|
|
if (!p) return;
|
|
|
|
e_fm2_select_set(cfdata->o_fm, p, 1);
|
|
|
|
e_fm2_file_show(cfdata->o_fm, p);
|
2006-11-30 08:35:56 -08:00
|
|
|
}
|
2006-12-17 03:24:59 -08:00
|
|
|
|
|
|
|
static void
|
2010-08-19 10:38:40 -07:00
|
|
|
_cb_files_files_deleted(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *sel, *all, *n;
|
2006-12-17 03:24:59 -08:00
|
|
|
E_Fm2_Icon_Info *ici, *ic;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata = data;
|
|
|
|
if (!cfdata->imc_current) return;
|
|
|
|
if (!cfdata->o_fm) return;
|
|
|
|
|
2010-05-05 09:42:16 -07:00
|
|
|
if (!(all = e_fm2_all_list_get(cfdata->o_fm))) return;
|
|
|
|
if (!(sel = e_fm2_selected_list_get(cfdata->o_fm))) return;
|
2006-12-17 03:24:59 -08:00
|
|
|
|
|
|
|
ici = sel->data;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2008-10-22 04:49:33 -07:00
|
|
|
all = eina_list_data_find_list(all, ici);
|
|
|
|
n = eina_list_next(all);
|
2008-09-23 22:58:55 -07:00
|
|
|
if (!n)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
n = eina_list_prev(all);
|
|
|
|
if (!n) return;
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
ic = n->data;
|
|
|
|
if (!ic) return;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
e_fm2_select_set(cfdata->o_fm, ic->file, 1);
|
|
|
|
e_fm2_file_show(cfdata->o_fm, ic->file);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2008-10-22 04:49:33 -07:00
|
|
|
eina_list_free(n);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
evas_object_smart_callback_call(cfdata->o_fm, "selection_change", cfdata);
|
|
|
|
}
|
2012-06-13 23:55:01 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
/** End IMC FM2 Callbacks **/
|
|
|
|
|
|
|
|
/** Start IMC Utility Functions **/
|
|
|
|
/* When updating the selection call this to fill in the form */
|
|
|
|
static void
|
|
|
|
_e_imc_form_fill(E_Config_Dialog_Data *cfdata)
|
|
|
|
{
|
|
|
|
Eet_File *imc_file;
|
|
|
|
E_Input_Method_Config *imc;
|
|
|
|
int imc_free;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
|
|
|
if (!cfdata->imc_current)
|
2007-01-26 21:30:33 -08:00
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
e_widget_disabled_set(cfdata->gui.imc_advanced_setup, 1);
|
|
|
|
return;
|
2007-01-26 21:30:33 -08:00
|
|
|
}
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
imc_free = 0;
|
2008-12-17 07:33:43 -08:00
|
|
|
imc = eina_hash_find(cfdata->imc_change_map, cfdata->imc_current);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
if (!imc)
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
imc_free = 1;
|
|
|
|
imc_file = eet_open(cfdata->imc_current, EET_FILE_MODE_READ);
|
|
|
|
if (imc_file)
|
|
|
|
{
|
|
|
|
imc = e_intl_input_method_config_read(imc_file);
|
|
|
|
eet_close(imc_file);
|
|
|
|
}
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2007-01-26 21:30:33 -08:00
|
|
|
_e_imc_setup_button_toggle(cfdata->gui.imc_advanced_setup, imc);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
if (imc)
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
e_widget_entry_text_set(cfdata->gui.e_im_name, imc->e_im_name);
|
|
|
|
e_widget_entry_text_set(cfdata->gui.e_im_exec, imc->e_im_exec);
|
|
|
|
e_widget_entry_text_set(cfdata->gui.e_im_setup_exec, imc->e_im_setup_exec);
|
|
|
|
e_widget_entry_text_set(cfdata->gui.gtk_im_module, imc->gtk_im_module);
|
|
|
|
e_widget_entry_text_set(cfdata->gui.qt_im_module, imc->qt_im_module);
|
|
|
|
e_widget_entry_text_set(cfdata->gui.xmodifiers, imc->xmodifiers);
|
|
|
|
|
|
|
|
e_widget_entry_readonly_set(cfdata->gui.e_im_name, cfdata->fmdir);
|
|
|
|
e_widget_entry_readonly_set(cfdata->gui.e_im_exec, cfdata->fmdir);
|
|
|
|
e_widget_entry_readonly_set(cfdata->gui.e_im_setup_exec, cfdata->fmdir);
|
|
|
|
e_widget_entry_readonly_set(cfdata->gui.gtk_im_module, cfdata->fmdir);
|
|
|
|
e_widget_entry_readonly_set(cfdata->gui.qt_im_module, cfdata->fmdir);
|
|
|
|
e_widget_entry_readonly_set(cfdata->gui.xmodifiers, cfdata->fmdir);
|
|
|
|
if (imc_free) e_intl_input_method_config_free(imc);
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
2007-01-26 21:30:33 -08:00
|
|
|
e_widget_check_checked_set(cfdata->gui.imc_advanced_disable, 0);
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata->imc.dirty = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Remember changes in memory until we click apply */
|
|
|
|
static void
|
|
|
|
_e_imc_change_enqueue(E_Config_Dialog_Data *cfdata)
|
|
|
|
{
|
|
|
|
if (cfdata->imc.dirty)
|
2008-09-23 22:58:55 -07:00
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
E_Input_Method_Config *imc_update;
|
|
|
|
E_Input_Method_Config *imc_update_old;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
imc_update = E_NEW(E_Input_Method_Config, 1);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
imc_update->version = E_INTL_INPUT_METHOD_CONFIG_VERSION;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
/* TODO: need to only add if the string is not empty */
|
|
|
|
imc_update->e_im_name = eina_stringshare_add(cfdata->imc.e_im_name);
|
|
|
|
imc_update->e_im_exec = eina_stringshare_add(cfdata->imc.e_im_exec);
|
|
|
|
imc_update->e_im_setup_exec = eina_stringshare_add(cfdata->imc.e_im_setup_exec);
|
|
|
|
imc_update->gtk_im_module = eina_stringshare_add(cfdata->imc.gtk_im_module);
|
2008-10-15 08:12:56 -07:00
|
|
|
imc_update->qt_im_module = eina_stringshare_add(cfdata->imc.qt_im_module);
|
|
|
|
imc_update->xmodifiers = eina_stringshare_add(cfdata->imc.xmodifiers);
|
2006-12-17 03:24:59 -08:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
/* look for changes to this file and remove them */
|
|
|
|
imc_update_old = eina_hash_find(cfdata->imc_change_map, cfdata->imc_current);
|
|
|
|
if (imc_update_old)
|
|
|
|
{
|
|
|
|
eina_hash_del(cfdata->imc_change_map, cfdata->imc_current, NULL);
|
|
|
|
e_intl_input_method_config_free(imc_update_old);
|
|
|
|
}
|
|
|
|
if (!cfdata->imc_change_map)
|
|
|
|
cfdata->imc_change_map = eina_hash_string_superfast_new(NULL);
|
|
|
|
eina_hash_add(cfdata->imc_change_map, cfdata->imc_current, imc_update);
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Get a new filename, and create the new file */
|
2012-06-13 23:55:01 -07:00
|
|
|
static const char *
|
2006-12-17 03:24:59 -08:00
|
|
|
_e_imc_file_name_new_get(void)
|
|
|
|
{
|
2010-05-05 09:42:16 -07:00
|
|
|
char path[PATH_MAX];
|
2006-12-17 03:24:59 -08:00
|
|
|
int i;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
for (i = 0; i < 32; i++)
|
|
|
|
{
|
2012-06-13 23:55:01 -07:00
|
|
|
snprintf(path, sizeof(path), "%s/new_input_method-%02d.imc",
|
|
|
|
e_intl_imc_personal_path_get(), i);
|
|
|
|
if (!ecore_file_exists(path))
|
|
|
|
return eina_stringshare_add(path);
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
return NULL;
|
|
|
|
}
|
2012-06-13 23:55:01 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
/** End IMC Utility Functions **/
|
|
|
|
|
|
|
|
/** Import Dialog **/
|
2010-01-22 12:28:39 -08:00
|
|
|
void
|
2006-12-17 03:24:59 -08:00
|
|
|
e_int_config_imc_import_done(E_Config_Dialog *dia)
|
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata = dia->cfdata;
|
|
|
|
cfdata->win_import = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2010-08-19 10:38:40 -07:00
|
|
|
_cb_import(void *data1, void *data2 __UNUSED__)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata = data1;
|
|
|
|
if (cfdata->win_import)
|
|
|
|
e_win_raise(cfdata->win_import);
|
2008-09-23 22:58:55 -07:00
|
|
|
else
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata->win_import = e_int_config_imc_import(cfdata->cfd);
|
|
|
|
}
|
|
|
|
|
2010-01-22 12:28:39 -08:00
|
|
|
void
|
2006-12-17 03:24:59 -08:00
|
|
|
e_int_config_imc_update(E_Config_Dialog *dia, const char *file)
|
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata = dia->cfdata;
|
2008-09-23 22:58:55 -07:00
|
|
|
cfdata->fmdir = 1;
|
2009-03-11 08:13:42 -07:00
|
|
|
eina_stringshare_del(cfdata->imc_current);
|
|
|
|
cfdata->imc_current = eina_stringshare_add(file);
|
2006-12-17 03:24:59 -08:00
|
|
|
e_widget_radio_toggle_set(cfdata->o_personal, 1);
|
|
|
|
|
|
|
|
if (cfdata->o_fm)
|
|
|
|
e_fm2_path_set(cfdata->o_fm, e_intl_imc_personal_path_get(), "/");
|
|
|
|
_e_imc_form_fill(cfdata);
|
|
|
|
if (cfdata->o_frame)
|
2008-09-23 22:58:55 -07:00
|
|
|
e_widget_change(cfdata->o_frame);
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
2012-12-03 01:24:12 -08:00
|
|
|
_advanced_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata)
|
2006-12-17 03:24:59 -08:00
|
|
|
{
|
2012-05-02 13:09:44 -07:00
|
|
|
Evas_Object *o, *rt, *ot;
|
|
|
|
Evas_Object *ow, *of;
|
2006-12-17 03:24:59 -08:00
|
|
|
const char *path;
|
|
|
|
E_Fm2_Config fmc;
|
|
|
|
E_Radio_Group *rg;
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-05-02 13:09:44 -07:00
|
|
|
o = e_widget_list_add(evas, 0, 1);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
rg = e_widget_radio_group_new(&(cfdata->fmdir));
|
2012-05-02 13:09:44 -07:00
|
|
|
ot = e_widget_table_add(evas, 0);
|
|
|
|
rt = e_widget_table_add(evas, 1);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-05-02 13:09:44 -07:00
|
|
|
ow = e_widget_radio_add(evas, _("Personal"), 0, rg);
|
|
|
|
cfdata->o_personal = ow;
|
|
|
|
e_widget_on_change_hook_set(ow, _cb_dir, cfdata);
|
|
|
|
e_widget_table_object_append(rt, ow, 0, 0, 1, 1, 1, 1, 0, 0);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-05-02 13:09:44 -07:00
|
|
|
ow = e_widget_radio_add(evas, _("System"), 1, rg);
|
|
|
|
cfdata->o_system = ow;
|
|
|
|
e_widget_on_change_hook_set(ow, _cb_dir, cfdata);
|
|
|
|
e_widget_table_object_append(rt, ow, 1, 0, 1, 1, 1, 1, 0, 0);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-05-02 13:09:44 -07:00
|
|
|
e_widget_table_object_append(ot, rt, 0, 0, 1, 1, 0, 0, 0, 0);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
ow = e_widget_button_add(evas, _("Go up a Directory"), "go-up",
|
2012-05-02 13:09:44 -07:00
|
|
|
_cb_button_up, cfdata, NULL);
|
|
|
|
cfdata->o_up_button = ow;
|
|
|
|
e_widget_table_object_append(ot, ow, 0, 1, 1, 1, 0, 0, 0, 0);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
if (cfdata->fmdir == 1)
|
|
|
|
path = e_intl_imc_system_path_get();
|
|
|
|
else
|
|
|
|
path = e_intl_imc_personal_path_get();
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-05-02 13:09:44 -07:00
|
|
|
ow = e_fm2_add(evas);
|
|
|
|
cfdata->o_fm = ow;
|
2006-12-17 03:24:59 -08:00
|
|
|
memset(&fmc, 0, sizeof(E_Fm2_Config));
|
|
|
|
fmc.view.mode = E_FM2_VIEW_MODE_LIST;
|
|
|
|
fmc.view.open_dirs_in_place = 1;
|
|
|
|
fmc.view.selector = 1;
|
|
|
|
fmc.view.single_click = 0;
|
|
|
|
fmc.view.no_subdir_jump = 0;
|
|
|
|
fmc.icon.list.w = 16;
|
|
|
|
fmc.icon.list.h = 16;
|
|
|
|
fmc.icon.fixed.w = 1;
|
|
|
|
fmc.icon.fixed.h = 1;
|
|
|
|
fmc.icon.extension.show = 0;
|
|
|
|
fmc.icon.key_hint = NULL;
|
|
|
|
fmc.list.sort.no_case = 1;
|
|
|
|
fmc.list.sort.dirs.first = 0;
|
|
|
|
fmc.list.sort.dirs.last = 1;
|
|
|
|
fmc.selection.single = 1;
|
|
|
|
fmc.selection.windows_modifiers = 0;
|
2012-05-02 13:09:44 -07:00
|
|
|
e_fm2_config_set(ow, &fmc);
|
|
|
|
e_fm2_icon_menu_flags_set(ow, E_FM2_MENU_NO_SHOW_HIDDEN);
|
2006-12-17 03:24:59 -08:00
|
|
|
|
2012-05-02 13:09:44 -07:00
|
|
|
evas_object_smart_callback_add(ow, "dir_changed",
|
2012-06-13 23:55:01 -07:00
|
|
|
_cb_files_changed, cfdata);
|
2012-05-02 13:09:44 -07:00
|
|
|
evas_object_smart_callback_add(ow, "selection_change",
|
2012-06-13 23:55:01 -07:00
|
|
|
_cb_files_selection_change, cfdata);
|
2012-05-02 13:09:44 -07:00
|
|
|
evas_object_smart_callback_add(ow, "changed",
|
2012-06-13 23:55:01 -07:00
|
|
|
_cb_files_files_changed, cfdata);
|
2012-05-02 13:09:44 -07:00
|
|
|
evas_object_smart_callback_add(ow, "files_deleted",
|
2012-06-13 23:55:01 -07:00
|
|
|
_cb_files_files_deleted, cfdata);
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata->o_frame = NULL;
|
2012-05-02 13:09:44 -07:00
|
|
|
e_fm2_path_set(ow, path, "/");
|
2006-12-17 03:24:59 -08:00
|
|
|
|
2012-05-02 13:09:44 -07:00
|
|
|
of = e_widget_scrollframe_pan_add(evas, ow,
|
2012-06-13 23:55:01 -07:00
|
|
|
e_fm2_pan_set,
|
|
|
|
e_fm2_pan_get,
|
|
|
|
e_fm2_pan_max_get,
|
|
|
|
e_fm2_pan_child_size_get);
|
2006-12-17 03:24:59 -08:00
|
|
|
cfdata->o_frame = of;
|
2009-09-01 06:34:42 -07:00
|
|
|
e_widget_size_min_set(of, 160, 160);
|
2012-05-02 13:09:44 -07:00
|
|
|
e_widget_table_object_append(ot, of, 0, 2, 1, 1, 1, 1, 1, 1);
|
|
|
|
e_widget_list_object_append(o, ot, 1, 1, 0.0);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2012-05-02 13:09:44 -07:00
|
|
|
ot = e_widget_table_add(evas, 0);
|
2007-01-26 21:30:33 -08:00
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
ow = e_widget_check_add(evas, _("Use No Input Method"),
|
2012-05-02 13:09:44 -07:00
|
|
|
&(cfdata->imc_disable));
|
|
|
|
cfdata->gui.imc_advanced_disable = ow;
|
|
|
|
e_widget_table_object_append(ot, ow, 0, 0, 1, 1, 1, 0, 0, 0);
|
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
ow = e_widget_button_add(evas, _("New"), "document-new",
|
2012-05-02 13:09:44 -07:00
|
|
|
_cb_new, cfdata, NULL);
|
|
|
|
e_widget_table_object_append(ot, ow, 1, 0, 1, 1, 1, 0, 0, 0);
|
|
|
|
|
2012-06-13 23:55:01 -07:00
|
|
|
ow = e_widget_button_add(evas, _("Import..."), "preferences-imc",
|
2012-05-02 13:09:44 -07:00
|
|
|
_cb_import, cfdata, NULL);
|
|
|
|
e_widget_table_object_append(ot, ow, 2, 0, 1, 1, 1, 0, 0, 0);
|
|
|
|
|
|
|
|
of = e_widget_frametable_add(evas, _("Input Method Parameters"), 0);
|
|
|
|
e_widget_frametable_content_align_set(of, 0.0, 0.0);
|
|
|
|
|
|
|
|
ow = e_widget_label_add(evas, _("Name"));
|
|
|
|
e_widget_frametable_object_append(of, ow, 0, 0, 1, 1, 1, 1, 0, 0);
|
|
|
|
ow = e_widget_entry_add(evas, &(cfdata->imc.e_im_name), NULL, NULL, NULL);
|
|
|
|
e_widget_on_change_hook_set(ow, _e_imc_entry_change_cb, cfdata);
|
|
|
|
cfdata->gui.e_im_name = ow;
|
|
|
|
e_widget_frametable_object_append(of, ow, 1, 0, 1, 1, 1, 1, 1, 0);
|
|
|
|
|
|
|
|
ow = e_widget_label_add(evas, _("Execute Command"));
|
|
|
|
e_widget_frametable_object_append(of, ow, 0, 1, 1, 1, 1, 1, 0, 0);
|
|
|
|
ow = e_widget_entry_add(evas, &(cfdata->imc.e_im_exec), NULL, NULL, NULL);
|
|
|
|
e_widget_on_change_hook_set(ow, _e_imc_entry_change_cb, cfdata);
|
|
|
|
cfdata->gui.e_im_exec = ow;
|
|
|
|
e_widget_frametable_object_append(of, ow, 1, 1, 1, 1, 1, 1, 1, 0);
|
|
|
|
|
|
|
|
ow = e_widget_label_add(evas, _("Setup Command"));
|
|
|
|
e_widget_frametable_object_append(of, ow, 0, 2, 1, 1, 1, 1, 0, 0);
|
|
|
|
ow = e_widget_entry_add(evas, &(cfdata->imc.e_im_setup_exec), NULL, NULL, NULL);
|
|
|
|
e_widget_on_change_hook_set(ow, _e_imc_entry_change_cb, cfdata);
|
|
|
|
cfdata->gui.e_im_setup_exec = ow;
|
|
|
|
e_widget_frametable_object_append(of, ow, 1, 2, 1, 1, 1, 1, 1, 0);
|
|
|
|
|
|
|
|
e_widget_table_object_append(ot, of, 0, 1, 3, 1, 1, 1, 1, 1);
|
|
|
|
|
|
|
|
of = e_widget_frametable_add(evas, _("Exported Environment Variables"), 0);
|
|
|
|
e_widget_frametable_content_align_set(of, 0.0, 0.0);
|
|
|
|
|
|
|
|
ow = e_widget_label_add(evas, "GTK_IM_MODULE");
|
|
|
|
e_widget_frametable_object_append(of, ow, 0, 0, 1, 1, 1, 1, 0, 0);
|
|
|
|
ow = e_widget_entry_add(evas, &(cfdata->imc.gtk_im_module), NULL, NULL, NULL);
|
|
|
|
e_widget_on_change_hook_set(ow, _e_imc_entry_change_cb, cfdata);
|
|
|
|
cfdata->gui.gtk_im_module = ow;
|
|
|
|
e_widget_frametable_object_append(of, ow, 1, 0, 1, 1, 1, 1, 1, 0);
|
|
|
|
|
|
|
|
ow = e_widget_label_add(evas, "QT_IM_MODULE");
|
|
|
|
e_widget_frametable_object_append(of, ow, 0, 1, 1, 1, 1, 1, 0, 0);
|
|
|
|
ow = e_widget_entry_add(evas, &(cfdata->imc.qt_im_module), NULL, NULL, NULL);
|
|
|
|
e_widget_on_change_hook_set(ow, _e_imc_entry_change_cb, cfdata);
|
|
|
|
cfdata->gui.qt_im_module = ow;
|
|
|
|
e_widget_frametable_object_append(of, ow, 1, 1, 1, 1, 1, 1, 1, 0);
|
|
|
|
|
|
|
|
ow = e_widget_label_add(evas, "XMODIFIERS");
|
|
|
|
e_widget_frametable_object_append(of, ow, 0, 2, 1, 1, 1, 1, 0, 0);
|
|
|
|
ow = e_widget_entry_add(evas, &(cfdata->imc.xmodifiers), NULL, NULL, NULL);
|
|
|
|
e_widget_on_change_hook_set(ow, _e_imc_entry_change_cb, cfdata);
|
|
|
|
cfdata->gui.xmodifiers = ow;
|
|
|
|
e_widget_frametable_object_append(of, ow, 1, 2, 1, 1, 1, 1, 1, 0);
|
|
|
|
|
|
|
|
e_widget_table_object_append(ot, of, 0, 2, 3, 1, 1, 1, 1, 1);
|
|
|
|
|
|
|
|
ow = e_widget_button_add(evas, _("Setup Selected Input Method"), "configure", _e_imc_adv_setup_cb, cfdata, NULL);
|
|
|
|
e_widget_table_object_append(ot, ow, 0, 3, 3, 1, 1, 1, 1, 0);
|
|
|
|
cfdata->gui.imc_advanced_setup = ow;
|
|
|
|
|
|
|
|
e_widget_list_object_append(o, ot, 1, 1, 0.0);
|
2008-09-23 22:58:55 -07:00
|
|
|
|
2007-01-26 21:30:33 -08:00
|
|
|
|
2006-12-17 03:24:59 -08:00
|
|
|
_e_imc_form_fill(cfdata);
|
2012-05-02 13:09:44 -07:00
|
|
|
|
|
|
|
return o;
|
2006-12-17 03:24:59 -08:00
|
|
|
}
|
2012-06-13 23:55:01 -07:00
|
|
|
|