[Xfce4-commits] <xfce4-panel:devel> Launch the migration utility from the panel.
Nick Schermer
noreply at xfce.org
Wed Oct 28 16:20:04 CET 2009
Updating branch refs/heads/devel
to 4ea2bbee76145dcf3fe68b686abc2cf11ddc4f2a (commit)
from 8ba6d363d7f575fbea38cb478a6b74ba7751a7e7 (commit)
commit 4ea2bbee76145dcf3fe68b686abc2cf11ddc4f2a
Author: Nick Schermer <nick at xfce.org>
Date: Wed Oct 28 12:03:10 2009 +0100
Launch the migration utility from the panel.
When there are no panels found the migration application is
spawned (sync).
panel/panel-application.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/panel/panel-application.c b/panel/panel-application.c
index e73a08a..5117d9c 100644
--- a/panel/panel-application.c
+++ b/panel/panel-application.c
@@ -28,6 +28,7 @@
#include <glib/gstdio.h>
#include <xfconf/xfconf.h>
#include <libxfce4util/libxfce4util.h>
+#include <libxfce4ui/libxfce4ui.h>
#include <common/panel-private.h>
#include <common/panel-xfconf.h>
@@ -45,6 +46,7 @@
#include <panel/panel-plugin-external.h>
#define AUTOSAVE_INTERVAL (10 * 60)
+#define MIGRATE_COMMAND LIBEXECDIR G_DIR_SEPARATOR_S "xfce4-panel-migrate"
@@ -172,6 +174,7 @@ static void
panel_application_init (PanelApplication *application)
{
PanelWindow *window;
+ GError *error = NULL;
/* initialize */
application->windows = NULL;
@@ -187,7 +190,11 @@ panel_application_init (PanelApplication *application)
/* check for any configuration */
if (!xfconf_channel_has_property (application->xfconf, "/panels"))
{
- /* here we're going to spawn the migration utility */
+ if (!g_spawn_command_line_sync (MIGRATE_COMMAND, NULL, NULL, NULL, &error))
+ {
+ xfce_dialog_show_error (NULL, error, _("Failed to launch the migration application"));
+ g_error_free (error);
+ }
}
/* check if we need to force all plugins to run external */
More information about the Xfce4-commits
mailing list