Enlightenment CVS committal

Author  : devilhorns
Project : e_modules
Module  : screenshot

Dir     : e_modules/screenshot


Modified Files:
        e_mod_main.c 


Log Message:
Fix bug in screenshot where if filename was empty, the shots ended up being 
saved as .png
===================================================================
RCS file: /cvsroot/enlightenment/e_modules/screenshot/e_mod_main.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- e_mod_main.c        1 Feb 2006 13:32:28 -0000       1.23
+++ e_mod_main.c        9 Feb 2006 05:42:53 -0000       1.24
@@ -475,9 +475,12 @@
                }
              opt = get_options(opts);
              f = get_filename(ef->screen->conf);
-
-             snprintf(buff, sizeof(buff), "import %s %s", opt, f);
-             if (ef->screen->conf->delay_time > 0)
+            if (!f)
+              snprintf(buff, sizeof(buff), "import %s", opt);         
+            else
+              snprintf(buff, sizeof(buff), "import %s %s", opt, f);
+             
+            if (ef->screen->conf->delay_time > 0)
                {
                   msg = malloc(sizeof(Edje_Message_Int_Set) + 1 * sizeof(int));
                   msg->count = 1;
@@ -506,7 +509,11 @@
                }
              opt = get_options(opts);
              f = get_filename(ef->screen->conf);
-             snprintf(buff, sizeof(buff), "scrot %s %s", opt, f);
+            if (!f)
+              snprintf(buff, sizeof(buff), "scrot %s", opt);
+            else
+              snprintf(buff, sizeof(buff), "scrot %s %s", opt, f);
+              
              if (ef->screen->conf->delay_time > 0)
                {
                   msg = malloc(sizeof(Edje_Message_Int_Set) + 1 * sizeof(int));




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to