Codebase list empathy / f23e749
Merge tag 'upstream/3.12.4' into debian Upstream version 3.12.4 Laurent Bigonville 9 years ago
10 changed file(s) with 517 addition(s) and 151 deletion(s). Raw diff Collapse all Expand all
0 commit 0eee2312758104f3b9b04753a358d82aa96a28a7
1 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2 Date: Mon Jun 23 18:15:38 2014 +0200
3
4 3.12.4
5
6 NEWS | 6 ++++++
7 configure.ac | 4 ++--
8 2 files changed, 8 insertions(+), 2 deletions(-)
9
10 commit 8ac7209da2305762f9ef2c711c555afb19e85b62
11 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
12 Date: Mon Jun 23 15:35:03 2014 +0200
13
14 individual-menu: stop creating single_individual
15
16 This code was always pretty hacky and created loads of nasty bugs
17 so I'm glad
18 to get rid of it.
19
20 https://bugzilla.gnome.org/show_bug.cgi?id=732100
21
22 libempathy-gtk/empathy-individual-menu.c | 10 ----------
23 1 file changed, 10 deletions(-)
24
25 commit a2a7b6ecc313022e4e0904651ba4b27ae83ca293
26 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
27 Date: Mon Jun 23 15:33:11 2014 +0200
28
29 individual-menu: remove 'block' item from personas sub menus
30
31 Blocking a specific persona from an individual is a very uncommon
32 operation.
33 Either you want to block the full individual or the personas
34 shouldn't be
35 linked together.
36 There is not much point cluttering the menu with it.
37
38 https://bugzilla.gnome.org/show_bug.cgi?id=732100
39
40 libempathy-gtk/empathy-individual-menu.c | 14 --------------
41 1 file changed, 14 deletions(-)
42
43 commit 1f9230409b3e8bdba369a994102b53a9e591ba6e
44 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
45 Date: Mon Jun 23 15:10:17 2014 +0200
46
47 individual-menu: use the proper persona in submenus
48
49 'single_individual' uses to be a FolksIndivudal containing a single
50 persona
51 (the one from the submenu) ensuring that operations (chat, call,
52 etc) were
53 performed on this very persona.
54
55 But we broke this in 0909d1f884c4542553d98b18e7622664d2a02169 by
56 replacing the
57 empathy_create_individual_from_tp_contact() call by
58 empathy_ensure_individual_from_tp_contact() as the same individuals
59 (the one
60 will all the personas) was now used in all the sub menus.
61
62 Fixing this by introducing 'contact' variant of the menu_item_new
63 methods
64 which is always cleaner.
65
66 https://bugzilla.gnome.org/show_bug.cgi?id=732100
67
68 libempathy-gtk/empathy-individual-menu.c | 155
69 +++++++++++++++++++++++++++++--
70 1 file changed, 146 insertions(+), 9 deletions(-)
71
72 commit ad1b40b1d31b4c612a94736f27072baab4ac1364
73 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
74 Date: Mon Jun 23 14:54:09 2014 +0200
75
76 individual-menu: factor out some item_new() code
77
78 https://bugzilla.gnome.org/show_bug.cgi?id=732100
79
80 libempathy-gtk/empathy-individual-menu.c | 158
81 +++++++++++++++++++++++--------
82 1 file changed, 121 insertions(+), 37 deletions(-)
83
84 commit 8a91bd6aa01f46742c11b22c7d404c9f6d56b7a9
85 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
86 Date: Mon Jun 23 14:39:28 2014 +0200
87
88 individual-menu: rename menu_item_new functions
89
90 - Remove the namespace prefix for static functions
91 - Add 'individual' suffix
92
93 https://bugzilla.gnome.org/show_bug.cgi?id=732100
94
95 libempathy-gtk/empathy-individual-menu.c | 114
96 ++++++++++++++-----------------
97 libempathy-gtk/empathy-individual-menu.h | 4 +-
98 libempathy-gtk/empathy-individual-view.c | 6 +-
99 3 files changed, 59 insertions(+), 65 deletions(-)
100
101 commit d53111417536194edd8bfd66f98630416de72e50
102 Author: Giovanni Campagna <gcampagna@src.gnome.org>
103 Date: Fri Jan 10 11:03:28 2014 +0100
104
105 EmpathySmileyManager: use the proper Unicode characters
106
107 For emoticons that are part of the freedesktop icon spec and of
108 Unicode 6.3, recognize the character and replace it with the icon.
109 Also, prefer the unicode character to the older ASCII encoding.
110 This ensures the maximum compatibility with Hangouts, and also
111 looks nice on iOS/Android.
112
113 https://bugzilla.gnome.org/show_bug.cgi?id=692689
114
115 libempathy-gtk/empathy-smiley-manager.c | 69
116 ++++++++++++++++++++++-----------
117 1 file changed, 46 insertions(+), 23 deletions(-)
118
119 commit 1d7db6929a00bf0fc87be40e3a9628ff6bed473a
120 Author: Giovanni Campagna <gcampagna@src.gnome.org>
121 Date: Mon Jan 28 10:21:49 2013 +0100
122
123 Be more compatible with Facebook emoticon codes
124
125 Since we support Facebook chat, and interoperate with the chat
126 from the
127 browser, we need to support roughly the same emoticon codes.
128
129 https://bugzilla.gnome.org/show_bug.cgi?id=692689
130
131 libempathy-gtk/empathy-smiley-manager.c | 9 ++++++---
132 1 file changed, 6 insertions(+), 3 deletions(-)
133
134 commit 1460786fe3362c7b33a3f37f8f353e391e267566
135 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
136 Date: Wed Jun 11 14:02:28 2014 +0200
137
138 remove released flag
139
140 configure.ac | 2 +-
141 1 file changed, 1 insertion(+), 1 deletion(-)
142
0143 commit 99a7002f326e5210852c0be25b7d0ff9c93f7db2
1144 Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
2145 Date: Wed Jun 11 13:45:59 2014 +0200
0 NEW in 3.12.4 (23/06/2014)
1 =============
2
3 Bugs fixed:
4 - Fixed #732100, Picking a specific persona/account from context menu doesn't work (Guillaume Desmottes)
5
06 NEW in 3.12.3 (11/06/2014)
17 =============
28
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for Empathy 3.12.3.
2 # Generated by GNU Autoconf 2.69 for Empathy 3.12.4.
33 #
44 # Report bugs to <http://bugzilla.gnome.org/browse.cgi?product=empathy>.
55 #
595595 # Identity of this package.
596596 PACKAGE_NAME='Empathy'
597597 PACKAGE_TARNAME='empathy'
598 PACKAGE_VERSION='3.12.3'
599 PACKAGE_STRING='Empathy 3.12.3'
598 PACKAGE_VERSION='3.12.4'
599 PACKAGE_STRING='Empathy 3.12.4'
600600 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/browse.cgi?product=empathy'
601601 PACKAGE_URL='https://live.gnome.org/Empathy'
602602
14881488 # Omit some internal or obsolete options to make the list less imposing.
14891489 # This message is too long to be a string in the A/UX 3.1 sh.
14901490 cat <<_ACEOF
1491 \`configure' configures Empathy 3.12.3 to adapt to many kinds of systems.
1491 \`configure' configures Empathy 3.12.4 to adapt to many kinds of systems.
14921492
14931493 Usage: $0 [OPTION]... [VAR=VALUE]...
14941494
15621562
15631563 if test -n "$ac_init_help"; then
15641564 case $ac_init_help in
1565 short | recursive ) echo "Configuration of Empathy 3.12.3:";;
1565 short | recursive ) echo "Configuration of Empathy 3.12.4:";;
15661566 esac
15671567 cat <<\_ACEOF
15681568
17441744 test -n "$ac_init_help" && exit $ac_status
17451745 if $ac_init_version; then
17461746 cat <<\_ACEOF
1747 Empathy configure 3.12.3
1747 Empathy configure 3.12.4
17481748 generated by GNU Autoconf 2.69
17491749
17501750 Copyright (C) 2012 Free Software Foundation, Inc.
20272027 This file contains any messages produced by compilers while
20282028 running configure, to aid debugging if configure makes a mistake.
20292029
2030 It was created by Empathy $as_me 3.12.3, which was
2030 It was created by Empathy $as_me 3.12.4, which was
20312031 generated by GNU Autoconf 2.69. Invocation command line was
20322032
20332033 $ $0 $@
33413341
33423342 # Define the identity of the package.
33433343 PACKAGE='empathy'
3344 VERSION='3.12.3'
3344 VERSION='3.12.4'
33453345
33463346
33473347 # Some tools Automake needs.
1750517505 # report actual input values of CONFIG_FILES etc. instead of their
1750617506 # values after options handling.
1750717507 ac_log="
17508 This file was extended by Empathy $as_me 3.12.3, which was
17508 This file was extended by Empathy $as_me 3.12.4, which was
1750917509 generated by GNU Autoconf 2.69. Invocation command line was
1751017510
1751117511 CONFIG_FILES = $CONFIG_FILES
1757217572 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1757317573 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1757417574 ac_cs_version="\\
17575 Empathy config.status 3.12.3
17575 Empathy config.status 3.12.4
1757617576 configured by $0, generated by GNU Autoconf 2.69,
1757717577 with options \\"\$ac_cs_config\\"
1757817578
22
33 m4_define([empathy_major_version], [3])
44 m4_define([empathy_minor_version], [12])
5 m4_define([empathy_micro_version], [3])
5 m4_define([empathy_micro_version], [4])
66 m4_define([empathy_nano_version], [0])
77
88 dnl Display the nano_version only if it's not '0'
350350 X-GNOME-Bugzilla-Bugzilla=GNOME
351351 X-GNOME-Bugzilla-Product=empathy
352352 X-GNOME-Bugzilla-Component=General
353 X-GNOME-Bugzilla-Version=3.12.3
353 X-GNOME-Bugzilla-Version=3.12.4
1414 X-GNOME-Bugzilla-Bugzilla=GNOME
1515 X-GNOME-Bugzilla-Product=empathy
1616 X-GNOME-Bugzilla-Component=General
17 X-GNOME-Bugzilla-Version=3.12.3
17 X-GNOME-Bugzilla-Version=3.12.4
7171
7272 G_DEFINE_TYPE (EmpathyIndividualMenu, empathy_individual_menu, GTK_TYPE_MENU);
7373
74 static GtkWidget * empathy_individual_chat_menu_item_new (
75 EmpathyIndividualMenu *self, FolksIndividual *individual);
76 static GtkWidget * empathy_individual_sms_menu_item_new (
77 EmpathyIndividualMenu *self, FolksIndividual *individual);
78 static GtkWidget * empathy_individual_log_menu_item_new (
74 static GtkWidget * chat_menu_item_new_individual (EmpathyIndividualMenu *self,
7975 FolksIndividual *individual);
80 static GtkWidget * empathy_individual_info_menu_item_new (
76 static GtkWidget * chat_menu_item_new_contact (EmpathyIndividualMenu *self,
77 EmpathyContact *contact);
78 static GtkWidget * sms_menu_item_new_individual (EmpathyIndividualMenu *self,
8179 FolksIndividual *individual);
82 static GtkWidget * empathy_individual_edit_menu_item_new (
80 static GtkWidget * sms_menu_item_new_contact (EmpathyIndividualMenu *self,
81 EmpathyContact *contact);
82 static GtkWidget * audio_call_menu_item_new_contact (
83 EmpathyIndividualMenu *self,
84 EmpathyContact *contact);
85 static GtkWidget * video_call_menu_item_new_contact (
86 EmpathyIndividualMenu *self,
87 EmpathyContact *contact);
88 static GtkWidget * log_menu_item_new_individual (FolksIndividual *individual);
89 static GtkWidget * log_menu_item_new_contact (EmpathyContact *contact);
90 static GtkWidget * info_menu_item_new_individual (FolksIndividual *individual);
91 static GtkWidget * edit_menu_item_new_individual (FolksIndividual *individual);
92 static GtkWidget * invite_menu_item_new (FolksIndividual *individual,
93 EmpathyContact *contact);
94 static GtkWidget * file_transfer_menu_item_new_individual (EmpathyIndividualMenu *self,
8395 FolksIndividual *individual);
84 static GtkWidget * empathy_individual_invite_menu_item_new (
85 FolksIndividual *individual,
96 static GtkWidget * file_transfer_menu_item_new_contact (
97 EmpathyIndividualMenu *self,
8698 EmpathyContact *contact);
87 static GtkWidget * empathy_individual_file_transfer_menu_item_new (
88 EmpathyIndividualMenu *self, FolksIndividual *individual);
89 static GtkWidget * empathy_individual_share_my_desktop_menu_item_new (
90 EmpathyIndividualMenu *self, FolksIndividual *individual);
91 static GtkWidget * empathy_individual_favourite_menu_item_new (
99 static GtkWidget * share_my_desktop_menu_item_new_individual (EmpathyIndividualMenu *self,
92100 FolksIndividual *individual);
93 static GtkWidget * empathy_individual_add_menu_item_new (
101 static GtkWidget * share_my_desktop_menu_item_new_contact (
94102 EmpathyIndividualMenu *self,
103 EmpathyContact *contact);
104 static GtkWidget * favourite_menu_item_new_individual (FolksIndividual *individual);
105 static GtkWidget * add_menu_item_new_individual (EmpathyIndividualMenu *self,
95106 FolksIndividual *individual);
96 static GtkWidget * empathy_individiual_block_menu_item_new (
97 FolksIndividual *individual);
98 static GtkWidget * empathy_individiual_remove_menu_item_new (
99 EmpathyIndividualMenu *self);
107 static GtkWidget * block_menu_item_new_individual (FolksIndividual *individual);
108 static GtkWidget * remove_menu_item_new_individual (EmpathyIndividualMenu *self);
100109
101110 static void
102111 individual_menu_add_personas (EmpathyIndividualMenu *self,
152161 FolksPersonaStore *store;
153162 const gchar *account;
154163 GtkWidget *action;
155 /* Individual containing only persona */
156 FolksIndividual *single_individual;
157164
158165 if (!empathy_folks_persona_is_interesting (FOLKS_PERSONA (persona)))
159166 goto while_finish;
163170 goto while_finish;
164171
165172 contact = empathy_contact_dup_from_tp_contact (tp_contact);
166 single_individual = empathy_ensure_individual_from_tp_contact (
167 tp_contact);
168
169 /* Pretty hacky. Creating single_individual had a side effect to change
170 * persona.individual from individual to single_individual which is not
171 * what we want so we set it back. See bgo#684971 for details. */
172 g_object_set (persona, "individual", individual, NULL);
173173
174174 store = folks_persona_get_store (FOLKS_PERSONA (persona));
175175 account = folks_persona_store_get_display_name (store);
193193 /* Chat */
194194 if (features & EMPATHY_INDIVIDUAL_FEATURE_CHAT)
195195 {
196 action = empathy_individual_chat_menu_item_new (self,
197 single_individual);
196 action = chat_menu_item_new_contact (self, contact);
198197 gtk_menu_shell_append (GTK_MENU_SHELL (contact_submenu), action);
199198 gtk_widget_show (action);
200199 }
202201 /* SMS */
203202 if (features & EMPATHY_INDIVIDUAL_FEATURE_SMS)
204203 {
205 action = empathy_individual_sms_menu_item_new (self,
206 single_individual);
204 action = sms_menu_item_new_contact (self, contact);
207205 gtk_menu_shell_append (GTK_MENU_SHELL (contact_submenu), action);
208206 gtk_widget_show (action);
209207 }
211209 if (features & EMPATHY_INDIVIDUAL_FEATURE_CALL)
212210 {
213211 /* Audio Call */
214 action = empathy_individual_audio_call_menu_item_new (
215 self, single_individual);
212 action = audio_call_menu_item_new_contact (self, contact);
216213 gtk_menu_shell_append (GTK_MENU_SHELL (contact_submenu), action);
217214 gtk_widget_show (action);
218215
219216 /* Video Call */
220 action = empathy_individual_video_call_menu_item_new (
221 self, single_individual);
217 action = video_call_menu_item_new_contact (self, contact);
222218 gtk_menu_shell_append (GTK_MENU_SHELL (contact_submenu), action);
223219 gtk_widget_show (action);
224220 }
226222 /* Log */
227223 if (features & EMPATHY_INDIVIDUAL_FEATURE_LOG)
228224 {
229 action = empathy_individual_log_menu_item_new (single_individual);
225 action = log_menu_item_new_contact (contact);
230226 gtk_menu_shell_append (GTK_MENU_SHELL (contact_submenu), action);
231227 gtk_widget_show (action);
232228 }
233229
234230 /* Invite */
235 action = empathy_individual_invite_menu_item_new (NULL, contact);
231 action = invite_menu_item_new (NULL, contact);
236232 gtk_menu_shell_append (GTK_MENU_SHELL (contact_submenu), action);
237233 gtk_widget_show (action);
238234
239235 /* File transfer */
240236 if (features & EMPATHY_INDIVIDUAL_FEATURE_FILE_TRANSFER)
241237 {
242 action = empathy_individual_file_transfer_menu_item_new (
243 self, single_individual);
238 action = file_transfer_menu_item_new_contact (self, contact);
244239 gtk_menu_shell_append (GTK_MENU_SHELL (contact_submenu), action);
245240 gtk_widget_show (action);
246241 }
247242
248243 /* Share my desktop */
249 action = empathy_individual_share_my_desktop_menu_item_new (
250 self, single_individual);
244 action = share_my_desktop_menu_item_new_contact (self, contact);
251245 gtk_menu_shell_append (GTK_MENU_SHELL (contact_submenu), action);
252246 gtk_widget_show (action);
253247
254 /* Block */
255 if (features & EMPATHY_INDIVIDUAL_FEATURE_BLOCK &&
256 (item = empathy_individiual_block_menu_item_new (single_individual))
257 != NULL) {
258 GtkWidget *sep;
259
260 sep = gtk_separator_menu_item_new ();
261 gtk_menu_shell_append (GTK_MENU_SHELL (contact_submenu), sep);
262 gtk_widget_show (sep);
263
264 gtk_menu_shell_append (GTK_MENU_SHELL (contact_submenu), item);
265 gtk_widget_show (item);
266 }
267
268248 gtk_menu_shell_append (GTK_MENU_SHELL (menu), contact_item);
269249 gtk_widget_show (contact_item);
270250
271251 g_free (label);
272252 g_object_unref (contact);
273 g_object_unref (single_individual);
274253
275254 while_finish:
276255 g_clear_object (&persona);
680659 }
681660
682661 static GtkWidget *
683 empathy_individiual_block_menu_item_new (FolksIndividual *individual)
662 block_menu_item_new_individual (FolksIndividual *individual)
684663 {
685664 GtkWidget *item;
686665 GList *contacts, *l;
920899 }
921900
922901 static GtkWidget *
923 empathy_individiual_remove_menu_item_new (EmpathyIndividualMenu *self)
902 remove_menu_item_new_individual (EmpathyIndividualMenu *self)
924903 {
925904 GeeSet *personas;
926905 GeeIterator *iter;
980959 /* Add contact */
981960 if (features & EMPATHY_INDIVIDUAL_FEATURE_ADD_CONTACT)
982961 {
983 item = empathy_individual_add_menu_item_new (self, individual);
962 item = add_menu_item_new_individual (self, individual);
984963 if (item != NULL)
985964 {
986965 gtk_menu_shell_append (GTK_MENU_SHELL (shell), item);
991970 /* Chat */
992971 if (features & EMPATHY_INDIVIDUAL_FEATURE_CHAT)
993972 {
994 item = empathy_individual_chat_menu_item_new (self, individual);
973 item = chat_menu_item_new_individual (self, individual);
995974 if (item != NULL)
996975 {
997976 gtk_menu_shell_append (shell, item);
1002981 /* SMS */
1003982 if (features & EMPATHY_INDIVIDUAL_FEATURE_SMS)
1004983 {
1005 item = empathy_individual_sms_menu_item_new (self, individual);
984 item = sms_menu_item_new_individual (self, individual);
1006985 if (item != NULL)
1007986 {
1008987 gtk_menu_shell_append (shell, item);
1013992 if (features & EMPATHY_INDIVIDUAL_FEATURE_CALL)
1014993 {
1015994 /* Audio Call */
1016 item = empathy_individual_audio_call_menu_item_new (self, individual);
995 item = empathy_individual_audio_call_menu_item_new_individual (self,
996 individual);
1017997 gtk_menu_shell_append (shell, item);
1018998 gtk_widget_show (item);
1019999
10201000 /* Video Call */
1021 item = empathy_individual_video_call_menu_item_new (self, individual);
1001 item = empathy_individual_video_call_menu_item_new_individual (self,
1002 individual);
10221003 gtk_menu_shell_append (shell, item);
10231004 gtk_widget_show (item);
10241005 }
10271008 add_phone_numbers (self);
10281009
10291010 /* Invite */
1030 item = empathy_individual_invite_menu_item_new (individual, NULL);
1011 item = invite_menu_item_new (individual, NULL);
10311012 gtk_menu_shell_append (shell, item);
10321013 gtk_widget_show (item);
10331014
10341015 /* File transfer */
10351016 if (features & EMPATHY_INDIVIDUAL_FEATURE_FILE_TRANSFER)
10361017 {
1037 item = empathy_individual_file_transfer_menu_item_new (self, individual);
1018 item = file_transfer_menu_item_new_individual (self, individual);
10381019 gtk_menu_shell_append (shell, item);
10391020 gtk_widget_show (item);
10401021 }
10421023 /* Share my desktop */
10431024 /* FIXME we should add the "Share my desktop" menu item if Vino is
10441025 a registered handler in MC5 */
1045 item = empathy_individual_share_my_desktop_menu_item_new (self, individual);
1026 item = share_my_desktop_menu_item_new_individual (self, individual);
10461027 gtk_menu_shell_append (shell, item);
10471028 gtk_widget_show (item);
10481029
10631044 /* Edit */
10641045 if (features & EMPATHY_INDIVIDUAL_FEATURE_EDIT)
10651046 {
1066 item = empathy_individual_edit_menu_item_new (individual);
1047 item = edit_menu_item_new_individual (individual);
10671048 gtk_menu_shell_append (shell, item);
10681049 gtk_widget_show (item);
10691050 }
10711052 /* Log */
10721053 if (features & EMPATHY_INDIVIDUAL_FEATURE_LOG)
10731054 {
1074 item = empathy_individual_log_menu_item_new (individual);
1055 item = log_menu_item_new_individual (individual);
10751056 gtk_menu_shell_append (shell, item);
10761057 gtk_widget_show (item);
10771058 }
10791060 /* Info */
10801061 if (features & EMPATHY_INDIVIDUAL_FEATURE_INFO)
10811062 {
1082 item = empathy_individual_info_menu_item_new (individual);
1063 item = info_menu_item_new_individual (individual);
10831064 gtk_menu_shell_append (shell, item);
10841065 gtk_widget_show (item);
10851066 }
10871068 /* Favorite checkbox */
10881069 if (features & EMPATHY_INDIVIDUAL_FEATURE_FAVOURITE)
10891070 {
1090 item = empathy_individual_favourite_menu_item_new (individual);
1071 item = favourite_menu_item_new_individual (individual);
10911072 gtk_menu_shell_append (shell, item);
10921073 gtk_widget_show (item);
10931074 }
10941075
10951076 /* Separator & Block */
10961077 if (features & EMPATHY_INDIVIDUAL_FEATURE_BLOCK &&
1097 (item = empathy_individiual_block_menu_item_new (individual)) != NULL) {
1078 (item = block_menu_item_new_individual (individual)) != NULL) {
10981079 GtkWidget *sep;
10991080
11001081 sep = gtk_separator_menu_item_new ();
11071088
11081089 /* Separator & Remove */
11091090 if (features & EMPATHY_INDIVIDUAL_FEATURE_REMOVE &&
1110 (item = empathy_individiual_remove_menu_item_new (self)) != NULL) {
1091 (item = remove_menu_item_new_individual (self)) != NULL) {
11111092 GtkWidget *sep;
11121093
11131094 sep = gtk_separator_menu_item_new ();
13611342 }
13621343
13631344 static GtkWidget *
1364 empathy_individual_chat_menu_item_new (EmpathyIndividualMenu *self,
1365 FolksIndividual *individual)
1345 chat_menu_item_new (EmpathyIndividualMenu *self)
13661346 {
13671347 GtkWidget *item;
13681348 GtkWidget *image;
1369
1370 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual) &&
1371 empathy_folks_individual_contains_contact (individual), NULL);
13721349
13731350 item = gtk_image_menu_item_new_with_mnemonic (_("_Chat"));
13741351 image = gtk_image_new_from_icon_name (EMPATHY_IMAGE_MESSAGE,
13771354 gtk_widget_show (image);
13781355
13791356 g_object_set_data (G_OBJECT (item), "individual-menu", self);
1357
1358 return item;
1359 }
1360
1361 static GtkWidget *
1362 chat_menu_item_new_individual (EmpathyIndividualMenu *self,
1363 FolksIndividual *individual)
1364 {
1365 GtkWidget *item;
1366
1367 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual) &&
1368 empathy_folks_individual_contains_contact (individual), NULL);
1369
1370 item = chat_menu_item_new (self);
1371
13801372 menu_item_set_first_contact (item, individual,
1373 G_CALLBACK (empathy_individual_chat_menu_item_activated),
1374 EMPATHY_ACTION_CHAT);
1375
1376 return item;
1377 }
1378
1379 static GtkWidget *
1380 chat_menu_item_new_contact (EmpathyIndividualMenu *self,
1381 EmpathyContact *contact)
1382 {
1383 GtkWidget *item;
1384
1385 g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
1386
1387 item = chat_menu_item_new (self);
1388
1389 menu_item_set_contact (item, contact,
13811390 G_CALLBACK (empathy_individual_chat_menu_item_activated),
13821391 EMPATHY_ACTION_CHAT);
13831392
14001409 }
14011410
14021411 static GtkWidget *
1403 empathy_individual_sms_menu_item_new (EmpathyIndividualMenu *self,
1404 FolksIndividual *individual)
1412 sms_menu_item_new (EmpathyIndividualMenu *self)
14051413 {
14061414 GtkWidget *item;
14071415 GtkWidget *image;
1408
1409 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual) &&
1410 empathy_folks_individual_contains_contact (individual), NULL);
14111416
14121417 item = gtk_image_menu_item_new_with_mnemonic (_("_SMS"));
14131418 image = gtk_image_new_from_icon_name (EMPATHY_IMAGE_SMS,
14161421 gtk_widget_show (image);
14171422
14181423 g_object_set_data (G_OBJECT (item), "individual-menu", self);
1424
1425 return item;
1426 }
1427
1428 static GtkWidget *
1429 sms_menu_item_new_individual (EmpathyIndividualMenu *self,
1430 FolksIndividual *individual)
1431 {
1432 GtkWidget *item;
1433
1434 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual) &&
1435 empathy_folks_individual_contains_contact (individual), NULL);
1436
1437 item = sms_menu_item_new (self);
1438
14191439 menu_item_set_first_contact (item, individual,
14201440 G_CALLBACK (empathy_individual_sms_menu_item_activated),
14211441 EMPATHY_ACTION_SMS);
14231443 return item;
14241444 }
14251445
1446 static GtkWidget *
1447 sms_menu_item_new_contact (EmpathyIndividualMenu *self,
1448 EmpathyContact *contact)
1449 {
1450 GtkWidget *item;
1451
1452 g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
1453
1454 item = sms_menu_item_new (self);
1455
1456 menu_item_set_contact (item, contact,
1457 G_CALLBACK (empathy_individual_sms_menu_item_activated),
1458 EMPATHY_ACTION_SMS);
1459
1460 return item;
1461 }
1462
1463
14261464 static void
14271465 empathy_individual_audio_call_menu_item_activated (GtkMenuItem *item,
14281466 EmpathyContact *contact)
14361474 emit_menu_item_activated (item);
14371475 }
14381476
1439 GtkWidget *
1440 empathy_individual_audio_call_menu_item_new (EmpathyIndividualMenu *self,
1441 FolksIndividual *individual)
1477 static GtkWidget *
1478 audio_call_menu_item_new (EmpathyIndividualMenu *self)
14421479 {
14431480 GtkWidget *item;
14441481 GtkWidget *image;
1445
1446 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
14471482
14481483 item = gtk_image_menu_item_new_with_mnemonic (C_("menu item", "_Audio Call"));
14491484 image = gtk_image_new_from_icon_name (EMPATHY_IMAGE_VOIP, GTK_ICON_SIZE_MENU);
14511486 gtk_widget_show (image);
14521487
14531488 g_object_set_data (G_OBJECT (item), "individual-menu", self);
1489
1490 return item;
1491 }
1492
1493 GtkWidget *
1494 empathy_individual_audio_call_menu_item_new_individual (
1495 EmpathyIndividualMenu *self,
1496 FolksIndividual *individual)
1497 {
1498 GtkWidget *item;
1499
1500 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
1501
1502 item = audio_call_menu_item_new (self);
1503
14541504 menu_item_set_first_contact (item, individual,
14551505 G_CALLBACK (empathy_individual_audio_call_menu_item_activated),
14561506 EMPATHY_ACTION_AUDIO_CALL);
14581508 return item;
14591509 }
14601510
1511 static GtkWidget *
1512 audio_call_menu_item_new_contact (
1513 EmpathyIndividualMenu *self,
1514 EmpathyContact *contact)
1515 {
1516 GtkWidget *item;
1517
1518 g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
1519
1520 item = audio_call_menu_item_new (self);
1521
1522 menu_item_set_contact (item, contact,
1523 G_CALLBACK (empathy_individual_audio_call_menu_item_activated),
1524 EMPATHY_ACTION_AUDIO_CALL);
1525
1526 return item;
1527 }
1528
1529
14611530 static void
14621531 empathy_individual_video_call_menu_item_activated (GtkMenuItem *item,
14631532 EmpathyContact *contact)
14711540 emit_menu_item_activated (item);
14721541 }
14731542
1474 GtkWidget *
1475 empathy_individual_video_call_menu_item_new (EmpathyIndividualMenu *self,
1476 FolksIndividual *individual)
1543 static GtkWidget *
1544 video_call_menu_item_new (EmpathyIndividualMenu *self)
14771545 {
14781546 GtkWidget *item;
14791547 GtkWidget *image;
1480 TpawCameraMonitor *monitor;
1481
1482 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
14831548
14841549 item = gtk_image_menu_item_new_with_mnemonic (C_("menu item", "_Video Call"));
14851550 image = gtk_image_new_from_icon_name (EMPATHY_IMAGE_VIDEO_CALL,
14881553 gtk_widget_show (image);
14891554
14901555 g_object_set_data (G_OBJECT (item), "individual-menu", self);
1491 menu_item_set_first_contact (item, individual,
1492 G_CALLBACK (empathy_individual_video_call_menu_item_activated),
1493 EMPATHY_ACTION_VIDEO_CALL);
1556
1557 return item;
1558 }
1559
1560 static void
1561 check_camera_available (GtkWidget *item)
1562 {
1563 TpawCameraMonitor *monitor;
14941564
14951565 /* Only follow available cameras if the contact can do Video calls */
14961566 if (gtk_widget_get_sensitive (item))
15011571 g_object_bind_property (monitor, "available", item, "sensitive",
15021572 G_BINDING_SYNC_CREATE);
15031573 }
1574 }
1575
1576 GtkWidget *
1577 empathy_individual_video_call_menu_item_new_individual (
1578 EmpathyIndividualMenu *self,
1579 FolksIndividual *individual)
1580 {
1581 GtkWidget *item;
1582
1583 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
1584
1585 item = video_call_menu_item_new (self);
1586
1587 menu_item_set_first_contact (item, individual,
1588 G_CALLBACK (empathy_individual_video_call_menu_item_activated),
1589 EMPATHY_ACTION_VIDEO_CALL);
1590
1591 check_camera_available (item);
1592
1593 return item;
1594 }
1595
1596 GtkWidget *
1597 video_call_menu_item_new_contact (EmpathyIndividualMenu *self,
1598 EmpathyContact *contact)
1599 {
1600 GtkWidget *item;
1601
1602 g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
1603
1604 item = video_call_menu_item_new (self);
1605
1606 menu_item_set_contact (item, contact,
1607 G_CALLBACK (empathy_individual_video_call_menu_item_activated),
1608 EMPATHY_ACTION_VIDEO_CALL);
1609
1610 check_camera_available (item);
15041611
15051612 return item;
15061613 }
15161623 }
15171624
15181625 static GtkWidget *
1519 empathy_individual_log_menu_item_new (FolksIndividual *individual)
1626 log_menu_item_new (void)
15201627 {
15211628 GtkWidget *item;
15221629 GtkWidget *image;
1523
1524 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
15251630
15261631 item = gtk_image_menu_item_new_with_mnemonic (_("_Previous Conversations"));
15271632 image = gtk_image_new_from_icon_name (EMPATHY_IMAGE_LOG, GTK_ICON_SIZE_MENU);
15281633 gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
15291634 gtk_widget_show (image);
15301635
1636 return item;
1637 }
1638
1639 static GtkWidget *
1640 log_menu_item_new_individual (FolksIndividual *individual)
1641 {
1642 GtkWidget *item;
1643
1644 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
1645
1646 item = log_menu_item_new ();
1647
15311648 menu_item_set_first_contact (item, individual,
15321649 G_CALLBACK (empathy_individual_log_menu_item_activated),
15331650 EMPATHY_ACTION_VIEW_LOGS);
15351652 return item;
15361653 }
15371654
1655 static GtkWidget *
1656 log_menu_item_new_contact (EmpathyContact *contact)
1657 {
1658 GtkWidget *item;
1659
1660 g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
1661
1662 item = log_menu_item_new ();
1663
1664 menu_item_set_contact (item, contact,
1665 G_CALLBACK (empathy_individual_log_menu_item_activated),
1666 EMPATHY_ACTION_VIEW_LOGS);
1667
1668 return item;
1669 }
1670
15381671 static void
15391672 empathy_individual_file_transfer_menu_item_activated (GtkMenuItem *item,
15401673 EmpathyContact *contact)
15471680 }
15481681
15491682 static GtkWidget *
1550 empathy_individual_file_transfer_menu_item_new (EmpathyIndividualMenu *self,
1551 FolksIndividual *individual)
1683 file_transfer_menu_item_new (EmpathyIndividualMenu *self)
15521684 {
15531685 GtkWidget *item;
15541686 GtkWidget *image;
1555
1556 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
15571687
15581688 item = gtk_image_menu_item_new_with_mnemonic (_("Send File"));
15591689 image = gtk_image_new_from_icon_name (EMPATHY_IMAGE_DOCUMENT_SEND,
15621692 gtk_widget_show (image);
15631693
15641694 g_object_set_data (G_OBJECT (item), "individual-menu", self);
1695
1696 return item;
1697 }
1698
1699 static GtkWidget *
1700 file_transfer_menu_item_new_individual (EmpathyIndividualMenu *self,
1701 FolksIndividual *individual)
1702 {
1703 GtkWidget *item;
1704
1705 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
1706
1707 item = file_transfer_menu_item_new (self);
1708
15651709 menu_item_set_first_contact (item, individual,
15661710 G_CALLBACK (empathy_individual_file_transfer_menu_item_activated),
15671711 EMPATHY_ACTION_SEND_FILE);
15691713 return item;
15701714 }
15711715
1716 static GtkWidget *
1717 file_transfer_menu_item_new_contact (EmpathyIndividualMenu *self,
1718 EmpathyContact *contact)
1719 {
1720 GtkWidget *item;
1721
1722 g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
1723
1724 item = file_transfer_menu_item_new (self);
1725
1726 menu_item_set_contact (item, contact,
1727 G_CALLBACK (empathy_individual_file_transfer_menu_item_activated),
1728 EMPATHY_ACTION_SEND_FILE);
1729
1730 return item;
1731 }
1732
15721733 static void
15731734 empathy_individual_share_my_desktop_menu_item_activated (GtkMenuItem *item,
15741735 EmpathyContact *contact)
15811742 }
15821743
15831744 static GtkWidget *
1584 empathy_individual_share_my_desktop_menu_item_new (EmpathyIndividualMenu *self,
1585 FolksIndividual *individual)
1745 share_my_desktop_menu_item_new (EmpathyIndividualMenu *self)
15861746 {
15871747 GtkWidget *item;
15881748 GtkWidget *image;
1589
1590 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
15911749
15921750 item = gtk_image_menu_item_new_with_mnemonic (_("Share My Desktop"));
15931751 image = gtk_image_new_from_icon_name (GTK_STOCK_NETWORK, GTK_ICON_SIZE_MENU);
15951753 gtk_widget_show (image);
15961754
15971755 g_object_set_data (G_OBJECT (item), "individual-menu", self);
1756
1757 return item;
1758 }
1759
1760 static GtkWidget *
1761 share_my_desktop_menu_item_new_individual (EmpathyIndividualMenu *self,
1762 FolksIndividual *individual)
1763 {
1764 GtkWidget *item;
1765
1766 g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
1767
1768 item = share_my_desktop_menu_item_new (self);
1769
15981770 menu_item_set_first_contact (item, individual,
15991771 G_CALLBACK (empathy_individual_share_my_desktop_menu_item_activated),
16001772 EMPATHY_ACTION_SHARE_MY_DESKTOP);
16021774 return item;
16031775 }
16041776
1777 static GtkWidget *
1778 share_my_desktop_menu_item_new_contact (EmpathyIndividualMenu *self,
1779 EmpathyContact *contact)
1780 {
1781 GtkWidget *item;
1782
1783 g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
1784
1785 item = share_my_desktop_menu_item_new (self);
1786
1787 menu_item_set_contact (item, contact,
1788 G_CALLBACK (empathy_individual_share_my_desktop_menu_item_activated),
1789 EMPATHY_ACTION_SHARE_MY_DESKTOP);
1790
1791 return item;
1792 }
1793
16051794 static void
16061795 favourite_menu_item_toggled_cb (GtkCheckMenuItem *item,
16071796 FolksIndividual *individual)
16121801 }
16131802
16141803 static GtkWidget *
1615 empathy_individual_favourite_menu_item_new (FolksIndividual *individual)
1804 favourite_menu_item_new_individual (FolksIndividual *individual)
16161805 {
16171806 GtkWidget *item;
16181807
16361825 }
16371826
16381827 static GtkWidget *
1639 empathy_individual_info_menu_item_new (FolksIndividual *individual)
1828 info_menu_item_new_individual (FolksIndividual *individual)
16401829 {
16411830 GtkWidget *item;
16421831 GtkWidget *image;
16651854 }
16661855
16671856 static GtkWidget *
1668 empathy_individual_edit_menu_item_new (FolksIndividual *individual)
1857 edit_menu_item_new_individual (FolksIndividual *individual)
16691858 {
16701859 EmpathyIndividualManager *manager;
16711860 GtkWidget *item;
18342023 }
18352024
18362025 static GtkWidget *
1837 empathy_individual_invite_menu_item_new (FolksIndividual *individual,
2026 invite_menu_item_new (FolksIndividual *individual,
18382027 EmpathyContact *contact)
18392028 {
18402029 GtkWidget *item;
19762165 }
19772166
19782167 static GtkWidget *
1979 empathy_individual_add_menu_item_new (EmpathyIndividualMenu *self,
2168 add_menu_item_new_individual (EmpathyIndividualMenu *self,
19802169 FolksIndividual *individual)
19812170 {
19822171 EmpathyIndividualMenuPriv *priv = GET_PRIV (self);
7575 EmpathyIndividualFeatureFlags features,
7676 EmpathyIndividualStore *store);
7777
78 GtkWidget * empathy_individual_audio_call_menu_item_new (
78 GtkWidget * empathy_individual_audio_call_menu_item_new_individual (
7979 EmpathyIndividualMenu *self, FolksIndividual *individual);
80 GtkWidget * empathy_individual_video_call_menu_item_new (
80 GtkWidget * empathy_individual_video_call_menu_item_new_individual (
8181 EmpathyIndividualMenu *self, FolksIndividual *individual);
8282
8383 G_END_DECLS
10701070 shell = GTK_MENU_SHELL (menu);
10711071
10721072 /* audio */
1073 item = empathy_individual_audio_call_menu_item_new (NULL, individual);
1073 item = empathy_individual_audio_call_menu_item_new_individual (NULL,
1074 individual);
10741075 gtk_menu_shell_append (shell, item);
10751076 gtk_widget_show (item);
10761077
10771078 /* video */
1078 item = empathy_individual_video_call_menu_item_new (NULL, individual);
1079 item = empathy_individual_video_call_menu_item_new_individual (NULL,
1080 individual);
10791081 gtk_menu_shell_append (shell, item);
10801082 gtk_widget_show (item);
10811083
266266 g_return_if_fail (EMPATHY_IS_SMILEY_MANAGER (manager));
267267
268268 /* From fd.o icon-naming spec */
269 empathy_smiley_manager_add (manager, "face-angel", "O:-)", "O:)", NULL);
270 empathy_smiley_manager_add (manager, "face-angry", "X-(", ":@", NULL);
271 empathy_smiley_manager_add (manager, "face-cool", "B-)", NULL);
272 empathy_smiley_manager_add (manager, "face-crying", ":'(", NULL);
273 empathy_smiley_manager_add (manager, "face-devilish", ">:-)", ">:)", NULL);
274 empathy_smiley_manager_add (manager, "face-embarrassed",":-[", ":[", ":-$", ":$", NULL);
275 empathy_smiley_manager_add (manager, "face-kiss", ":-*", ":*", NULL);
276 empathy_smiley_manager_add (manager, "face-laugh", ":-))", ":))", NULL);
277 empathy_smiley_manager_add (manager, "face-monkey", ":-(|)", ":(|)", NULL);
278 empathy_smiley_manager_add (manager, "face-plain", ":-|", ":|", NULL);
279 empathy_smiley_manager_add (manager, "face-raspberry", ":-P", ":P", ":-p", ":p", NULL);
280 empathy_smiley_manager_add (manager, "face-sad", ":-(", ":(", NULL);
281 empathy_smiley_manager_add (manager, "face-sick", ":-&", ":&", NULL);
282 empathy_smiley_manager_add (manager, "face-smile", ":-)", ":)", NULL);
283 empathy_smiley_manager_add (manager, "face-smile-big", ":-D", ":D", ":-d", ":d", NULL);
284 empathy_smiley_manager_add (manager, "face-smirk", ":-!", ":!", NULL);
285 empathy_smiley_manager_add (manager, "face-surprise", ":-O", ":O", ":-o", ":o", NULL);
286 empathy_smiley_manager_add (manager, "face-tired", "|-)", "|)", NULL);
287 empathy_smiley_manager_add (manager, "face-uncertain", ":-/", ":/", NULL);
288 empathy_smiley_manager_add (manager, "face-wink", ";-)", ";)", NULL);
289 empathy_smiley_manager_add (manager, "face-worried", ":-S", ":S", ":-s", ":s", NULL);
269
270 /* U+1F47C BABY ANGEL */
271 empathy_smiley_manager_add (manager, "face-angel", "👼", "O:-)", "O:)", NULL);
272 /* U+1F620 ANGRY FACE */
273 empathy_smiley_manager_add (manager, "face-angry", "😠", "X-(", ":@", NULL);
274 /* U+1F60E SMILING FACE WITH SUNGLASSES */
275 empathy_smiley_manager_add (manager, "face-cool", "😎", "B-)", "B-|", NULL);
276 /* U+1F62D LOUDLY CRYING FACE */
277 empathy_smiley_manager_add (manager, "face-crying", "😭", ":'(", NULL);
278 /* U+1F608 SMILING FACE WITH HORNS */
279 empathy_smiley_manager_add (manager, "face-devilish", "😈", ">:-)", ">:)", NULL);
280 /* U+1F633 FLUSHED FACE */
281 empathy_smiley_manager_add (manager, "face-embarrassed","😳", ":-[", ":[", ":-$", ":$", NULL);
282 /* no suitable character in unicode */
283 empathy_smiley_manager_add (manager, "face-glasses", "8-)", NULL);
284 /* U+1F618 FACE THROWING A KISS */
285 empathy_smiley_manager_add (manager, "face-kiss", "😘", ":-*", ":*", NULL);
286 /* U+1F604 SMILING FACE WITH OPEN MOUTH AND SMILING EYES" */
287 empathy_smiley_manager_add (manager, "face-laugh", "😄", ":-))", ":))", NULL);
288 /* U+1F435 MONKEY */
289 empathy_smiley_manager_add (manager, "face-monkey", "🐵", ":-(|)", ":(|)", NULL);
290 /* U+1F610 NEUTRAL FACE */
291 empathy_smiley_manager_add (manager, "face-plain", "😐", ":-|", ":|", NULL);
292 /* U+1F61B FACE WITH STUCK-OUT TONGUE */
293 empathy_smiley_manager_add (manager, "face-raspberry", "😛", ":-P", ":P", ":-p", ":p", NULL);
294 /* U+1F626 FROWING FACE WITH OPEN MOUTH */
295 empathy_smiley_manager_add (manager, "face-sad", "😦", ":-(", ":(", NULL);
296 /* U+1F635 DIZZY FACE */
297 empathy_smiley_manager_add (manager, "face-sick", "😵", ":-&", ":&", NULL);
298 /* U+1F603 SMILING FACE WITH OPEN MOUTH */
299 empathy_smiley_manager_add (manager, "face-smile", "😃", ":-)", ":)", ":]", "=)", NULL);
300 /* U+1F601 GRINNING FACE WITH SMILING EYES */
301 empathy_smiley_manager_add (manager, "face-smile-big", "😁", ":-D", ":D", ":-d", ":d", NULL);
302 /* U+1F60F SMIRKING FACE */
303 empathy_smiley_manager_add (manager, "face-smirk", "😏", ":-!", ":!", NULL);
304 /* U+1F632 ASTONISHED FACE */
305 empathy_smiley_manager_add (manager, "face-surprise", "😲", ":-O", ":O", ":-o", ":o", NULL);
306 /* U+1F62A SLEEPY FACE */
307 empathy_smiley_manager_add (manager, "face-tired", "😪", "|-)", "|)", NULL);
308 /* U+1F615 CONFUSED FACE */
309 empathy_smiley_manager_add (manager, "face-uncertain", "😕", ":-/", ":/", ":-\\", ":\\", NULL);
310 /* U+1F609 WINKING FACE */
311 empathy_smiley_manager_add (manager, "face-wink", "😉", ";-)", ";)", NULL);
312 /* U+1F61F WORRIED FACE */
313 empathy_smiley_manager_add (manager, "face-worried", "😟", ":-S", ":S", ":-s", ":s", NULL);
314 /* U+2764 HEAVY BLACK HEART */
315 empathy_smiley_manager_add (manager, "emblem-favorite", "❤", "<3", NULL);
290316 }
291317
292318 static EmpathySmileyHit *