2012-09-12 11:27:40 +02:00
|
|
|
Index: gnome-control-center-3.5.90/shell/gnome-control-center.c
|
2011-10-12 17:06:43 +02:00
|
|
|
===================================================================
|
2012-09-12 11:27:40 +02:00
|
|
|
--- gnome-control-center-3.5.90.orig/shell/gnome-control-center.c
|
|
|
|
+++ gnome-control-center-3.5.90/shell/gnome-control-center.c
|
|
|
|
@@ -172,6 +172,39 @@ get_icon_name_from_g_icon (GIcon *gicon)
|
|
|
|
return NULL;
|
2011-10-12 17:06:43 +02:00
|
|
|
}
|
|
|
|
|
2012-09-12 11:27:40 +02:00
|
|
|
+static void
|
2011-10-12 17:06:43 +02:00
|
|
|
+suse_activate_desktop (GnomeControlCenter *shell,
|
|
|
|
+ const gchar *id,
|
|
|
|
+ const gchar *desktop_file)
|
|
|
|
+{
|
|
|
|
+ GDesktopAppInfo *appinfo;
|
|
|
|
+ GdkAppLaunchContext *context;
|
|
|
|
+ GdkScreen *screen;
|
|
|
|
+ GdkDisplay *display;
|
|
|
|
+ GError *error;
|
|
|
|
+
|
|
|
|
+ appinfo = g_desktop_app_info_new_from_filename (desktop_file);
|
|
|
|
+
|
|
|
|
+ screen = gtk_widget_get_screen (shell->priv->window);
|
|
|
|
+ display = gdk_screen_get_display (screen);
|
|
|
|
+ context = gdk_display_get_app_launch_context (display);
|
|
|
|
+ gdk_app_launch_context_set_screen (context, screen);
|
|
|
|
+ gdk_app_launch_context_set_timestamp (context, gtk_get_current_event_time ());
|
|
|
|
+
|
|
|
|
+ error = NULL;
|
|
|
|
+ g_app_info_launch_uris (G_APP_INFO (appinfo), NULL,
|
|
|
|
+ (GAppLaunchContext *) context,
|
|
|
|
+ &error);
|
|
|
|
+
|
|
|
|
+ if (error) {
|
|
|
|
+ g_printerr ("Could not launch '%s': %s\n", id, error->message);
|
|
|
|
+ g_clear_error (&error);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ g_object_unref (context);
|
|
|
|
+ g_object_unref (appinfo);
|
|
|
|
+}
|
|
|
|
+
|
2012-09-12 11:27:40 +02:00
|
|
|
static gboolean
|
2011-10-12 17:06:43 +02:00
|
|
|
activate_panel (GnomeControlCenter *shell,
|
|
|
|
const gchar *id,
|
2012-09-12 11:27:40 +02:00
|
|
|
@@ -195,6 +228,12 @@ activate_panel (GnomeControlCenter *shel
|
|
|
|
if (!id)
|
|
|
|
return FALSE;
|
2011-10-12 17:06:43 +02:00
|
|
|
|
|
|
|
+ if (g_strcmp0 (id, "YaST.desktop") == 0)
|
|
|
|
+ {
|
|
|
|
+ suse_activate_desktop (shell, id, desktop_file);
|
2012-09-12 11:27:40 +02:00
|
|
|
+ return TRUE;
|
2011-10-12 17:06:43 +02:00
|
|
|
+ }
|
|
|
|
+
|
2012-09-12 11:27:40 +02:00
|
|
|
for (l = panels; l != NULL; l = l->next)
|
2011-10-12 17:06:43 +02:00
|
|
|
{
|
2012-09-12 11:27:40 +02:00
|
|
|
GIOExtension *extension;
|