[Xfce4-commits] r30276 - in xfce4-settings/branches/migration-to-4ui: . xfce4-settings-helper

Nick Schermer nick at xfce.org
Sat Jul 11 13:57:49 CEST 2009


Author: nick
Date: 2009-07-11 11:57:48 +0000 (Sat, 11 Jul 2009)
New Revision: 30276

Modified:
   xfce4-settings/branches/migration-to-4ui/configure.ac.in
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/Makefile.am
   xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboard-shortcuts.c
Log:
Port a part of the settings helper. SM is not ported yet.


Modified: xfce4-settings/branches/migration-to-4ui/configure.ac.in
===================================================================
--- xfce4-settings/branches/migration-to-4ui/configure.ac.in	2009-07-11 10:45:33 UTC (rev 30275)
+++ xfce4-settings/branches/migration-to-4ui/configure.ac.in	2009-07-11 11:57:48 UTC (rev 30276)
@@ -79,7 +79,8 @@
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.6.0])
 XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.6.0])
 XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.7.0])
-XDT_CHECK_PACKAGE([LIBXFCE4KBD_PRIVATE], [libxfce4kbd-private-1.0], [4.6.0])
+XDT_CHECK_PACKAGE([LIBXFCE4KBD_PRIVATE], [libxfce4kbd-private-2], [4.7.0])
+XDT_CHECK_PACKAGE([LIBXFCE4SMCLIENT_PRIVATE], [libxfce4smclient-private-1], [4.7.0])
 XDT_CHECK_PACKAGE([GLADE], [libglade-2.0], [2.0.0])
 XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.6.0])
 XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.34])

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/Makefile.am
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/Makefile.am	2009-07-11 10:45:33 UTC (rev 30275)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/Makefile.am	2009-07-11 11:57:48 UTC (rev 30276)
@@ -38,8 +38,10 @@
 	$(DBUS_GLIB_CFLAGS) \
 	$(XFCONF_CFLAGS) \
 	$(LIBXFCE4UTIL_CFLAGS) \
+	$(LIBXFCE4UI_CFLAGS) \
 	$(LIBXFCEGUI4_CFLAGS) \
 	$(LIBXFCE4KBD_PRIVATE_CFLAGS) \
+	$(LIBXFCE4SMCLIENT_PRIVATE_CFLAGS) \
 	$(LIBXKLAVIER_CFLAGS) \
 	$(XI_CFLAGS) \
 	$(LIBX11_CFLAGS) \
@@ -58,8 +60,10 @@
 	$(DBUS_GLIB_LIBS) \
 	$(XFCONF_LIBS) \
 	$(LIBXFCE4UTIL_LIBS) \
+	$(LIBXFCE4UI_LIBS) \
 	$(LIBXFCEGUI4_LIBS) \
 	$(LIBXFCE4KBD_PRIVATE_LIBS) \
+	$(LIBXFCE4SMCLIENT_PRIVATE_LIBS) \
 	$(LIBXKLAVIER_LIBS) \
 	$(XI_LIBS) \
 	$(LIBX11_LIBS) \

Modified: xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboard-shortcuts.c
===================================================================
--- xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboard-shortcuts.c	2009-07-11 10:45:33 UTC (rev 30275)
+++ xfce4-settings/branches/migration-to-4ui/xfce4-settings-helper/keyboard-shortcuts.c	2009-07-11 11:57:48 UTC (rev 30276)
@@ -37,7 +37,8 @@
 
 #include <dbus/dbus-glib.h>
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
+#include <libxfce4util/libxfce4util.h>
 #include <xfconf/xfconf.h>
 #include <libxfce4kbd-private/xfce-shortcuts-provider.h>
 #include <libxfce4kbd-private/xfce-shortcuts-grabber.h>
@@ -242,10 +243,8 @@
                                                    XfceKeyboardShortcutsHelper *helper)
 {
   XfceShortcut *sc;
-  GdkDisplay   *display;
   GdkScreen    *screen;
   GError       *error = NULL;
-  gint          monitor;
 
   g_return_if_fail (XFCE_IS_KEYBOARD_SHORTCUTS_HELPER (helper));
   g_return_if_fail (XFCE_IS_SHORTCUTS_PROVIDER (helper->provider));
@@ -262,20 +261,15 @@
   if (G_UNLIKELY (sc == NULL))
     return;
 
-  display = gdk_display_get_default ();
-
   DBG ("command = %s", sc->command);
 
-  /* Determine active monitor */
-  screen = xfce_gdk_display_locate_monitor_with_pointer (display, &monitor);
+  /* Spawn command on active screen */
+  screen = xfce_gdk_screen_get_active (NULL);
+  if (!xfce_spawn_command_line_on_screen (screen, sc->command, FALSE, FALSE, &error))
+    {
+      g_error ("Failed to spawn command \"%s\": %s", sc->command, error->message);
+      g_error_free (error);
+    }
 
-  /* Spawn command */
-  if (!G_UNLIKELY (!xfce_gdk_spawn_command_line_on_screen (screen, sc->command, &error)))
-    if (G_LIKELY (error != NULL))
-      {
-        g_error ("%s", error->message);
-        g_error_free (error);
-      }
-
   xfce_shortcut_free (sc);
 }




More information about the Xfce4-commits mailing list