r47329 - in /packages/unstable/gnome-calendar/debian/patches: ./ 0001-Hide-GOA-sources-on-Unity.patch 0002-Spawn-Ubuntu-s-credentials-panel-instead-of-the-GOA-.patch series
laney at users.alioth.debian.org
laney at users.alioth.debian.org
Fri Feb 12 16:21:05 UTC 2016
Author: laney
Date: Fri Feb 12 16:21:05 2016
New Revision: 47329
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=47329
Log:
Yeah, actually add the patches
Added:
packages/unstable/gnome-calendar/debian/patches/
packages/unstable/gnome-calendar/debian/patches/0001-Hide-GOA-sources-on-Unity.patch
packages/unstable/gnome-calendar/debian/patches/0002-Spawn-Ubuntu-s-credentials-panel-instead-of-the-GOA-.patch
packages/unstable/gnome-calendar/debian/patches/series
Added: packages/unstable/gnome-calendar/debian/patches/0001-Hide-GOA-sources-on-Unity.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/gnome-calendar/debian/patches/0001-Hide-GOA-sources-on-Unity.patch?rev=47329&op=file
==============================================================================
--- packages/unstable/gnome-calendar/debian/patches/0001-Hide-GOA-sources-on-Unity.patch (added)
+++ packages/unstable/gnome-calendar/debian/patches/0001-Hide-GOA-sources-on-Unity.patch [utf-8] Fri Feb 12 16:21:05 2016
@@ -0,0 +1,95 @@
+From 5e1d0482919405695df558874153f00d6991430c Mon Sep 17 00:00:00 2001
+From: Iain Lane <iain.lane at canonical.com>
+Date: Thu, 28 Jan 2016 12:34:35 +0000
+Subject: [PATCH 1/2] Hide GOA sources on Unity
+
+(Backported to gnome-3-18, use the patches on the bug for 3.20)
+
+https://bugzilla.gnome.org/show_bug.cgi?id=761259
+
+---
+ src/gcal-manager.c | 14 ++++++++++----
+ src/gcal-source-dialog.c | 9 +++++++++
+ 2 files changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/src/gcal-manager.c b/src/gcal-manager.c
+index 2a4498d..a44bee6 100644
+--- a/src/gcal-manager.c
++++ b/src/gcal-manager.c
+@@ -21,6 +21,7 @@
+ #include "gcal-utils.h"
+
+ #include <libedataserverui/libedataserverui.h>
++#include <string.h>
+
+ typedef struct
+ {
+@@ -776,6 +777,7 @@ gcal_manager_constructed (GObject *object)
+ GList *sources, *l;
+ GError *error = NULL;
+ ESourceCredentialsProvider *credentials_provider;
++ const gchar *desktop;
+
+ G_OBJECT_CLASS (gcal_manager_parent_class)->constructed (object);
+
+@@ -787,10 +789,14 @@ gcal_manager_constructed (GObject *object)
+ priv->clients = g_hash_table_new_full ((GHashFunc) e_source_hash, (GEqualFunc) e_source_equal,
+ g_object_unref, (GDestroyNotify) free_unit_data);
+
+- /* load GOA client */
+- goa_client_new (NULL, // we won't really cancel it
+- (GAsyncReadyCallback) gcal_manager_client_ready_cb,
+- object);
++ desktop = g_getenv ("XDG_CURRENT_DESKTOP");
++ if (desktop && strstr (desktop, "Unity"))
++ {
++ /* load GOA client */
++ goa_client_new (NULL, // we won't really cancel it
++ (GAsyncReadyCallback) gcal_manager_client_ready_cb,
++ object);
++ }
+
+ /* reading sources and schedule its connecting */
+ priv->source_registry = e_source_registry_new_sync (NULL, &error);
+diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
+index 842dc54..c5b3543 100644
+--- a/src/gcal-source-dialog.c
++++ b/src/gcal-source-dialog.c
+@@ -36,6 +36,7 @@ typedef struct
+ GtkWidget *main_scrolledwindow;
+ GtkWidget *name_entry;
+ GtkWidget *notebook;
++ GtkWidget *online_account_main_grid;
+ GtkWidget *remove_button;
+ GtkWidget *stack;
+ GtkWidget *web_source_grid;
+@@ -1809,11 +1810,18 @@ gcal_source_dialog_constructed (GObject *object)
+ GcalSourceDialogPrivate *priv;
+ GtkBuilder *builder;
+ GMenuModel *menu;
++ const gchar *desktop;
+
+ priv = gcal_source_dialog_get_instance_private (GCAL_SOURCE_DIALOG (object));
+
+ G_OBJECT_CLASS (gcal_source_dialog_parent_class)->constructed (object);
+
++ desktop = g_getenv ("XDG_CURRENT_DESKTOP");
++ if (desktop && strstr (desktop, "Unity"))
++ {
++ gtk_widget_hide (priv->online_account_main_grid);
++ }
++
+ /* widget responses */
+ gtk_dialog_set_default_response (GTK_DIALOG (object), GTK_RESPONSE_CANCEL);
+
+@@ -1894,6 +1902,7 @@ gcal_source_dialog_class_init (GcalSourceDialogClass *klass)
+ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, notification);
+ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, notification_label);
+ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, online_accounts_listbox);
++ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, online_account_main_grid);
+ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, owncloud_stub_row);
+ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, remove_button);
+ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, settings_button);
+--
+2.7.0
+
Added: packages/unstable/gnome-calendar/debian/patches/0002-Spawn-Ubuntu-s-credentials-panel-instead-of-the-GOA-.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/gnome-calendar/debian/patches/0002-Spawn-Ubuntu-s-credentials-panel-instead-of-the-GOA-.patch?rev=47329&op=file
==============================================================================
--- packages/unstable/gnome-calendar/debian/patches/0002-Spawn-Ubuntu-s-credentials-panel-instead-of-the-GOA-.patch (added)
+++ packages/unstable/gnome-calendar/debian/patches/0002-Spawn-Ubuntu-s-credentials-panel-instead-of-the-GOA-.patch [utf-8] Fri Feb 12 16:21:05 2016
@@ -0,0 +1,124 @@
+From c589d3f665e576cda2d0c28209be00579d9ebca5 Mon Sep 17 00:00:00 2001
+From: Iain Lane <iain.lane at canonical.com>
+Date: Thu, 28 Jan 2016 13:35:32 +0000
+Subject: [PATCH 2/2] Spawn Ubuntu's credentials panel instead of the GOA
+ online-accounts one on Unity
+
+Show the cog button to launch the control-center in the remaining
+GtkGrid in this case.
+
+(Backported to gnome-3-18, use the patches on the bug for 3.20)
+
+https://bugzilla.gnome.org/show_bug.cgi?id=761259
+
+---
+ src/gcal-source-dialog.c | 51 ++++++++++++++++++++++++++++++++++++------------
+ 1 file changed, 39 insertions(+), 12 deletions(-)
+
+diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
+index c5b3543..1ee8600 100644
+--- a/src/gcal-source-dialog.c
++++ b/src/gcal-source-dialog.c
+@@ -37,6 +37,9 @@ typedef struct
+ GtkWidget *name_entry;
+ GtkWidget *notebook;
+ GtkWidget *online_account_main_grid;
++ GtkWidget *online_accounts_settings_button;
++ GtkWidget *other_calendars_main_grid;
++ GtkWidget *other_calendars_main_frame;
+ GtkWidget *remove_button;
+ GtkWidget *stack;
+ GtkWidget *web_source_grid;
+@@ -510,6 +513,29 @@ default_check_toggled (GObject *object,
+ gcal_manager_set_default_source (priv->manager, priv->old_default_source);
+ }
+
++static void
++spawn_goa_with_args (gchar *action,
++ gchar *arg)
++{
++ const gchar *desktop;
++
++ gchar *command[] = {"gnome-control-center", "online-accounts", action, arg, NULL};
++
++ /* On Ubuntu (Ubuntu Online Accounts), the panel is called 'credentials' */
++ desktop = g_getenv ("XDG_CURRENT_DESKTOP");
++ if (desktop && strstr (desktop, "Unity"))
++ {
++ command[1] = "credentials";
++ }
++
++ g_spawn_async (NULL, command, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL, NULL, NULL, NULL, NULL);
++}
++
++static void
++spawn_goa (void)
++{
++ spawn_goa_with_args (NULL, NULL);
++}
+
+ /**
+ * description_label_link_activated:
+@@ -524,8 +550,7 @@ description_label_link_activated (GtkWidget *widget,
+ gchar *uri,
+ gpointer user_data)
+ {
+- gchar *command[] = {"gnome-control-center", "online-accounts", NULL};
+- g_spawn_async (NULL, command, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
++ spawn_goa ();
+
+ return TRUE;
+ }
+@@ -669,14 +694,6 @@ name_entry_text_changed (GObject *object,
+ e_source_set_display_name (priv->source, gtk_entry_get_text (GTK_ENTRY (priv->name_entry)));
+ }
+
+-static void
+-spawn_goa_with_args (gchar *action,
+- gchar *arg)
+-{
+- gchar *command[] = {"gnome-control-center", "online-accounts", action, arg, NULL};
+- g_spawn_async (NULL, command, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL, NULL, NULL, NULL, NULL);
+-}
+-
+ /**
+ * online_accounts_listbox_row_activated:
+ *
+@@ -1113,8 +1130,7 @@ static void
+ online_accounts_settings_button_clicked (GtkWidget *button,
+ gpointer user_data)
+ {
+- gchar *command[] = {"gnome-control-center", "online-accounts", NULL};
+- g_spawn_async (NULL, command, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
++ spawn_goa ();
+ }
+
+ static void
+@@ -1819,6 +1835,14 @@ gcal_source_dialog_constructed (GObject *object)
+ desktop = g_getenv ("XDG_CURRENT_DESKTOP");
+ if (desktop && strstr (desktop, "Unity"))
+ {
++ gtk_container_remove (GTK_CONTAINER (priv->online_account_main_grid),
++ priv->online_accounts_settings_button);
++ gtk_container_add (GTK_CONTAINER (priv->other_calendars_main_grid),
++ priv->online_accounts_settings_button);
++ gtk_container_child_set (GTK_CONTAINER (priv->other_calendars_main_grid),
++ priv->other_calendars_main_frame,
++ "width", 3,
++ NULL);
+ gtk_widget_hide (priv->online_account_main_grid);
+ }
+
+@@ -1903,6 +1927,9 @@ gcal_source_dialog_class_init (GcalSourceDialogClass *klass)
+ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, notification_label);
+ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, online_accounts_listbox);
+ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, online_account_main_grid);
++ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, online_accounts_settings_button);
++ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, other_calendars_main_grid);
++ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, other_calendars_main_frame);
+ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, owncloud_stub_row);
+ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, remove_button);
+ gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, settings_button);
+--
+2.7.0
+
Added: packages/unstable/gnome-calendar/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/gnome-calendar/debian/patches/series?rev=47329&op=file
==============================================================================
--- packages/unstable/gnome-calendar/debian/patches/series (added)
+++ packages/unstable/gnome-calendar/debian/patches/series [utf-8] Fri Feb 12 16:21:05 2016
@@ -0,0 +1,2 @@
+0001-Hide-GOA-sources-on-Unity.patch
+0002-Spawn-Ubuntu-s-credentials-panel-instead-of-the-GOA-.patch
More information about the pkg-gnome-commits
mailing list