Enlightenment CVS committal

Author  : codewarrior
Project : e17
Module  : apps/e_utils

Dir     : e17/apps/e_utils/src/bin/e17setroot


Modified Files:
        e17setroot.c 


Log Message:
1- added proper help
2- fixed minor bug that didnt allow help to show when no args were given

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/apps/e_utils/src/bin/e17setroot/e17setroot.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- e17setroot.c        25 Jan 2005 22:01:07 -0000      1.14
+++ e17setroot.c        25 Jan 2005 23:24:26 -0000      1.15
@@ -16,10 +16,9 @@
 /* TODO: 
  * make Esetroot respect our options
  * add empty -s -t -c flags that will take current bg and apply option
- * implement -g (get current bg)
  */
 
-static int e_bg_type;
+static int e_bg_type = 0;
 static int e_bg_no_load = 0;
 static char *e_bg_img_file = NULL;
 
@@ -36,13 +35,20 @@
 
 
 void _e_bg_bg_help() { 
+   printf("e17setroot - Manipulate Enlightenment DR17's background\n");
    printf("Usage: e17setroot <imagename> | <eet>\n");
+   printf(" -t | --tile  <imagename>   Tile the suppied image.\n");
+   printf(" -c | --center <imagename>  Center the supplied image.\n");
+   printf(" -s | --scale <imagename>   Scale the supplied image to the 
screen.\n");
+   printf(" -n | --noload <imagename>  Create .eet without setting it.\n");
+   printf(" -g | --get                 Get current E17 background.\n");
+   printf(" -h                         Show this help screen.\n");
 }
 
 static int _e_bg_bg_get(void *data, int type, void *event) {   
    E_Response_Background_Get *bg;   
    bg = event;   
-   printf("Bg: %s\n", bg->data);
+   printf("Current bg file: %s\n", bg->data);
    ecore_main_loop_quit();      
 }
 
@@ -306,9 +312,11 @@
       e_background_get();
       ecore_main_loop_begin();
       ecore_shutdown();
+   } else if(!e_bg_type) {
+      _e_bg_bg_help();
    } else
-      _e_bg_bg_eet_gen(e_bg_img_file);
-  
+     _e_bg_bg_eet_gen(e_bg_img_file);
+   
    if (!e_bg_no_load)
       e_shutdown();
 




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to