[Xfce4-commits] <xfce4-session:jeromeg/libxfce4ui> Port the panel plugin to libxfce4ui.

Jérôme Guelfucci noreply at xfce.org
Wed Jan 20 18:24:03 CET 2010


Updating branch refs/heads/jeromeg/libxfce4ui
         to 03d6c72afeb630f1f14ad6146cce31da187e7c96 (commit)
       from 4147f173b1b121c250973cf692f851ca5c825393 (commit)

commit 03d6c72afeb630f1f14ad6146cce31da187e7c96
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Wed Jan 20 08:32:25 2010 +0100

    Port the panel plugin to libxfce4ui.

 panel-plugin/Makefile.am          |    4 ++--
 panel-plugin/xfsm-logout-plugin.c |   19 +++++++++++--------
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 7b390ad..bd04430 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -6,7 +6,7 @@ plugin_cflags = \
 	$(LIBX11_CFLAGS) \
 	$(LIBXFCE4PANEL_CFLAGS) \
 	$(LIBXFCE4UTIL_CFLAGS) \
-	$(LIBXFCEGUI4_CFLAGS) \
+	$(LIBXFCE4UI_CFLAGS) \
 	$(GTK_CFLAGS) \
 	$(DBUS_GLIB_CFLAGS) \
 	-DLOCALEDIR=\"$(localedir)\"
@@ -15,7 +15,7 @@ plugin_libs = \
 	$(LIBX11_LIBS) \
 	$(LIBXFCE4PANEL_LIBS) \
 	$(LIBXFCE4UTIL_LIBS) \
-	$(LIBXFCEGUI4_LIBS) \
+	$(LIBXFCE4UI_LIBS) \
 	$(GTK_LIBS) \
 	$(DBUS_GLIB_LIBS)
 
diff --git a/panel-plugin/xfsm-logout-plugin.c b/panel-plugin/xfsm-logout-plugin.c
index 316cf3a..d839acb 100644
--- a/panel-plugin/xfsm-logout-plugin.c
+++ b/panel-plugin/xfsm-logout-plugin.c
@@ -42,7 +42,7 @@
 #include <gtk/gtk.h>
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 #include <libxfce4panel/libxfce4panel.h>
 
 #include "xfsm-logout-plugin-ui.h"
@@ -142,7 +142,13 @@ static void
 xfsm_logout_plugin_lock_screen(GtkAction *action,
                           gpointer user_data)
 {
-    xfce_exec("xflock4", FALSE, FALSE, NULL);
+    GError *error = NULL;
+
+    if (!g_spawn_command_line_async("xflock4", error)) {
+        xfce_dialog_show_error (NULL,
+                                error,
+                                _("Xfclock4 could not be launched"));
+    }
 }
 
 static gboolean
@@ -301,12 +307,9 @@ xfsm_logout_plugin_show_confirmation_dialog(XfsmLogoutPlugin *logout_plugin,
         GError *error = NULL;
 
         if(!xfsm_logout_plugin_do_dbus_call(logout_plugin, type, &error)) {
-            xfce_message_dialog(NULL, _("Session Error"),
-                                GTK_STOCK_DIALOG_ERROR,
-                                _(dialog_strings[type].error_text),
-                                error->message,
-                                GTK_STOCK_CLOSE, GTK_RESPONSE_ACCEPT,
-                                NULL);
+            xfce_dialog_show_warning (NULL,
+                                      error->message,
+                                      _(dialog_strings[type].error_text));
             g_error_free(error);
         }
     }



More information about the Xfce4-commits mailing list