[Xfce4-commits] <xfce4-screenshooter:master> Add some missing files from a previous commit.
Jérôme Guelfucci
noreply at xfce.org
Sat Dec 5 23:36:03 CET 2009
Updating branch refs/heads/master
to 58350222a6c8130e50ef0f02523f064ca385404e (commit)
from eb01021434d54d0855edec3a42959012e86001d0 (commit)
commit 58350222a6c8130e50ef0f02523f064ca385404e
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date: Sat Dec 5 23:36:21 2009 +0100
Add some missing files from a previous commit.
lib/screenshooter-utils.c | 6 +-----
src/main.c | 11 ++++++-----
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/lib/screenshooter-utils.c b/lib/screenshooter-utils.c
index 5571253..9305718 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 1563121..0aa4232 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",
More information about the Xfce4-commits
mailing list