[Xfce4-commits] [apps/xfce4-screenshooter] 01/01: Correctly handle loaded action and app from rc

noreply at xfce.org noreply at xfce.org
Wed Sep 27 03:23:46 CEST 2017


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screenshooter.

commit 7602c9e3aa1f0a1e3865ed388d69c227e070181d
Author: Andre Miranda <andreldm at xfce.org>
Date:   Tue Sep 26 22:16:42 2017 -0300

    Correctly handle loaded action and app from rc
    
    These options were until then ignored when using
    the window, region or fullscreen options from CLI.
---
 src/main.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/main.c b/src/main.c
index c677165..8267913 100644
--- a/src/main.c
+++ b/src/main.c
@@ -36,8 +36,8 @@ gboolean mouse = FALSE;
 gboolean upload = FALSE;
 gboolean clipboard = FALSE;
 gboolean upload_imgur = FALSE;
-gchar *screenshot_dir;
-gchar *application;
+gchar *screenshot_dir = NULL;
+gchar *application = NULL;
 gint delay = 0;
 
 
@@ -337,11 +337,12 @@ int main (int argc, char **argv)
           sd->action = UPLOAD_IMGUR;
           sd->action_specified = TRUE;
         }
-      else
-        {
-          sd->app = g_strdup ("none");
-          sd->action = SAVE;
-        }
+
+      if (!sd->app)
+        sd->app = g_strdup ("none");
+
+      if (!sd->action)
+        sd->action = SAVE;
 
       /* If the user gave a directory name, check that it is valid */
       if (screenshot_dir != NULL)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list