pidgin/pidginaccountactionsmenu.h

Sun, 24 Jan 2021 03:27:43 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Sun, 24 Jan 2021 03:27:43 -0600
changeset 40728
2dbfbaeefe40
parent 40597
fa308dd62f4c
child 41124
95555046173e
permissions
-rw-r--r--

Merge PidginBuddyListMenu with PidginContactList which fixes all of the accelerators as well.

Testing Done:
Compiled and ran locally. Verified that the `g_warnings` at startup are now gone and that the keyboard accelerators now work again.

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

40379
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
40597
fa308dd62f4c Properly set the sensitive state of the "enable account" menu item based on whether or not any accounts are disabled.
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
2 * Pidgin - Internet Messenger
fa308dd62f4c Properly set the sensitive state of the "enable account" menu item based on whether or not any accounts are disabled.
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
40379
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Pidgin is the legal property of its developers, whose names are too numerous
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
40597
fa308dd62f4c Properly set the sensitive state of the "enable account" menu item based on whether or not any accounts are disabled.
Gary Kramlich <grim@reaperworld.com>
parents: 40502
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
40379
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
40502
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40388
diff changeset
22
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40388
diff changeset
23 #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40388
diff changeset
24 # error "only <pidgin.h> may be included directly"
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40388
diff changeset
25 #endif
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40388
diff changeset
26
40379
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PIDGIN_ACCOUNT_ACTIONS_MENU_H
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PIDGIN_ACCOUNT_ACTIONS_MENU_H
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 /**
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 * SECTION:pidginaccountactionsmenu
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 * @section_id: pidgin-account-actions-menu
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 * @short_description: A menu for managing account actions
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 * @title: Accounts Actions Menu
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 *
40388
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40379
diff changeset
36 * #PidginAccountActionsMenu is a #GtkMenu that provides an interface for users
3f2e9e346f6f Fix a bunch of stuff that was found in review.
Gary Kramlich <grim@reaperworld.com>
parents: 40379
diff changeset
37 * to edit accounts and activate the account's actions.
40379
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 */
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 #include <gtk/gtk.h>
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 #include <purple.h>
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 G_BEGIN_DECLS
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 #define PIDGIN_TYPE_ACCOUNT_ACTIONS_MENU (pidgin_account_actions_menu_get_type())
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 G_DECLARE_FINAL_TYPE(PidginAccountActionsMenu, pidgin_account_actions_menu,
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 PIDGIN, ACCOUNT_ACTIONS_MENU, GtkMenu)
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 /**
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 * pidgin_account_actions_menu_new:
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 * @account: The #PurpleAccount that this menu is for.
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 *
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 * Creates a new #PidginAccountActionsMenu for @account.
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 *
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 * Returns: (transfer full): The new #PidginAccountActionsMenu instance.
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 */
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 GtkWidget *pidgin_account_actions_menu_new(PurpleAccount *account);
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 /**
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 * pidgin_account_actions_menu_get_account:
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 * @menu: The #PidginAccountActionsMenu instance.
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 *
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 * Gets the #PurpleAccount associated with @menu.
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 *
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 * Returns: (transfer none): The #PurpleAccount associated with @menu.
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 */
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 PurpleAccount *pidgin_account_actions_menu_get_account(PidginAccountActionsMenu *menu);
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 G_END_DECLS
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71
c50c509dd028 Migrate the accounts menu to its own set of widgets
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 #endif /* PIDGIN_ACCOUNT_ACTIONS_MENU_H */

mercurial