[Goodies-commits] r6862 - in xfce4-screenshooter/trunk: . lib
Jerome Guelfucci
jeromeg at xfce.org
Sun Mar 8 10:37:44 CET 2009
Author: jeromeg
Date: 2009-03-08 09:37:44 +0000 (Sun, 08 Mar 2009)
New Revision: 6862
Modified:
xfce4-screenshooter/trunk/ChangeLog
xfce4-screenshooter/trunk/lib/screenshooter-dialogs.c
Log:
Add a check box to show or hide the mouse pointer on screenshots.
Modified: xfce4-screenshooter/trunk/ChangeLog
===================================================================
--- xfce4-screenshooter/trunk/ChangeLog 2009-03-08 09:21:53 UTC (rev 6861)
+++ xfce4-screenshooter/trunk/ChangeLog 2009-03-08 09:37:44 UTC (rev 6862)
@@ -1,5 +1,12 @@
2009-03-08 jeromeg
+ * lib/screenshooter-dialogs.c:
+ - (screenshooter_dialog_new) Add a check box to show/hide the mouse
+ pointer on screenshots.
+ - (cb_show_mouse_toggled) Add the callback for this new check box.
+
+2009-03-08 jeromeg
+
* lib/screenshooter-dialogs.c (screenshooter_dialog_new):
- try to make the UI a bit more intuitive by putting the directory
chooser on the same line as the radio button and by saying
Modified: xfce4-screenshooter/trunk/lib/screenshooter-dialogs.c
===================================================================
--- xfce4-screenshooter/trunk/lib/screenshooter-dialogs.c 2009-03-08 09:21:53 UTC (rev 6861)
+++ xfce4-screenshooter/trunk/lib/screenshooter-dialogs.c 2009-03-08 09:37:44 UTC (rev 6862)
@@ -34,7 +34,10 @@
ScreenshotData *sd);
static void
cb_rectangle_toggled (GtkToggleButton *tb,
- ScreenshotData *sd);
+ ScreenshotData *sd);
+static void
+cb_show_mouse_toggled (GtkToggleButton *tb,
+ ScreenshotData *sd);
static void
cb_open_toggled (GtkToggleButton *tb,
ScreenshotData *sd);
@@ -112,6 +115,21 @@
+/* Set whether the mouse should be captured when the button is toggled */
+static void cb_show_mouse_toggled (GtkToggleButton *tb, ScreenshotData *sd)
+{
+ if (gtk_toggle_button_get_active (tb))
+ {
+ sd->show_mouse = 1;
+ }
+ else
+ {
+ sd->show_mouse = 0;
+ }
+}
+
+
+
/* Set the action when the button is toggled */
static void cb_save_toggled (GtkToggleButton *tb, ScreenshotData *sd)
{
@@ -436,6 +454,8 @@
GtkWidget *active_window_button,
*fullscreen_button,
*rectangle_button;
+
+ GtkWidget *show_mouse_checkbox;
GtkWidget *delay_box, *delay_label, *delay_alignment;
GtkWidget *delay_spinner_box, *delay_spinner, *seconds_label;
@@ -596,6 +616,23 @@
sd);
gtk_widget_show (rectangle_button);
+
+ /* Create show mouse checkbox */
+
+ show_mouse_checkbox =
+ gtk_check_button_new_with_label (_("Display the mouse pointer on the screenshot"));
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (show_mouse_checkbox),
+ (sd->show_mouse == 1));
+
+ gtk_box_pack_start (GTK_BOX (area_box),
+ show_mouse_checkbox, FALSE,
+ FALSE, 0);
+
+ gtk_widget_show (show_mouse_checkbox);
+
+ g_signal_connect (G_OBJECT (show_mouse_checkbox), "toggled",
+ G_CALLBACK (cb_show_mouse_toggled), sd);
/* Create delay label */
@@ -776,7 +813,7 @@
gtk_check_button_new_with_label (_("Display the save dialog"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (save_checkbox),
- (sd->show_save_dialog == 0));
+ (sd->show_save_dialog == 1));
gtk_widget_set_tooltip_text (save_checkbox,
_("The save dialog allows you to change the file name and the save"
More information about the Goodies-commits
mailing list