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..41794fc 100644 --- a/src/main.c +++ b/src/main.c @@ -314,6 +314,10 @@ int main (int argc, char **argv) if (clipboard) { + /* if no action was specified, reset its value loaded from prefs */ + if (!sd->action_specified) + sd->action = NONE; + sd->action |= CLIPBOARD; sd->action_specified = TRUE; }