Enlightenment CVS committal

Author  : handyande
Project : misc
Module  : engage

Dir     : misc/engage/src


Modified Files:
        config.c engage.h main.c 


Log Message:
Fixup to new ecore_config api
add argument parsing / display
requires a bit more work - not very user friendly on arguemtn names
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/config.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- config.c    2 May 2004 22:02:25 -0000       1.10
+++ config.c    4 May 2004 15:18:38 -0000       1.11
@@ -6,13 +6,17 @@
 
 OD_Options      options;
 
-void
-od_config_init()
+int
+od_config_init(int argc, char **argv)
 {
+  int ret;
+  
   ecore_config_default_int("engage.options.width", 1024);
   ecore_config_default_int("engage.options.height", 100);
   ecore_config_default_theme("engage.options.theme", "gentoo");
-//  ecore_config_set_theme_preview_group("engage.options.theme", "Terminal");
+  /* not technically correct - iconsets should do this, but it looks better for
+     everything bar 'gentoo' - and we all have the others installed ;) */
+  ecore_config_set_theme_preview_group("engage.options.theme", "Terminal");
   ecore_config_default_string("engage.options.engine", "software");
   options.icon_path = PACKAGE_DATA_DIR "/icons/";
   ecore_config_default_int_bound("engage.options.mode", OM_BELOW, 0, 1, 1);
@@ -34,6 +38,8 @@
   ecore_config_default_float("engage.options.icon_appear_duration", 0.1);
 
   ecore_config_load();
+  ret = ecore_config_args_parse(argc, argv);
+  
   options.width = ecore_config_get_int("engage.options.width");
   options.height = ecore_config_get_int("engage.options.height");
   options.engine = ecore_config_get_string("engage.options.engine");
@@ -55,5 +61,6 @@
   options.tt_fs = ecore_config_get_int("engage.options.tt_fs");
   options.icon_appear_duration =
     ecore_config_get_float("engage.options.icon_appear_duration");
-
+  
+  return ret;
 }
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/engage.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- engage.h    23 Apr 2004 23:33:15 -0000      1.10
+++ engage.h    4 May 2004 15:18:39 -0000       1.11
@@ -29,7 +29,7 @@
 extern Ecore_X_Window od_window;
 extern bool     need_redraw;
 
-void            od_config_init();
+int             od_config_init(int argc, char **argv);
 
 void            od_window_init();
 
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/main.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- main.c      26 Apr 2004 03:46:58 -0000      1.4
+++ main.c      4 May 2004 15:18:39 -0000       1.5
@@ -21,7 +21,12 @@
   ecore_x_init(NULL);
   ecore_config_init("engage");
 
-  od_config_init();
+  if (od_config_init(argc, argv) != ECORE_CONFIG_PARSE_CONTINUE) {
+    ecore_config_shutdown();
+    ecore_x_shutdown();
+    ecore_shutdown();
+    exit(0);
+  }
 
   ecore_app_args_set(argc, (const char **) argv);
   ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_cb, NULL);
@@ -45,7 +50,7 @@
   edje_shutdown();
   ecore_evas_shutdown();
   ecore_config_save();
-  ecore_config_exit();
+  ecore_config_shutdown();
   ecore_x_shutdown();
   ecore_shutdown();
 




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to