pidgin/pidginaccountsenabledmenu.h

Mon, 22 Aug 2022 21:40:04 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Mon, 22 Aug 2022 21:40:04 -0500
branch
gtk4
changeset 41567
517ac516af27
parent 41457
f0e7534a555d
child 42465
b7d530551c1b
permissions
-rw-r--r--

Inline pidgin_make_scrollable

We need to change it for GTK4, and there are few enough that it can be inlined. Eventually, that code might be a `.ui` anyway.

Testing Done:
Compile only.

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

41304
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Pidgin - Internet Messenger
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * Pidgin is the legal property of its developers, whose names are too numerous
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * source distribution.
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 # error "only <pidgin.h> may be included directly"
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #endif
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PIDGIN_ACCOUNTS_ENABLED_MENU_H
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PIDGIN_ACCOUNTS_ENABLED_MENU_H
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <glib.h>
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 #include <gio/gio.h>
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 #include <purple.h>
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 G_BEGIN_DECLS
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 /**
41457
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
38 * PidginAccountsEnabledMenu:
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
39 *
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
40 * A [class@Gio.MenuModel] that automatically updates itself based on what
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
41 * accounts are enabled.
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
42 *
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
43 * Since: 3.0.0
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
44 */
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
45
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
46 #define PIDGIN_TYPE_ACCOUNTS_ENABLED_MENU (pidgin_accounts_enabled_menu_get_type())
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
47 G_DECLARE_FINAL_TYPE(PidginAccountsEnabledMenu, pidgin_accounts_enabled_menu,
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
48 PIDGIN, ACCOUNTS_ENABLED_MENU, GMenuModel)
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
49
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
50 /**
41304
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 * pidgin_accounts_enabled_menu_new:
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 *
41457
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
53 * Creates a [class@Gio.MenuModel] that will automatically update itself to
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
54 * include accounts that are enabled in libpurple.
41304
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 *
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 * Returns: (transfer full): The new menu instance.
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 *
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 * Since: 3.0.0
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 */
41457
f0e7534a555d Convert PidginAccountsEnabledMenu from a menu controller to a GMenuModel
Gary Kramlich <grim@reaperworld.com>
parents: 41304
diff changeset
60 GMenuModel *pidgin_accounts_enabled_menu_new(void);
41304
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 G_END_DECLS
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63
25830cad9bfc Add a menu controller for the accounts enabled section of the accounts menu
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 #endif /* PIDGIN_ACCOUNTS_ENABLED_MENU_H */

mercurial