Accepting request 243900 from home:fcrozat:branches:GNOME:Factory
- 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. OBS-URL: https://build.opensuse.org/request/show/243900 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-control-center?expand=0&rev=245
This commit is contained in:
parent
461d4e1885
commit
183969d3a6
@ -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 <fezhang@suse.com>
|
From: Felix Zhang <fezhang@suse.com>
|
||||||
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
|
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.orig/shell/cc-panel-loader.c
|
||||||
+++ gnome-control-center-3.12.1/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);
|
GType (*get_type)(void);
|
||||||
#endif
|
#endif
|
||||||
} all_panels[] = {
|
} 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 ),
|
+ PANEL_TYPE("wacom", cc_wacom_panel_get_type ),
|
||||||
#endif
|
#endif
|
||||||
+ PANEL_TYPE("dconf-editor", NULL ),
|
+ PANEL_TYPE("dconf-editor", NULL ),
|
||||||
|
+ PANEL_TYPE("alacarte", NULL ),
|
||||||
+ PANEL_TYPE("gpk-prefs", NULL ),
|
+ PANEL_TYPE("gpk-prefs", NULL ),
|
||||||
+ PANEL_TYPE("tracker-preferences", NULL ),
|
+ PANEL_TYPE("tracker-preferences", NULL ),
|
||||||
|
+ PANEL_TYPE("itweb-settings", NULL ),
|
||||||
+ PANEL_TYPE("gnome-tweak-tool", NULL ),
|
+ PANEL_TYPE("gnome-tweak-tool", NULL ),
|
||||||
+ PANEL_TYPE("YaST", NULL ),
|
+ PANEL_TYPE("YaST", NULL ),
|
||||||
};
|
};
|
||||||
|
|
||||||
GList *
|
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 *desktop_name;
|
||||||
|
+ char *name;
|
||||||
int category;
|
int category;
|
||||||
|
|
||||||
- desktop_name = g_strconcat ("gnome-", all_panels[i].name,
|
+#ifndef CC_PANEL_LOADER_NO_GTYPES
|
||||||
- "-panel.desktop", NULL);
|
+ if (all_panels[i].get_type == 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)
|
|
||||||
+ desktop_name = g_strconcat (all_panels[i].name,
|
+ desktop_name = g_strconcat (all_panels[i].name,
|
||||||
+ ".desktop", NULL);
|
+ ".desktop", NULL);
|
||||||
|
+ name = g_strconcat ("suse-",all_panels[i].name, NULL);
|
||||||
|
+ }
|
||||||
+ else
|
+ else
|
||||||
+ desktop_name = g_strconcat ("gnome-", all_panels[i].name,
|
+#endif
|
||||||
+ "-panel.desktop", NULL);
|
+ {
|
||||||
|
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);
|
app = g_desktop_app_info_new (desktop_name);
|
||||||
g_free (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);
|
GType (*get_type) (void);
|
||||||
get_type = all_panels[i].get_type;
|
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.orig/shell/cc-window.c
|
||||||
+++ gnome-control-center-3.12.1/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;
|
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_file = g_strconcat ("/usr/share/applications/", id,
|
||||||
+ ".desktop", NULL);
|
+ ".desktop", NULL);
|
||||||
+ appinfo = g_desktop_app_info_new_from_filename (desktop_file);
|
+ appinfo = g_desktop_app_info_new_from_filename (desktop_file);
|
||||||
|
+ if (appinfo == NULL)
|
||||||
|
+ return;
|
||||||
+
|
+
|
||||||
+ screen = gdk_screen_get_default();
|
+ screen = gdk_screen_get_default();
|
||||||
+ display = gdk_screen_get_display (screen);
|
+ display = gdk_screen_get_display (screen);
|
||||||
@ -146,20 +163,25 @@ Index: gnome-control-center-3.12.1/shell/cc-window.c
|
|||||||
static gboolean
|
static gboolean
|
||||||
activate_panel (CcWindow *self,
|
activate_panel (CcWindow *self,
|
||||||
const gchar *id,
|
const gchar *id,
|
||||||
@@ -153,6 +186,16 @@ activate_panel (CcWindow *self
|
@@ -152,6 +187,12 @@ activate_panel (CcWindow *self
|
||||||
|
|
||||||
if (!id)
|
if (!id)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
+ if (g_str_has_prefix(id, "suse-"))
|
||||||
+ 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)
|
|
||||||
+ {
|
+ {
|
||||||
+ 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;
|
+ return FALSE;
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
priv->current_panel = GTK_WIDGET (cc_panel_loader_load_by_name (CC_SHELL (self), id, parameters));
|
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));
|
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);
|
||||||
|
@ -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
|
Mon Jun 23 07:58:24 UTC 2014 - fcrozat@suse.com
|
||||||
|
|
||||||
- Update gnome-control-center-allow-yast-in-shell.patch: properly
|
- Update gnome-control-center-allow-yast-in-shell.patch: properly
|
||||||
|
Loading…
Reference in New Issue
Block a user