Thu, 25 Aug 2022 22:30:30 -0500
Remove the use of the removed popup-menu signal and fix the popup menu not displaying
Testing Done:
Double clicked a buddy to open a conversation and right clicked a buddy to make sure the contact menu came up.
Reviewed at https://reviews.imfreedom.org/r/1651/
|
40950
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Purple is the legal property of its developers, whose names are too numerous |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #include "purpledebugui.h" |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | gboolean |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | purple_debug_ui_is_enabled(PurpleDebugUi *ui, PurpleDebugLevel level, |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | const gchar *category) |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | { |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | PurpleDebugUiInterface *iface = NULL; |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | g_return_val_if_fail(PURPLE_IS_DEBUG_UI(ui), FALSE); |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | iface = PURPLE_DEBUG_UI_GET_IFACE(ui); |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | if(iface != NULL && iface->is_enabled != NULL) { |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | return iface->is_enabled(ui, level, category); |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | } |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | return FALSE; |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | } |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | void |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | purple_debug_ui_print(PurpleDebugUi *ui, PurpleDebugLevel level, |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | const gchar *category, const gchar *arg_s) |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | { |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | PurpleDebugUiInterface *iface = NULL; |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | g_return_if_fail(PURPLE_IS_DEBUG_UI(ui)); |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | if(!purple_debug_ui_is_enabled(ui, level, category)) { |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | return; |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | } |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | iface = PURPLE_DEBUG_UI_GET_IFACE(ui); |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | if(iface != NULL && iface->print != NULL) { |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | iface->print(ui, level, category, arg_s); |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | } |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | } |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | G_DEFINE_INTERFACE(PurpleDebugUi, purple_debug_ui, G_TYPE_OBJECT); |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | static void |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | purple_debug_ui_default_init(PurpleDebugUiInterface *iface) { |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | } |
|
c3fc77a3c015
Separate PurpleDebugUi out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 |