diff --git a/lib/screenshooter-utils.c b/lib/screenshooter-utils.c index 55712534addbc2c4d298f2c57d100fa09adf71ba..9305718f838364e8841748ee0d01876012cff082 100644 --- a/lib/screenshooter-utils.c +++ b/lib/screenshooter-utils.c @@ -55,7 +55,7 @@ screenshooter_read_rc_file (const gchar *file, ScreenshotData *sd) const gchar *default_uri = screenshooter_get_xdg_image_dir_uri (); XfceRc *rc; - gint delay = 1; + gint delay = 0; gint region = FULLSCREEN; gint action = SAVE; gint show_mouse = 1; @@ -104,10 +104,6 @@ screenshooter_read_rc_file (const gchar *file, ScreenshotData *sd) /* And set the sd values */ TRACE ("Set the values of the struct"); - /* Don't accept null delay */ - if (delay == 0) - delay = 1; - sd->delay = delay; sd->region = region; sd->action = action; diff --git a/src/main.c b/src/main.c index 1563121978adf829929268bebc71d1b9602e5282..0aa4232ca5524c0b75b28058d7104b7db1202110 100644 --- a/src/main.c +++ b/src/main.c @@ -36,7 +36,7 @@ gboolean mouse = FALSE; gboolean upload = FALSE; gchar *screenshot_dir; gchar *application; -gint delay = 1; +gint delay = 0; @@ -247,10 +247,7 @@ int main (int argc, char **argv) /* Whether to display the mouse pointer on the screenshot */ mouse ? (sd->show_mouse = 1) : (sd->show_mouse = 0); - if (delay > 0) - sd->delay = delay; - else - delay = 1; + sd->delay = delay; if (application != NULL) { @@ -297,6 +294,10 @@ int main (int argc, char **argv) { GtkWidget *dialog; + /* Use 0 as the minimal delay */ + if (sd->delay == 0) + sd->delay = 1; + /* Set the dialog up */ dialog = screenshooter_region_dialog_new (sd, FALSE); g_signal_connect (dialog, "response",