Tue, 01 Apr 2025 00:28:58 -0500
Convert PidginAccountsEnabledMenu to the list model
Again, not exactly what PIDGIN-18066 requested, but should be a reasonable version of it.
Testing Done:
Opened Pidgin with no accounts enabled, and the menu was empty. Enabled an account and it moved there, disable the account and it was removed.
Also, started Pidgin with an account enabled, and it appeared in the lower menu as expected.
Bugs closed: PIDGIN-18066
Reviewed at https://reviews.imfreedom.org/r/3954/
|
42304
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | # error "only <pidgin.h> may be included directly" |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #endif |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #ifndef PIDGIN_CONTACT_INFO_MENU_H |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #define PIDGIN_CONTACT_INFO_MENU_H |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <glib.h> |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | #include <gtk/gtk.h> |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | #include <purple.h> |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
42466
ca3374c1cdba
Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42304
diff
changeset
|
36 | #include "pidginversion.h" |
|
ca3374c1cdba
Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42304
diff
changeset
|
37 | |
|
42304
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | G_BEGIN_DECLS |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | /** |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | * pidgin_contact_info_menu_popup: |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | * @info: The [class@Purple.ContactInfo] that the menu should use. |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | * @account: The [class@Purple.Account] that @info is for. |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | * @parent: The parent [class@Gtk.Widget] that the menu should use. |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | * @x: The x coordinate to point to. |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | * @y: The y coordinate to point to. |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | * |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | * Creates a [class@Gtk.PopoverMenu] for @info and displays it at the @x and @y |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | * coordinates instead of @parent. |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | * |
|
42620
72178a341eb8
Remove minor versions from Since tags in Pidgin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42466
diff
changeset
|
51 | * Since: 3.0 |
|
42304
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | */ |
|
42466
ca3374c1cdba
Add visibility to all Pidgin symbols tagged with Since 3.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42304
diff
changeset
|
53 | PIDGIN_AVAILABLE_IN_3_0 |
|
42304
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | void pidgin_contact_info_menu_popup(PurpleContactInfo *info, PurpleAccount *account, GtkWidget *parent, gdouble x, gdouble y); |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | G_END_DECLS |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | |
|
51a419226147
A basic context menu for PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | #endif /* PIDGIN_CONTACT_INFO_MENU_H */ |