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
This commit is contained in:
Vincent Untz 2011-10-12 15:06:43 +00:00 committed by Git OBS Bridge
parent 0a7c8fccf4
commit f7fa4133e6
5 changed files with 178 additions and 0 deletions

View File

@ -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)
{

View File

@ -0,0 +1,32 @@
From 3df3e35ff97e569523f0a6b96fecb253a7f39aed Mon Sep 17 00:00:00 2001
From: Gary Ching-Pang Lin <chingpang@gmail.com>
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

View File

@ -0,0 +1,33 @@
commit 59fe530504a4359f66d9a112050970a52fe46281
Author: Vincent Untz <vuntz@gnome.org>
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;

View File

@ -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

View File

@ -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