[Xfce4-commits] <xfce4-panel:devel> Update to latest libxfce4ui API.

Nick Schermer nick at xfce.org
Tue Aug 11 20:35:15 CEST 2009


Updating branch refs/heads/devel
         to a891d551965de229b820227e151f42f32b651261 (commit)
       from 8289aef73b9fce0b1e10e6047c029156c941da82 (commit)

commit a891d551965de229b820227e151f42f32b651261
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Jul 7 17:39:59 2009 +0200

    Update to latest libxfce4ui API.

 configure.in.in                  |    2 +-
 panel/panel-preferences-dialog.c |    9 ++++++---
 plugins/actions/actions.c        |    3 +--
 plugins/launcher/launcher.c      |   16 ++++++++--------
 plugins/pager/pager.c            |    4 +++-
 plugins/systray/systray.c        |    2 +-
 6 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index 4243287..46f8333 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -98,7 +98,7 @@ dnl *** Check for required packages ***
 dnl ***********************************
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.6.0])
 XDT_CHECK_PACKAGE([LIBXFCE4MENU], [libxfce4menu-0.1], [4.6.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.5.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.7.0])
 XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.6.0])
 XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.100])
 XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])
diff --git a/panel/panel-preferences-dialog.c b/panel/panel-preferences-dialog.c
index 3fa0e48..d6217ff 100644
--- a/panel/panel-preferences-dialog.c
+++ b/panel/panel-preferences-dialog.c
@@ -453,14 +453,17 @@ static void
 panel_preferences_dialog_panel_remove (GtkWidget              *widget,
                                        PanelPreferencesDialog *dialog)
 {
-  gint     nth;
-  GObject *combo;
+  gint       nth;
+  GObject   *combo;
+  GtkWidget *toplevel;
 
   /* get active panel */
   nth = panel_application_get_window_index (dialog->application, dialog->active);
 
   /* destroy the window */
-  if (xfce_dialog_confirm (dialog, GTK_STOCK_REMOVE, NULL,
+  toplevel = gtk_widget_get_toplevel (widget);
+  if (xfce_dialog_confirm (GTK_WINDOW (toplevel), GTK_STOCK_REMOVE, NULL,
+          _("The panel and plugin configurations will be permanently removed"),
           _("Are you sure you want to remove panel %d?"), nth + 1))
     {
       /* release the bindings */
diff --git a/plugins/actions/actions.c b/plugins/actions/actions.c
index 6bdf007..0109a28 100644
--- a/plugins/actions/actions.c
+++ b/plugins/actions/actions.c
@@ -445,8 +445,7 @@ actions_plugin_button_clicked (GtkWidget     *button,
   if (!g_spawn_command_line_async (action_entries[action].command, &error))
     {
       /* show error */
-      xfce_dialog_show_error (gtk_widget_get_screen (button),
-                              error, _("Failed to execute command \"%s\""),
+      xfce_dialog_show_error (NULL, error, _("Failed to execute command \"%s\""),
                               action_entries[action].command);
       g_error_free (error);
     }
diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 88a08b1..87652fa 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -1513,13 +1513,13 @@ launcher_plugin_item_exec_on_screen (XfceMenuItem *item,
   if (launcher_plugin_exec_parse (item, uri_list, NULL, &argv, &error))
     {
       /* launch the command on the screen */
-      succeed = xfce_execute_argv_on_screen (screen,
-                                             xfce_menu_item_get_path (item),
-                                             argv, NULL, G_SPAWN_SEARCH_PATH,
-                                             xfce_menu_item_supports_startup_notification (item),
-                                             event_time,
-                                             xfce_menu_item_get_icon_name (item),
-                                             &error);
+      succeed = xfce_spawn_on_screen (screen,
+                                      xfce_menu_item_get_path (item),
+                                      argv, NULL, G_SPAWN_SEARCH_PATH,
+                                      xfce_menu_item_supports_startup_notification (item),
+                                      event_time,
+                                      xfce_menu_item_get_icon_name (item),
+                                      &error);
 
       /* cleanup */
       g_strfreev (argv);
@@ -1528,7 +1528,7 @@ launcher_plugin_item_exec_on_screen (XfceMenuItem *item,
   if (G_UNLIKELY (succeed == FALSE))
     {
       /* show an error dialog */
-      xfce_dialog_show_error (screen, error,
+      xfce_dialog_show_error (NULL, error,
                               _("Failed to execute command \"%s\"."),
                               xfce_menu_item_get_command (item));
 
diff --git a/plugins/pager/pager.c b/plugins/pager/pager.c
index 2b37fc3..a4378d3 100644
--- a/plugins/pager/pager.c
+++ b/plugins/pager/pager.c
@@ -355,6 +355,7 @@ pager_plugin_configure_workspace_settings (GtkWidget *button)
 {
   GdkScreen *screen;
   GError    *error = NULL;
+  GtkWidget *toplevel;
 
   panel_return_if_fail (GTK_IS_WIDGET (button));
 
@@ -367,7 +368,8 @@ pager_plugin_configure_workspace_settings (GtkWidget *button)
   if (!gdk_spawn_command_line_on_screen (screen, "xfwm4-workspace-settings", &error))
     {
       /* show an error dialog */
-      xfce_dialog_show_error (button, error,
+      toplevel = gtk_widget_get_toplevel (button);
+      xfce_dialog_show_error (GTK_WINDOW (toplevel), error,
           _("Unable to open the Xfce workspace settings"));
       g_error_free (error);
     }
diff --git a/plugins/systray/systray.c b/plugins/systray/systray.c
index 00a2cf1..f79432f 100644
--- a/plugins/systray/systray.c
+++ b/plugins/systray/systray.c
@@ -549,7 +549,7 @@ systray_plugin_lost_selection (SystrayManager *manager,
   /* create fake error and show it */
   error.message = _("Most likely another widget took over the function "
                     "of a notification area. This plugin will close.");
-  xfce_dialog_show_error (gtk_widget_get_screen (GTK_WIDGET (plugin)), &error,
+  xfce_dialog_show_error (NULL, &error,
                           _("The notification area lost selection"));
 }
 



More information about the Xfce4-commits mailing list