Accepting request 259905 from home:badshah400:boo904047

Fixes prepared for maintenance release for 13.2, see boo#904047c5 for a summary

OBS-URL: https://build.opensuse.org/request/show/259905
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-control-center?expand=0&rev=261
This commit is contained in:
Dominique Leuenberger 2014-11-06 08:10:34 +00:00 committed by Git OBS Bridge
parent 9a6f6a7757
commit ca151d6f07
6 changed files with 2076 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From 57aab756e9d67d6420bcb651537e45930a257aa2 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Mon, 20 Oct 2014 13:41:21 +0200
Subject: background: Fix possible crash when date isn't available
https://bugzilla.gnome.org/show_bug.cgi?id=736475
diff --git a/panels/background/bg-pictures-source.c b/panels/background/bg-pictures-source.c
index c165fa3..1dcce19 100644
--- a/panels/background/bg-pictures-source.c
+++ b/panels/background/bg-pictures-source.c
@@ -571,7 +571,12 @@ add_single_file_from_media (BgPicturesSource *bg_source,
* plugin, GRL_METADATA_KEY_MODIFICATION_DATE is not
*/
mtime = grl_media_get_creation_date (media);
- mtime_unix = g_date_time_to_unix (mtime);
+ if (!mtime)
+ mtime = grl_media_get_modification_date (media);
+ if (mtime)
+ mtime_unix = g_date_time_to_unix (mtime);
+ else
+ mtime_unix = g_get_real_time () / G_USEC_PER_SEC;
return add_single_file (bg_source, file, content_type, (guint64) mtime_unix, NULL);
}
--
cgit v0.10.1

View File

@ -0,0 +1,107 @@
Index: gnome-control-center-3.14.1/panels/datetime/cc-datetime-panel.c
===================================================================
--- gnome-control-center-3.14.1.orig/panels/datetime/cc-datetime-panel.c
+++ gnome-control-center-3.14.1/panels/datetime/cc-datetime-panel.c
@@ -59,6 +59,7 @@ enum {
#define W(x) (GtkWidget*) gtk_builder_get_object (priv->builder, x)
#define DATETIME_PERMISSION "org.gnome.controlcenter.datetime.configure"
+#define DATETIME_TZ_PERMISSION "org.freedesktop.timedate1.set-timezone"
#define CLOCK_SCHEMA "org.gnome.desktop.interface"
#define CLOCK_FORMAT_KEY "clock-format"
@@ -99,6 +100,7 @@ struct _CcDateTimePanelPrivate
GCancellable *cancellable;
GPermission *permission;
+ GPermission *tz_permission;
};
static void update_time (CcDateTimePanel *self);
@@ -133,6 +135,7 @@ cc_date_time_panel_dispose (GObject *obj
g_clear_object (&priv->clock_tracker);
g_clear_object (&priv->dtm);
g_clear_object (&priv->permission);
+ g_clear_object (&priv->tz_permission);
g_clear_object (&priv->clock_settings);
g_clear_object (&priv->datetime_settings);
g_clear_object (&priv->filechooser_settings);
@@ -777,24 +780,24 @@ on_permission_changed (GPermission *perm
gpointer data)
{
CcDateTimePanelPrivate *priv = CC_DATE_TIME_PANEL (data)->priv;
- gboolean allowed, auto_timezone, using_ntp;
+ gboolean allowed, tz_allowed, auto_timezone, using_ntp;
allowed = (priv->permission == NULL || g_permission_get_allowed (priv->permission));
+ tz_allowed = (priv->tz_permission == NULL || g_permission_get_allowed (priv->tz_permission));
using_ntp = gtk_switch_get_active (GTK_SWITCH (W("network_time_switch")));
auto_timezone = gtk_switch_get_active (GTK_SWITCH (W("auto_timezone_switch")));
/* All the widgets but the lock button and the 24h setting */
gtk_widget_set_sensitive (W("auto-datetime-row"), allowed);
- gtk_widget_set_sensitive (W("auto-timezone-row"), allowed);
+ gtk_widget_set_sensitive (W("auto-timezone-row"), allowed || tz_allowed);
gtk_widget_set_sensitive (W("datetime-button"), allowed && !using_ntp);
- gtk_widget_set_sensitive (W("timezone-button"), allowed && !auto_timezone);
+ gtk_widget_set_sensitive (W("timezone-button"), (allowed || tz_allowed) && !auto_timezone);
/* Hide the subdialogs if we no longer have permissions */
if (!allowed)
- {
gtk_widget_hide (GTK_WIDGET (W ("datetime-dialog")));
+ if (!allowed && !tz_allowed)
gtk_widget_hide (GTK_WIDGET (W ("timezone-dialog")));
- }
}
static void
@@ -886,6 +889,25 @@ run_dialog (CcDateTimePanel *self,
}
static gboolean
+tz_switch_to_row_transform_func (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
+ CcDateTimePanel *self)
+{
+ CcDateTimePanelPrivate *priv = self->priv;
+ gboolean active;
+ gboolean allowed;
+
+ active = g_value_get_boolean (source_value);
+ allowed = (priv->permission == NULL || g_permission_get_allowed (priv->permission)) ||
+ (priv->tz_permission == NULL || g_permission_get_allowed (priv->tz_permission));
+
+ g_value_set_boolean (target_value, !active && allowed);
+
+ return TRUE;
+}
+
+static gboolean
switch_to_row_transform_func (GBinding *binding,
const GValue *source_value,
GValue *target_value,
@@ -1241,6 +1263,7 @@ cc_date_time_panel_init (CcDateTimePanel
/* add the lock button */
priv->permission = polkit_permission_new_sync (DATETIME_PERMISSION, NULL, NULL, NULL);
+ priv->tz_permission = polkit_permission_new_sync (DATETIME_TZ_PERMISSION, NULL, NULL, NULL);
if (priv->permission != NULL)
{
g_signal_connect (priv->permission, "notify",
@@ -1278,9 +1301,11 @@ cc_date_time_panel_init (CcDateTimePanel
gtk_widget_set_visible (W ("auto-datetime-row"), is_ntp_available (self));
/* Timezone settings */
- bind_switch_to_row (self,
- W ("auto_timezone_switch"),
- W ("timezone-button"));
+ g_object_bind_property_full (W ("auto_timezone_switch"), "active",
+ W ("timezone-button"), "sensitive",
+ G_BINDING_SYNC_CREATE,
+ (GBindingTransformFunc) tz_switch_to_row_transform_func,
+ NULL, self, NULL);
priv->datetime_settings = g_settings_new (DATETIME_SCHEMA);
g_settings_bind (priv->datetime_settings, AUTO_TIMEZONE_KEY,

View File

@ -0,0 +1,50 @@
From 422166f3206740b98304528fb0974419ac0aeadb Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimo@endlessm.com>
Date: Mon, 20 Oct 2014 14:52:47 -0700
Subject: region: don't crash for locales with no country_code
gnome_parse_locale() can return an empty country_code for some locales,
which we are not taking into account when building the simple_locale
string.
https://bugzilla.gnome.org/show_bug.cgi?id=738963
diff --git a/panels/region/cc-input-chooser.c b/panels/region/cc-input-chooser.c
index bb620f8..26a30a2 100644
--- a/panels/region/cc-input-chooser.c
+++ b/panels/region/cc-input-chooser.c
@@ -1022,7 +1022,11 @@ get_locale_infos (GtkWidget *chooser)
if (!gnome_parse_locale (*locale, &lang_code, &country_code, NULL, NULL))
continue;
- simple_locale = g_strdup_printf ("%s_%s.utf8", lang_code, country_code);
+ if (country_code != NULL)
+ simple_locale = g_strdup_printf ("%s_%s.utf8", lang_code, country_code);
+ else
+ simple_locale = g_strdup_printf ("%s.utf8", lang_code);
+
if (g_hash_table_contains (priv->locales, simple_locale))
{
g_free (simple_locale);
@@ -1060,10 +1064,13 @@ get_locale_infos (GtkWidget *chooser)
add_ids_to_set (layouts_with_locale, list);
g_list_free (list);
- list = gnome_xkb_info_get_layouts_for_country (priv->xkb_info, country_code);
- add_rows_to_table (chooser, info, list, INPUT_SOURCE_TYPE_XKB, id);
- add_ids_to_set (layouts_with_locale, list);
- g_list_free (list);
+ if (country_code != NULL)
+ {
+ list = gnome_xkb_info_get_layouts_for_country (priv->xkb_info, country_code);
+ add_rows_to_table (chooser, info, list, INPUT_SOURCE_TYPE_XKB, id);
+ add_ids_to_set (layouts_with_locale, list);
+ g_list_free (list);
+ }
g_free (lang_code);
g_free (country_code);
--
cgit v0.10.1

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Mon Nov 3 14:55:37 UTC 2014 - badshah400@gmail.com
- Downgrade cups-pk-helper Requires to Recommends (boo#904047)
- Add gnome-control-center-follow-polkit-permissions-for-tz.patch
to allow timezone changes by user if permitted by polkit
permissions (boo#904058)
- Add patches from upstream for critical issues:
+ gnome-control-center-no-country-code-crash.patch: fix
a crash for locales with no country codes (boo#904071,
bgo#738963)
+ gnome-control-center-user-account-cheese-crash.patch:
user-account -- do not crash while taking a picture for user
avatar using cheese (boo#904070, bgo#697039)
+ gnome-control-center-crash-when-date-unavailable.patch:
background -- do not crash when date is unavailable
(boo#904073, bgo#736475).
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Oct 17 20:34:01 UTC 2014 - dimstar@opensuse.org Fri Oct 17 20:34:01 UTC 2014 - dimstar@opensuse.org

View File

@ -45,6 +45,14 @@ Patch14: gnome-control-center-system-proxy-configuration.patch
Patch15: gcc-private-connection.patch Patch15: gcc-private-connection.patch
# PATCH-FIX-UPSTREAM gnome-control-center-probe-radius-server-cert.patch bnc#574266 glin@suse.com -- network: Probe the RADIUS server certificate # PATCH-FIX-UPSTREAM gnome-control-center-probe-radius-server-cert.patch bnc#574266 glin@suse.com -- network: Probe the RADIUS server certificate
Patch16: gnome-control-center-probe-radius-server-cert.patch Patch16: gnome-control-center-probe-radius-server-cert.patch
# PATCH-FEATURE-OPENSUSE gnome-control-center-follow-polkit-permissions-for-tz.patch boo#904058 badshah400@gmail.com -- Follow polkit permissions for allowing/locking timezone setting changes
Patch17: gnome-control-center-follow-polkit-permissions-for-tz.patch
# PATCH-FIX-UPSTREAM gnome-control-center-user-account-cheese-crash.patch boo#904070 bgo#697039 badshah400@gmail.com -- user-account: Do not crash while taking a picture for user avatar using cheese, patch taken from upstream git
Patch18: gnome-control-center-user-account-cheese-crash.patch
# PATCH-FIX-UPSTREAM gnome-control-center-crash-when-date-unavailable.patch boo#904073 bgo#736475 badshah400@gmail.com -- background: Do not crash when date is unavailable, patch taken from upstream git
Patch19: gnome-control-center-crash-when-date-unavailable.patch
# PATCH-FIX-UPSTREAM gnome-control-center-no-country-code-crash.patch boo#904071 bgo#738963 badshah400@gmail.com -- region: don't crash for locales with no country_code, patch taken from upstream git
Patch20: gnome-control-center-no-country-code-crash.patch
BuildRequires: cups-devel BuildRequires: cups-devel
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: fdupes BuildRequires: fdupes
@ -105,7 +113,6 @@ BuildRequires: pkgconfig(xi) >= 1.2
# needed for glxinfo, used by System info panel # needed for glxinfo, used by System info panel
Requires: Mesa-demo-x Requires: Mesa-demo-x
# needed for printers panel # needed for printers panel
Requires: cups-pk-helper
Requires: gnome-menus Requires: gnome-menus
Requires: gnome-settings-daemon Requires: gnome-settings-daemon
# needed for universal access panel # needed for universal access panel
@ -117,6 +124,8 @@ Requires: libgnomekbd
Requires: nautilus Requires: nautilus
Recommends: %{name}-lang Recommends: %{name}-lang
Recommends: %{name}-user-faces Recommends: %{name}-user-faces
# cups-pk-helper should only be recommended, rather than a hard Requires, see boo#904047
Recommends: cups-pk-helper
Recommends: dbus(com.intel.dleyna-server) Recommends: dbus(com.intel.dleyna-server)
# the printers panel can use the dbus service # the printers panel can use the dbus service
Recommends: system-config-printer-dbus-service Recommends: system-config-printer-dbus-service
@ -178,6 +187,10 @@ GNOME control center.
%patch1 -p1 %patch1 -p1
%patch15 -p1 %patch15 -p1
%patch16 -p1 %patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
#NEEDS-REBASE #NEEDS-REBASE
#patch14 -p1 #patch14 -p1