[Goodies-commits] r5279 - in xfce4-screenshooter-plugin/trunk: . src

Jerome Guelfucci jeromeg at xfce.org
Tue Aug 19 15:57:32 CEST 2008


Author: jeromeg
Date: 2008-08-19 13:57:32 +0000 (Tue, 19 Aug 2008)
New Revision: 5279

Modified:
   xfce4-screenshooter-plugin/trunk/ChangeLog
   xfce4-screenshooter-plugin/trunk/src/main.c
   xfce4-screenshooter-plugin/trunk/src/screenshooter-plugin.c
   xfce4-screenshooter-plugin/trunk/src/screenshooter-utils.h
Log:
Use a #define to set the default save directory.

Modified: xfce4-screenshooter-plugin/trunk/ChangeLog
===================================================================
--- xfce4-screenshooter-plugin/trunk/ChangeLog	2008-08-19 10:58:54 UTC (rev 5278)
+++ xfce4-screenshooter-plugin/trunk/ChangeLog	2008-08-19 13:57:32 UTC (rev 5279)
@@ -1,5 +1,9 @@
 2008-08-19 jeromeg
 
+  * src/*: use a #define to set the default save directory.
+
+2008-08-19 jeromeg
+
   * src/*:
     - comment all code
     - clean identation

Modified: xfce4-screenshooter-plugin/trunk/src/main.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/src/main.c	2008-08-19 10:58:54 UTC (rev 5278)
+++ xfce4-screenshooter-plugin/trunk/src/main.c	2008-08-19 13:57:32 UTC (rev 5279)
@@ -89,13 +89,13 @@
     {
       rc = xfce_rc_simple_open (rc_file, TRUE);
       screenshot_dir = g_strdup (xfce_rc_read_entry (rc, "screenshot_dir", 
-                               xfce_get_homedir ()));
+                               DEFAULT_SAVE_DIRECTORY));
       sd->screenshot_dir = screenshot_dir;
       xfce_rc_close (rc);
     }
   else
     {
-      screenshot_dir = g_strdup (xfce_get_homedir ());
+      screenshot_dir = g_strdup (DEFAULT_SAVE_DIRECTORY);
       sd->screenshot_dir = screenshot_dir;
     }
 

Modified: xfce4-screenshooter-plugin/trunk/src/screenshooter-plugin.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/src/screenshooter-plugin.c	2008-08-19 10:58:54 UTC (rev 5278)
+++ xfce4-screenshooter-plugin/trunk/src/screenshooter-plugin.c	2008-08-19 13:57:32 UTC (rev 5279)
@@ -177,7 +177,7 @@
   gint screenshot_delay = 0;
   gint whole_screen = 1;
   gint show_save_dialog = 1;
-  gchar *screenshot_dir = g_strdup (xfce_get_homedir ());
+  gchar *screenshot_dir = g_strdup (DEFAULT_SAVE_DIRECTORY);
 
   /* If there is an rc file, we read it */
   if ( (file = xfce_panel_plugin_lookup_rc_file (plugin) ) != NULL)
@@ -192,7 +192,7 @@
           screenshot_dir = 
             g_strdup (xfce_rc_read_entry (rc, 
                                           "screenshot_dir", 
-                                          xfce_get_homedir ()));
+                                          DEFAULT_SAVE_DIRECTORY));
           xfce_rc_close (rc);
       }
       

Modified: xfce4-screenshooter-plugin/trunk/src/screenshooter-utils.h
===================================================================
--- xfce4-screenshooter-plugin/trunk/src/screenshooter-utils.h	2008-08-19 10:58:54 UTC (rev 5278)
+++ xfce4-screenshooter-plugin/trunk/src/screenshooter-utils.h	2008-08-19 13:57:32 UTC (rev 5279)
@@ -29,6 +29,8 @@
 
 #include <unistd.h>
 
+#define DEFAULT_SAVE_DIRECTORY xfce_get_homedir ()
+
 /* Struct to store the screenshot options */
 typedef struct
 {




More information about the Goodies-commits mailing list