2013-03-13 23:38:52 +01:00
|
|
|
Index: gnome-control-center-3.7.91/shell/cc-window.c
|
2011-10-12 17:06:43 +02:00
|
|
|
===================================================================
|
2013-03-13 23:38:52 +01:00
|
|
|
--- gnome-control-center-3.7.91.orig/shell/cc-window.c
|
|
|
|
+++ gnome-control-center-3.7.91/shell/cc-window.c
|
|
|
|
@@ -133,6 +133,39 @@ get_icon_name_from_g_icon (GIcon *gicon)
|
2012-09-12 11:27:40 +02:00
|
|
|
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
|
2013-03-13 23:38:52 +01:00
|
|
|
activate_panel (CcWindow *self,
|
2011-10-12 17:06:43 +02:00
|
|
|
const gchar *id,
|
2013-03-13 23:38:52 +01:00
|
|
|
@@ -147,6 +180,11 @@ activate_panel (CcWindow *self
|
2012-09-12 11:27:40 +02:00
|
|
|
if (!id)
|
|
|
|
return FALSE;
|
2011-10-12 17:06:43 +02:00
|
|
|
|
2013-03-13 23:38:52 +01:00
|
|
|
+ if (g_strcmp0 (id, "yast") == 0) {
|
|
|
|
+ suse_activate_desktop (shell, id, "YaST.desktop");
|
|
|
|
+ return TRUE;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
priv->current_panel = GTK_WIDGET (cc_panel_loader_load_by_name (CC_SHELL (self), id, argv));
|
|
|
|
cc_shell_set_active_panel (CC_SHELL (self), CC_PANEL (priv->current_panel));
|
|
|
|
gtk_widget_show (priv->current_panel);
|
|
|
|
Index: gnome-control-center-3.7.91/shell/cc-panel-loader.c
|
|
|
|
===================================================================
|
|
|
|
--- gnome-control-center-3.7.91.orig/shell/cc-panel-loader.c
|
|
|
|
+++ gnome-control-center-3.7.91/shell/cc-panel-loader.c
|
|
|
|
@@ -178,6 +178,23 @@ cc_panel_loader_fill_model (CcShellModel
|
|
|
|
cc_shell_model_add_item (model, category, G_APP_INFO (app), all_panels[i].name);
|
|
|
|
g_object_unref (app);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ do
|
2011-10-12 17:06:43 +02:00
|
|
|
+ {
|
2013-03-13 23:38:52 +01:00
|
|
|
+ GDesktopAppInfo *app;
|
2011-10-12 17:06:43 +02:00
|
|
|
+
|
2013-03-13 23:38:52 +01:00
|
|
|
+ app = g_desktop_app_info_new ("YaST.desktop");
|
|
|
|
+
|
|
|
|
+ if (app == NULL)
|
|
|
|
+ {
|
|
|
|
+ g_warning ("Missing desktop file for YaST");
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ cc_shell_model_add_item (model, CC_CATEGORY_SYSTEM, G_APP_INFO (app), "yast");
|
|
|
|
+ g_object_unref (app);
|
|
|
|
+ }
|
|
|
|
+ while (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifndef CC_PANEL_LOADER_NO_GTYPES
|