Thu, 02 Mar 2023 23:58:21 -0600
Fix leaks in debug window
Fixes two leaks from the debug window:
```
22 bytes in 1 blocks are definitely lost in loss record 7,038 of 41,972
at 0x484386F: malloc (vg_replace_malloc.c:393)
by 0x4980168: g_malloc (gmem.c:130)
by 0x4995602: g_strdup (gstrfuncs.c:363)
by 0x4CFB782: purple_prefs_connect_callback (prefs.c:1301)
by 0x48AA524: pidgin_debug_init (pidgindebug.c:918)
by 0x48B8F9E: pidgin_ui_start (pidginui.c:146)
by 0x4D37B01: purple_ui_start (purpleui.c:397)
by 0x4CE3BA6: purple_core_init (core.c:211)
by 0x48A384F: pidgin_application_startup (pidginapplication.c:820)
by 0x4DD3553: UnknownInlinedFun (gclosure.c:895)
by 0x4DD3553: g_signal_emit_valist (gsignal.c:3456)
by 0x4DD3632: g_signal_emit (gsignal.c:3606)
by 0x5815B82: g_application_register (gapplication.c:2211)
```
and
```
32 bytes in 1 blocks are definitely lost in loss record 15,308 of 41,972
at 0x484386F: malloc (vg_replace_malloc.c:393)
by 0x4980168: g_malloc (gmem.c:130)
by 0x4997AB5: g_slice_alloc (gslice.c:1074)
by 0x495E14C: UnknownInlinedFun (gdatetime.c:678)
by 0x495E14C: g_date_time_from_instant (gdatetime.c:774)
by 0x495F4E9: g_date_time_new_now_local (gdatetime.c:989)
by 0x48A82F9: save_response_cb (pidgindebug.c:136)
by 0x4DB4375: g_cclosure_marshal_VOID__INTv (gmarshal.c:596)
by 0x4DD3553: UnknownInlinedFun (gclosure.c:895)
by 0x4DD3553: g_signal_emit_valist (gsignal.c:3456)
by 0x4DD3632: g_signal_emit (gsignal.c:3606)
by 0x4DB5FBF: g_closure_invoke (gclosure.c:832)
by 0x4DE3D85: signal_emit_unlocked_R.isra.0 (gsignal.c:3796)
by 0x4DD3419: g_signal_emit_valist (gsignal.c:3549)
```
Testing Done:
Ran in valgrind, saved the debug logs to a file, and the above leaks were gone.
Reviewed at https://reviews.imfreedom.org/r/2304/
|
42050
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | # error "only <pidgin.h> may be included directly" |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #endif |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #ifndef PIDGIN_DISPLAY_ITEM_H |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #define PIDGIN_DISPLAY_ITEM_H |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <glib.h> |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | #include <gtk/gtk.h> |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | G_BEGIN_DECLS |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | * PidginDisplayItem: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | * A class that's used by [class@Pidgin.DisplayWindow] to represent all of the |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | * displays items. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | * Since: 3.0.0 |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | #define PIDGIN_TYPE_DISPLAY_ITEM (pidgin_display_item_get_type()) |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | G_DECLARE_FINAL_TYPE(PidginDisplayItem, pidgin_display_item, |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | PIDGIN, DISPLAY_ITEM, GObject) |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | * pidgin_display_item_new: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | * @child: The [class@Gtk.Widget] that this item represents. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | * @id: A unique identifier that will be used internally. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | * Creates a new #PidginDisplayItem instance. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | * Returns: (transfer full): The new #PidginDisplayItem instance. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | PidginDisplayItem *pidgin_display_item_new(GtkWidget *child, const char *id); |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | * pidgin_display_item_get_widget: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | * @item: The instance. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | * Gets the widget that @item was created for. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | * Returns: (transfer none): The widget. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | * Since: 3.0.0 |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | GtkWidget *pidgin_display_item_get_widget(PidginDisplayItem *item); |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
71 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
73 | * pidgin_display_item_get_id: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
74 | * @item: The instance. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
75 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
76 | * Gets the unique identifier of @item. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
77 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
78 | * Returns: The unique identifier of @item. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | * Since: 3.0.0 |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | const char *pidgin_display_item_get_id(PidginDisplayItem *item); |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | * pidgin_display_item_get_title: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | * @item: The instance. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | * Gets the title of @item. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | * Returns: (nullable): The title of @item. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
91 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | * Since: 3.0.0 |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | const char *pidgin_display_item_get_title(PidginDisplayItem *item); |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
95 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
97 | * pidgin_display_item_set_title: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | * @item: The instance. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | * @title: (nullable): The new title. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
100 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
101 | * Sets the title for @item to @title. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
102 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
103 | * Since: 3.0.0 |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
104 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
105 | void pidgin_display_item_set_title(PidginDisplayItem *item, const char *title); |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
106 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | * pidgin_display_item_get_icon_name: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
109 | * @item: The instance. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
110 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
111 | * Gets the icon name if any that should be used when displaying @item. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
112 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
113 | * Returns: (nullable): The icon name to use. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
114 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
115 | * Since: 3.0.0 |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
116 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
117 | const char *pidgin_display_item_get_icon_name(PidginDisplayItem *item); |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
118 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
119 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
120 | * pidgin_display_item_set_icon_name: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
121 | * @item: The instance. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
122 | * @icon_name: (nullable): The icon-name to use. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
123 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
124 | * Sets the icon name that should be used when displaying @item. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
125 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
126 | * Since: 3.0.0 |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
127 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
128 | void pidgin_display_item_set_icon_name(PidginDisplayItem *item, const char *icon_name); |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
129 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
130 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
131 | * pidgin_display_item_get_needs_attention: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
132 | * @item: The instance. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
133 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
134 | * Gets whether or not @item needs attention. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
135 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
136 | * Returns: %TRUE if @item needs attention otherwise %FALSE. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
137 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
138 | * Since: 3.0.0 |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
139 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
140 | gboolean pidgin_display_item_get_needs_attention(PidginDisplayItem *item); |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
141 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
142 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
143 | * pidgin_display_item_set_needs_attention: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
144 | * @item: The instance. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
145 | * @needs_attention: Whether or not attention is needed. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
146 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
147 | * Sets whether or not @item needs attention. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
148 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
149 | * Since: 3.0.0 |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
150 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
151 | void pidgin_display_item_set_needs_attention(PidginDisplayItem *item, gboolean needs_attention); |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
152 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
153 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
154 | * pidgin_display_item_get_badge_number: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
155 | * @item: The instance. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
156 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
157 | * Gets the number that should be displayed in the badge for @item. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
158 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
159 | * Returns: The value to display or %0 to display nothing. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
160 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
161 | * Since: 3.0.0 |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
162 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
163 | guint pidgin_display_item_get_badge_number(PidginDisplayItem *item); |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
164 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
165 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
166 | * pidgin_display_item_set_badge_number: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
167 | * @item: The instance. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
168 | * @badge_number: The new value. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
169 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
170 | * Sets the values to be displayed in the badge for @item to @badge_number. A |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
171 | * value of %0 indicates that the badge should not be displayed. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
172 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
173 | * Since: 3.0.0 |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
174 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
175 | void pidgin_display_item_set_badge_number(PidginDisplayItem *item, guint badge_number); |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
176 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
177 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
178 | * pidgin_display_item_get_children: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
179 | * @item: The instance. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
180 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
181 | * Gets the children for @item if there are any. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
182 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
183 | * Returns: (transfer none) (nullable): The children of @item if there are any. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
184 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
185 | * Since: 3.0.0 |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
186 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
187 | GListModel *pidgin_display_item_get_children(PidginDisplayItem *item); |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
188 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
189 | /** |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
190 | * pidgin_display_item_set_children: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
191 | * @item: The instance: |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
192 | * @children: (nullable): The new children. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
193 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
194 | * Sets the children of @item to @children. If @children is not %NULL then the |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
195 | * model must have an item type of [class@Pidgin.DisplayItem]. |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
196 | * |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
197 | * Since: 3.0.0 |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
198 | */ |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
199 | void pidgin_display_item_set_children(PidginDisplayItem *item, GListModel *children); |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
200 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
201 | G_END_DECLS |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
202 | |
|
5ac6db2b8c2d
Make the DisplayWindow use a GtkListView
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
203 | #endif /* PIDGIN_DISPLAY_ITEM_H */ |