[control-center] backport upstream fix for BGO #730080 (i need it, so everyone gets it)

Adam Williamson adamwill at fedoraproject.org
Thu May 22 21:49:58 UTC 2014


commit 80f7667429944cd90cdba4866ad04a2b64489de8
Author: Adam Williamson <awilliam at redhat.com>
Date:   Thu May 22 14:49:34 2014 -0700

    backport upstream fix for BGO #730080 (i need it, so everyone gets it)

 ...unts-Use-a-header-bar-for-the-Add-Account.patch |   84 ++++++++++++++++++++
 control-center.spec                                |   11 +++-
 2 files changed, 94 insertions(+), 1 deletions(-)
---
diff --git a/0001-online-accounts-Use-a-header-bar-for-the-Add-Account.patch b/0001-online-accounts-Use-a-header-bar-for-the-Add-Account.patch
new file mode 100644
index 0000000..3fb6563
--- /dev/null
+++ b/0001-online-accounts-Use-a-header-bar-for-the-Add-Account.patch
@@ -0,0 +1,84 @@
+From 29bd627bb3e2d28005f4f22b8491c96acaa0f5ec Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <debarshir at gnome.org>
+Date: Wed, 21 May 2014 11:34:18 +0200
+Subject: [PATCH 1/3] online-accounts: Use a header bar for the "Add Account"
+ dialog
+
+Even though this is an action dialog, and not a presentation dialog,
+as defined in the HIG [1], there is no need for action buttons when
+showing the initial list because the list is single-click.
+
+[1] https://wiki.gnome.org/Design/HIG/Dialogs
+
+https://bugzilla.gnome.org/show_bug.cgi?id=730080
+---
+ .../cc-online-accounts-add-account-dialog.c        | 22 ++--------------------
+ 1 file changed, 2 insertions(+), 20 deletions(-)
+
+diff --git a/panels/online-accounts/cc-online-accounts-add-account-dialog.c b/panels/online-accounts/cc-online-accounts-add-account-dialog.c
+index 85b168c..42f699b 100644
+--- a/panels/online-accounts/cc-online-accounts-add-account-dialog.c
++++ b/panels/online-accounts/cc-online-accounts-add-account-dialog.c
+@@ -74,21 +74,10 @@ add_account_dialog_add_account (GoaPanelAddAccountDialog *add_account,
+                                 GoaProvider *provider)
+ {
+   GoaPanelAddAccountDialogPrivate *priv = add_account->priv;
+-  GList *children;
+-  GList *l;
+-  GtkWidget *action_area;
+   GtkWidget *vbox;
+ 
+-  action_area = gtk_dialog_get_action_area (GTK_DIALOG (add_account));
+   vbox = gtk_dialog_get_content_area (GTK_DIALOG (add_account));
+-  children = gtk_container_get_children (GTK_CONTAINER (vbox));
+-  for (l = children; l != NULL; l = l->next)
+-    {
+-      GtkWidget *child = l->data;
+-      if (child != action_area)
+-        gtk_container_remove (GTK_CONTAINER (vbox), child);
+-    }
+-  g_list_free (children);
++  gtk_container_foreach (GTK_CONTAINER (vbox), (GtkCallback) gtk_widget_destroy, NULL);
+ 
+   /* This spins gtk_dialog_run() */
+   priv->object = goa_provider_add_account (provider,
+@@ -238,7 +227,6 @@ static void
+ goa_panel_add_account_dialog_realize (GtkWidget *widget)
+ {
+   GoaPanelAddAccountDialog *add_account = GOA_PANEL_ADD_ACCOUNT_DIALOG (widget);
+-  GtkWidget *button;
+   GtkWindow *parent;
+ 
+   parent = gtk_window_get_transient_for (GTK_WINDOW (add_account));
+@@ -252,9 +240,6 @@ goa_panel_add_account_dialog_realize (GtkWidget *widget)
+     }
+ 
+   GTK_WIDGET_CLASS (goa_panel_add_account_dialog_parent_class)->realize (widget);
+-
+-  button = gtk_dialog_get_widget_for_response (GTK_DIALOG (add_account), GTK_RESPONSE_CANCEL);
+-  gtk_widget_grab_focus (button);
+ }
+ 
+ static void
+@@ -373,9 +358,6 @@ goa_panel_add_account_dialog_init (GoaPanelAddAccountDialog *add_account)
+                                       _("Resources"));
+ 
+   gtk_stack_set_visible_child_name (GTK_STACK (priv->stack), BRANDED_PAGE);
+-
+-  gtk_dialog_add_button (GTK_DIALOG (add_account), _("_Cancel"), GTK_RESPONSE_CANCEL);
+-  gtk_dialog_set_default_response (GTK_DIALOG (add_account), GTK_RESPONSE_CANCEL);
+ }
+ 
+ static void
+@@ -406,7 +388,7 @@ goa_panel_add_account_dialog_class_init (GoaPanelAddAccountDialogClass *klass)
+ GtkWidget *
+ goa_panel_add_account_dialog_new (GoaClient *client)
+ {
+-  return g_object_new (GOA_TYPE_PANEL_ADD_ACCOUNT_DIALOG, "client", client, NULL);
++  return g_object_new (GOA_TYPE_PANEL_ADD_ACCOUNT_DIALOG, "client", client, "use-header-bar", TRUE, NULL);
+ }
+ 
+ void
+-- 
+1.9.3
+
diff --git a/control-center.spec b/control-center.spec
index e182ad8..1a5f5fb 100644
--- a/control-center.spec
+++ b/control-center.spec
@@ -11,7 +11,7 @@
 Summary: Utilities to configure the GNOME desktop
 Name: control-center
 Version: 3.13.1
-Release: 4%{?dist}
+Release: 5%{?dist}
 Epoch: 1
 License: GPLv2+ and GFDL
 #VCS: git:git://git.gnome.org/gnome-control-center
@@ -21,6 +21,11 @@ URL: http://www.gnome.org
 # https://bugzilla.gnome.org/show_bug.cgi?id=695691
 Patch0: distro-logo.patch
 
+# https://bugzilla.gnome.org/show_bug.cgi?id=730080
+# upstream commit https://git.gnome.org/browse/gnome-control-center/commit/?id=29bd627bb3e2d28005f4f22b8491c96acaa0f5ec
+# drop with next upstream release
+Patch1: 0001-online-accounts-Use-a-header-bar-for-the-Add-Account.patch
+
 Requires: gnome-settings-daemon >= %{gsd_version}
 Requires: redhat-menus >= %{redhat_menus_version}
 Requires: alsa-lib
@@ -129,6 +134,7 @@ utilities.
 %prep
 %setup -q -n gnome-control-center-%{version}
 %patch0 -p1 -b .distro-logo
+%patch1 -p1 -b .online_accounts_headerbar
 
 %build
 %configure \
@@ -216,6 +222,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Thu May 22 2014 Adam Williamson <awilliam at redhat.com> - 1:3.13.1-5
+- backport upstream fix for BGO #730080 (i need it, so everyone gets it)
+
 * Wed May 07 2014 Kalev Lember <kalevlember at gmail.com> - 1:3.13.1-4
 - Drop gnome-icon-theme and gnome-icon-theme-symbolic dependencies
 


More information about the scm-commits mailing list