summaryrefslogtreecommitdiff
path: root/src/modules/dropshadow/e_mod_main.c
diff options
context:
space:
mode:
authorDan Sinclair <dj2>2005-09-22 18:17:18 +0000
committerDan Sinclair <dj2@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2005-09-22 18:17:18 +0000
commit9288298ae80c3fa765b1f8c08ec3081fa86601f5 (patch)
treec8f439bf4a9a3cefc343b387efee36c4eeb8b772 /src/modules/dropshadow/e_mod_main.c
parentbcce7a8bce24ff3f373d946a4efeb8e032cfebf8 (diff)
downloadenlightenment-9288298ae80c3fa765b1f8c08ec3081fa86601f5.tar.gz
- move the common code to a function in the e_modules file.
SVN revision: 16851
Diffstat (limited to 'src/modules/dropshadow/e_mod_main.c')
-rw-r--r--src/modules/dropshadow/e_mod_main.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/src/modules/dropshadow/e_mod_main.c b/src/modules/dropshadow/e_mod_main.c
index d89cc92cb8..91298a6f3b 100644
--- a/src/modules/dropshadow/e_mod_main.c
+++ b/src/modules/dropshadow/e_mod_main.c
@@ -97,23 +97,13 @@ e_modapi_init(E_Module *m)
if (m->api->version < E_MODULE_API_VERSION)
{
- E_Dialog *dia;
char buf[4096];
-
- dia = e_dialog_new(e_container_current_get(e_manager_current_get()));
- if (!dia) return NULL;
-
- snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: Dropshadow<br>"
+ snprintf(buf, sizeof(buf), _("Module API Error<br>Error initializing Module: %s<br>"
"It requires a minimum module API version of: %i.<br>"
"The module API advertized by Enlightenment is: %i.<br>"),
- E_MODULE_API_VERSION, m->api->version);
-
- e_dialog_title_set(dia, "Enlightenment Dropshadow Module");
- e_dialog_icon_set(dia, "enlightenment/e", 64);
- e_dialog_text_set(dia, buf);
- e_dialog_button_add(dia, _("Ok"), NULL, NULL, NULL);
- e_win_centered_set(dia->win, 1);
- e_dialog_show(dia);
+ _("Dropshadow"), E_MODULE_API_VERSION, m->api->version);
+
+ e_module_dialog_show(_("Enlightenment Dropshadow Module"), buf);
return NULL;
}
ds = _ds_init(m);
@@ -200,18 +190,10 @@ e_modapi_info(E_Module *m)
int
e_modapi_about(E_Module *m)
{
- E_Dialog *dia;
-
- dia = e_dialog_new(e_container_current_get(e_manager_current_get()));
- if (!dia) return 0;
- e_dialog_title_set(dia, "Enlightenment Dropshadow Module");
- e_dialog_icon_set(dia, "enlightenment/e", 64);
- e_dialog_text_set(dia, _("This is the dropshadow module that allows dropshadows to be cast<br>"
- "on the desktop background - without special X-Server extensions<br>"
- "or hardware acceleration."));
- e_dialog_button_add(dia, _("Ok"), NULL, NULL, NULL);
- e_win_centered_set(dia->win, 1);
- e_dialog_show(dia);
+ e_module_dialog_show(_("Enlightenment Dropshadow Module"),
+ _("This is the dropshadow module that allows dropshadows to be cast<br>"
+ "on the desktop background - without special X-Server extensions<br>"
+ "or hardware acceleration."));
return 1;
}