aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin
diff options
context:
space:
mode:
authorChristopher Michael <cpmichael1@comcast.net>2006-07-03 07:35:44 +0000
committerChristopher Michael <cpmichael1@comcast.net>2006-07-03 07:35:44 +0000
commit73a7ba6011e3a6d2bb20c955011b68da6668f530 (patch)
tree1eb1578f72a984e8a666ae7911ec9fcd9d1a28a0 /src/bin
parentasparagus time... (diff)
downloadenlightenment-73a7ba6011e3a6d2bb20c955011b68da6668f530.tar.gz
As per HandyAndE request, this patch gives ability for modules config
dialogs to show their icon in their config dialog by passing in the module_eap path to the config_dialog_new function as the icon parameter ie: e_config_dialog_new(con, module_name, eap_path, 0, v, data); Update E core modules to use this ability. Fix dropshadow config dialog to fit in 640x480. SVN revision: 23682
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/e_border.c22
-rw-r--r--src/bin/e_border.h1
-rw-r--r--src/bin/e_dialog.h24
-rw-r--r--src/bin/e_module.c7
4 files changed, 27 insertions, 27 deletions
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index 64140e904..b8d5b8bba 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -2448,17 +2448,20 @@ e_border_icon_add(E_Border *bd, Evas *evas)
if (bd->internal)
{
o = edje_object_add(evas);
- if ((!bd->internal_icon) && (!bd->module_eap))
+ if (!bd->internal_icon)
e_util_edje_icon_set(o, "enlightenment/e");
- else if (bd->internal_icon)
- {
- if (!e_util_edje_icon_set(o, bd->internal_icon))
- e_util_edje_icon_set(o, "enlightenment/e");
- }
- else if (bd->module_eap)
+ else
{
- if (!edje_object_file_set(o, bd->module_eap, "icon"))
- e_util_edje_icon_set(o, "enlightenment/e");
+ if (!strcmp(bd->internal_icon + strlen(bd->internal_icon) - 4, ".eap"))
+ {
+ if (!edje_object_file_set(o, bd->internal_icon, "icon"))
+ e_util_edje_icon_set(o, "enlightenment/e");
+ }
+ else
+ {
+ if (!e_util_edje_icon_set(o, bd->internal_icon))
+ e_util_edje_icon_set(o, "enlightenment/e");
+ }
}
return o;
}
@@ -3037,7 +3040,6 @@ _e_border_free(E_Border *bd)
if (bd->client.netwm.name) free(bd->client.netwm.name);
if (bd->client.netwm.icon_name) free(bd->client.netwm.icon_name);
e_object_del(E_OBJECT(bd->shape));
- if (bd->module_eap) evas_stringshare_del(bd->module_eap);
if (bd->internal_icon) evas_stringshare_del(bd->internal_icon);
if (bd->icon_object) evas_object_del(bd->icon_object);
evas_object_del(bd->bg_object);
diff --git a/src/bin/e_border.h b/src/bin/e_border.h
index efc8477f6..7e9136652 100644
--- a/src/bin/e_border.h
+++ b/src/bin/e_border.h
@@ -135,7 +135,6 @@ struct _E_Border
Evas_Object *icon_object;
Ecore_X_Window event_win;
const char *internal_icon;
- const char *module_eap;
struct {
Ecore_X_Window shell_win;
diff --git a/src/bin/e_dialog.h b/src/bin/e_dialog.h
index 4fc15b38f..f9d930c02 100644
--- a/src/bin/e_dialog.h
+++ b/src/bin/e_dialog.h
@@ -29,18 +29,18 @@ struct _E_Dialog
unsigned char resizable : 1;
};
-EAPI E_Dialog *e_dialog_new (E_Container *con);
-EAPI void e_dialog_button_add (E_Dialog *dia, const char *label, const char *icon, void (*func) (void *data, E_Dialog *dia), void *data);
-EAPI int e_dialog_button_focus_num (E_Dialog *dia, int button);
-EAPI int e_dialog_button_disable_num_set (E_Dialog *dia, int button, int disabled);
-EAPI int e_dialog_button_disable_num_get (E_Dialog *dia, int button);
-EAPI void e_dialog_title_set (E_Dialog *dia, const char *title);
-EAPI void e_dialog_text_set (E_Dialog *dia, const char *text);
-EAPI void e_dialog_icon_set (E_Dialog *dia, const char *icon, Evas_Coord size);
-EAPI void e_dialog_border_icon_set (E_Dialog *dia, const char *icon);
-EAPI void e_dialog_content_set (E_Dialog *dia, Evas_Object *obj, Evas_Coord minw, Evas_Coord minh);
-EAPI void e_dialog_resizable_set (E_Dialog *dia, int resizable);
-EAPI void e_dialog_show (E_Dialog *dia);
+EAPI E_Dialog *e_dialog_new (E_Container *con);
+EAPI void e_dialog_button_add (E_Dialog *dia, const char *label, const char *icon, void (*func) (void *data, E_Dialog *dia), void *data);
+EAPI int e_dialog_button_focus_num (E_Dialog *dia, int button);
+EAPI int e_dialog_button_disable_num_set (E_Dialog *dia, int button, int disabled);
+EAPI int e_dialog_button_disable_num_get (E_Dialog *dia, int button);
+EAPI void e_dialog_title_set (E_Dialog *dia, const char *title);
+EAPI void e_dialog_text_set (E_Dialog *dia, const char *text);
+EAPI void e_dialog_icon_set (E_Dialog *dia, const char *icon, Evas_Coord size);
+EAPI void e_dialog_border_icon_set (E_Dialog *dia, const char *icon);
+EAPI void e_dialog_content_set (E_Dialog *dia, Evas_Object *obj, Evas_Coord minw, Evas_Coord minh);
+EAPI void e_dialog_resizable_set (E_Dialog *dia, int resizable);
+EAPI void e_dialog_show (E_Dialog *dia);
#endif
#endif
diff --git a/src/bin/e_module.c b/src/bin/e_module.c
index d89aab8e5..2c89dae2f 100644
--- a/src/bin/e_module.c
+++ b/src/bin/e_module.c
@@ -383,7 +383,7 @@ e_module_dialog_show(E_Module *m, const char *title, const char *body)
if (!m) return;
bd = dia->win->border;
if (!bd) return;
- bd->module_eap = evas_stringshare_add(eap);
+ bd->internal_icon = evas_stringshare_add(eap);
}
/* local subsystem functions */
@@ -505,9 +505,8 @@ _e_module_control_menu_enabled(void *data, E_Menu *m, E_Menu_Item *mi)
e_module_disable(mod);
}
else if ((!mod->enabled) && (enabled))
- {
- e_module_enable(mod);
- }
+ e_module_enable(mod);
+
e_menu_item_toggle_set(mi, e_module_enabled_get(mod));
}