Merge lp:~om26er/ubuntu/natty/empathy/empathy-bug-fixes into lp:~ubuntu-desktop/empathy/ubuntu

Proposed by Omer Akram
Status: Merged
Merged at revision: 157
Proposed branch: lp:~om26er/ubuntu/natty/empathy/empathy-bug-fixes
Merge into: lp:~ubuntu-desktop/empathy/ubuntu
Diff against target: 218 lines (+193/-0)
4 files modified
debian/changelog (+9/-0)
debian/patches/enable_pidgin_imported_contacts.patch (+158/-0)
debian/patches/reword_subscription_dailog_to_be_less_technical.patch (+24/-0)
debian/patches/series (+2/-0)
To merge this branch: bzr merge lp:~om26er/ubuntu/natty/empathy/empathy-bug-fixes
Reviewer Review Type Date Requested Status
Ubuntu Desktop Pending
Review via email: mp+45242@code.launchpad.net

Description of the change

backported two empathy bug fixes since we are not sure at this point if we'd be having empathy 3.0 in Natty

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-12-06 05:15:25 +0000
3+++ debian/changelog 2011-01-05 14:37:37 +0000
4@@ -1,3 +1,12 @@
5+empathy (2.32.2-0ubuntu3) natty; urgency=low
6+
7+ * debian/patches/enable_pidgin_imported_contacts.patch:
8+ - Enable pidgin imported accounts by default. (LP: #622215)
9+ * debian/patches/reword_subscription_dailog_to_be_less_technical.patch:
10+ - Reword subscription request dialog to be less technical. (LP: #670197)
11+
12+ -- Omer Akram <om26er@ubuntu.com> Wed, 05 Jan 2011 19:23:37 +0500
13+
14 empathy (2.32.2-0ubuntu2) natty; urgency=low
15
16 * debian/patches/00git_folks_aliasable_groupable.patch:
17
18=== added file 'debian/patches/enable_pidgin_imported_contacts.patch'
19--- debian/patches/enable_pidgin_imported_contacts.patch 1970-01-01 00:00:00 +0000
20+++ debian/patches/enable_pidgin_imported_contacts.patch 2011-01-05 14:37:37 +0000
21@@ -0,0 +1,158 @@
22+From: Vitaly Minko <vitaly.minko@gmail.com>
23+Subject: Enable imported Pidgin accounts if needed.
24+Origin: http://git.gnome.org/browse/empathy/commit/?id=888df7fc53595e18c5de077860881bd10f327cc5
25+Bug: https://bugs.gnome.org/594145
26+Bug-Ubuntu: https://launchpad.net/bugs/622215
27+
28+---
29+diff --git a/src/empathy-import-pidgin.c b/src/empathy-import-pidgin.c
30+index ab69d41..4de9bce 100644
31+--- a/src/empathy-import-pidgin.c
32++++ b/src/empathy-import-pidgin.c
33+@@ -93,6 +93,8 @@ static PidginCmMapItem pidgin_cm_map[] =
34+ #define PIDGIN_ACCOUNT_TAG_PROTOCOL "protocol"
35+ #define PIDGIN_ACCOUNT_TAG_PASSWORD "password"
36+ #define PIDGIN_ACCOUNT_TAG_SETTINGS "settings"
37++#define PIDGIN_SETTING_PROP_UI "ui"
38++#define PIDGIN_SETTING_PROP_NAME "name"
39+ #define PIDGIN_SETTING_PROP_TYPE "type"
40+ #define PIDGIN_PROTOCOL_BONJOUR "bonjour"
41+ #define PIDGIN_PROTOCOL_NOVELL "novell"
42+@@ -110,7 +112,7 @@ import_dialog_pidgin_parse_setting (EmpathyImportAccountData *data,
43+
44+ /* We can't do anything if the setting don't have a name */
45+ tag_name = (gchar *) xmlGetProp (setting,
46+- (xmlChar *) PIDGIN_ACCOUNT_TAG_NAME);
47++ (xmlChar *) PIDGIN_SETTING_PROP_NAME);
48+ if (!tag_name)
49+ return;
50+
51+@@ -183,10 +185,54 @@ import_dialog_pidgin_parse_setting (EmpathyImportAccountData *data,
52+ g_free (content);
53+ }
54+
55++static void
56++import_dialog_pidgin_handle_settings (EmpathyImportAccountData *data,
57++ xmlNodePtr settings)
58++{
59++ xmlNodePtr setting;
60++ gchar *tag_ui, *name, *type, *content;
61++
62++ tag_ui = (gchar *) xmlGetProp (settings, (xmlChar *) PIDGIN_SETTING_PROP_UI);
63++
64++ /* UI settings - fetch the Enabled parameter.
65++ * The expected value of the ui property is 'gtk-gaim', which looks obsolete,
66++ * but still valid for 2.7.3.
67++ */
68++ if (tag_ui && !tp_strdiff (tag_ui, "gtk-gaim"))
69++ {
70++ for (setting = settings->children; setting; setting = setting->next)
71++ {
72++ name = (gchar *) xmlGetProp (setting,
73++ (xmlChar *) PIDGIN_SETTING_PROP_NAME);
74++ type = (gchar *) xmlGetProp (setting,
75++ (xmlChar *) PIDGIN_SETTING_PROP_TYPE);
76++ /* The Enabled parameter is supposed to be boolean.
77++ * Pidgin name of the setting is 'auto-login'.
78++ */
79++ if (!tp_strdiff (name, "auto-login") && !tp_strdiff (type, "bool"))
80++ {
81++ content = (gchar *) xmlNodeGetContent (setting);
82++ data->enabled = (0 != (gint) g_ascii_strtod (content, NULL));
83++ g_free (content);
84++ }
85++ g_free (type);
86++ g_free (name);
87++ }
88++ }
89++ /* General settings. */
90++ else
91++ {
92++ for (setting = settings->children; setting; setting = setting->next)
93++ import_dialog_pidgin_parse_setting (data, setting);
94++ }
95++
96++ g_free (tag_ui);
97++}
98++
99+ GList *
100+ empathy_import_pidgin_load (void)
101+ {
102+- xmlNodePtr rootnode, node, child, setting;
103++ xmlNodePtr rootnode, node, child;
104+ xmlParserCtxtPtr ctxt;
105+ xmlDocPtr doc;
106+ gchar *filename;
107+@@ -310,8 +356,7 @@ empathy_import_pidgin_load (void)
108+ /* Other settings */
109+ else if (!tp_strdiff ((gchar *) child->name,
110+ PIDGIN_ACCOUNT_TAG_SETTINGS))
111+- for (setting = child->children; setting; setting = setting->next)
112+- import_dialog_pidgin_parse_setting (data, setting);
113++ import_dialog_pidgin_handle_settings (data, child);
114+ }
115+
116+ /* If we have the needed settings, add the account data to the list,
117+diff --git a/src/empathy-import-utils.c b/src/empathy-import-utils.c
118+index 520f056..7e69d62 100644
119+--- a/src/empathy-import-utils.c
120++++ b/src/empathy-import-utils.c
121+@@ -40,6 +40,7 @@ empathy_import_account_data_new (const gchar *source)
122+ data->source = g_strdup (source);
123+ data->protocol = NULL;
124+ data->connection_manager = NULL;
125++ data->enabled = FALSE;
126+
127+ return data;
128+ }
129+diff --git a/src/empathy-import-utils.h b/src/empathy-import-utils.h
130+index 20af25a..09b85e0 100644
131+--- a/src/empathy-import-utils.h
132++++ b/src/empathy-import-utils.h
133+@@ -37,6 +37,8 @@ typedef struct
134+ gchar *connection_manager;
135+ /* The name of the account import source */
136+ gchar *source;
137++ /* Indicates whether the account is enabled by default */
138++ gboolean enabled;
139+ } EmpathyImportAccountData;
140+
141+ typedef enum {
142+diff --git a/src/empathy-import-widget.c b/src/empathy-import-widget.c
143+index 0989818..fc1e2f5 100644
144+--- a/src/empathy-import-widget.c
145++++ b/src/empathy-import-widget.c
146+@@ -167,6 +167,7 @@ import_widget_create_account_cb (GObject *source,
147+ GAsyncResult *result,
148+ gpointer user_data)
149+ {
150++ TpAccountManager *account_manager;
151+ TpAccount *account;
152+ GError *error = NULL;
153+ EmpathyImportWidget *self = user_data;
154+@@ -184,6 +185,13 @@ import_widget_create_account_cb (GObject *source,
155+
156+ DEBUG ("account created\n");
157+
158++ if (tp_account_is_enabled (account))
159++ {
160++ account_manager = tp_account_manager_dup ();
161++ empathy_connect_new_account (account, account_manager);
162++ g_object_unref (account_manager);
163++ }
164++
165+ g_object_unref (self);
166+ }
167+
168+@@ -208,7 +216,8 @@ import_widget_add_account (EmpathyImportWidget *self,
169+
170+ DEBUG ("display name: %s\n", display_name);
171+
172+- properties = g_hash_table_new (NULL, NULL);
173++ properties = tp_asv_new (NULL, NULL);
174++ tp_asv_set_boolean (properties, TP_IFACE_ACCOUNT ".Enabled", data->enabled);
175+
176+ tp_account_manager_create_account_async (account_manager,
177+ (const gchar*) data->connection_manager, data->protocol, display_name,
178+--
179+cgit v0.8.3.1
180
181=== added file 'debian/patches/reword_subscription_dailog_to_be_less_technical.patch'
182--- debian/patches/reword_subscription_dailog_to_be_less_technical.patch 1970-01-01 00:00:00 +0000
183+++ debian/patches/reword_subscription_dailog_to_be_less_technical.patch 2011-01-05 14:37:37 +0000
184@@ -0,0 +1,24 @@
185+From: Alex Launi <alex.launi@gmail.com>
186+Subject: Reword subscription request dialog to be less technical.
187+Origin: http://git.gnome.org/browse/empathy/commit/?id=20bf62e79da14568fcd8c65fd561d601acf4b882
188+Bug: https://bugs.gnome.org/633870
189+Bug-Ubuntu: https://launchpad.net/bugs/670197
190+
191+---
192+diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
193+index 0216eea..439bb3a 100644
194+--- a/src/empathy-event-manager.c
195++++ b/src/empathy-event-manager.c
196+@@ -1002,8 +1002,8 @@ event_manager_pendings_changed_cb (EmpathyContactList *list,
197+ return;
198+ }
199+
200+- header = g_strdup_printf (_("Subscription requested by %s"),
201+- empathy_contact_get_alias (contact));
202++ header = g_strdup_printf (_("%s would like permission to see when you are available"),
203++ empathy_contact_get_alias (contact);
204+
205+ if (!EMP_STR_EMPTY (message))
206+ event_msg = g_strdup_printf (_("\nMessage: %s"), message);
207+--
208+cgit v0.8.3.1
209
210=== modified file 'debian/patches/series'
211--- debian/patches/series 2010-12-06 05:15:25 +0000
212+++ debian/patches/series 2011-01-05 14:37:37 +0000
213@@ -1,3 +1,5 @@
214+enable_pidgin_imported_contacts.patch
215+reword_subscription_dailog_to_be_less_technical.patch
216 00git_folks_aliasable_groupable.patch
217 00git_individual_methods.patch
218 01_lpi.patch

Subscribers

People subscribed via source and target branches