From 2808362889f08147d4f2704f814bb086aa99171aa7d0a1ed9c24b42d3a54f1b4 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Thu, 6 Oct 2011 21:30:25 +0000 Subject: [PATCH 1/3] Accepting request 86862 from home:gary_lin:branches:GNOME:Factory - Add gnome-control-center-network-allocate-nm-connection.patch: allocate nm-connection for nma-wireless-dialog so that the user can configure the wireless conection settings. bgo#648174 OBS-URL: https://build.opensuse.org/request/show/86862 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-control-center?expand=0&rev=117 --- ...enter-network-allocate-nm-connection.patch | 25 +++++++++++++++++++ gnome-control-center.changes | 7 ++++++ gnome-control-center.spec | 3 +++ 3 files changed, 35 insertions(+) create mode 100644 gnome-control-center-network-allocate-nm-connection.patch diff --git a/gnome-control-center-network-allocate-nm-connection.patch b/gnome-control-center-network-allocate-nm-connection.patch new file mode 100644 index 0000000..f656587 --- /dev/null +++ b/gnome-control-center-network-allocate-nm-connection.patch @@ -0,0 +1,25 @@ +From fafc200c9017d152da2ce59c34130456133a2de6 Mon Sep 17 00:00:00 2001 +From: Gary Ching-Pang Lin +Date: Thu, 6 Oct 2011 12:16:59 +0800 +Subject: [PATCH] network: allocate nm-connection for nma-wireless-dialog + +--- + panels/network/network-dialogs.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/panels/network/network-dialogs.c b/panels/network/network-dialogs.c +index d446dbd..196c6ef 100644 +--- a/panels/network/network-dialogs.c ++++ b/panels/network/network-dialogs.c +@@ -281,6 +281,8 @@ cc_network_panel_connect_to_8021x_network (CcNetworkPanel *panel, + return; + } + ++ connection = nm_connection_new (); ++ + /* Need a UUID for the "always ask" stuff in the Dialog of Doom */ + s_con = (NMSettingConnection *) nm_setting_connection_new (); + uuid = nm_utils_uuid_generate (); +-- +1.7.3.4 + diff --git a/gnome-control-center.changes b/gnome-control-center.changes index a1ce2f0..489965a 100644 --- a/gnome-control-center.changes +++ b/gnome-control-center.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Oct 6 04:27:50 UTC 2011 - glin@suse.com + +- Add gnome-control-center-network-allocate-nm-connection.patch: + allocate nm-connection for nma-wireless-dialog so that the user + can configure the wireless conection settings. bgo#648174 + ------------------------------------------------------------------- Mon Oct 3 07:36:56 UTC 2011 - vuntz@opensuse.org diff --git a/gnome-control-center.spec b/gnome-control-center.spec index 8f0f30b..75a8909 100644 --- a/gnome-control-center.spec +++ b/gnome-control-center.spec @@ -70,6 +70,8 @@ Summary: The GNOME Control Center Source: http://download.gnome.org/sources/gnome-control-center/3.2/%{name}-%{version}.tar.bz2 # 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 gnome-control-center-network-allocate-nm-connection.patch bgo#648174 glin@suse.com -- Allocate nm-connection for nma-wireless-dialog +Patch15: gnome-control-center-network-allocate-nm-connection.patch Url: http://www.gnome.org # needed for printers panel Requires: cups-pk-helper @@ -131,6 +133,7 @@ various aspects of your desktop. translation-update-upstream #NEEDS-REBASE #%patch14 -p1 +%patch15 -p1 %if 0%{?BUILD_FROM_VCS} [ -x ./autogen.sh ] && NOCONFIGURE=1 ./autogen.sh From 0a7c8fccf47cf5308477d3371281e776c84cfa5c039450b4f6aa3a97e4425d97 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Thu, 6 Oct 2011 21:31:38 +0000 Subject: [PATCH 2/3] Accepting request 86985 from home:vuntz:branches:GNOME:Factory tweak OBS-URL: https://build.opensuse.org/request/show/86985 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-control-center?expand=0&rev=118 --- gnome-control-center.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnome-control-center.changes b/gnome-control-center.changes index 489965a..0ab9447 100644 --- a/gnome-control-center.changes +++ b/gnome-control-center.changes @@ -3,7 +3,7 @@ Thu Oct 6 04:27:50 UTC 2011 - glin@suse.com - Add gnome-control-center-network-allocate-nm-connection.patch: allocate nm-connection for nma-wireless-dialog so that the user - can configure the wireless conection settings. bgo#648174 + can configure the wireless conection settings (bgo#648174). ------------------------------------------------------------------- Mon Oct 3 07:36:56 UTC 2011 - vuntz@opensuse.org From f7fa4133e602b84985df0352451abe058331874f1e14862407d26314a2576088 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Wed, 12 Oct 2011 15:06:43 +0000 Subject: [PATCH 3/3] Accepting request 87552 from home:vuntz:branches:GNOME:Factory Add bits so we can have yast in control center + glin's patch OBS-URL: https://build.opensuse.org/request/show/87552 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-control-center?expand=0&rev=119 --- ...e-control-center-allow-yast-in-shell.patch | 57 +++++++++++++++++++ ...ol-center-setup-wpa-eap-no-active-ap.patch | 32 +++++++++++ gnome-control-center-shell-no-crash.patch | 33 +++++++++++ gnome-control-center.changes | 24 ++++++++ gnome-control-center.spec | 32 +++++++++++ 5 files changed, 178 insertions(+) create mode 100644 gnome-control-center-allow-yast-in-shell.patch create mode 100644 gnome-control-center-setup-wpa-eap-no-active-ap.patch create mode 100644 gnome-control-center-shell-no-crash.patch diff --git a/gnome-control-center-allow-yast-in-shell.patch b/gnome-control-center-allow-yast-in-shell.patch new file mode 100644 index 0000000..b7b54e4 --- /dev/null +++ b/gnome-control-center-allow-yast-in-shell.patch @@ -0,0 +1,57 @@ +Index: gnome-control-center-3.2.0/shell/gnome-control-center.c +=================================================================== +--- gnome-control-center-3.2.0.orig/shell/gnome-control-center.c ++++ gnome-control-center-3.2.0/shell/gnome-control-center.c +@@ -110,6 +110,39 @@ get_icon_name_from_g_icon (GIcon *gicon) + } + + static void ++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); ++} ++ ++static void + activate_panel (GnomeControlCenter *shell, + const gchar *id, + const gchar **argv, +@@ -127,6 +160,12 @@ activate_panel (GnomeControlCenter *shel + if (!desktop_file) + return; + ++ if (g_strcmp0 (id, "YaST.desktop") == 0) ++ { ++ suse_activate_desktop (shell, id, desktop_file); ++ return; ++ } ++ + if (id) + { + diff --git a/gnome-control-center-setup-wpa-eap-no-active-ap.patch b/gnome-control-center-setup-wpa-eap-no-active-ap.patch new file mode 100644 index 0000000..89f5be7 --- /dev/null +++ b/gnome-control-center-setup-wpa-eap-no-active-ap.patch @@ -0,0 +1,32 @@ +From 3df3e35ff97e569523f0a6b96fecb253a7f39aed Mon Sep 17 00:00:00 2001 +From: Gary Ching-Pang Lin +Date: Wed, 12 Oct 2011 16:33:53 +0800 +Subject: [PATCH] network: show wireless dialog even if there is no active AP + +The network panel ignored the request of showing the wireless +dialog if there is no active AP, and the user was not able to +set up the advanced wireless settings, such as WPA-EAP settings. + +https://bugzilla.gnome.org/show_bug.cgi?id=661526 +--- + panels/network/cc-network-panel.c | 4 +--- + 1 files changed, 1 insertions(+), 3 deletions(-) + +diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c +index 6698d86..e3c8e27 100644 +--- a/panels/network/cc-network-panel.c ++++ b/panels/network/cc-network-panel.c +@@ -911,9 +911,7 @@ add_access_point (CcNetworkPanel *panel, NMAccessPoint *ap, NMAccessPoint *activ + -1); + + /* is this what we're on already? */ +- if (active == NULL) +- return; +- if (nm_utils_same_ssid (ssid, nm_access_point_get_ssid (active), TRUE)) { ++ if (active && nm_utils_same_ssid (ssid, nm_access_point_get_ssid (active), TRUE)) { + widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, + "combobox_wireless_network_name")); + gtk_combo_box_set_active_iter (GTK_COMBO_BOX (widget), &treeiter); +-- +1.7.3.4 + diff --git a/gnome-control-center-shell-no-crash.patch b/gnome-control-center-shell-no-crash.patch new file mode 100644 index 0000000..8350945 --- /dev/null +++ b/gnome-control-center-shell-no-crash.patch @@ -0,0 +1,33 @@ +commit 59fe530504a4359f66d9a112050970a52fe46281 +Author: Vincent Untz +Date: Tue Oct 11 22:51:42 2011 +0200 + + shell: Avoid crash when searching if a .desktop has no comment + + The code doing the search assumes the description column is set, which + might not be the case. + + https://bugzilla.gnome.org/show_bug.cgi?id=661494 + +diff --git a/shell/shell-search-renderer.c b/shell/shell-search-renderer.c +index 0667bc0..6032af8 100644 +--- a/shell/shell-search-renderer.c ++++ b/shell/shell-search-renderer.c +@@ -154,12 +154,15 @@ shell_search_renderer_set_layout (ShellSearchRenderer *cell, GtkWidget *widget) + needle = g_utf8_casefold (priv->search_string, -1); + else + needle = NULL; +- haystack = g_utf8_casefold (full_string, -1); ++ if (full_string != NULL) ++ haystack = g_utf8_casefold (full_string, -1); ++ else ++ haystack = NULL; + + /* clear any previous attributes */ + pango_layout_set_attributes (priv->layout, NULL); + +- if (priv->search_string && priv->title ++ if (priv->search_string && priv->search_target && priv->title + && (strstr (haystack, needle))) + { + gchar *start; diff --git a/gnome-control-center.changes b/gnome-control-center.changes index 0ab9447..502cf76 100644 --- a/gnome-control-center.changes +++ b/gnome-control-center.changes @@ -1,3 +1,27 @@ +------------------------------------------------------------------- +Wed Oct 12 08:49:59 UTC 2011 - glin@suse.com + +- Add gnome-control-center-setup-wpa-eap-no-active-ap.patch: show + the wireless setup dialog regardless of whether there is an + active AP or not (bgo#661526). + +------------------------------------------------------------------- +Tue Oct 11 18:09:05 UTC 2011 - vuntz@opensuse.org + +- Add gnome-control-center-allow-yast-in-shell.patch: allow the + launch of the YaST shell from the gnome-control-center shell. We + need a special case as the gnome-control-center shell only + supports internal panels, but we want an exception for the YaST + shell. +- Add gnome-control-center-shell-no-crash.patch: fix crash on + search when a .desktop file has no comment. +- Split /etc/xdg/menus/gnomecc.menu in a branding-upstream + subpackage, so that we can have a branding-openSUSE package that + will add YaST to the control center shell. +- Add a Requires on gnome-control-center-branding to the main + subpackage, to make sure we always have a menu definition for the + shell. + ------------------------------------------------------------------- Thu Oct 6 04:27:50 UTC 2011 - glin@suse.com diff --git a/gnome-control-center.spec b/gnome-control-center.spec index 75a8909..f8a3726 100644 --- a/gnome-control-center.spec +++ b/gnome-control-center.spec @@ -68,11 +68,18 @@ Version: 3.2.0 Release: 1 Summary: The GNOME Control Center Source: http://download.gnome.org/sources/gnome-control-center/3.2/%{name}-%{version}.tar.bz2 +# PATCH-FEATURE-OPENSUSE gnome-control-center-allow-yast-in-shell.patch vuntz@opensuse.org -- 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-FIX-UPSTREAM gnome-control-center-shell-no-crash.patch vuntz@opensuse.org -- Do not crash on search when a .desktop has no Comment +Patch1: gnome-control-center-shell-no-crash.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 gnome-control-center-network-allocate-nm-connection.patch bgo#648174 glin@suse.com -- Allocate nm-connection for nma-wireless-dialog Patch15: gnome-control-center-network-allocate-nm-connection.patch +# PATCH-FIX-UPSTREAM gnome-control-center-setup-wpa-eap-no-active-ap.patch bgo#61526 glin@suse.com -- Do not ignore the wireless dialog request regardless of whether there is an active AP or not +Patch16: gnome-control-center-setup-wpa-eap-no-active-ap.patch Url: http://www.gnome.org +Requires: %{name}-branding = %{version} # needed for printers panel Requires: cups-pk-helper # needed for /usr/bin/glxinfo, used by System info panel @@ -98,6 +105,25 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build The control center is GNOME's main interface for configuration of various aspects of your desktop. +%package branding-upstream +License: GPLv2+ +Summary: The GNOME Control Center -- Upstream Definition of Shell Content +Group: System/GUI/GNOME +Requires: %{name} = %{version} +Provides: %{name}-branding = %{version} +Conflicts: otherproviders(%{name}-branding) +Supplements: packageand(%{name}:branding-upstream) +BuildArch: noarch +#BRAND: This package contains the definitions of the content appearing +#BRAND: in the shell (/etc/xdg/menus/gnomecc.menu). + +%description branding-upstream +The control center is GNOME's main interface for configuration of +various aspects of your desktop. + +This package provides the upstream definition of what appears in the +control center. + %package user-faces License: GPLv2+ Summary: Login Managers user avatars @@ -131,9 +157,12 @@ various aspects of your desktop. %prep %setup -q translation-update-upstream +%patch0 -p1 +%patch1 -p1 #NEEDS-REBASE #%patch14 -p1 %patch15 -p1 +%patch16 -p1 %if 0%{?BUILD_FROM_VCS} [ -x ./autogen.sh ] && NOCONFIGURE=1 ./autogen.sh @@ -219,6 +248,9 @@ rm -rf $RPM_BUILD_ROOT %dir %{_datadir}/sounds/gnome/default %dir %{_datadir}/sounds/gnome/default/alerts %{_datadir}/sounds/gnome/default/alerts/*.ogg + +%files branding-upstream +%defattr (-, root, root) %{_sysconfdir}/xdg/menus/gnomecc.menu %files lang -f %{name}-2.0.lang