[Goodies-commits] r5514 - in xfce4-screenshooter-plugin/trunk: . src
Jerome Guelfucci
jeromeg at xfce.org
Sun Oct 5 12:19:07 CEST 2008
Author: jeromeg
Date: 2008-10-05 10:19:07 +0000 (Sun, 05 Oct 2008)
New Revision: 5514
Modified:
xfce4-screenshooter-plugin/trunk/ChangeLog
xfce4-screenshooter-plugin/trunk/NEWS
xfce4-screenshooter-plugin/trunk/src/main.c
xfce4-screenshooter-plugin/trunk/src/screenshooter-plugin.c
xfce4-screenshooter-plugin/trunk/xfce4-screenshooter.1
Log:
* Don't do anything ofr now if no cli option is given. TODO: add a dialog similar to the plugin preferences one to take a screenshot easily without having to mess with cli options.
* Add a cli option to take a fullscreen screenshot.
Modified: xfce4-screenshooter-plugin/trunk/ChangeLog
===================================================================
--- xfce4-screenshooter-plugin/trunk/ChangeLog 2008-10-05 08:25:05 UTC (rev 5513)
+++ xfce4-screenshooter-plugin/trunk/ChangeLog 2008-10-05 10:19:07 UTC (rev 5514)
@@ -1,5 +1,13 @@
2008-10-05 jeromeg
+ * NEWS: updated.
+ * src/main.c: add a fullscreen CLI option, the goal is to provide an interface
+ to take a screenshot with chosen option when calling the executable without
+ any cli options.
+ * xfce4-screenshooter.1: add new CLI option.
+
+2008-10-05 jeromeg
+
* NEWS: updated and fixed identation.
* configure.ac.in: added the new translations.
Modified: xfce4-screenshooter-plugin/trunk/NEWS
===================================================================
--- xfce4-screenshooter-plugin/trunk/NEWS 2008-10-05 08:25:05 UTC (rev 5513)
+++ xfce4-screenshooter-plugin/trunk/NEWS 2008-10-05 10:19:07 UTC (rev 5514)
@@ -3,12 +3,14 @@
* Use applets-screenshooter icon for preferences dialog and save dialog.
* Add some default icons taken from the Rodent icon theme to make sure the
applet has an icon.
- * Plug some remaining leaks and remove some useless code in main.
- * Fix a crash when using the screenshooter to take a screenshot of the desktop
- when xfdesktop is set up not to display any icons.
+ * BUGFIX: Plug some remaining leaks and remove some useless code in main.
+ * BUGFIX: Fix a crash when using the screenshooter to take a screenshot of the
+ desktop when xfdesktop is set up not to display any icons.
* New and updated translations, thanks to the fabulous translation team.
+ * New CLI option to take a screenshot of the desktop.
=== Version 1.3.2 ===
+
* BUGFIX: plug some stupid leaks.
* BUGFIX: when the active window is the desktop, instead of returning a
corrupted snapshot of the background image, return the whole desktop view.
@@ -20,19 +22,22 @@
the file chooser to set its save location.
=== Version 1.3.1 ===
+
* BUGFIX: Fix -s switch with relative path.
=== Version 1.3.0 ===
+
* Code cleanup, remove deprecated code.
* Reduce code duplication between the executable and the plugin.
* New CLI option to save screenshots without showing a save dialog.
* New CLI option to set the save directory.
* New CLI option to set a default save directory, saved in a rc file.
* BUGFIX: generate file names correctly, screenshots should now be
- saved in the correct place, whatever mode is being used.
+ saved in the correct place, whatever mode is being used.
* A lot of updated/new translations.
=== Version 1.2.0 ===
+
* Fix gcc warnings.
* Add manpage taken from Debian package.
* Cleaned the preferences dialog to make it look like the ones of
@@ -43,6 +48,7 @@
* Some others code cleanups.
=== Version 1.1.0 ===
+
* Delay now works.
* Canceling save now works.
* Executable to take screenshots from cli or with a keybinding.
Modified: xfce4-screenshooter-plugin/trunk/src/main.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/src/main.c 2008-10-05 08:25:05 UTC (rev 5513)
+++ xfce4-screenshooter-plugin/trunk/src/main.c 2008-10-05 10:19:07 UTC (rev 5514)
@@ -28,6 +28,7 @@
/* Set default values for cli args */
gboolean version = FALSE;
gboolean window = FALSE;
+gboolean fullscreen = FALSE;
gboolean no_save_dialog = FALSE;
gboolean preferences = FALSE;
gchar *screenshot_dir;
@@ -49,6 +50,10 @@
N_("Take a screenshot of the active window"),
NULL
},
+ { "fullscreen", 'f', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &fullscreen,
+ N_("Take a screenshot of the desktop"),
+ NULL
+ },
{ "delay", 'd', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_INT, &delay,
N_("Delay in seconds before taking the screenshot"),
NULL
@@ -165,10 +170,14 @@
{
sd->mode = ACTIVE_WINDOW;
}
- else
+ else if (fullscreen)
{
sd->mode = FULLSCREEN;
}
+ else
+ {
+ sd->mode = 0;
+ }
/* Wether to show the save dialog allowing to choose a filename and a save
location */
@@ -210,16 +219,17 @@
}
}
- /* If -p is given, show the preferences dialog, else just take the screenshots
- with the given options */
- if (!preferences)
+ /* If a mode cli option is given, take the screenshot accordingly. */
+ if (sd->mode)
{
screenshot = take_screenshot (sd->mode, sd->delay);
save_screenshot (screenshot, sd->show_save_dialog, sd->screenshot_dir);
g_object_unref (screenshot);
}
- else
+
+ /* If -p is given, show the preferences dialog */
+ if (preferences)
{
screenshooter_preferences_dialog (rc_file, sd->screenshot_dir);
}
Modified: xfce4-screenshooter-plugin/trunk/src/screenshooter-plugin.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/src/screenshooter-plugin.c 2008-10-05 08:25:05 UTC (rev 5513)
+++ xfce4-screenshooter-plugin/trunk/src/screenshooter-plugin.c 2008-10-05 10:19:07 UTC (rev 5514)
@@ -326,7 +326,7 @@
if (pd->sd->mode == FULLSCREEN)
{
gtk_widget_set_tooltip_text (GTK_WIDGET (pd->button),
- _("Take a screenshot of desktop"));
+ _("Take a screenshot of the desktop"));
}
else
{
Modified: xfce4-screenshooter-plugin/trunk/xfce4-screenshooter.1
===================================================================
--- xfce4-screenshooter-plugin/trunk/xfce4-screenshooter.1 2008-10-05 08:25:05 UTC (rev 5513)
+++ xfce4-screenshooter-plugin/trunk/xfce4-screenshooter.1 2008-10-05 10:19:07 UTC (rev 5514)
@@ -24,6 +24,9 @@
\fB\-w\fR, \fB\-\-window\fR
Take a screenshot of the active window
.TP
+\fB\-f\fR, \fB\-\-fullscreen\fR
+Take a screenshot of the desktop
+.TP
\fB\-d\fR, \fB\-\-delay\fR
Delay in seconds before taking the screenshot
.TP
More information about the Goodies-commits
mailing list