[Goodies-commits] r5967 - in xfce4-screenshooter-plugin/trunk: . lib panel-plugin src
Jerome Guelfucci
jeromeg at xfce.org
Tue Nov 4 12:12:13 CET 2008
Author: jeromeg
Date: 2008-11-04 11:12:13 +0000 (Tue, 04 Nov 2008)
New Revision: 5967
Modified:
xfce4-screenshooter-plugin/trunk/ChangeLog
xfce4-screenshooter-plugin/trunk/lib/screenshooter-dialogs.c
xfce4-screenshooter-plugin/trunk/lib/screenshooter-utils.c
xfce4-screenshooter-plugin/trunk/lib/screenshooter-utils.h
xfce4-screenshooter-plugin/trunk/panel-plugin/screenshooter-plugin.c
xfce4-screenshooter-plugin/trunk/src/main.c
Log:
Make sure that all the open with stuff is ifdef'ed.
Modified: xfce4-screenshooter-plugin/trunk/ChangeLog
===================================================================
--- xfce4-screenshooter-plugin/trunk/ChangeLog 2008-11-04 11:01:17 UTC (rev 5966)
+++ xfce4-screenshooter-plugin/trunk/ChangeLog 2008-11-04 11:12:13 UTC (rev 5967)
@@ -1,5 +1,9 @@
2008-11-04 jeromeg
+ * Make sure that all the open with stuff is ifdef'ed.
+
+2008-11-04 jeromeg
+
* Add missing comments in the code and improve indentation in some places.
2008-11-03 jeromeg
Modified: xfce4-screenshooter-plugin/trunk/lib/screenshooter-dialogs.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/lib/screenshooter-dialogs.c 2008-11-04 11:01:17 UTC (rev 5966)
+++ xfce4-screenshooter-plugin/trunk/lib/screenshooter-dialogs.c 2008-11-04 11:12:13 UTC (rev 5967)
@@ -110,9 +110,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)
{
Modified: xfce4-screenshooter-plugin/trunk/lib/screenshooter-utils.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/lib/screenshooter-utils.c 2008-11-04 11:01:17 UTC (rev 5966)
+++ xfce4-screenshooter-plugin/trunk/lib/screenshooter-utils.c 2008-11-04 11:12:13 UTC (rev 5967)
@@ -295,8 +295,10 @@
gint mode = FULLSCREEN;
gint show_save_dialog = 1;
gchar *screenshot_dir = g_strdup (DEFAULT_SAVE_DIRECTORY);
+ #ifdef HAVE_GIO
gchar *app = DEFAULT_APPLICATION;
-
+ #endif
+
if (g_file_test (file, G_FILE_TEST_EXISTS))
{
rc = xfce_rc_simple_open (file, TRUE);
@@ -309,8 +311,10 @@
mode = xfce_rc_read_int_entry (rc, "mode", FULLSCREEN);
show_save_dialog =
xfce_rc_read_int_entry (rc, "show_save_dialog", 1);
+ #ifdef HAVE_GIO
app =
g_strdup (xfce_rc_read_entry (rc, "app", DEFAULT_APPLICATION));
+ #endif
}
g_free (screenshot_dir);
@@ -328,7 +332,9 @@
sd->mode = mode;
sd->show_save_dialog = show_save_dialog;
sd->screenshot_dir = screenshot_dir;
+ #ifdef HAVE_GIO
sd->app = app;
+ #endif
}
@@ -351,7 +357,9 @@
xfce_rc_write_int_entry (rc, "mode", sd->mode);
xfce_rc_write_int_entry (rc, "show_save_dialog", sd->show_save_dialog);
xfce_rc_write_entry (rc, "screenshot_dir", sd->screenshot_dir);
+ #ifdef
xfce_rc_write_entry (rc, "app", sd->app);
+ #endif
xfce_rc_close (rc);
}
@@ -362,6 +370,7 @@
@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)
@@ -386,4 +395,5 @@
g_free (command);
}
}
-}
+}
+#endif
Modified: xfce4-screenshooter-plugin/trunk/lib/screenshooter-utils.h
===================================================================
--- xfce4-screenshooter-plugin/trunk/lib/screenshooter-utils.h 2008-11-04 11:01:17 UTC (rev 5966)
+++ xfce4-screenshooter-plugin/trunk/lib/screenshooter-utils.h 2008-11-04 11:12:13 UTC (rev 5967)
@@ -58,7 +58,10 @@
gint delay;
gchar *screenshot_dir;
+ #ifdef HAVE_GIO
gchar *app;
+ #endif
+
}
ScreenshotData;
@@ -81,8 +84,10 @@
void
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-plugin/trunk/panel-plugin/screenshooter-plugin.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/panel-plugin/screenshooter-plugin.c 2008-11-04 11:01:17 UTC (rev 5966)
+++ xfce4-screenshooter-plugin/trunk/panel-plugin/screenshooter-plugin.c 2008-11-04 11:12:13 UTC (rev 5967)
@@ -138,7 +138,9 @@
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);
}
@@ -169,11 +171,13 @@
g_object_unref (screenshot);
/* Open the screenshot */
+ #ifdef HAVE_GIO
if (screenshot_path != NULL)
{
screenshooter_open_screenshot (screenshot_path, pd->sd->app);
g_free (screenshot_path);
- }
+ }
+ #endif
/* Make the panel button clickable */
gtk_widget_set_sensitive (GTK_WIDGET (pd->button), TRUE);
Modified: xfce4-screenshooter-plugin/trunk/src/main.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/src/main.c 2008-11-04 11:01:17 UTC (rev 5966)
+++ xfce4-screenshooter-plugin/trunk/src/main.c 2008-11-04 11:12:13 UTC (rev 5967)
@@ -210,11 +210,13 @@
g_object_unref (screenshot);
/* Open the screenshot */
+ #ifdef HAVE_GIO
if (screenshot_path != NULL)
{
screenshooter_open_screenshot (screenshot_path, sd->app);
g_free (screenshot_path);
}
+ #endif
/* Save preferences */
screenshooter_write_rc_file (rc_file, sd);
@@ -222,7 +224,9 @@
}
g_free (sd->screenshot_dir);
+ #ifdef HAVE_GIO
g_free (sd->app);
+ #endif
g_free (sd);
g_free (rc_file);
More information about the Goodies-commits
mailing list