pidgin/pidginactiongroup.c

Mon, 08 Jun 2020 23:11:45 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Mon, 08 Jun 2020 23:11:45 -0500
changeset 40444
f2d8204dcf4e
parent 40388
3f2e9e346f6f
child 40496
6941fece679b
permissions
-rw-r--r--

Some stuff got missed when making internal.h libpurple only.

40363
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * pidgin
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 *
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 * Pidgin is the legal property of its developers, whose names are too numerous
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * to list here. Please refer to the COPYRIGHT file distributed with this
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * source distribution.
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 *
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * (at your option) any later version.
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 *
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * GNU General Public License for more details.
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 *
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #include "pidginactiongroup.h"
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24
40364
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
25 #include <purple.h>
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
26
40378
9713b0ef6504 Move the join chat menu item to the new menu setup
Gary Kramlich <grim@reaperworld.com>
parents: 40373
diff changeset
27 #include "pidgin/gtkblist.h"
40364
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
28 #include "pidgin/gtkdialogs.h"
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
29 #include "pidgin/gtkpounce.h"
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
30 #include "pidgin/gtkprefs.h"
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
31 #include "pidgin/gtkprivacy.h"
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
32 #include "pidgin/gtkroomlist.h"
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
33 #include "pidgin/gtksmiley-manager.h"
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
34 #include "pidgin/gtkxfer.h"
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
35 #include "pidgin/pidginabout.h"
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
36 #include "pidgin/pidginlog.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: 40382
diff changeset
37 #include "pidgin/pidginmooddialog.h"
40363
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 struct _PidginActionGroup {
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 GSimpleActionGroup parent;
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 };
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 /******************************************************************************
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
44 * Globals
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
45 *****************************************************************************/
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
46
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
47 /**< private >
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
48 * online_actions:
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
49 *
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
50 * This list keeps track of which actions should only be enabled while online.
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
51 */
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
52 static const gchar *pidgin_action_group_online_actions[] = {
40371
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
53 PIDGIN_ACTION_ADD_BUDDY,
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
54 PIDGIN_ACTION_ADD_GROUP,
40380
665ba7e7acbc alphabetize the online required actions and add room list to them
Gary Kramlich <grim@reaperworld.com>
parents: 40379
diff changeset
55 PIDGIN_ACTION_GET_USER_INFO,
665ba7e7acbc alphabetize the online required actions and add room list to them
Gary Kramlich <grim@reaperworld.com>
parents: 40379
diff changeset
56 PIDGIN_ACTION_NEW_MESSAGE,
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
57 PIDGIN_ACTION_PRIVACY,
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: 40382
diff changeset
58 PIDGIN_ACTION_SET_MOOD,
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
59 };
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
60
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
61 static const gchar *pidgin_action_group_chat_actions[] = {
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
62 PIDGIN_ACTION_ADD_CHAT,
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
63 PIDGIN_ACTION_JOIN_CHAT,
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
64 };
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
65
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
66 static const gchar *pidgin_action_group_room_list_actions[] = {
40380
665ba7e7acbc alphabetize the online required actions and add room list to them
Gary Kramlich <grim@reaperworld.com>
parents: 40379
diff changeset
67 PIDGIN_ACTION_ROOM_LIST,
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
68 };
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
69
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
70 /******************************************************************************
40366
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
71 * Helpers
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
72 *****************************************************************************/
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
73
40368
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
74 /*< private >
40366
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
75 * pidgin_action_group_bool_pref_handler:
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
76 * @group: The #PidginActionGroup instance.
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
77 * @action_name: The name of the action to update.
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
78 * @value: The value of the preference.
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
79 *
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
80 * Changes the state of the action named @action_name to match @value.
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
81 *
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
82 * This function is meant to be called from a #PurplePrefCallback function as
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
83 * there isn't a good way to have a #PurplePrefCallback with multiple items in
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
84 * the data parameter without leaking them forever.
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
85 */
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
86 static void
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
87 pidgin_action_group_bool_pref_handler(PidginActionGroup *group,
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
88 const gchar *action_name,
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
89 gboolean value)
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
90 {
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
91 GAction *action = NULL;
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
92
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
93 action = g_action_map_lookup_action(G_ACTION_MAP(group), action_name);
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
94 if(action != NULL) {
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
95 g_simple_action_set_state(G_SIMPLE_ACTION(action),
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
96 g_variant_new_boolean(value));
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
97 }
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
98 }
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
99
40368
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
100 /*< private >
40366
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
101 * pidgin_action_group_setup_bool:
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
102 * @group: The #PidginActionGroup instance.
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
103 * @action_name: The name of the action to setup.
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
104 * @pref_name: The name of the preference that @action_name is tied to.
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
105 * @callback: (scope notified): A #PurplePrefCallback to call when the
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
106 * preference is changed.
40366
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
107 *
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
108 * Initializes the boolean action named @action_name to the value of @pref_name
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
109 * and setups up a preference change callback to @callback to maintain the
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
110 * state of the action.
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
111 */
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
112 static void
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
113 pidgin_action_group_setup_bool(PidginActionGroup *group,
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
114 const gchar *action_name,
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
115 const gchar *pref_name,
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
116 PurplePrefCallback callback)
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
117 {
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
118 GAction *action = NULL;
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
119 gboolean value = FALSE;
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
120
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
121 /* find the action, if we can't find it, bail */
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
122 action = g_action_map_lookup_action(G_ACTION_MAP(group), action_name);
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
123 g_return_if_fail(action != NULL);
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
124
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
125 /* get the value of the preference */
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
126 value = purple_prefs_get_bool(pref_name);
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
127
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
128 /* change the state of the action to match the preference value. */
40367
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
129 g_simple_action_set_state(G_SIMPLE_ACTION(action),
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
130 g_variant_new_boolean(value));
40366
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
131
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
132 /* finally add a preference callback to update the state based on the
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
133 * preference.
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
134 */
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
135 purple_prefs_connect_callback(group, pref_name, callback, group);
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
136 }
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
137
40368
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
138 /*< private >
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
139 * pidgin_action_group_string_pref_handler:
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
140 * @group: The #PidginActionGroup instance.
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
141 * @action_name: The name of the action to update.
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
142 * @value: The value of the preference.
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
143 *
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
144 * Changes the state of the action named @action_name to match @value.
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
145 *
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
146 * This function is meant to be called from a #PurplePrefCallback function as
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
147 * there isn't a good way to have a #PurplePrefCallback with multiple items in
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
148 * the data parameter without leaking them forever.
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
149 */
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
150 static void
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
151 pidgin_action_group_string_pref_handler(PidginActionGroup *group,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
152 const gchar *action_name,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
153 const gchar *value)
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
154 {
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
155 GAction *action = NULL;
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
156
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
157 action = g_action_map_lookup_action(G_ACTION_MAP(group), action_name);
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
158 if(action != NULL) {
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
159 g_simple_action_set_state(G_SIMPLE_ACTION(action),
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
160 g_variant_new_string(value));
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
161 }
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
162 }
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
163
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
164 /*< private >
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
165 * pidgin_action_group_setup_string:
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
166 * @group: The #PidginActionGroup instance.
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
167 * @action_name: The name of the action to setup.
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
168 * @pref_name: The name of the preference that @action_name is tied to.
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
169 * @callback: (scope notified): A #PurplePrefCallback to call when the
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
170 * preference is changed.
40368
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
171 *
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
172 * Initializes the string action named @action_name to the value of @pref_name
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
173 * and setups up a preference change callback to @callback to maintain the
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
174 * state of the action.
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
175 */
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
176 static void
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
177 pidgin_action_group_setup_string(PidginActionGroup *group,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
178 const gchar *action_name,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
179 const gchar *pref_name,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
180 PurplePrefCallback callback)
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
181 {
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
182 GAction *action = NULL;
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
183 const gchar *value = NULL;
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
184
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
185 /* find the action, if we can't find it, bail */
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
186 action = g_action_map_lookup_action(G_ACTION_MAP(group), action_name);
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
187 g_return_if_fail(action != NULL);
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
188
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
189 /* change the state of the action to match the preference value. */
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
190 value = purple_prefs_get_string(pref_name);
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
191 g_simple_action_set_state(G_SIMPLE_ACTION(action),
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
192 g_variant_new_string(value));
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
193
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
194 /* finally add a preference callback to update the state based on the
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
195 * preference.
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
196 */
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
197 purple_prefs_connect_callback(group, pref_name, callback, group);
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
198 }
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
199
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
200 /*< private >
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
201 * pidgin_action_group_actions_set_enable:
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
202 * @group: The #PidginActionGroup instance.
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
203 * @actions: The action names.
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
204 * @n_actions: The number of @actions.
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
205 * @enabled: Whether or not to enable the actions.
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
206 *
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
207 * Sets the enabled property of the named actions to @enabled.
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
208 */
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
209 static void
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
210 pidgin_action_group_actions_set_enable(PidginActionGroup *group,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
211 const gchar *const *actions,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
212 gint n_actions,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
213 gboolean enabled)
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
214 {
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
215 gint i = 0;
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
216
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
217 for(i = 0; i < n_actions; i++) {
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
218 GAction *action = NULL;
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
219 const gchar *name = actions[i];
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
220
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
221 action = g_action_map_lookup_action(G_ACTION_MAP(group), name);
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
222
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
223 if(action != NULL) {
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
224 g_simple_action_set_enabled(G_SIMPLE_ACTION(action), enabled);
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
225 } else {
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
226 g_warning("Failed to find action named %s", name);
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
227 }
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
228 }
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
229 }
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
230
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
231 /*< private >
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
232 * pidgin_action_group_online_actions_set_enable:
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
233 * @group: The #PidginActionGroup instance.
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
234 * @enabled: %TRUE to enable the actions, %FALSE to disable them.
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
235 *
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
236 * Enables/disables the actions that require being online to use.
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
237 */
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
238 static void
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
239 pidgin_action_group_online_actions_set_enable(PidginActionGroup *group,
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
240 gboolean enabled)
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
241 {
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
242 gint n_actions = G_N_ELEMENTS(pidgin_action_group_online_actions);
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
243
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
244 pidgin_action_group_actions_set_enable(group,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
245 pidgin_action_group_online_actions,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
246 n_actions,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
247 enabled);
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
248 }
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
249
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
250 /*< private >
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
251 * pidgin_action_group_chat_actions_set_enable:
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
252 * @group: The #PidginActionGroup instance.
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
253 * @enabled: Whether or not to enable/disable the actions.
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
254 *
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
255 * Sets the enabled state of the chat specific actions to the value of @enabled.
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
256 */
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
257 static void
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
258 pidgin_action_group_chat_actions_set_enable(PidginActionGroup *group,
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
259 gboolean enabled)
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
260 {
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
261 gint n_actions = G_N_ELEMENTS(pidgin_action_group_chat_actions);
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
262
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
263 pidgin_action_group_actions_set_enable(group,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
264 pidgin_action_group_chat_actions,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
265 n_actions,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
266 enabled);
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
267 }
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
268
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
269 /*< private >
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
270 * pidgin_action_group_room_list_actions_set_enable:
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
271 * @group: The #PidginActionGroup instance.
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
272 * @enabled: Whether or not to enable/disable the actions.
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
273 *
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
274 * Sets the enabled state of the room list specific actions to the value of
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
275 * @enabled.
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
276 */
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
277 static void
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
278 pidgin_action_group_room_list_actions_set_enable(PidginActionGroup *group,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
279 gboolean enabled)
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
280 {
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
281 gint n_actions = G_N_ELEMENTS(pidgin_action_group_room_list_actions);
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
282
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
283 pidgin_action_group_actions_set_enable(group,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
284 pidgin_action_group_room_list_actions,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
285 n_actions,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
286 enabled);
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
287 }
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
288
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
289 /******************************************************************************
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
290 * Purple Signal Callbacks
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
291 *****************************************************************************/
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
292 static void
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
293 pidgin_action_group_online_cb(gpointer data) {
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
294 pidgin_action_group_online_actions_set_enable(PIDGIN_ACTION_GROUP(data),
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
295 TRUE);
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
296 }
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
297
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
298 static void
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
299 pidgin_action_group_offline_cb(gpointer data) {
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
300 pidgin_action_group_online_actions_set_enable(PIDGIN_ACTION_GROUP(data),
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
301 FALSE);
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
302 }
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
303
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
304 static void
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
305 pidgin_action_group_signed_on_cb(PurpleAccount *account, gpointer data) {
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
306 PidginActionGroup *group = PIDGIN_ACTION_GROUP(data);
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
307 PurpleProtocol *protocol = NULL;
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
308 const gchar *protocol_id = NULL;
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
309 gboolean should_enable_chat = FALSE, should_enable_room_list = FALSE;
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
310
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
311 protocol_id = purple_account_get_protocol_id(account);
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
312 protocol = purple_protocols_find(protocol_id);
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
313
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
314 /* We assume that the current state is correct, so we don't bother changing
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
315 * state unless the newly connected account implements the chat interface,
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
316 * which would cause a state change.
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
317 */
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
318 should_enable_chat = PURPLE_PROTOCOL_IMPLEMENTS(protocol, CHAT, info);
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
319 if(should_enable_chat) {
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
320 pidgin_action_group_chat_actions_set_enable(group, TRUE);
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
321 }
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
322
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
323 /* likewise, for the room list, we only care about enabling in this
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
324 * handler.
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
325 */
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
326 should_enable_room_list = PURPLE_PROTOCOL_IMPLEMENTS(protocol, ROOMLIST,
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
327 get_list);
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
328 if(should_enable_room_list) {
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
329 pidgin_action_group_room_list_actions_set_enable(group, TRUE);
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
330 }
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
331 }
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
332
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
333 static void
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
334 pidgin_action_group_signed_off_cb(PurpleAccount *account, gpointer data) {
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
335 gboolean should_disable_chat = TRUE, should_disable_room_list = TRUE;
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
336 GList *connections = NULL, *l = NULL;
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
337
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
338 /* walk through all the connections, looking for online ones that implement
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
339 * the chat interface. We don't bother checking the account that this
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
340 * signal was emitted for, because it's already offline and will be
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
341 * filtered out by the online check.
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
342 */
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
343 connections = purple_connections_get_all();
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
344 for(l = connections; l != NULL; l = l->next) {
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
345 PurpleConnection *connection = PURPLE_CONNECTION(l->data);
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
346 PurpleProtocol *protocol = NULL;
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
347
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
348 /* if the connection isn't online, we don't care about it */
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
349 if(!PURPLE_CONNECTION_IS_CONNECTED(connection)) {
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
350 continue;
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
351 }
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
352
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
353 protocol = purple_connection_get_protocol(connection);
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
354
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
355 /* check if the protocol implements the chat interface */
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
356 if(PURPLE_PROTOCOL_IMPLEMENTS(protocol, CHAT, info)) {
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
357 should_disable_chat = FALSE;
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
358 }
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
359
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
360 /* check if the protocol implement the room list interface */
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
361 if(PURPLE_PROTOCOL_IMPLEMENTS(protocol, ROOMLIST, get_list)) {
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
362 should_disable_room_list = FALSE;
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
363 }
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
364
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
365 /* if we can't disable both, we can bail out of the loop */
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
366 if(!should_disable_chat && !should_disable_room_list) {
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
367 break;
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
368 }
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
369 }
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
370
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
371 if(should_disable_chat) {
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
372 pidgin_action_group_chat_actions_set_enable(PIDGIN_ACTION_GROUP(data),
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
373 FALSE);
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
374 }
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
375
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
376 if(should_disable_room_list) {
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
377 pidgin_action_group_room_list_actions_set_enable(PIDGIN_ACTION_GROUP(data),
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
378 FALSE);
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
379 }
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
380 }
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
381
40366
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
382 /******************************************************************************
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
383 * Preference Callbacks
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
384 *****************************************************************************/
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
385 static void
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
386 pidgin_action_group_mute_sounds_callback(const gchar *name,
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
387 PurplePrefType type,
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
388 gconstpointer value,
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
389 gpointer data)
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
390 {
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
391 PidginActionGroup *group = PIDGIN_ACTION_GROUP(data);
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
392
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
393 pidgin_action_group_bool_pref_handler(group, PIDGIN_ACTION_MUTE_SOUNDS,
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
394 (gboolean)GPOINTER_TO_INT(value));
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
395 }
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
396
40367
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
397 static void
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
398 pidgin_action_group_show_buddy_icons_callback(const gchar *name,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
399 PurplePrefType type,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
400 gconstpointer value,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
401 gpointer data)
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
402 {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
403 PidginActionGroup *group = PIDGIN_ACTION_GROUP(data);
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
404
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
405 pidgin_action_group_bool_pref_handler(group,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
406 PIDGIN_ACTION_SHOW_BUDDY_ICONS,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
407 (gboolean)GPOINTER_TO_INT(value));
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
408 }
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
409
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
410 static void
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
411 pidgin_action_group_show_empty_groups_callback(const gchar *name,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
412 PurplePrefType type,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
413 gconstpointer value,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
414 gpointer data)
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
415 {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
416 PidginActionGroup *group = PIDGIN_ACTION_GROUP(data);
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
417
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
418 pidgin_action_group_bool_pref_handler(group,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
419 PIDGIN_ACTION_SHOW_EMPTY_GROUPS,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
420 (gboolean)GPOINTER_TO_INT(value));
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
421 }
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
422
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
423 static void
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
424 pidgin_action_group_show_idle_times_callback(const gchar *name,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
425 PurplePrefType type,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
426 gconstpointer value,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
427 gpointer data)
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
428 {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
429 PidginActionGroup *group = PIDGIN_ACTION_GROUP(data);
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
430
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
431 pidgin_action_group_bool_pref_handler(group,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
432 PIDGIN_ACTION_SHOW_IDLE_TIMES,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
433 (gboolean)GPOINTER_TO_INT(value));
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
434 }
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
435
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
436 static void
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
437 pidgin_action_group_show_offline_buddies_callback(const gchar *name,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
438 PurplePrefType type,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
439 gconstpointer value,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
440 gpointer data)
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
441 {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
442 PidginActionGroup *group = PIDGIN_ACTION_GROUP(data);
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
443
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
444 pidgin_action_group_bool_pref_handler(group,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
445 PIDGIN_ACTION_SHOW_OFFLINE_BUDDIES,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
446 (gboolean)GPOINTER_TO_INT(value));
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
447 }
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
448
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
449 static void
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
450 pidgin_action_group_show_protocol_icons_callback(const gchar *name,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
451 PurplePrefType type,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
452 gconstpointer value,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
453 gpointer data)
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
454 {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
455 PidginActionGroup *group = PIDGIN_ACTION_GROUP(data);
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
456
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
457 pidgin_action_group_bool_pref_handler(group,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
458 PIDGIN_ACTION_SHOW_PROTOCOL_ICONS,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
459 (gboolean)GPOINTER_TO_INT(value));
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
460 }
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
461
40368
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
462 static void
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
463 pidgin_action_group_sort_method_callback(const gchar *name,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
464 PurplePrefType type,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
465 gconstpointer value,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
466 gpointer data)
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
467 {
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
468 PidginActionGroup *group = PIDGIN_ACTION_GROUP(data);
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
469
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
470 pidgin_action_group_string_pref_handler(group,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
471 PIDGIN_ACTION_SORT_METHOD,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
472 value);
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
473 }
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
474
40366
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
475 /******************************************************************************
40363
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
476 * Action Callbacks
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
477 *****************************************************************************/
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
478 static void
40364
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
479 pidgin_action_group_about(GSimpleAction *simple, GVariant *parameter,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
480 gpointer data)
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
481 {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
482 GtkWidget *about = pidgin_about_dialog_new();
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
483
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
484 /* fix me? */
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
485 #if 0
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
486 gtk_window_set_transient_for(GTK_WINDOW(about), GTK_WINDOW(window));
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
487 #endif
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
488
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
489 gtk_widget_show_all(about);
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
490 }
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
491
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
492 static void
40371
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
493 pidgin_action_group_add_buddy(GSimpleAction *simple, GVariant *parameter,
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
494 gpointer data)
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
495 {
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
496 purple_blist_request_add_buddy(NULL, NULL, NULL, NULL);
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
497 }
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
498
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
499 static void
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
500 pidgin_action_group_add_chat(GSimpleAction *simple, GVariant *parameter,
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
501 gpointer data)
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
502 {
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
503 purple_blist_request_add_chat(NULL, NULL, NULL, NULL);
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
504 }
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
505
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
506 static void
40364
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
507 pidgin_action_group_add_group(GSimpleAction *simple, GVariant *parameter,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
508 gpointer data)
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
509 {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
510 purple_blist_request_add_group();
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
511 }
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
512
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
513 static void
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
514 pidgin_action_group_buddy_pounces(GSimpleAction *simple, GVariant *parameter,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
515 gpointer data)
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
516 {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
517 pidgin_pounces_manager_show();
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
518 }
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
519
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
520 static void
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
521 pidgin_action_group_custom_smiley(GSimpleAction *simple, GVariant *parameter,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
522 gpointer data)
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
523 {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
524 pidgin_smiley_manager_show();
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
525 }
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
526
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
527 static void
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
528 pidgin_action_group_debug(GSimpleAction *simple, GVariant *parameter,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
529 gpointer data)
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
530 {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
531 gboolean old = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/enabled");
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
532 purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/debug/enabled", !old);
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
533 }
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
534
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
535 static void
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
536 pidgin_action_group_file_transfers(GSimpleAction *simple, GVariant *parameter,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
537 gpointer data)
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
538 {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
539 pidgin_xfer_dialog_show(NULL);
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
540 }
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
541
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
542 static void
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
543 pidgin_action_group_get_user_info(GSimpleAction *simple, GVariant *parameter,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
544 gpointer data)
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
545 {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
546 pidgin_dialogs_info();
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
547 }
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
548
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
549 static void
40378
9713b0ef6504 Move the join chat menu item to the new menu setup
Gary Kramlich <grim@reaperworld.com>
parents: 40373
diff changeset
550 pidgin_action_group_join_chat(GSimpleAction *simple, GVariant *parameter,
9713b0ef6504 Move the join chat menu item to the new menu setup
Gary Kramlich <grim@reaperworld.com>
parents: 40373
diff changeset
551 gpointer data)
9713b0ef6504 Move the join chat menu item to the new menu setup
Gary Kramlich <grim@reaperworld.com>
parents: 40373
diff changeset
552 {
9713b0ef6504 Move the join chat menu item to the new menu setup
Gary Kramlich <grim@reaperworld.com>
parents: 40373
diff changeset
553 pidgin_blist_joinchat_show();
9713b0ef6504 Move the join chat menu item to the new menu setup
Gary Kramlich <grim@reaperworld.com>
parents: 40373
diff changeset
554 }
9713b0ef6504 Move the join chat menu item to the new menu setup
Gary Kramlich <grim@reaperworld.com>
parents: 40373
diff changeset
555
9713b0ef6504 Move the join chat menu item to the new menu setup
Gary Kramlich <grim@reaperworld.com>
parents: 40373
diff changeset
556 static void
40366
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
557 pidgin_action_group_mute_sounds(GSimpleAction *action, GVariant *value,
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
558 gpointer data)
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
559 {
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
560 purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/sound/mute",
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
561 g_variant_get_boolean(value));
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
562 }
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
563
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
564 static void
40363
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
565 pidgin_action_group_new_message(GSimpleAction *simple, GVariant *parameter,
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
566 gpointer data)
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
567 {
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
568 pidgin_dialogs_im();
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
569 }
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
570
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
571 static void
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
572 pidgin_action_group_online_help(GSimpleAction *simple, GVariant *parameter,
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
573 gpointer data)
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
574 {
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40385
diff changeset
575 purple_notify_uri(NULL, PURPLE_WEBSITE "help");
40363
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
576 }
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
577
40364
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
578 static void
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
579 pidgin_action_group_preferences(GSimpleAction *simple, GVariant *parameter,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
580 gpointer data)
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
581 {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
582 pidgin_prefs_show();
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
583 }
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
584
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
585 static void
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
586 pidgin_action_group_privacy(GSimpleAction *simple, GVariant *parameter,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
587 gpointer data)
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
588 {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
589 pidgin_privacy_dialog_show();
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
590 }
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
591
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
592 static void
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
593 pidgin_action_group_quit(GSimpleAction *simple, GVariant *parameter,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
594 gpointer data)
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
595 {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
596 purple_core_quit();
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
597 }
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
598
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
599 static void
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
600 pidgin_action_group_room_list(GSimpleAction *simple, GVariant *parameter,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
601 gpointer data)
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
602 {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
603 pidgin_roomlist_dialog_show();
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
604 }
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
605
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
606 static void
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: 40382
diff changeset
607 pidgin_action_group_set_mood(GSimpleAction *simple, GVariant *parameter,
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents: 40382
diff changeset
608 gpointer 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: 40382
diff changeset
609 {
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents: 40382
diff changeset
610 pidgin_mood_dialog_show(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: 40382
diff changeset
611 }
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents: 40382
diff changeset
612
c3e9a7d14e6f Move the mood api to it's own files and remove the remaining bits of the old menu bar from gtkblist
Gary Kramlich <grim@reaperworld.com>
parents: 40382
diff changeset
613 static void
40367
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
614 pidgin_action_group_show_buddy_icons(GSimpleAction *action, GVariant *value,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
615 gpointer data)
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
616 {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
617 purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/blist/show_buddy_icons",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
618 g_variant_get_boolean(value));
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
619 }
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
620
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
621 static void
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
622 pidgin_action_group_show_empty_groups(GSimpleAction *action, GVariant *value,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
623 gpointer data)
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
624 {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
625 purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/blist/show_empty_groups",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
626 g_variant_get_boolean(value));
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
627 }
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
628
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
629 static void
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
630 pidgin_action_group_show_idle_times(GSimpleAction *action,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
631 GVariant *value,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
632 gpointer data)
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
633 {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
634 purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/blist/show_idle_time",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
635 g_variant_get_boolean(value));
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
636 }
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
637
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
638 static void
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
639 pidgin_action_group_show_offline_buddies(GSimpleAction *action,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
640 GVariant *value,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
641 gpointer data)
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
642 {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
643 purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/blist/show_offline_buddies",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
644 g_variant_get_boolean(value));
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
645 }
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
646
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
647 static void
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
648 pidgin_action_group_show_protocol_icons(GSimpleAction *action,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
649 GVariant *value,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
650 gpointer data)
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
651 {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
652 purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/blist/show_protocol_icons",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
653 g_variant_get_boolean(value));
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
654 }
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
655
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
656 static void
40368
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
657 pidgin_action_group_sort_method(GSimpleAction *action, GVariant *value,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
658 gpointer data)
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
659 {
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
660 purple_prefs_set_string(PIDGIN_PREFS_ROOT "/blist/sort_type",
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
661 g_variant_get_string(value, NULL));
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
662 }
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
663
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
664 static void
40364
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
665 pidgin_action_group_system_log(GSimpleAction *simple, GVariant *parameter,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
666 gpointer data)
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
667 {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
668 pidgin_syslog_show();
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
669 }
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
670
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
671 static void
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
672 pidgin_action_group_view_user_log(GSimpleAction *simple, GVariant *parameter,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
673 gpointer data)
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
674 {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
675 pidgin_dialogs_log();
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
676 }
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
677
40363
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
678 /******************************************************************************
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
679 * GObject Implementation
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
680 *****************************************************************************/
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
681 G_DEFINE_TYPE(PidginActionGroup, pidgin_action_group,
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
682 G_TYPE_SIMPLE_ACTION_GROUP)
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
683
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
684 static void
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
685 pidgin_action_group_init(PidginActionGroup *group) {
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
686 gpointer handle = NULL;
40363
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
687 GActionEntry entries[] = {
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
688 {
40364
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
689 .name = PIDGIN_ACTION_ABOUT,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
690 .activate = pidgin_action_group_about,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
691 }, {
40371
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
692 .name = PIDGIN_ACTION_ADD_BUDDY,
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
693 .activate = pidgin_action_group_add_buddy,
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
694 }, {
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
695 .name = PIDGIN_ACTION_ADD_CHAT,
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
696 .activate = pidgin_action_group_add_chat,
0773c993abd8 Migrate add-chat and add-buddy to the new menu
Gary Kramlich <grim@reaperworld.com>
parents: 40370
diff changeset
697 }, {
40364
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
698 .name = PIDGIN_ACTION_ADD_GROUP,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
699 .activate = pidgin_action_group_add_group,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
700 }, {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
701 .name = PIDGIN_ACTION_BUDDY_POUNCES,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
702 .activate = pidgin_action_group_buddy_pounces,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
703 }, {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
704 .name = PIDGIN_ACTION_CUSTOM_SMILEY,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
705 .activate = pidgin_action_group_custom_smiley,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
706 }, {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
707 .name = PIDGIN_ACTION_DEBUG,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
708 .activate = pidgin_action_group_debug,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
709 }, {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
710 .name = PIDGIN_ACTION_FILE_TRANSFERS,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
711 .activate = pidgin_action_group_file_transfers,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
712 }, {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
713 .name = PIDGIN_ACTION_GET_USER_INFO,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
714 .activate = pidgin_action_group_get_user_info,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
715 }, {
40378
9713b0ef6504 Move the join chat menu item to the new menu setup
Gary Kramlich <grim@reaperworld.com>
parents: 40373
diff changeset
716 .name = PIDGIN_ACTION_JOIN_CHAT,
9713b0ef6504 Move the join chat menu item to the new menu setup
Gary Kramlich <grim@reaperworld.com>
parents: 40373
diff changeset
717 .activate = pidgin_action_group_join_chat,
9713b0ef6504 Move the join chat menu item to the new menu setup
Gary Kramlich <grim@reaperworld.com>
parents: 40373
diff changeset
718 }, {
40366
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
719 .name = PIDGIN_ACTION_MUTE_SOUNDS,
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
720 .state = "false",
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
721 .change_state = pidgin_action_group_mute_sounds,
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
722 }, {
40363
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
723 .name = PIDGIN_ACTION_NEW_MESSAGE,
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
724 .activate = pidgin_action_group_new_message,
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
725 }, {
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
726 .name = PIDGIN_ACTION_ONLINE_HELP,
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
727 .activate = pidgin_action_group_online_help,
40364
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
728 }, {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
729 .name = PIDGIN_ACTION_PREFERENCES,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
730 .activate = pidgin_action_group_preferences,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
731 }, {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
732 .name = PIDGIN_ACTION_PRIVACY,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
733 .activate = pidgin_action_group_privacy,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
734 }, {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
735 .name = PIDGIN_ACTION_QUIT,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
736 .activate = pidgin_action_group_quit,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
737 }, {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
738 .name = PIDGIN_ACTION_ROOM_LIST,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
739 .activate = pidgin_action_group_room_list,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
740 }, {
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: 40382
diff changeset
741 .name = PIDGIN_ACTION_SET_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: 40382
diff changeset
742 .activate = pidgin_action_group_set_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: 40382
diff changeset
743 }, {
40367
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
744 .name = PIDGIN_ACTION_SHOW_BUDDY_ICONS,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
745 .state = "false",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
746 .change_state = pidgin_action_group_show_buddy_icons,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
747 }, {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
748 .name = PIDGIN_ACTION_SHOW_EMPTY_GROUPS,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
749 .state = "false",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
750 .change_state = pidgin_action_group_show_empty_groups,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
751 }, {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
752 .name = PIDGIN_ACTION_SHOW_IDLE_TIMES,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
753 .state = "false",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
754 .change_state = pidgin_action_group_show_idle_times,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
755 }, {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
756 .name = PIDGIN_ACTION_SHOW_OFFLINE_BUDDIES,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
757 .state = "false",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
758 .change_state = pidgin_action_group_show_offline_buddies,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
759 }, {
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
760 .name = PIDGIN_ACTION_SHOW_PROTOCOL_ICONS,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
761 .state = "false",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
762 .change_state = pidgin_action_group_show_protocol_icons,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
763 }, {
40368
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
764 .name = PIDGIN_ACTION_SORT_METHOD,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
765 .parameter_type = "s",
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
766 .state = "'none'",
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
767 .change_state = pidgin_action_group_sort_method,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
768 }, {
40364
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
769 .name = PIDGIN_ACTION_SYSTEM_LOG,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
770 .activate = pidgin_action_group_system_log,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
771 }, {
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
772 .name = PIDGIN_ACTION_VIEW_USER_LOG,
55483ee6710f Migrate the rest of the static menu items to the new PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40363
diff changeset
773 .activate = pidgin_action_group_view_user_log,
40363
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
774 },
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
775 };
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
776
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
777 g_action_map_add_action_entries(G_ACTION_MAP(group), entries,
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
778 G_N_ELEMENTS(entries), NULL);
40366
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
779
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
780 /* now add some handlers for preference changes and set actions to the
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
781 * correct value.
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
782 */
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
783 pidgin_action_group_setup_bool(group, PIDGIN_ACTION_MUTE_SOUNDS,
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
784 PIDGIN_PREFS_ROOT "/sound/mute",
5c78f6c9a36b Implement mute sounds to prove out the action state code
Gary Kramlich <grim@reaperworld.com>
parents: 40364
diff changeset
785 pidgin_action_group_mute_sounds_callback);
40367
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
786 pidgin_action_group_setup_bool(group, PIDGIN_ACTION_SHOW_BUDDY_ICONS,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
787 PIDGIN_PREFS_ROOT "/blist/show_buddy_icons",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
788 pidgin_action_group_show_buddy_icons_callback);
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
789 pidgin_action_group_setup_bool(group, PIDGIN_ACTION_SHOW_EMPTY_GROUPS,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
790 PIDGIN_PREFS_ROOT "/blist/show_empty_groups",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
791 pidgin_action_group_show_empty_groups_callback);
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
792 pidgin_action_group_setup_bool(group, PIDGIN_ACTION_SHOW_IDLE_TIMES,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
793 PIDGIN_PREFS_ROOT "/blist/show_idle_time",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
794 pidgin_action_group_show_idle_times_callback);
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
795 pidgin_action_group_setup_bool(group, PIDGIN_ACTION_SHOW_OFFLINE_BUDDIES,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
796 PIDGIN_PREFS_ROOT "/blist/show_offline_buddies",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
797 pidgin_action_group_show_offline_buddies_callback);
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
798 pidgin_action_group_setup_bool(group, PIDGIN_ACTION_SHOW_PROTOCOL_ICONS,
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
799 PIDGIN_PREFS_ROOT "/blist/show_protocol_icons",
3bd059ab9eb4 Finish porting the rest of the toggle actions to the new menubar widget
Gary Kramlich <grim@reaperworld.com>
parents: 40366
diff changeset
800 pidgin_action_group_show_protocol_icons_callback);
40368
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
801
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
802 pidgin_action_group_setup_string(group, PIDGIN_ACTION_SORT_METHOD,
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
803 PIDGIN_PREFS_ROOT "/blist/sort_type",
cb9a81e8845a Port the sort-method items to GMenu and GAction and display in the new menubar
Gary Kramlich <grim@reaperworld.com>
parents: 40367
diff changeset
804 pidgin_action_group_sort_method_callback);
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
805
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
806 /* assume we are offline and disable all of the actions that require us to
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
807 * be online.
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
808 */
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
809 pidgin_action_group_online_actions_set_enable(group, FALSE);
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
810 pidgin_action_group_chat_actions_set_enable(group, FALSE);
40382
c491e1f440dd Manage the room list action's state based on whether the online accounts support the room list interface.
Gary Kramlich <grim@reaperworld.com>
parents: 40381
diff changeset
811 pidgin_action_group_room_list_actions_set_enable(group, FALSE);
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
812
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
813 /* connect to the online and offline signals in purple connections. This
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
814 * is used to toggle states of actions that require being online.
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
815 */
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
816 handle = purple_connections_get_handle();
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
817 purple_signal_connect(handle, "online", group,
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
818 PURPLE_CALLBACK(pidgin_action_group_online_cb),
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
819 group);
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
820 purple_signal_connect(handle, "offline", group,
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
821 PURPLE_CALLBACK(pidgin_action_group_offline_cb),
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
822 group);
40381
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
823
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
824 /* connect to account-signed-on and account-signed-off to toggle actions
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
825 * that depend on specific interfaces in accounts.
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
826 */
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
827 handle = purple_accounts_get_handle();
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
828 purple_signal_connect(handle, "account-signed-on", group,
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
829 PURPLE_CALLBACK(pidgin_action_group_signed_on_cb),
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
830 group);
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
831 purple_signal_connect(handle, "account-signed-off", group,
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
832 PURPLE_CALLBACK(pidgin_action_group_signed_off_cb),
bfd6a61974ac Toggle the enabled status of chat actions based on connected accounts that implement that interface
Gary Kramlich <grim@reaperworld.com>
parents: 40380
diff changeset
833 group);
40363
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
834 };
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
835
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
836 static void
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
837 pidgin_action_group_finalize(GObject *obj) {
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
838 purple_signals_disconnect_by_handle(obj);
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
839
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
840 G_OBJECT_CLASS(pidgin_action_group_parent_class)->finalize(obj);
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
841 }
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
842
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
843 static void
40363
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
844 pidgin_action_group_class_init(PidginActionGroupClass *klass) {
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
845 GObjectClass *obj_class = G_OBJECT_CLASS(klass);
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
846
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
847 obj_class->finalize = pidgin_action_group_finalize;
40363
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
848 }
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
849
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
850 /******************************************************************************
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
851 * Public API
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
852 *****************************************************************************/
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
853 GSimpleActionGroup *
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
854 pidgin_action_group_new(void) {
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
855 return G_SIMPLE_ACTION_GROUP(g_object_new(PIDGIN_TYPE_ACTION_GROUP, NULL));
c8b010d1d430 Start to migrate the buddy list from GtkActionEntry and UiManager to GActionEntry and a custom widget
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
856 }
40370
74c0f140048d Use the new online and offline signals to manage the state of actions in PidginActionGroup
Gary Kramlich <grim@reaperworld.com>
parents: 40368
diff changeset
857

mercurial