Thu, 22 Jul 2021 22:33:54 -0500
Move minidialog stuff from utils to its source file
* Remove minidialog list from utils.
It's supposed to be used to delete them when the connection is dropped, but this list is never added to. And the dialogs are automatically closed when the account disconnects in some other way that I could not find.
Consequently, drop the unused `gc` from `pidgin_make_mini_dialog*`.
* Replace `PidginUtilMiniDialogCallback` by `PidginMiniDialogCallback`.
It is just a wrapper around the latter, with different argument order.
* Move minidialog wrappers from utils to `minidialog.c`. And fix naming/arguments to match the existing functions.
Testing Done:
Compiled, connected an account that had buddy requests, but didn't act on them.
Reviewed at https://reviews.imfreedom.org/r/788/
|
39568
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* pidgin |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * source distribution. |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * This program is free software; you can redistribute it and/or modify |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * it under the terms of the GNU General Public License as published by |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * the Free Software Foundation; either version 2 of the License, or |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * (at your option) any later version. |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * This program is distributed in the hope that it will be useful, |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * GNU General Public License for more details. |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * You should have received a copy of the GNU General Public License |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * along with this program; if not, write to the Free Software |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | */ |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
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:
39570
diff
changeset
|
22 | #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:
39570
diff
changeset
|
23 | # 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:
39570
diff
changeset
|
24 | #endif |
|
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
39570
diff
changeset
|
25 | |
|
39568
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | #ifndef PIDGIN_GDK_PIXBUF_H |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #define PIDGIN_GDK_PIXBUF_H |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | #include <glib.h> |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <gdk-pixbuf/gdk-pixbuf.h> |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | #include <purple.h> |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | /** |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | * SECTION:pidgingdkpixbuf |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | * @section_id: pidgin-gdk-pixbuf |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | * @short_description: <filename>pidgingdkpixbuf.h</filename> |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | * @title: GDK Pixbuf Helpers |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | */ |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | G_BEGIN_DECLS |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | |
|
39570
a6ec70c31e9e
Add missing docs on pidgin_gdk_pixbuf_new_from_image
Gary Kramlich <grim@reaperworld.com>
parents:
39569
diff
changeset
|
43 | /** |
|
a6ec70c31e9e
Add missing docs on pidgin_gdk_pixbuf_new_from_image
Gary Kramlich <grim@reaperworld.com>
parents:
39569
diff
changeset
|
44 | * pidgin_gdk_pixbuf_new_from_image: |
|
a6ec70c31e9e
Add missing docs on pidgin_gdk_pixbuf_new_from_image
Gary Kramlich <grim@reaperworld.com>
parents:
39569
diff
changeset
|
45 | * @image: A #PurpleImage instance. |
|
a6ec70c31e9e
Add missing docs on pidgin_gdk_pixbuf_new_from_image
Gary Kramlich <grim@reaperworld.com>
parents:
39569
diff
changeset
|
46 | * @error: (out) (nullable): A return address for a #GError. |
|
a6ec70c31e9e
Add missing docs on pidgin_gdk_pixbuf_new_from_image
Gary Kramlich <grim@reaperworld.com>
parents:
39569
diff
changeset
|
47 | * |
|
a6ec70c31e9e
Add missing docs on pidgin_gdk_pixbuf_new_from_image
Gary Kramlich <grim@reaperworld.com>
parents:
39569
diff
changeset
|
48 | * Creates a new #GdkPixbuf from the #PurpleImage @image. If provided Sets |
|
a6ec70c31e9e
Add missing docs on pidgin_gdk_pixbuf_new_from_image
Gary Kramlich <grim@reaperworld.com>
parents:
39569
diff
changeset
|
49 | * @error on error. |
|
a6ec70c31e9e
Add missing docs on pidgin_gdk_pixbuf_new_from_image
Gary Kramlich <grim@reaperworld.com>
parents:
39569
diff
changeset
|
50 | * |
|
a6ec70c31e9e
Add missing docs on pidgin_gdk_pixbuf_new_from_image
Gary Kramlich <grim@reaperworld.com>
parents:
39569
diff
changeset
|
51 | * Returns: (transfer full) (nullable): The new #GdkPixbuf or %NULL or error. |
|
a6ec70c31e9e
Add missing docs on pidgin_gdk_pixbuf_new_from_image
Gary Kramlich <grim@reaperworld.com>
parents:
39569
diff
changeset
|
52 | */ |
|
39568
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | GdkPixbuf *pidgin_gdk_pixbuf_new_from_image(PurpleImage *image, GError **error); |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | /** |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | * pidgin_gdk_pixbuf_make_round: |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | * @pixbuf: The buddy icon to transform |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | * |
|
39569
0f82795adcb5
Clean up a bad comment
Gary Kramlich <grim@reaperworld.com>
parents:
39568
diff
changeset
|
59 | * Rounds the corners of a GdkPixbuf in place. |
|
39568
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | */ |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | void pidgin_gdk_pixbuf_make_round(GdkPixbuf *pixbuf); |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | /** |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | * pidgin_gdk_pixbuf_is_opaque: |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | * @pixbuf: The pixbuf |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | * |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | * Returns TRUE if the GdkPixbuf is opaque, as determined by no |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | * alpha at any of the edge pixels. |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | * |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | * Returns: TRUE if the pixbuf is opaque around the edges, FALSE otherwise |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
71 | */ |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | gboolean pidgin_gdk_pixbuf_is_opaque(GdkPixbuf *pixbuf); |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
73 | |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
74 | G_END_DECLS |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
75 | |
|
f4714f1de6d0
Start cleaning up gtkutils by moving functions to individual files
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
76 | #endif /* PIDGIN_GDK_PIXBUF_H */ |