[Goodies-commits] r6799 - in xfce4-screenshooter/trunk: . lib panel-plugin src
Jerome Guelfucci
jeromeg at xfce.org
Thu Feb 26 10:02:21 CET 2009
Author: jeromeg
Date: 2009-02-26 09:02:20 +0000 (Thu, 26 Feb 2009)
New Revision: 6799
Modified:
xfce4-screenshooter/trunk/ChangeLog
xfce4-screenshooter/trunk/configure.ac.in
xfce4-screenshooter/trunk/lib/Makefile.am
xfce4-screenshooter/trunk/lib/screenshooter-actions.c
xfce4-screenshooter/trunk/lib/screenshooter-dialogs.c
xfce4-screenshooter/trunk/lib/screenshooter-utils.c
xfce4-screenshooter/trunk/lib/screenshooter-utils.h
xfce4-screenshooter/trunk/panel-plugin/screenshooter-plugin.c
xfce4-screenshooter/trunk/src/main.c
Log:
Bump gtk to 2.12, glib to 2.16 and remove all useless ifdefs.
Modified: xfce4-screenshooter/trunk/ChangeLog
===================================================================
--- xfce4-screenshooter/trunk/ChangeLog 2009-02-26 05:15:06 UTC (rev 6798)
+++ xfce4-screenshooter/trunk/ChangeLog 2009-02-26 09:02:20 UTC (rev 6799)
@@ -1,3 +1,9 @@
+2009-02-26 jeromeg
+
+ * Bump gtk required to 2.12.
+ * Bump glib required version to 2.16.
+ * Remove all previous ifdef.
+
2009-02-25 jeromeg
* Last minute bug fixes:
Modified: xfce4-screenshooter/trunk/configure.ac.in
===================================================================
--- xfce4-screenshooter/trunk/configure.ac.in 2009-02-26 05:15:06 UTC (rev 6798)
+++ xfce4-screenshooter/trunk/configure.ac.in 2009-02-26 09:02:20 UTC (rev 6799)
@@ -53,14 +53,9 @@
XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.4.0])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.4.0])
XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.4.0])
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0])
-XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.12.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.12.0])
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.16.0])
-dnl ***********************************
-dnl *** Check for optional packages ***
-dnl ***********************************
-XDT_CHECK_OPTIONAL_PACKAGE([GIO], [gio-2.0], [2.16])
-
dnl **************************
dnl *** Check for xsltproc ***
dnl **************************
@@ -125,12 +120,6 @@
echo "Build Configuration:"
echo ""
-if test x"$GIO_FOUND" = x"yes"; then
-echo " * Open with support: yes"
-else
-echo " * Open with support: no"
-fi
-
echo " * Debugging support: $enable_debug"
echo ""
Modified: xfce4-screenshooter/trunk/lib/Makefile.am
===================================================================
--- xfce4-screenshooter/trunk/lib/Makefile.am 2009-02-26 05:15:06 UTC (rev 6798)
+++ xfce4-screenshooter/trunk/lib/Makefile.am 2009-02-26 09:02:20 UTC (rev 6799)
@@ -13,19 +13,11 @@
@GLIB_CFLAGS@ \
@LIBXFCE4UTIL_CFLAGS@ \
@LIBXFCEGUI4_CFLAGS@ \
+ @GIO_CFLAGS@ \
-DPACKAGE_LOCALE_DIR=\"$(localedir)\"
libscreenshooter_la_LIBADD = \
@GTK_LIBS@ \
@LIBXFCE4UTIL_LIBS@ \
- @LIBXFCEGUI4_LIBS@
-
-if HAVE_GIO
-
-libscreenshooter_la_CFLAGS += \
- @GIO_CFLAGS@
-
-libscreenshooter_la_LIBADD += \
- @GIO_LIBS@
-
-endif
+ @LIBXFCEGUI4_LIBS@ \
+ @GIO_LIBS@
Modified: xfce4-screenshooter/trunk/lib/screenshooter-actions.c
===================================================================
--- xfce4-screenshooter/trunk/lib/screenshooter-actions.c 2009-02-26 05:15:06 UTC (rev 6798)
+++ xfce4-screenshooter/trunk/lib/screenshooter-actions.c 2009-02-26 09:02:20 UTC (rev 6799)
@@ -39,7 +39,6 @@
{
screenshooter_copy_to_clipboard (screenshot);
}
- #ifdef HAVE_GIO
else
{
gchar *tempdir = g_strdup (g_get_tmp_dir ());
@@ -57,7 +56,6 @@
if (tempdir != NULL)
g_free (tempdir);
}
- #endif
g_object_unref (screenshot);
}
Modified: xfce4-screenshooter/trunk/lib/screenshooter-dialogs.c
===================================================================
--- xfce4-screenshooter/trunk/lib/screenshooter-dialogs.c 2009-02-26 05:15:06 UTC (rev 6798)
+++ xfce4-screenshooter/trunk/lib/screenshooter-dialogs.c 2009-02-26 09:02:20 UTC (rev 6799)
@@ -35,11 +35,9 @@
static void
cb_rectangle_toggled (GtkToggleButton *tb,
ScreenshotData *sd);
-#ifdef HAVE_GIO
static void
cb_open_toggled (GtkToggleButton *tb,
ScreenshotData *sd);
-#endif
static void
cb_clipboard_toggled (GtkToggleButton *tb,
ScreenshotData *sd);
@@ -60,8 +58,6 @@
ScreenshotData *sd);
static gchar
*generate_filename_for_uri (char *uri);
-
-#ifdef HAVE_GIO
static void
cb_combo_active_item_changed (GtkWidget *box,
ScreenshotData *sd);
@@ -73,8 +69,8 @@
static void
set_default_item (GtkWidget *combobox,
ScreenshotData *sd);
-
-#endif
+
+
/* Internals */
@@ -145,7 +141,6 @@
-#ifdef HAVE_GIO
/* Set the action when the button is toggled */
static void cb_open_toggled (GtkToggleButton *tb, ScreenshotData *sd)
{
@@ -154,7 +149,6 @@
sd->action = OPEN;
}
}
-#endif
@@ -257,7 +251,6 @@
-#ifdef HAVE_GIO
/* Set sd->app as per the active item in the combobox */
static void cb_combo_active_item_changed (GtkWidget *box,
ScreenshotData *sd)
@@ -422,9 +415,9 @@
sd->app = g_strdup ("none");
}
}
-#endif
+
/* Public */
@@ -456,7 +449,6 @@
GtkWidget *clipboard_radio_button;
-#ifdef HAVE_GIO
GtkWidget *open_with_alignment;
GtkWidget *open_with_box, *open_with_radio_button;
@@ -465,7 +457,6 @@
GtkListStore *liststore;
GtkWidget *combobox;
GtkCellRenderer *renderer, *renderer_pixbuf;
-#endif
/* Create the dialog */
if (!plugin)
@@ -554,10 +545,8 @@
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fullscreen_button),
(sd->region == FULLSCREEN));
- #if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text (fullscreen_button,
_("Take a screenshot of the entire screen"));
- #endif
g_signal_connect (G_OBJECT (fullscreen_button), "toggled",
G_CALLBACK (cb_fullscreen_screen_toggled),
@@ -578,10 +567,8 @@
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (active_window_button),
(sd->region == ACTIVE_WINDOW));
- #if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text (active_window_button,
_("Take a screenshot of the active window"));
- #endif
g_signal_connect (G_OBJECT (active_window_button), "toggled",
G_CALLBACK (cb_active_window_toggled),
@@ -602,12 +589,10 @@
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rectangle_button),
(sd->region == SELECT));
- #if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text (rectangle_button,
_("Select a region to be captured by clicking a point of the screen "
"without releasing the mouse button, dragging your mouse to the "
"other corner of the region, and releasing the mouse button."));
- #endif
g_signal_connect (G_OBJECT (rectangle_button), "toggled",
G_CALLBACK (cb_rectangle_toggled),
@@ -663,11 +648,8 @@
gtk_spin_button_set_value (GTK_SPIN_BUTTON (delay_spinner),
sd->delay);
- /* Tooltip needs to be improved */
- #if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text (delay_spinner,
_("Delay in seconds before the screenshot is taken"));
- #endif
gtk_widget_show (delay_spinner);
@@ -739,10 +721,8 @@
G_CALLBACK (cb_save_toggled),
sd);
- #if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text (save_radio_button,
_("Save the screenshot to a PNG file"));
- #endif
gtk_widget_show (save_radio_button);
@@ -783,12 +763,10 @@
g_signal_connect (G_OBJECT (save_checkbox), "toggled",
G_CALLBACK (cb_show_save_dialog_toggled), sd);
-
- #if GTK_CHECK_VERSION(2,12,0)
+
gtk_widget_set_tooltip_text (save_checkbox,
_("If checked, the screenshot will be saved by default to the "
"location set on the right without displaying a save dialog"));
- #endif
dir_chooser =
gtk_file_chooser_button_new (_("Default save location"),
@@ -803,10 +781,8 @@
gtk_widget_show (dir_chooser);
- #if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text (dir_chooser,
_("Set the default save location"));
- #endif
g_signal_connect (G_OBJECT (dir_chooser), "selection-changed",
G_CALLBACK (cb_default_folder), sd);
@@ -835,11 +811,9 @@
gtk_widget_show (clipboard_radio_button);
- #if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text (clipboard_radio_button,
_("Copy the screenshot to the clipboard so that it can be "
"pasted later"));
- #endif
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (clipboard_radio_button),
(sd->action == CLIPBOARD));
@@ -847,9 +821,7 @@
g_signal_connect (G_OBJECT (clipboard_radio_button), "toggled",
G_CALLBACK (cb_clipboard_toggled),
sd);
-
-#ifdef HAVE_GIO
-
+
/* Open with radio button */
open_with_radio_button =
@@ -869,10 +841,8 @@
G_CALLBACK (cb_open_toggled),
sd);
- #if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text (open_with_radio_button,
_("Open the screenshot with the chosen application"));
- #endif
/* Create open with alignment */
@@ -949,16 +919,13 @@
gtk_widget_show_all (combobox);
- #if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text (combobox,
_("Application to open the screenshot"));
- #endif
/* Run the callback functions to grey/ungrey the correct widgets */
cb_toggle_set_sensi (GTK_TOGGLE_BUTTON (open_with_radio_button),
open_with_box);
-#endif
return dlg;
}
Modified: xfce4-screenshooter/trunk/lib/screenshooter-utils.c
===================================================================
--- xfce4-screenshooter/trunk/lib/screenshooter-utils.c 2009-02-26 05:15:06 UTC (rev 6798)
+++ xfce4-screenshooter/trunk/lib/screenshooter-utils.c 2009-02-26 09:02:20 UTC (rev 6799)
@@ -473,9 +473,7 @@
gint action = SAVE;
gint show_save_dialog = 1;
gchar *screenshot_dir = g_strdup (DEFAULT_SAVE_DIRECTORY);
- #ifdef HAVE_GIO
gchar *app = g_strdup ("none");
- #endif
if (file != NULL)
{
@@ -496,12 +494,10 @@
show_save_dialog =
xfce_rc_read_int_entry (rc, "show_save_dialog", 1);
- #ifdef HAVE_GIO
g_free (app);
app =
g_strdup (xfce_rc_read_entry (rc, "app", "none"));
- #endif
g_free (screenshot_dir);
@@ -524,9 +520,7 @@
sd->action = action;
sd->show_save_dialog = show_save_dialog;
sd->screenshot_dir = screenshot_dir;
- #ifdef HAVE_GIO
sd->app = app;
- #endif
}
@@ -557,9 +551,7 @@
xfce_rc_write_int_entry (rc, "show_save_dialog",
sd->show_save_dialog);
xfce_rc_write_entry (rc, "screenshot_dir", sd->screenshot_dir);
- #ifdef HAVE_GIO
xfce_rc_write_entry (rc, "app", sd->app);
- #endif
TRACE ("Flush and close the rc file");
@@ -574,7 +566,6 @@
@screenshot_path: the path to the saved screenshot.
@application: the command to run the application.
*/
-#ifdef HAVE_GIO
void
screenshooter_open_screenshot (gchar *screenshot_path,
gchar *application)
@@ -607,4 +598,3 @@
}
}
}
-#endif
Modified: xfce4-screenshooter/trunk/lib/screenshooter-utils.h
===================================================================
--- xfce4-screenshooter/trunk/lib/screenshooter-utils.h 2009-02-26 05:15:06 UTC (rev 6798)
+++ xfce4-screenshooter/trunk/lib/screenshooter-utils.h 2009-02-26 09:02:20 UTC (rev 6799)
@@ -52,9 +52,7 @@
ACTION_0,
SAVE,
CLIPBOARD,
- #ifdef HAVE_GIO
OPEN,
- #endif
};
@@ -67,9 +65,7 @@
gint delay;
gint action;
gchar *screenshot_dir;
- #ifdef HAVE_GIO
gchar *app;
- #endif
}
ScreenshotData;
@@ -89,9 +85,8 @@
screenshooter_write_rc_file (gchar *file,
ScreenshotData *sd);
-#ifdef HAVE_GIO
void
screenshooter_open_screenshot (gchar *screenshot_path,
gchar *application);
-#endif
+
#endif
Modified: xfce4-screenshooter/trunk/panel-plugin/screenshooter-plugin.c
===================================================================
--- xfce4-screenshooter/trunk/panel-plugin/screenshooter-plugin.c 2009-02-26 05:15:06 UTC (rev 6798)
+++ xfce4-screenshooter/trunk/panel-plugin/screenshooter-plugin.c 2009-02-26 09:02:20 UTC (rev 6799)
@@ -148,9 +148,7 @@
pd->style_id = 0;
g_free (pd->sd->screenshot_dir);
- #ifdef HAVE_GIO
g_free (pd->sd->app);
- #endif
g_free (pd->sd);
g_free (pd);
}
@@ -237,7 +235,6 @@
gtk_widget_destroy (dlg);
/* Update tooltips according to the chosen option */
- #if GTK_CHECK_VERSION(2,12,0)
if (pd->sd->region == FULLSCREEN)
{
gtk_widget_set_tooltip_text (GTK_WIDGET (pd->button),
@@ -255,7 +252,6 @@
"without releasing the mouse button, dragging your mouse to the "
"other corner of the region, and releasing the mouse button."));
}
- #endif
/* Unblock the menu and save options */
xfce_panel_plugin_unblock_menu (pd->plugin);
@@ -340,9 +336,7 @@
gtk_container_add (GTK_CONTAINER (pd->button), GTK_WIDGET (pd->image));
/* Set the tooltips if available */
- #if GTK_CHECK_VERSION(2,12,0)
TRACE ("Set the default tooltip");
-
if (pd->sd->region == FULLSCREEN)
{
@@ -361,7 +355,6 @@
"without releasing the mouse button, dragging your mouse to the "
"other corner of the region, and releasing the mouse button."));
}
- #endif
TRACE ("Add the button to the panel");
Modified: xfce4-screenshooter/trunk/src/main.c
===================================================================
--- xfce4-screenshooter/trunk/src/main.c 2009-02-26 05:15:06 UTC (rev 6798)
+++ xfce4-screenshooter/trunk/src/main.c 2009-02-26 09:02:20 UTC (rev 6799)
@@ -32,9 +32,7 @@
gboolean fullscreen = FALSE;
gboolean no_save_dialog = FALSE;
gchar *screenshot_dir;
-#ifdef HAVE_GIO
gchar *application;
-#endif
gint delay = 0;
@@ -72,12 +70,10 @@
N_("Directory where the screenshot will be saved"),
NULL
},
- #ifdef HAVE_GIO
{ "open", 'o', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING, &application,
N_("Application to open the screenshot"),
NULL
},
- #endif
{ NULL, ' ', 0, 0, NULL, NULL, NULL }
};
@@ -232,7 +228,6 @@
sd->delay = delay;
- #ifdef HAVE_GIO
if (application != NULL)
{
sd->app = application;
@@ -243,7 +238,6 @@
sd->app = g_strdup ("none");
sd->action = SAVE;
}
- #endif
/* If the user gave a directory name, verify that it is valid */
if (screenshot_dir != NULL)
@@ -308,9 +302,7 @@
}
g_free (sd->screenshot_dir);
- #ifdef HAVE_GIO
g_free (sd->app);
- #endif
g_free (sd);
return 0;
More information about the Goodies-commits
mailing list