diff --git a/gnome-control-center-allow-extra-tools-in-shell.patch b/gnome-control-center-allow-extra-tools-in-shell.patch index 75563c7..f52116f 100644 --- a/gnome-control-center-allow-extra-tools-in-shell.patch +++ b/gnome-control-center-allow-extra-tools-in-shell.patch @@ -1,6 +1,6 @@ -From 35797b29339cd33c45bba6bfc0431fb52e2415b4 Mon Sep 17 00:00:00 2001 +From fbdfce5abb17cae9a1b9b8df8f3c5f87af345789 Mon Sep 17 00:00:00 2001 From: Felix Zhang -Date: Fri, 13 Jun 2014 15:51:14 +0800 +Date: Thu, 12 Jun 2014 20:17:05 +0800 Subject: [PATCH] allow extra tools in shell --- @@ -12,7 +12,7 @@ Index: gnome-control-center-3.12.1/shell/cc-panel-loader.c =================================================================== --- gnome-control-center-3.12.1.orig/shell/cc-panel-loader.c +++ gnome-control-center-3.12.1/shell/cc-panel-loader.c -@@ -73,35 +73,40 @@ static struct { +@@ -73,35 +73,42 @@ static struct { GType (*get_type)(void); #endif } all_panels[] = { @@ -67,33 +67,48 @@ Index: gnome-control-center-3.12.1/shell/cc-panel-loader.c + PANEL_TYPE("wacom", cc_wacom_panel_get_type ), #endif + PANEL_TYPE("dconf-editor", NULL ), ++ PANEL_TYPE("alacarte", NULL ), + PANEL_TYPE("gpk-prefs", NULL ), + PANEL_TYPE("tracker-preferences", NULL ), ++ PANEL_TYPE("itweb-settings", NULL ), + PANEL_TYPE("gnome-tweak-tool", NULL ), + PANEL_TYPE("YaST", NULL ), }; GList * -@@ -160,8 +165,16 @@ cc_panel_loader_fill_model (CcShellModel +@@ -158,10 +165,22 @@ cc_panel_loader_fill_model (CcShellModel + { + GDesktopAppInfo *app; char *desktop_name; ++ char *name; int category; -- desktop_name = g_strconcat ("gnome-", all_panels[i].name, -- "-panel.desktop", NULL); -+ if (g_strcmp0 (all_panels[i].name, "dconf-editor") == 0 || -+ g_strcmp0 (all_panels[i].name, "gpk-prefs") == 0 || -+ g_strcmp0 (all_panels[i].name, "tracker-preferences") == 0 || -+ g_strcmp0 (all_panels[i].name, "gnome-tweak-tool") == 0 || -+ g_strcmp0 (all_panels[i].name, "YaST") == 0) ++#ifndef CC_PANEL_LOADER_NO_GTYPES ++ if (all_panels[i].get_type == NULL) { + desktop_name = g_strconcat (all_panels[i].name, + ".desktop", NULL); ++ name = g_strconcat ("suse-",all_panels[i].name, NULL); ++ } + else -+ desktop_name = g_strconcat ("gnome-", all_panels[i].name, -+ "-panel.desktop", NULL); ++#endif ++ { + desktop_name = g_strconcat ("gnome-", all_panels[i].name, + "-panel.desktop", NULL); ++ name = g_strconcat (all_panels[i].name); ++ } app = g_desktop_app_info_new (desktop_name); g_free (desktop_name); -@@ -226,6 +239,8 @@ cc_panel_loader_add_option_groups (GOpti +@@ -176,7 +195,7 @@ cc_panel_loader_fill_model (CcShellModel + if (G_UNLIKELY (category < 0)) + continue; + +- cc_shell_model_add_item (model, category, G_APP_INFO (app), all_panels[i].name); ++ cc_shell_model_add_item (model, category, G_APP_INFO (app), name); + g_object_unref (app); + } + } +@@ -226,6 +245,8 @@ cc_panel_loader_add_option_groups (GOpti { GType (*get_type) (void); get_type = all_panels[i].get_type; @@ -106,7 +121,7 @@ Index: gnome-control-center-3.12.1/shell/cc-window.c =================================================================== --- gnome-control-center-3.12.1.orig/shell/cc-window.c +++ gnome-control-center-3.12.1/shell/cc-window.c -@@ -139,6 +139,39 @@ get_icon_name_from_g_icon (GIcon *gicon) +@@ -139,6 +139,41 @@ get_icon_name_from_g_icon (GIcon *gicon) return NULL; } @@ -123,6 +138,8 @@ Index: gnome-control-center-3.12.1/shell/cc-window.c + desktop_file = g_strconcat ("/usr/share/applications/", id, + ".desktop", NULL); + appinfo = g_desktop_app_info_new_from_filename (desktop_file); ++ if (appinfo == NULL) ++ return; + + screen = gdk_screen_get_default(); + display = gdk_screen_get_display (screen); @@ -146,20 +163,25 @@ Index: gnome-control-center-3.12.1/shell/cc-window.c static gboolean activate_panel (CcWindow *self, const gchar *id, -@@ -153,6 +186,16 @@ activate_panel (CcWindow *self +@@ -152,6 +187,12 @@ activate_panel (CcWindow *self + if (!id) return FALSE; - -+ if (g_strcmp0 (id, "dconf-editor") == 0 || -+ g_strcmp0 (id, "gpk-prefs") == 0 || -+ g_strcmp0 (id, "tracker-preferences") == 0 || -+ g_strcmp0 (id, "gnome-tweak-tool") == 0 || -+ g_strcmp0 (id, "YaST") == 0) ++ if (g_str_has_prefix(id, "suse-")) + { -+ suse_activate_desktop (id); ++ /* we strip suse- prefix from the id we got to retrieve .desktop on disk */ ++ suse_activate_desktop (id+strlen("suse-")); + return FALSE; + } -+ + priv->current_panel = GTK_WIDGET (cc_panel_loader_load_by_name (CC_SHELL (self), id, parameters)); cc_shell_set_active_panel (CC_SHELL (self), CC_PANEL (priv->current_panel)); - gtk_widget_show (priv->current_panel); +@@ -1498,7 +1539,7 @@ create_header (CcWindow *self) + gtk_button_set_image (GTK_BUTTON (priv->search_button), image); + gtk_widget_set_valign (priv->search_button, GTK_ALIGN_CENTER); + gtk_style_context_add_class (gtk_widget_get_style_context (priv->search_button), +- "image-button"); ++ "image-button"); + gtk_header_bar_pack_end (GTK_HEADER_BAR (priv->header), priv->search_button); + + priv->top_right_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); diff --git a/gnome-control-center.changes b/gnome-control-center.changes index deb461b..e3fae38 100644 --- a/gnome-control-center.changes +++ b/gnome-control-center.changes @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Aug 7 12:31:29 UTC 2014 - fcrozat@suse.com + +- Update gnome-control-center-allow-extra-tools-in-shell.patch: + Improve patch (no longer need to change 3 files to add one icon) + and add alacarte and icedtea settings to available icons. +------------------------------------------------------------------- Mon Jun 23 07:58:24 UTC 2014 - fcrozat@suse.com - Update gnome-control-center-allow-yast-in-shell.patch: properly