pidgin/pidginmooddialog.c

Fri, 04 Nov 2022 00:47:21 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Fri, 04 Nov 2022 00:47:21 -0500
changeset 41882
e0a90a0a5bb2
parent 41851
64d7e69bff25
child 42127
18acb99a0fa6
permissions
-rw-r--r--

Remove last unused argument in purple_util_format_song_info

Testing Done:
Compiled only.

Reviewed at https://reviews.imfreedom.org/r/2020/

40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * pidgin
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 *
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 * Pidgin is the legal property of its developers, whose names are too numerous
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * source distribution.
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 *
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * (at your option) any later version.
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 *
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * GNU General Public License for more details.
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 *
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #include "pidgin/pidginmooddialog.h"
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24
40444
f2d8204dcf4e Some stuff got missed when making internal.h libpurple only.
Gary Kramlich <grim@reaperworld.com>
parents: 40388
diff changeset
25 #include <glib/gi18n-lib.h>
f2d8204dcf4e Some stuff got missed when making internal.h libpurple only.
Gary Kramlich <grim@reaperworld.com>
parents: 40388
diff changeset
26
f2d8204dcf4e Some stuff got missed when making internal.h libpurple only.
Gary Kramlich <grim@reaperworld.com>
parents: 40388
diff changeset
27 #include "config.h"
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 /*< private >
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 * pidgin_mood_update_status:
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 * @account: The #PurpleAccount instance.
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 * @mood: The id of the new mood.
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 * @text: The new status text.
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 *
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 * Updates the current status for @account with the given @mood and @text.
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 */
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 static void
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 update_status_with_mood(PurpleAccount *account, const gchar *mood,
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 const gchar *text)
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 if (mood && *mood) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 if (text) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 purple_account_set_status(account, "mood", TRUE,
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 PURPLE_MOOD_NAME, mood,
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 PURPLE_MOOD_COMMENT, text,
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 NULL);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 } else {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 purple_account_set_status(account, "mood", TRUE,
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 PURPLE_MOOD_NAME, mood,
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 NULL);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 } else {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 purple_account_set_status(account, "mood", FALSE, NULL);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 /*< private
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 * pidgin_mood_edit_cb:
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
59 * @connection: The #PurpleConnection instance.
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 * @fields: The #PurpleRequestFields
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 *
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 * This a callback function for when the request dialog has been accepted.
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 */
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 static void
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
65 pidgin_mood_dialog_edit_cb(PurpleConnection *connection,
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
66 PurpleRequestFields *fields)
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
67 {
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
68 PurpleRequestField *mood_field = NULL;
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
69 GList *l = NULL;
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 const gchar *mood = NULL;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 mood_field = purple_request_fields_get_field(fields, "mood");
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 l = purple_request_field_list_get_selected(mood_field);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 if(l == NULL) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 return;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 mood = purple_request_field_list_get_data(mood_field, l->data);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
81 if(connection != NULL) {
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
82 PurpleAccount *account = purple_connection_get_account(connection);
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
83 PurpleConnectionFlags flags;
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
84 const gchar *text = NULL;
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
86 flags = purple_connection_get_flags(connection);
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
87 if (flags & PURPLE_CONNECTION_FLAG_SUPPORT_MOOD_MESSAGES) {
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
88 PurpleRequestField *text_field = NULL;
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
89
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90 text_field = purple_request_fields_get_field(fields, "text");
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 text = purple_request_field_string_get_value(text_field);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 } else {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 text = NULL;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 update_status_with_mood(account, mood, text);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 } else {
41851
64d7e69bff25 Move PurpleAccountManager to GPtrArray and implement GListModel
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41454
diff changeset
98 GListModel *manager_model = NULL;
64d7e69bff25 Move PurpleAccountManager to GPtrArray and implement GListModel
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41454
diff changeset
99 guint n_items = 0;
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100
41851
64d7e69bff25 Move PurpleAccountManager to GPtrArray and implement GListModel
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41454
diff changeset
101 manager_model = purple_account_manager_get_default_as_model();
64d7e69bff25 Move PurpleAccountManager to GPtrArray and implement GListModel
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41454
diff changeset
102 n_items = g_list_model_get_n_items(manager_model);
64d7e69bff25 Move PurpleAccountManager to GPtrArray and implement GListModel
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41454
diff changeset
103 for(guint index = 0; index < n_items; index++) {
64d7e69bff25 Move PurpleAccountManager to GPtrArray and implement GListModel
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41454
diff changeset
104 PurpleAccount *account = NULL;
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
105
41851
64d7e69bff25 Move PurpleAccountManager to GPtrArray and implement GListModel
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41454
diff changeset
106 account = g_list_model_get_item(manager_model, index);
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
107 connection = purple_account_get_connection(account);
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
108 if(PURPLE_IS_CONNECTION(connection)) {
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
109 PurpleConnectionFlags flags;
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
111 flags = purple_connection_get_flags(connection);
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
112 if(flags & PURPLE_CONNECTION_FLAG_SUPPORT_MOODS) {
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
113 update_status_with_mood(account, mood, NULL);
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
114 }
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
115 }
41851
64d7e69bff25 Move PurpleAccountManager to GPtrArray and implement GListModel
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41454
diff changeset
116
64d7e69bff25 Move PurpleAccountManager to GPtrArray and implement GListModel
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41454
diff changeset
117 g_object_unref(account);
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
118 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
119 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
120 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
121
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
122 /*< private >
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
123 * pidgin_mood_get_global_moods:
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
124 *
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
125 * Returns an array of all global moods.
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126 *
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127 * This function should be in libpurple, and it needs a lot of cleanup. It
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
128 * should probably also be returning a GList of moods as that's easier to deal
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129 * with.
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 *
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
131 * Also, there is non-deterministic behavior here that the order of the
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
132 * returned moods depends purely on the order that the accounts where connected
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
133 * in. This is probably okay, but we should look at fixing that somehow.
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134 *
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
135 * Returns: (transfer full): A list of all global moods.
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136 */
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137 static PurpleMood *
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
138 pidgin_mood_get_global_moods(void) {
41209
909561f42b1f port Pidgin to the new PurpleAccountManager api
Gary Kramlich <grim@reaperworld.com>
parents: 40647
diff changeset
139 PurpleAccountManager *manager = NULL;
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140 GHashTable *global_moods = NULL;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
141 GHashTable *mood_counts = NULL;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142 GList *accounts = NULL;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
143 PurpleMood *result = NULL;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
144 GList *out_moods = NULL;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145 int i = 0;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
146 int num_accounts = 0;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
147
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
148 global_moods = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, NULL);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149 mood_counts = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, NULL);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
150
41209
909561f42b1f port Pidgin to the new PurpleAccountManager api
Gary Kramlich <grim@reaperworld.com>
parents: 40647
diff changeset
151 manager = purple_account_manager_get_default();
41454
7cc69bde919d Update pidgin for the purple_account_manager_get_(in)active deprecations
Gary Kramlich <grim@reaperworld.com>
parents: 41209
diff changeset
152 accounts = purple_account_manager_get_enabled(manager);
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 for (; accounts ; accounts = g_list_delete_link(accounts, accounts)) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154 PurpleAccount *account = (PurpleAccount *) accounts->data;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
155 if (purple_account_is_connected(account)) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
156 PurpleConnection *gc = purple_account_get_connection(account);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
157
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
158 if (purple_connection_get_flags(gc) & PURPLE_CONNECTION_FLAG_SUPPORT_MOODS) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
159 PurpleProtocol *protocol = purple_connection_get_protocol(gc);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
160 PurpleMood *mood = NULL;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
161
40634
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents: 40444
diff changeset
162 for (mood = purple_protocol_client_get_moods(PURPLE_PROTOCOL_CLIENT(protocol), account) ;
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
163 mood->mood != NULL ; mood++) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
164 int mood_count =
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
165 GPOINTER_TO_INT(g_hash_table_lookup(mood_counts, mood->mood));
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
166
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
167 if (!g_hash_table_contains(global_moods, mood->mood)) {
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
168 g_hash_table_insert(global_moods, (gpointer)mood->mood, mood);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
169 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
170 g_hash_table_insert(mood_counts, (gpointer)mood->mood,
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
171 GINT_TO_POINTER(mood_count + 1));
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
172 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
173
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
174 num_accounts++;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
175 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
176 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
177 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
178
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
179 result = g_new0(PurpleMood, g_hash_table_size(global_moods) + 1);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
180
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
181 out_moods = g_hash_table_get_values(global_moods);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
182 while (out_moods) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
183 PurpleMood *mood = (PurpleMood *) out_moods->data;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
184 int in_num_accounts =
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
185 GPOINTER_TO_INT(g_hash_table_lookup(mood_counts, mood->mood));
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
186
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
187 if (in_num_accounts == num_accounts) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
188 /* mood is present in all accounts supporting moods */
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
189 result[i].mood = mood->mood;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
190 result[i].description = mood->description;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
191 i++;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
192 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
193 out_moods = g_list_delete_link(out_moods, out_moods);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
194 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
195
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
196 g_hash_table_destroy(global_moods);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
197 g_hash_table_destroy(mood_counts);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
198
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
199 return result;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
200 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
201
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
202 /*< private >
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
203 * pidgin_mood_get_global_status:
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
204 *
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
205 * Get the currently selected mood name for all mood support accounts. If no
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
206 * mood is set, or accounts have different moods then %NULL is returned.
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
207 *
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
208 * Returns: The currently selected mood name or %NULL if a mood is not set, or
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
209 * accounts are using different moods.
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
210 */
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
211 static const gchar *
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
212 pidgin_mood_get_global_status(void) {
41209
909561f42b1f port Pidgin to the new PurpleAccountManager api
Gary Kramlich <grim@reaperworld.com>
parents: 40647
diff changeset
213 PurpleAccountManager *manager = NULL;
909561f42b1f port Pidgin to the new PurpleAccountManager api
Gary Kramlich <grim@reaperworld.com>
parents: 40647
diff changeset
214 GList *accounts = NULL;
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
215 const gchar *found_mood = NULL;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
216
41209
909561f42b1f port Pidgin to the new PurpleAccountManager api
Gary Kramlich <grim@reaperworld.com>
parents: 40647
diff changeset
217 manager = purple_account_manager_get_default();
41454
7cc69bde919d Update pidgin for the purple_account_manager_get_(in)active deprecations
Gary Kramlich <grim@reaperworld.com>
parents: 41209
diff changeset
218 accounts = purple_account_manager_get_enabled(manager);
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
219 for (; accounts ; accounts = g_list_delete_link(accounts, accounts)) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
220 PurpleAccount *account = (PurpleAccount *) accounts->data;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
221
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
222 if (purple_account_is_connected(account) &&
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
223 (purple_connection_get_flags(purple_account_get_connection(account)) &
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
224 PURPLE_CONNECTION_FLAG_SUPPORT_MOODS)) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
225 PurplePresence *presence = purple_account_get_presence(account);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
226 PurpleStatus *status = purple_presence_get_status(presence, "mood");
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
227 const gchar *curr_mood = purple_status_get_attr_string(status, PURPLE_MOOD_NAME);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
228
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
229 if (found_mood != NULL && !purple_strequal(curr_mood, found_mood)) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
230 /* found a different mood */
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
231 found_mood = NULL;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
232 break;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
233 } else {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
234 found_mood = curr_mood;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
235 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
236 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
237 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
238
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
239 return found_mood;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
240 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
241
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
242 /******************************************************************************
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
243 * Public API
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
244 *****************************************************************************/
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
245 void
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
246 pidgin_mood_dialog_show(PurpleAccount *account) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
247 const gchar *current_mood;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
248 PurpleRequestFields *fields;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
249 PurpleRequestFieldGroup *g;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
250 PurpleRequestField *f;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
251 PurpleConnection *gc = NULL;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
252 PurpleProtocol *protocol = NULL;
40647
33d7e6abb37f Fix a few random issues that scanbuild found.
Gary Kramlich <grim@reaperworld.com>
parents: 40634
diff changeset
253 PurpleMood *mood = NULL;
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
254 PurpleMood *global_moods = NULL;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
255
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
256 if (account) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
257 PurplePresence *presence = purple_account_get_presence(account);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
258 PurpleStatus *status = purple_presence_get_status(presence, "mood");
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
259 gc = purple_account_get_connection(account);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
260 g_return_if_fail(purple_connection_get_protocol(gc) != NULL);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
261 protocol = purple_connection_get_protocol(gc);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
262 current_mood = purple_status_get_attr_string(status, PURPLE_MOOD_NAME);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
263 } else {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
264 current_mood = pidgin_mood_get_global_status();
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
265 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
266
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
267 fields = purple_request_fields_new();
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
268 g = purple_request_field_group_new(NULL);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
269 f = purple_request_field_list_new("mood", _("Please select your mood from the list"));
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
270
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
271 purple_request_field_list_add_icon(f, _("None"), NULL, "");
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
272 if (current_mood == NULL)
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
273 purple_request_field_list_add_selected(f, _("None"));
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
274
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
275 /* TODO: rlaager wants this sorted. */
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
276 /* TODO: darkrain wants it sorted post-translation */
40634
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents: 40444
diff changeset
277 if (account && PURPLE_IS_PROTOCOL_CLIENT(protocol)) {
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents: 40444
diff changeset
278 mood = purple_protocol_client_get_moods(PURPLE_PROTOCOL_CLIENT(protocol), account);
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents: 40444
diff changeset
279 }
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents: 40444
diff changeset
280
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents: 40444
diff changeset
281 if(mood == NULL) {
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
282 mood = global_moods = pidgin_mood_get_global_moods();
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
283 }
40634
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents: 40444
diff changeset
284
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents: 40444
diff changeset
285 for ( ; mood != NULL && mood->mood != NULL ; mood++) {
40385
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
286 char *path;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
287
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
288 if (mood->description == NULL) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
289 continue;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
290 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
291
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
292 path = pidgin_mood_get_icon_path(mood->mood);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
293 purple_request_field_list_add_icon(f, _(mood->description),
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
294 path, (gpointer)mood->mood);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
295 g_free(path);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
296
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
297 if (current_mood && purple_strequal(current_mood, mood->mood))
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
298 purple_request_field_list_add_selected(f, _(mood->description));
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
299 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
300 purple_request_field_group_add_field(g, f);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
301
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
302 purple_request_fields_add_group(fields, g);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
303
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
304 /* if the connection allows setting a mood message */
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
305 if (gc && (purple_connection_get_flags(gc) & PURPLE_CONNECTION_FLAG_SUPPORT_MOOD_MESSAGES)) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
306 g = purple_request_field_group_new(NULL);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
307 f = purple_request_field_string_new("text",
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
308 _("Message (optional)"), NULL, FALSE);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
309 purple_request_field_group_add_field(g, f);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
310 purple_request_fields_add_group(fields, g);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
311 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
312
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
313 purple_request_fields(gc, _("Edit User Mood"), _("Edit User Mood"),
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
314 NULL, fields,
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
315 _("OK"), G_CALLBACK(pidgin_mood_dialog_edit_cb),
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
316 _("Cancel"), NULL,
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
317 purple_request_cpar_from_connection(gc), gc);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
318
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
319 g_free(global_moods);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
320 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
321
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
322 gchar *
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
323 pidgin_mood_get_icon_path(const gchar *mood) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
324 gchar *path;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
325
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
326 if(purple_strequal(mood, "busy")) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
327 path = g_build_filename(PURPLE_DATADIR, "pidgin", "icons",
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
328 "hicolor", "16x16", "status", "user-busy.png", NULL);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
329 } else if(purple_strequal(mood, "hiptop")) {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
330 path = g_build_filename(PURPLE_DATADIR, "pidgin", "icons",
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
331 "hicolor", "16x16", "emblems", "emblem-hiptop.png",
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
332 NULL);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
333 } else {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
334 gchar *filename = g_strdup_printf("%s.png", mood);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
335 path = g_build_filename(PURPLE_DATADIR, "pixmaps", "pidgin",
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
336 "emotes", "small", filename, NULL);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
337 g_free(filename);
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
338 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
339
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
340 return path;
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
341 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
342

mercurial