[Xfce4-commits] [apps/xfce4-taskmanager] 01/02: GApplication appeared in glib/gio 2.28, protect those codepaths with GLIB_CHECK_VERSION(2, 28, 0)

noreply at xfce.org noreply at xfce.org
Wed Dec 3 17:52:33 CET 2014


This is an automated email from the git hooks/post-receive script.

landry pushed a commit to branch master
in repository apps/xfce4-taskmanager.

commit 2392f5328f6a615088506548ac40f9a9898e6e37
Author: Landry Breuil <landry at xfce.org>
Date:   Wed Dec 3 17:51:44 2014 +0100

    GApplication appeared in glib/gio 2.28, protect those codepaths with GLIB_CHECK_VERSION(2, 28, 0)
---
 src/main.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/main.c b/src/main.c
index aaa8452..e218405 100644
--- a/src/main.c
+++ b/src/main.c
@@ -14,7 +14,9 @@
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+#if GLIB_CHECK_VERSION(2, 28, 0)
 #include <gio/gio.h>
+#endif
 
 #include "settings.h"
 #include "process-window.h"
@@ -147,8 +149,10 @@ refresh_rate_changed (void)
 
 int main (int argc, char *argv[])
 {
+#if GLIB_CHECK_VERSION(2, 28, 0)
 	GApplication *app;
 	GError *error = NULL;
+#endif
 #ifdef ENABLE_NLS
 	bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
@@ -158,6 +162,7 @@ int main (int argc, char *argv[])
 	gtk_init (&argc, &argv);
 	g_set_application_name (_("Task Manager"));
 
+#if GLIB_CHECK_VERSION(2, 28, 0)
 	app = g_application_new ("xfce.taskmanager", 0);
 	g_application_register (G_APPLICATION (app), NULL, &error);
 	if (error != NULL)
@@ -173,6 +178,7 @@ int main (int argc, char *argv[])
 		g_object_unref (app);
 		return 0;
 	}
+#endif
 
 	settings = xtm_settings_get_default ();
 
@@ -183,7 +189,9 @@ int main (int argc, char *argv[])
 
 	window = xtm_process_window_new ();
 	gtk_widget_show (window);
+#if GLIB_CHECK_VERSION(2, 28, 0)
 	g_signal_connect_swapped (app, "activate", G_CALLBACK (xtm_process_window_show), window);
+#endif
 
 	task_manager = xtm_task_manager_new (xtm_process_window_get_model (XTM_PROCESS_WINDOW (window)));
 	g_message ("Running as %s on %s", xtm_task_manager_get_username (task_manager), xtm_task_manager_get_hostname (task_manager));

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list