[Goodies-commits] r6688 - in xfce4-screenshooter/trunk: . lib

Jerome Guelfucci jeromeg at xfce.org
Sun Feb 15 13:31:34 CET 2009


Author: jeromeg
Date: 2009-02-15 12:31:34 +0000 (Sun, 15 Feb 2009)
New Revision: 6688

Modified:
   xfce4-screenshooter/trunk/ChangeLog
   xfce4-screenshooter/trunk/NEWS
   xfce4-screenshooter/trunk/lib/screenshooter-actions.c
Log:
* lib/screenshooter-actions.c: correctly set the active folder in the
  file chooser, this is useful when using the -s cli option. Patch by
  Enrico Tr?\195?\182ger.



Modified: xfce4-screenshooter/trunk/ChangeLog
===================================================================
--- xfce4-screenshooter/trunk/ChangeLog	2009-02-15 06:08:29 UTC (rev 6687)
+++ xfce4-screenshooter/trunk/ChangeLog	2009-02-15 12:31:34 UTC (rev 6688)
@@ -1,3 +1,9 @@
+2009-02-15 jeromeg
+
+  * lib/screenshooter-actions.c: correctly set the active folder in the
+    file chooser, this is useful when using the -s cli option. Patch by
+    Enrico Tröger.
+
 2009-02-08 jeromeg
 
   * configure.ac.in: add maintainer information about xml2po and

Modified: xfce4-screenshooter/trunk/NEWS
===================================================================
--- xfce4-screenshooter/trunk/NEWS	2009-02-15 06:08:29 UTC (rev 6687)
+++ xfce4-screenshooter/trunk/NEWS	2009-02-15 12:31:34 UTC (rev 6688)
@@ -7,6 +7,8 @@
       be annoying.
     - fix build without Gio (#4894).
     - do not use a verb for the desktop file title (#4914).
+    - set the correct folder in the filechooser when using the -s CLI
+      option. Thanks to Enrico Tröger.
 
   * Translations updates.
 

Modified: xfce4-screenshooter/trunk/lib/screenshooter-actions.c
===================================================================
--- xfce4-screenshooter/trunk/lib/screenshooter-actions.c	2009-02-15 06:08:29 UTC (rev 6687)
+++ xfce4-screenshooter/trunk/lib/screenshooter-actions.c	2009-02-15 12:31:34 UTC (rev 6688)
@@ -21,28 +21,17 @@
 
 void screenshooter_take_and_output_screenshot (ScreenshotData *sd)
 {
-  GdkPixbuf *screenshot = 
+  GdkPixbuf *screenshot =
     screenshooter_take_screenshot (sd->region, sd->delay);
-  
+
   if (sd->action == SAVE)
     {
-      if (sd->show_save_dialog == 1)
-        {
-          gchar *home = g_strdup (DEFAULT_SAVE_DIRECTORY);
-          
-          screenshooter_save_screenshot (screenshot, 
-                                         1, 
-                                         home);
-                                         
-          if (home != NULL)
-            g_free (home);                                         
-        }
-      else
-        {
-          screenshooter_save_screenshot (screenshot, 
-                                         0, 
-                                         sd->screenshot_dir);
-        }
+      if (sd->screenshot_dir == NULL)
+        sd->screenshot_dir = g_strdup (DEFAULT_SAVE_DIRECTORY);
+
+      screenshooter_save_screenshot (screenshot,
+                                     TRUE,
+                                     sd->screenshot_dir);
     }
   else if (sd->action == CLIPBOARD)
     {
@@ -52,22 +41,22 @@
   else
     {
       gchar *tempdir = g_strdup (g_get_tmp_dir ());
-      
+
       gchar *screenshot_path =
-        screenshooter_save_screenshot (screenshot, 
-                                       FALSE, 
+        screenshooter_save_screenshot (screenshot,
+                                       FALSE,
                                        tempdir);
       if (screenshot_path != NULL)
         {
           screenshooter_open_screenshot (screenshot_path, sd->app);
           g_free (screenshot_path);
         }
-        
+
       if (tempdir != NULL)
         g_free (tempdir);
     }
   #endif
-  
+
   g_object_unref (screenshot);
 }
-      
+




More information about the Goodies-commits mailing list