Enlightenment CVS committal
Author : essiene
Project : e17
Module : proto
Dir : e17/proto/entrance_edit_gui/src/gui
Modified Files:
egui_graphics_selector.c
Log Message:
- Replace printfs with the spunkling new ew_messagebox*
- Add a return status to _gs_apply() and check for it, so that when an error
messagebox occurs, the dialog doesn't get destroyed.
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/gui/egui_graphics_selector.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- egui_graphics_selector.c 14 Aug 2006 17:08:55 -0000 1.3
+++ egui_graphics_selector.c 15 Aug 2006 00:23:56 -0000 1.4
@@ -12,7 +12,7 @@
static char* _gs_get_path(const char *);
static void _gs_close(void);
-static void _gs_apply(void);
+static int _gs_apply(void);
static char* _gs_populate_list(void);
static void _gs_load_preview(const char *);
@@ -67,8 +67,8 @@
static void
_gs_cb_ok(void *object, void *data)
{
- _gs_apply();
- _gs_close();
+ if(_gs_apply())
+ _gs_close();
}
static void
@@ -92,14 +92,17 @@
return path;
}
-static void
+static int
_gs_apply(void)
{
+ char msg[PATH_MAX];
+
char *graphic = ew_list_selected_data_get(list_thumbs);
if(!graphic)
{
- printf("Error. Please select a %s first\n", egs.name);
- return;
+ snprintf(msg, PATH_MAX, "Please select a %s first", egs.name);
+ ew_messagebox_ok("Entrance Config - Error", msg,
EW_MESSAGEBOX_ICON_ERROR);
+ return 0;
}
if(egs.use_full_path)
@@ -113,8 +116,12 @@
if(!entrance_edit_save())
{
- printf("Error setting %s. Please check your permissions\n",
egs.name);
+ snprintf(msg, PATH_MAX, "Can not set %s. Please check your
permissions", egs.name);
+ ew_messagebox_ok("Entrance Config - Error", msg,
EW_MESSAGEBOX_ICON_ERROR);
+ return 0;
}
+
+ return 1;
}
static void
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs