Hello community,
here is the log from the commit of package gnome-control-center for
openSUSE:Factory checked in at 2014-06-19 13:19:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-control-center (Old)
and /work/SRC/openSUSE:Factory/.gnome-control-center.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnome-control-center"
Changes:
--------
---
/work/SRC/openSUSE:Factory/gnome-control-center/gnome-control-center.changes
2014-05-05 21:15:59.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.gnome-control-center.new/gnome-control-center.changes
2014-06-19 13:19:33.000000000 +0200
@@ -1,0 +2,14 @@
+Fri Jun 13 08:03:48 UTC 2014 - [email protected]
+
+- Update gnome-control-center-allow-yast-in-shell.patch, add
+ dconf-editor, pkg-prefs, gnome-tweak-tool and tracker-preferences
+ to the patch so that they can show in g-c-c shell like YaST does
+ (bnc#866235).
+ + Renamed the patch to
+ gnome-control-center-allow-extra-tools-in-shell.patch.
+ + %suse_update_desktop_file must be added to specfiles of the
+ added tools with category X-GNOME-PersonalSettings and/or
+ X-GNOME-SystemSettings before g-c-c can show them in the
+ correct category view.
+
+-------------------------------------------------------------------
Old:
----
gnome-control-center-allow-yast-in-shell.patch
New:
----
gnome-control-center-allow-extra-tools-in-shell.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gnome-control-center.spec ++++++
--- /var/tmp/diff_new_pack.0y5CJv/_old 2014-06-19 13:19:34.000000000 +0200
+++ /var/tmp/diff_new_pack.0y5CJv/_new 2014-06-19 13:19:34.000000000 +0200
@@ -35,9 +35,9 @@
Group: System/GUI/GNOME
Url: http://www.gnome.org
Source:
http://download.gnome.org/sources/gnome-control-center/3.12/%{name}-%{version}.tar.xz
+# PATCH-FEATURE-OPENSUSE gnome-control-center-allow-extra-tools-in-shell.patch
[email protected] -- Add dconf-editor, pkg-prefs, gnome-tweak-tool and
tracker-preferences to gnome-control-center-allow-yast-in-shell.patch so that
they can launch from g-c-c shell like YaST does. Also change the patch with a
more generic name.
+Patch0: gnome-control-center-allow-extra-tools-in-shell.patch
# PATCH-FEATURE-OPENSUSE gnome-control-center-allow-yast-in-shell.patch
[email protected] -- Allow the launch of the yast shell from the g-c-c shell;
it's quite ugly, but on the other hand, we don't want to change the behavior of
the shell except for yast...
-Patch0: gnome-control-center-allow-yast-in-shell.patch
-# PATCH-NEEDS-REBASE gnome-control-center-system-proxy-configuration.patch --
this needs to be reimplemented to be more distro-generic before submitting
upstream - docs at http://en.opensuse.org/GNOME/Proxy_configuration (was
PATCH-FEATURE-OPENSUSE)
Patch14: gnome-control-center-system-proxy-configuration.patch
# PATCH-FIX-UPSTREAM gcc-private-connection.patch bnc#751211 bgo#646187
[email protected] -- network: create private connections if the user if not
authorized
Patch15: gcc-private-connection.patch
++++++ gnome-control-center-allow-extra-tools-in-shell.patch ++++++
>From 35797b29339cd33c45bba6bfc0431fb52e2415b4 Mon Sep 17 00:00:00 2001
From: Felix Zhang <[email protected]>
Date: Fri, 13 Jun 2014 15:51:14 +0800
Subject: [PATCH] allow extra tools in shell
---
shell/cc-panel-loader.c | 61 ++++++++++++++++++++++++++++++-------------------
shell/cc-window.c | 43 ++++++++++++++++++++++++++++++++++
2 files changed, 81 insertions(+), 23 deletions(-)
diff --git a/shell/cc-panel-loader.c b/shell/cc-panel-loader.c
index 26576dc..ec6b675 100644
--- a/shell/cc-panel-loader.c
+++ b/shell/cc-panel-loader.c
@@ -73,35 +73,40 @@ static struct {
GType (*get_type)(void);
#endif
} all_panels[] = {
- PANEL_TYPE("background", cc_background_panel_get_type ),
+ PANEL_TYPE("background", cc_background_panel_get_type ),
#ifdef BUILD_BLUETOOTH
- PANEL_TYPE("bluetooth", cc_bluetooth_panel_get_type ),
+ PANEL_TYPE("bluetooth", cc_bluetooth_panel_get_type ),
#endif
- PANEL_TYPE("color", cc_color_panel_get_type ),
- PANEL_TYPE("datetime", cc_date_time_panel_get_type ),
- PANEL_TYPE("display", cc_display_panel_get_type ),
- PANEL_TYPE("info", cc_info_panel_get_type ),
- PANEL_TYPE("keyboard", cc_keyboard_panel_get_type ),
- PANEL_TYPE("mouse", cc_mouse_panel_get_type ),
+ PANEL_TYPE("color", cc_color_panel_get_type ),
+ PANEL_TYPE("datetime", cc_date_time_panel_get_type ),
+ PANEL_TYPE("display", cc_display_panel_get_type ),
+ PANEL_TYPE("info", cc_info_panel_get_type ),
+ PANEL_TYPE("keyboard", cc_keyboard_panel_get_type ),
+ PANEL_TYPE("mouse", cc_mouse_panel_get_type ),
#ifdef BUILD_NETWORK
- PANEL_TYPE("network", cc_network_panel_get_type ),
+ PANEL_TYPE("network", cc_network_panel_get_type ),
#endif
- PANEL_TYPE("notifications", cc_notifications_panel_get_type),
- PANEL_TYPE("online-accounts", cc_goa_panel_get_type ),
- PANEL_TYPE("power", cc_power_panel_get_type ),
+ PANEL_TYPE("notifications", cc_notifications_panel_get_type),
+ PANEL_TYPE("online-a ccounts", cc_goa_panel_get_type ),
+ PANEL_TYPE("power", cc_power_panel_get_type ),
#ifdef BUILD_PRINTERS
- PANEL_TYPE("printers", cc_printers_panel_get_type ),
+ PANEL_TYPE("printers", cc_printers_panel_get_type ),
#endif
- PANEL_TYPE("privacy", cc_privacy_panel_get_type ),
- PANEL_TYPE("region", cc_region_panel_get_type ),
- PANEL_TYPE("search", cc_search_panel_get_type ),
- PANEL_TYPE("sharing", cc_sharing_panel_get_type ),
- PANEL_TYPE("sound", cc_sound_panel_get_type ),
- PANEL_TYPE("universal-access", cc_ua_panel_get_type ),
- PANEL_TYPE("user-accounts", cc_user_panel_get_type ),
+ PANEL_TYPE("privacy", cc_privacy_panel_get_type ),
+ PANEL_TYPE("region", cc_region_panel_get_type ),
+ PANEL_TYPE("search", cc_search_panel_get_type ),
+ PANEL_TYPE("sharing", cc_sharing_panel_get_type ),
+ PANEL_TYPE("sound", cc_sound_panel_get_type ),
+ PANEL_TYPE("universal-access", cc_ua_panel_get_type ),
+ PANEL_TYPE("user-accounts", cc_user_panel_get_type ),
#ifdef BUILD_WACOM
- PANEL_TYPE("wacom", cc_wacom_panel_get_type ),
+ PANEL_TYPE("wacom", cc_wacom_panel_get_type ),
#endif
+ PANEL_TYPE("dconf-editor", NULL ),
+ PANEL_TYPE("gpk-prefs", NULL ),
+ PANEL_TYPE("tracker-preferences", NULL ),
+ PANEL_TYPE("gnome-tweak-tool", NULL ),
+ PANEL_TYPE("YaST", NULL ),
};
GList *
@@ -160,8 +165,16 @@ cc_panel_loader_fill_model (CcShellModel *model)
char *desktop_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)
+ 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);
g_free (desktop_name);
@@ -226,6 +239,8 @@ cc_panel_loader_add_option_groups (GOptionContext *context,
{
GType (*get_type) (void);
get_type = all_panels[i].get_type;
+ if (get_type == NULL)
+ continue;
GOptionGroup *group = cc_panel_get_option_group (get_type(), builder);
if (group == NULL)
continue;
diff --git a/shell/cc-window.c b/shell/cc-window.c
index 29b28e6..8e8f096 100644
--- a/shell/cc-window.c
+++ b/shell/cc-window.c
@@ -139,6 +139,39 @@ get_icon_name_from_g_icon (GIcon *gicon)
return NULL;
}
+static void
+suse_activate_desktop (const gchar *id)
+{
+ GDesktopAppInfo *appinfo;
+ const gchar *desktop_file;
+ GdkScreen *screen;
+ GdkDisplay *display;
+ GdkAppLaunchContext *context;
+ GError *error;
+
+ desktop_file = g_strconcat ("/usr/share/applications/", id,
+ ".desktop", NULL);
+ appinfo = g_desktop_app_info_new_from_filename (desktop_file);
+
+ screen = gdk_screen_get_default();
+ 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);
+}
+
static gboolean
activate_panel (CcWindow *self,
const gchar *id,
@@ -153,6 +186,16 @@ 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)
+ {
+ suse_activate_desktop (id);
+ 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);
--
1.7.12.4
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]