Enlightenment CVS committal

Author  : sebastid
Project : misc
Module  : embrace

Dir     : misc/embrace/src


Modified Files:
        e_mod_main.c 


Log Message:
Change from error dialog to standard dialog

===================================================================
RCS file: /cvsroot/enlightenment/misc/embrace/src/e_mod_main.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- e_mod_main.c        3 Sep 2005 04:02:01 -0000       1.4
+++ e_mod_main.c        22 Sep 2005 10:24:36 -0000      1.5
@@ -36,13 +36,25 @@
 
        /* check module api version */
        if (module->api->version < E_MODULE_API_VERSION) {
-               e_error_dialog_show ( _("Module API Error"),
-                                     _("Error initializing Module: Embrace\n"
-                                       "It requires a minimum module API 
version of: %i.\n"
-                                       "The module API advertized by 
Enlightenment is: %i.\n"
-                                       "Aborting module."),
-                                     E_MODULE_API_VERSION,
-                                     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: 
Embrace<br>"
+                           "It requires a minimum module API version of: 
%i.<br>"
+                           "The module API advertized by Enlightenment is: 
%i.<br>"), 
+                         E_MODULE_API_VERSION, module->api->version);
+
+               e_dialog_title_set (dia, "Enlightenment Embrace 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);
                return NULL;
        }
        /* actually init embrace */
@@ -87,8 +99,17 @@
 
 int e_modapi_about (E_Module *module)
 {
-       e_error_dialog_show ( _("Enlightenment Embrace Module"),
-                             _("A module to check your email."));
+       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 Embrace Module");
+       e_dialog_icon_set (dia, "enlightenment/e", 64);
+       e_dialog_text_set (dia, _("A module to check your email."));
+       e_dialog_button_add (dia, _("Ok"), NULL, NULL, NULL);
+       e_win_centered_set (dia->win, 1);
+       e_dialog_show (dia);
        return 1;
 }
 




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to