[Xfce4-commits] [apps/xfce4-screenshooter] 01/01: Fix clipboard action handling (Bug #14513)

noreply at xfce.org noreply at xfce.org
Sun Jul 8 19:02:19 CEST 2018


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 234a3db78561298a21581208852cbb29ff66cd80
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sun Jul 8 14:02:10 2018 -0300

    Fix clipboard action handling (Bug #14513)
---
 lib/screenshooter-utils.c | 5 ++++-
 src/main.c                | 4 ++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/screenshooter-utils.c b/lib/screenshooter-utils.c
index de6d69e..7f94b28 100644
--- a/lib/screenshooter-utils.c
+++ b/lib/screenshooter-utils.c
@@ -139,12 +139,15 @@ screenshooter_write_rc_file (const gchar *file, ScreenshotData *sd)
 
   xfce_rc_write_int_entry (rc, "delay", sd->delay);
   xfce_rc_write_int_entry (rc, "region", sd->region);
-  xfce_rc_write_int_entry (rc, "action", sd->action);
   xfce_rc_write_int_entry (rc, "show_mouse", sd->show_mouse);
   xfce_rc_write_entry (rc, "screenshot_dir", sd->screenshot_dir);
   xfce_rc_write_entry (rc, "app", sd->app);
   xfce_rc_write_entry (rc, "last_user", sd->last_user);
 
+  /* do not save if the action was specified from cli */
+  if (!sd->action_specified)
+    xfce_rc_write_int_entry (rc, "action", sd->action);
+
   TRACE ("Flush and close the rc file");
   xfce_rc_close (rc);
 }
diff --git a/src/main.c b/src/main.c
index 011803d..d6a02af 100644
--- a/src/main.c
+++ b/src/main.c
@@ -314,6 +314,10 @@ int main (int argc, char **argv)
 
       if (clipboard)
         {
+          /* if no other action was specified, reset the value loaded from prefs */
+          if (!sd->action_specified)
+            sd->action = NONE;
+
           sd->action |= CLIPBOARD;
           sd->action_specified = TRUE;
         }

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


More information about the Xfce4-commits mailing list