~ubuntu-branches/ubuntu/natty/empathy/natty

« back to all changes in this revision

Viewing changes to debian/patches/00git_folks_api.patch

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell, Omer Akram
  • Date: 2011-01-06 14:32:31 UTC
  • Revision ID: james.westby@ubuntu.com-20110106143231-ol0gyfqi7h1ch8kv
Tags: 2.32.2-0ubuntu3
* debian/patches/00git_folks_api.patch:
  - Update to latest folks API

[ Omer Akram ]
* debian/patches/enable_pidgin_imported_contacts.patch:
  - Enable pidgin imported accounts by default. (LP: #622215)
* debian/patches/reword_subscription_dailog_to_be_less_technical.patch:
  - Reword subscription request dialog to be less technical. (LP: #670197)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From c6371ec63c928c848cbb5474cb005af5cc414230 Mon Sep 17 00:00:00 2001
 
2
From: Philip Withnall <philip.withnall@collabora.co.uk>
 
3
Date: Sun, 12 Dec 2010 18:51:07 +0000
 
4
Subject: Bug 637097 — Port to latest folks API changes
 
5
Note: This patch has been updated to apply to empathy 2.32
 
6
 
 
7
Catch up with three interface renamings which have happened in folks master.
 
8
This bumps Empathy's folks dependency to 0.3.3. Closes: bgo#637097
 
9
---
 
10
Index: empathy-2.32.2/configure.ac
 
11
===================================================================
 
12
--- empathy-2.32.2.orig/configure.ac    2011-01-06 14:06:24.000000000 +1100
 
13
+++ empathy-2.32.2/configure.ac 2011-01-06 14:06:30.886667000 +1100
 
14
@@ -31,7 +31,7 @@
 
15
 # Minimal version required
 
16
 
 
17
 # Hardp deps
 
18
-FOLKS_REQUIRED=0.3.0
 
19
+FOLKS_REQUIRED=0.3.3
 
20
 GCONF_REQUIRED=1.2.0
 
21
 GLIB_REQUIRED=2.25.9
 
22
 GNUTLS_REQUIRED=2.8.5
 
23
Index: empathy-2.32.2/libempathy-gtk/empathy-contact-widget.c
 
24
===================================================================
 
25
--- empathy-2.32.2.orig/libempathy-gtk/empathy-contact-widget.c 2011-01-06 14:06:24.000000000 +1100
 
26
+++ empathy-2.32.2/libempathy-gtk/empathy-contact-widget.c      2011-01-06 14:06:30.886667000 +1100
 
27
@@ -1284,10 +1284,10 @@
 
28
           FolksPersona *persona = empathy_contact_get_persona (
 
29
               information->contact);
 
30
 
 
31
-          if (persona != NULL && FOLKS_IS_FAVOURITE (persona))
 
32
+          if (persona != NULL && FOLKS_IS_FAVOURITABLE (persona))
 
33
             {
 
34
-              gboolean is_favourite = folks_favourite_get_is_favourite (
 
35
-                  FOLKS_FAVOURITE (persona));
 
36
+              gboolean is_favourite = folks_favouritable_get_is_favourite (
 
37
+                  FOLKS_FAVOURITABLE (persona));
 
38
               contact_widget_favourites_changed_cb (information->manager,
 
39
                   information->contact, is_favourite, information);
 
40
             }
 
41
@@ -1418,10 +1418,10 @@
 
42
 {
 
43
   FolksPersona *persona = empathy_contact_get_persona (information->contact);
 
44
 
 
45
-  if (persona != NULL && FOLKS_IS_FAVOURITE (persona))
 
46
+  if (persona != NULL && FOLKS_IS_FAVOURITABLE (persona))
 
47
     {
 
48
       gboolean active = gtk_toggle_button_get_active (button);
 
49
-      folks_favourite_set_is_favourite (FOLKS_FAVOURITE (persona), active);
 
50
+      folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (persona), active);
 
51
     }
 
52
 }
 
53
 
 
54
Index: empathy-2.32.2/libempathy-gtk/empathy-individual-menu.c
 
55
===================================================================
 
56
--- empathy-2.32.2.orig/libempathy-gtk/empathy-individual-menu.c        2010-11-19 01:25:30.000000000 +1100
 
57
+++ empathy-2.32.2/libempathy-gtk/empathy-individual-menu.c     2011-01-06 14:06:30.886667000 +1100
 
58
@@ -749,7 +749,7 @@
 
59
 favourite_menu_item_toggled_cb (GtkCheckMenuItem *item,
 
60
   FolksIndividual *individual)
 
61
 {
 
62
-  folks_favourite_set_is_favourite (FOLKS_FAVOURITE (individual),
 
63
+  folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (individual),
 
64
       gtk_check_menu_item_get_active (item));
 
65
 }
 
66
 
 
67
@@ -761,7 +761,7 @@
 
68
   item = gtk_check_menu_item_new_with_label (_("Favorite"));
 
69
 
 
70
   gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
 
71
-      folks_favourite_get_is_favourite (FOLKS_FAVOURITE (individual)));
 
72
+      folks_favouritable_get_is_favourite (FOLKS_FAVOURITABLE (individual)));
 
73
 
 
74
   g_signal_connect (item, "toggled",
 
75
       G_CALLBACK (favourite_menu_item_toggled_cb), individual);
 
76
Index: empathy-2.32.2/libempathy-gtk/empathy-individual-store.c
 
77
===================================================================
 
78
--- empathy-2.32.2.orig/libempathy-gtk/empathy-individual-store.c       2011-01-06 14:06:27.000000000 +1100
 
79
+++ empathy-2.32.2/libempathy-gtk/empathy-individual-store.c    2011-01-06 14:08:52.356667001 +1100
 
80
@@ -445,7 +445,7 @@
 
81
   g_list_free (groups);
 
82
 
 
83
   if (priv->show_groups &&
 
84
-      folks_favourite_get_is_favourite (FOLKS_FAVOURITE (individual)))
 
85
+      folks_favouritable_get_is_favourite (FOLKS_FAVOURITABLE (individual)))
 
86
     {
 
87
       /* Add contact to the fake 'Favorites' group */
 
88
       GtkTreeIter iter_group;
 
89
@@ -672,7 +672,7 @@
 
90
     }
 
91
 
 
92
   /* Get online state now. */
 
93
-  now_online = folks_presence_is_online (FOLKS_PRESENCE (individual));
 
94
+  now_online = folks_has_presence_is_online (FOLKS_HAS_PRESENCE (individual));
 
95
 
 
96
   if (!in_list)
 
97
     {
 
98
@@ -759,9 +759,9 @@
 
99
           EMPATHY_INDIVIDUAL_STORE_COL_NAME,
 
100
             folks_aliasable_get_alias (FOLKS_ALIASABLE (individual)),
 
101
           EMPATHY_INDIVIDUAL_STORE_COL_PRESENCE_TYPE,
 
102
-            folks_presence_get_presence_type (FOLKS_PRESENCE (individual)),
 
103
+            folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (individual)),
 
104
           EMPATHY_INDIVIDUAL_STORE_COL_STATUS,
 
105
-            folks_presence_get_presence_message (FOLKS_PRESENCE (individual)),
 
106
+            folks_has_presence_get_presence_message (FOLKS_HAS_PRESENCE (individual)),
 
107
           EMPATHY_INDIVIDUAL_STORE_COL_COMPACT, priv->is_compact,
 
108
           EMPATHY_INDIVIDUAL_STORE_COL_IS_GROUP, FALSE,
 
109
           EMPATHY_INDIVIDUAL_STORE_COL_IS_ONLINE, now_online,
 
110
@@ -1422,9 +1422,9 @@
 
111
    * the presences.
 
112
    */
 
113
   folks_presence_type_a =
 
114
-      folks_presence_get_presence_type (FOLKS_PRESENCE (individual_a));
 
115
+      folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (individual_a));
 
116
   folks_presence_type_b =
 
117
-      folks_presence_get_presence_type (FOLKS_PRESENCE (individual_b));
 
118
+      folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (individual_b));
 
119
   tp_presence_a = empathy_folks_presence_type_to_tp (folks_presence_type_a);
 
120
   tp_presence_b = empathy_folks_presence_type_to_tp (folks_presence_type_b);
 
121
 
 
122
Index: empathy-2.32.2/libempathy-gtk/empathy-individual-view.c
 
123
===================================================================
 
124
--- empathy-2.32.2.orig/libempathy-gtk/empathy-individual-view.c        2011-01-06 14:06:27.000000000 +1100
 
125
+++ empathy-2.32.2/libempathy-gtk/empathy-individual-view.c     2011-01-06 14:07:57.406667001 +1100
 
126
@@ -370,14 +370,14 @@
 
127
   if (!tp_strdiff (new_group, EMPATHY_INDIVIDUAL_STORE_FAVORITE))
 
128
     {
 
129
       /* Mark contact as favourite */
 
130
-      folks_favourite_set_is_favourite (FOLKS_FAVOURITE (individual), TRUE);
 
131
+      folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (individual), TRUE);
 
132
       return;
 
133
     }
 
134
 
 
135
   if (!tp_strdiff (old_group, EMPATHY_INDIVIDUAL_STORE_FAVORITE))
 
136
     {
 
137
       /* Remove contact as favourite */
 
138
-      folks_favourite_set_is_favourite (FOLKS_FAVOURITE (individual), FALSE);
 
139
+      folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (individual), FALSE);
 
140
 
 
141
       /* Don't try to remove it */
 
142
       old_group = NULL;
 
143
@@ -624,7 +624,7 @@
 
144
         }
 
145
 
 
146
       if (individual != NULL &&
 
147
-          folks_presence_is_online (FOLKS_PRESENCE (individual)) &&
 
148
+          folks_has_presence_is_online (FOLKS_HAS_PRESENCE (individual)) &&
 
149
           (caps & EMPATHY_CAPABILITIES_FT))
 
150
         {
 
151
           gdk_drag_status (context, GDK_ACTION_COPY, time_);
 
152
Index: empathy-2.32.2/libempathy-gtk/empathy-individual-widget.c
 
153
===================================================================
 
154
--- empathy-2.32.2.orig/libempathy-gtk/empathy-individual-widget.c      2011-01-06 14:06:24.000000000 +1100
 
155
+++ empathy-2.32.2/libempathy-gtk/empathy-individual-widget.c   2011-01-06 14:06:30.886667000 +1100
 
156
@@ -816,7 +816,7 @@
 
157
 
 
158
   /* FIXME: We just choose the first Persona which has an avatar, and save that.
 
159
    * The avatar handling in EmpathyContact needs to be moved into libfolks as
 
160
-   * much as possible, and this code rewritten to use FolksAvatar.
 
161
+   * much as possible, and this code rewritten to use FolksHasAvatar.
 
162
    * (bgo#627401) */
 
163
   personas = folks_individual_get_personas (individual);
 
164
   for (l = personas; l != NULL; l = l->next)
 
165
@@ -1070,8 +1070,8 @@
 
166
     EmpathyIndividualWidget *self)
 
167
 {
 
168
   gboolean active = gtk_toggle_button_get_active (button);
 
169
-  folks_favourite_set_is_favourite (
 
170
-      FOLKS_FAVOURITE (GET_PRIV (self)->individual), active);
 
171
+  folks_favouritable_set_is_favourite (
 
172
+      FOLKS_FAVOURITABLE (GET_PRIV (self)->individual), active);
 
173
 }
 
174
 
 
175
 static void
 
176
@@ -1167,11 +1167,13 @@
 
177
   state_image = g_object_get_data (table, "state-image");
 
178
 
 
179
   /* FIXME: Default messages should be moved into libfolks (bgo#627403) */
 
180
-  message = folks_presence_get_presence_message (FOLKS_PRESENCE (folks_object));
 
181
+  message = folks_has_presence_get_presence_message (
 
182
+      FOLKS_HAS_PRESENCE (folks_object));
 
183
   if (EMP_STR_EMPTY (message))
 
184
     {
 
185
       message = empathy_presence_get_default_message (
 
186
-          folks_presence_get_presence_type (FOLKS_PRESENCE (folks_object)));
 
187
+          folks_has_presence_get_presence_type (
 
188
+              FOLKS_HAS_PRESENCE (folks_object)));
 
189
     }
 
190
 
 
191
   if (message != NULL)
 
192
@@ -1181,7 +1183,8 @@
 
193
 
 
194
   gtk_image_set_from_icon_name (GTK_IMAGE (state_image),
 
195
       empathy_icon_name_for_presence (
 
196
-          folks_presence_get_presence_type (FOLKS_PRESENCE (folks_object))),
 
197
+          folks_has_presence_get_presence_type (
 
198
+              FOLKS_HAS_PRESENCE (folks_object))),
 
199
       GTK_ICON_SIZE_BUTTON);
 
200
   gtk_widget_show (state_image);
 
201
 }
 
202
@@ -1210,7 +1213,8 @@
 
203
   if (GTK_IS_TOGGLE_BUTTON (favourite_widget))
 
204
     {
 
205
       gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (favourite_widget),
 
206
-          folks_favourite_get_is_favourite (FOLKS_FAVOURITE (folks_object)));
 
207
+          folks_favouritable_get_is_favourite (
 
208
+              FOLKS_FAVOURITABLE (folks_object)));
 
209
     }
 
210
 }
 
211
 
 
212
Index: empathy-2.32.2/libempathy-gtk/empathy-persona-store.c
 
213
===================================================================
 
214
--- empathy-2.32.2.orig/libempathy-gtk/empathy-persona-store.c  2011-01-06 14:06:24.000000000 +1100
 
215
+++ empathy-2.32.2/libempathy-gtk/empathy-persona-store.c       2011-01-06 14:06:30.886667000 +1100
 
216
@@ -438,7 +438,7 @@
 
217
       gtk_tree_path_free (path);
 
218
 
 
219
       /* Get online state now. */
 
220
-      now_online = folks_presence_is_online (FOLKS_PRESENCE (persona));
 
221
+      now_online = folks_has_presence_is_online (FOLKS_HAS_PRESENCE (persona));
 
222
 
 
223
       /* Get online state before. */
 
224
       gtk_tree_model_get (GTK_TREE_MODEL (self), &iter,
 
225
@@ -484,9 +484,11 @@
 
226
           EMPATHY_PERSONA_STORE_COL_DISPLAY_ID,
 
227
               folks_persona_get_display_id (persona),
 
228
           EMPATHY_PERSONA_STORE_COL_PRESENCE_TYPE,
 
229
-              folks_presence_get_presence_type (FOLKS_PRESENCE (persona)),
 
230
+              folks_has_presence_get_presence_type (
 
231
+                  FOLKS_HAS_PRESENCE (persona)),
 
232
           EMPATHY_PERSONA_STORE_COL_STATUS,
 
233
-              folks_presence_get_presence_message (FOLKS_PRESENCE (persona)),
 
234
+              folks_has_presence_get_presence_message (
 
235
+                  FOLKS_HAS_PRESENCE (persona)),
 
236
           EMPATHY_PERSONA_STORE_COL_IS_ONLINE, now_online,
 
237
           EMPATHY_PERSONA_STORE_COL_CAN_AUDIO_CALL,
 
238
               empathy_contact_get_capabilities (contact) &
 
239
@@ -619,8 +621,8 @@
 
240
    * the presences.
 
241
    */
 
242
   ret_val = -tp_connection_presence_type_cmp_availability (
 
243
-      folks_presence_get_presence_type (FOLKS_PRESENCE (persona_a)),
 
244
-      folks_presence_get_presence_type (FOLKS_PRESENCE (persona_b)));
 
245
+      folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (persona_a)),
 
246
+      folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (persona_b)));
 
247
 
 
248
   if (ret_val == 0) {
 
249
     /* Fallback: compare by name et al. */
 
250
Index: empathy-2.32.2/libempathy-gtk/empathy-ui-utils.c
 
251
===================================================================
 
252
--- empathy-2.32.2.orig/libempathy-gtk/empathy-ui-utils.c       2011-01-06 14:06:27.000000000 +1100
 
253
+++ empathy-2.32.2/libempathy-gtk/empathy-ui-utils.c    2011-01-06 14:07:25.716667000 +1100
 
254
@@ -231,8 +231,7 @@
 
255
        FolksPresenceType folks_presence;
 
256
        TpConnectionPresenceType presence;
 
257
 
 
258
-       folks_presence =
 
259
-           folks_presence_get_presence_type (FOLKS_PRESENCE (individual));
 
260
+       folks_presence = folks_has_presence_get_presence_type (FOLKS_HAS_PRESENCE (individual));
 
261
        presence = empathy_folks_presence_type_to_tp (folks_presence);
 
262
 
 
263
        return empathy_icon_name_for_presence (presence);
 
264
@@ -632,7 +631,8 @@
 
265
                        callback, user_data,
 
266
                        empathy_pixbuf_avatar_from_individual_scaled_async);
 
267
 
 
268
-       avatar_file = folks_avatar_get_avatar (FOLKS_AVATAR (individual));
 
269
+       avatar_file =
 
270
+               folks_has_avatar_get_avatar (FOLKS_HAS_AVATAR (individual));
 
271
        if (avatar_file == NULL)
 
272
                goto out;
 
273
 
 
274
Index: empathy-2.32.2/libempathy/empathy-contact.c
 
275
===================================================================
 
276
--- empathy-2.32.2.orig/libempathy/empathy-contact.c    2011-01-06 14:06:24.000000000 +1100
 
277
+++ empathy-2.32.2/libempathy/empathy-contact.c 2011-01-06 14:06:30.896667000 +1100
 
278
@@ -484,8 +484,8 @@
 
279
 
 
280
   if (priv->persona != NULL)
 
281
     {
 
282
-      folks_presence_set_presence_message (FOLKS_PRESENCE (priv->persona),
 
283
-          message);
 
284
+      folks_has_presence_set_presence_message (
 
285
+          FOLKS_HAS_PRESENCE (priv->persona), message);
 
286
     }
 
287
 }
 
288
 
 
289
@@ -965,7 +965,10 @@
 
290
   priv = GET_PRIV (contact);
 
291
 
 
292
   if (priv->persona != NULL)
 
293
-    return folks_presence_get_presence_message (FOLKS_PRESENCE (priv->persona));
 
294
+    {
 
295
+      return folks_has_presence_get_presence_message (
 
296
+          FOLKS_HAS_PRESENCE (priv->persona));
 
297
+    }
 
298
 
 
299
   return NULL;
 
300
 }
 
301
@@ -1740,15 +1743,16 @@
 
302
 presence_cmp_func (EmpathyContact *a,
 
303
     EmpathyContact *b)
 
304
 {
 
305
-  FolksPresence *presence_a, *presence_b;
 
306
+  FolksHasPresence *presence_a, *presence_b;
 
307
 
 
308
-  presence_a = FOLKS_PRESENCE (empathy_contact_get_persona (a));
 
309
-  presence_b = FOLKS_PRESENCE (empathy_contact_get_persona (b));
 
310
+  presence_a = FOLKS_HAS_PRESENCE (empathy_contact_get_persona (a));
 
311
+  presence_b = FOLKS_HAS_PRESENCE (empathy_contact_get_persona (b));
 
312
 
 
313
   /* We negate the result because we're sorting in reverse order (i.e. such that
 
314
    * the Personas with the highest presence are at the beginning of the list. */
 
315
-  return -folks_presence_typecmp (folks_presence_get_presence_type (presence_a),
 
316
-      folks_presence_get_presence_type (presence_b));
 
317
+  return -folks_has_presence_typecmp (
 
318
+      folks_has_presence_get_presence_type (presence_a),
 
319
+      folks_has_presence_get_presence_type (presence_b));
 
320
 }
 
321
 
 
322
 static gint
 
323
Index: empathy-2.32.2/libempathy/empathy-individual-manager.c
 
324
===================================================================
 
325
--- empathy-2.32.2.orig/libempathy/empathy-individual-manager.c 2011-01-06 14:06:27.000000000 +1100
 
326
+++ empathy-2.32.2/libempathy/empathy-individual-manager.c      2011-01-06 14:06:30.896667000 +1100
 
327
@@ -85,8 +85,8 @@
 
328
     GParamSpec *pspec,
 
329
     EmpathyIndividualManager *self)
 
330
 {
 
331
-  gboolean is_favourite = folks_favourite_get_is_favourite (
 
332
-      FOLKS_FAVOURITE (individual));
 
333
+  gboolean is_favourite = folks_favouritable_get_is_favourite (
 
334
+      FOLKS_FAVOURITABLE (individual));
 
335
   g_signal_emit (self, signals[FAVOURITES_CHANGED], 0, individual,
 
336
       is_favourite);
 
337
 }