2013-05-08 20:00:27 +02:00
|
|
|
Index: gnome-control-center-3.8.1.5/shell/cc-panel-loader.c
|
2011-10-12 17:06:43 +02:00
|
|
|
===================================================================
|
2013-05-08 20:00:27 +02:00
|
|
|
--- gnome-control-center-3.8.1.5.orig/shell/cc-panel-loader.c
|
|
|
|
+++ gnome-control-center-3.8.1.5/shell/cc-panel-loader.c
|
2013-04-01 13:46:01 +02:00
|
|
|
@@ -102,6 +102,7 @@ static struct {
|
|
|
|
#ifdef BUILD_WACOM
|
|
|
|
PANEL_TYPE("wacom", cc_wacom_panel_get_type ),
|
|
|
|
#endif
|
|
|
|
+ PANEL_TYPE("YaST", NULL ),
|
|
|
|
};
|
|
|
|
|
|
|
|
GList *
|
|
|
|
@@ -160,8 +161,11 @@ cc_panel_loader_fill_model (CcShellModel
|
|
|
|
char *desktop_name;
|
|
|
|
int category;
|
|
|
|
|
|
|
|
- desktop_name = g_strconcat ("gnome-", all_panels[i].name,
|
|
|
|
- "-panel.desktop", NULL);
|
|
|
|
+ if (g_strcmp0 (all_panels[i].name, "YaST") == 0)
|
|
|
|
+ desktop_name = g_strconcat (all_panels[i].name, ".desktop", NULL);
|
|
|
|
+ else
|
|
|
|
+ desktop_name = g_strconcat ("gnome-", all_panels[i].name,
|
|
|
|
+ "-panel.desktop", NULL);
|
|
|
|
app = g_desktop_app_info_new (desktop_name);
|
2013-05-08 20:00:27 +02:00
|
|
|
g_free (desktop_name);
|
2013-04-01 13:46:01 +02:00
|
|
|
|
2013-05-08 20:00:27 +02:00
|
|
|
Index: gnome-control-center-3.8.1.5/shell/cc-window.c
|
2013-04-01 13:46:01 +02:00
|
|
|
===================================================================
|
2013-05-08 20:00:27 +02:00
|
|
|
--- gnome-control-center-3.8.1.5.orig/shell/cc-window.c
|
|
|
|
+++ gnome-control-center-3.8.1.5/shell/cc-window.c
|
2013-04-01 13:46:01 +02:00
|
|
|
@@ -134,6 +134,38 @@ 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
|
2013-04-01 13:46:01 +02:00
|
|
|
+suse_activate_desktop (const gchar *name)
|
2011-10-12 17:06:43 +02:00
|
|
|
+{
|
|
|
|
+ GDesktopAppInfo *appinfo;
|
2013-04-01 13:46:01 +02:00
|
|
|
+ const gchar *desktop_file;
|
2011-10-12 17:06:43 +02:00
|
|
|
+ GdkScreen *screen;
|
|
|
|
+ GdkDisplay *display;
|
2013-04-01 13:46:01 +02:00
|
|
|
+ GdkAppLaunchContext *context;
|
2011-10-12 17:06:43 +02:00
|
|
|
+ GError *error;
|
|
|
|
+
|
2013-04-01 13:46:01 +02:00
|
|
|
+ desktop_file = g_strconcat (name, ".desktop", NULL);
|
|
|
|
+ appinfo = g_desktop_app_info_new (desktop_file);
|
2011-10-12 17:06:43 +02:00
|
|
|
+
|
2013-04-01 13:46:01 +02:00
|
|
|
+ screen = gdk_screen_get_default();
|
2011-10-12 17:06:43 +02:00
|
|
|
+ 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,
|
2013-04-01 13:46:01 +02:00
|
|
|
+ &error);
|
2011-10-12 17:06:43 +02:00
|
|
|
+ if (error) {
|
2013-04-01 13:46:01 +02:00
|
|
|
+ g_printerr ("Could not launch '%s': %s\n", name, error->message);
|
2011-10-12 17:06:43 +02:00
|
|
|
+ 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-04-01 13:46:01 +02:00
|
|
|
@@ -148,6 +180,12 @@ 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-04-01 13:46:01 +02:00
|
|
|
+ if (g_strcmp0 (id, "YaST") == 0)
|
|
|
|
+ {
|
|
|
|
+ suse_activate_desktop (name);
|
2013-03-13 23:38:52 +01:00
|
|
|
+ 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);
|