pidgin/gtkaccount.h

Fri, 05 Mar 2021 03:31:29 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Fri, 05 Mar 2021 03:31:29 -0600
changeset 40810
28d50eece92d
parent 40502
875489636847
child 41087
4fc5b0ddf55e
permissions
-rw-r--r--

Create a PidginAvatar widget.

This does everything the existing code does, but trying to integrate right now
is kind of difficult. The plan is to use this in a new PidginInfoPane I have
started, but that change got very large so I just packed it into the end of
the existing info pane.

The only things that are not implement right now, are making menu items
insensitive and that's because we need to figure out a better want to handle
custom avatars for users.

Testing Done:
Ran locally.

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

20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
1 /* pidgin
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 *
15572
e069b22c1fc4 headers to pidgin
Sean Egan <seanegan@pidgin.im>
parents: 15562
diff changeset
3 * Pidgin is the legal property of its developers, whose names are too numerous
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7820
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7820
diff changeset
5 * source distribution.
7015
bea9111282b3 [gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents: 6120
diff changeset
6 *
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * (at your option) any later version.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * GNU General Public License for more details.
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 *
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 16254
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35451
diff changeset
21
40502
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40360
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: 40360
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: 40360
diff changeset
24 #endif
875489636847 pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents: 40360
diff changeset
25
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35451
diff changeset
26 #ifndef _PIDGINACCOUNT_H_
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35451
diff changeset
27 #define _PIDGINACCOUNT_H_
35451
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 35415
diff changeset
28 /**
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 35415
diff changeset
29 * SECTION:gtkaccount
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 35415
diff changeset
30 * @section_id: pidgin-gtkaccount
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 35415
diff changeset
31 * @short_description: <filename>gtkaccount.h</filename>
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 35415
diff changeset
32 * @title: Account Editor UI
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 35415
diff changeset
33 * @see_also: <link linkend="chapter-signals-gtkaccount">Account signals</link>
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 35415
diff changeset
34 */
206524351826 Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents: 35415
diff changeset
35
40360
e21f3bbcc2a5 Update all of the pidgin code to include purple.h
Gary Kramlich <grim@reaperworld.com>
parents: 37094
diff changeset
36 #include <purple.h>
6120
a2e246aa5275 [gaim-migrate @ 6589]
Nathan Walp <nwalp@pidgin.im>
parents: 6119
diff changeset
37
6119
5b4c66789a8c [gaim-migrate @ 6588]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
38 typedef enum
5b4c66789a8c [gaim-migrate @ 6588]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
39 {
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
40 PIDGIN_ADD_ACCOUNT_DIALOG,
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
41 PIDGIN_MODIFY_ACCOUNT_DIALOG
6119
5b4c66789a8c [gaim-migrate @ 6588]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
42
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
43 } PidginAccountDialogType;
6119
5b4c66789a8c [gaim-migrate @ 6588]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
44
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45
32790
b95c7c504118 Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 20890
diff changeset
46 G_BEGIN_DECLS
b95c7c504118 Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 20890
diff changeset
47
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48 /**
35415
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
49 * pidgin_accounts_window_show:
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
50 *
6119
5b4c66789a8c [gaim-migrate @ 6588]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
51 * Shows the accounts window.
5b4c66789a8c [gaim-migrate @ 6588]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
52 */
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
53 void pidgin_accounts_window_show(void);
6119
5b4c66789a8c [gaim-migrate @ 6588]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
54
5b4c66789a8c [gaim-migrate @ 6588]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
55 /**
35415
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
56 * pidgin_accounts_window_hide:
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
57 *
6119
5b4c66789a8c [gaim-migrate @ 6588]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
58 * Hides the accounts window.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59 */
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
60 void pidgin_accounts_window_hide(void);
6119
5b4c66789a8c [gaim-migrate @ 6588]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
61
5b4c66789a8c [gaim-migrate @ 6588]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
62 /**
35415
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
63 * pidgin_account_dialog_show:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34586
diff changeset
64 * @type: The type of dialog.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34586
diff changeset
65 * @account: The associated account, or %NULL for an Add dialog.
35415
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
66 *
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
67 * Shows an add/modify account dialog.
6119
5b4c66789a8c [gaim-migrate @ 6588]
Christian Hammond <chipx86@chipx86.com>
parents: 5563
diff changeset
68 */
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
69 void pidgin_account_dialog_show(PidginAccountDialogType type,
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15572
diff changeset
70 PurpleAccount *account);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71
7015
bea9111282b3 [gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents: 6120
diff changeset
72 /**
35415
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
73 * pidgin_accounts_get_ui_ops:
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
74 *
7015
bea9111282b3 [gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents: 6120
diff changeset
75 * Returns the GTK+ account UI ops
bea9111282b3 [gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents: 6120
diff changeset
76 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34586
diff changeset
77 * Returns: The UI operations structure.
7015
bea9111282b3 [gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents: 6120
diff changeset
78 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15572
diff changeset
79 PurpleAccountUiOps *pidgin_accounts_get_ui_ops(void);
7015
bea9111282b3 [gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents: 6120
diff changeset
80
9609
509595c974af [gaim-migrate @ 10452]
Gary Kramlich <grim@pidgin.im>
parents: 8046
diff changeset
81 /**
35415
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
82 * pidgin_accounts_get_handle:
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
83 *
9609
509595c974af [gaim-migrate @ 10452]
Gary Kramlich <grim@pidgin.im>
parents: 8046
diff changeset
84 * Returns the gtkaccounts handle
509595c974af [gaim-migrate @ 10452]
Gary Kramlich <grim@pidgin.im>
parents: 8046
diff changeset
85 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34586
diff changeset
86 * Returns: The handle to the GTK+ account system
9609
509595c974af [gaim-migrate @ 10452]
Gary Kramlich <grim@pidgin.im>
parents: 8046
diff changeset
87 */
34585
cc4b9443deb9 Renamed pidgin_account_[init,uninit,get_handle] to pidgin_accounts_[init,uninit,get_handle].
Ankit Vani <a@nevitus.org>
parents: 32790
diff changeset
88 void *pidgin_accounts_get_handle(void);
9609
509595c974af [gaim-migrate @ 10452]
Gary Kramlich <grim@pidgin.im>
parents: 8046
diff changeset
89
509595c974af [gaim-migrate @ 10452]
Gary Kramlich <grim@pidgin.im>
parents: 8046
diff changeset
90 /**
35415
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
91 * pidgin_accounts_init:
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
92 *
9609
509595c974af [gaim-migrate @ 10452]
Gary Kramlich <grim@pidgin.im>
parents: 8046
diff changeset
93 * Initializes the GTK+ account system
509595c974af [gaim-migrate @ 10452]
Gary Kramlich <grim@pidgin.im>
parents: 8046
diff changeset
94 */
34585
cc4b9443deb9 Renamed pidgin_account_[init,uninit,get_handle] to pidgin_accounts_[init,uninit,get_handle].
Ankit Vani <a@nevitus.org>
parents: 32790
diff changeset
95 void pidgin_accounts_init(void);
9609
509595c974af [gaim-migrate @ 10452]
Gary Kramlich <grim@pidgin.im>
parents: 8046
diff changeset
96
509595c974af [gaim-migrate @ 10452]
Gary Kramlich <grim@pidgin.im>
parents: 8046
diff changeset
97 /**
35415
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
98 * pidgin_accounts_uninit:
ba28be1a7611 Convert docs from doxygen to gtk-doc format for gtkaccount to gtkconvwin
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
99 *
9609
509595c974af [gaim-migrate @ 10452]
Gary Kramlich <grim@pidgin.im>
parents: 8046
diff changeset
100 * Uninitializes the GTK+ account system
509595c974af [gaim-migrate @ 10452]
Gary Kramlich <grim@pidgin.im>
parents: 8046
diff changeset
101 */
34585
cc4b9443deb9 Renamed pidgin_account_[init,uninit,get_handle] to pidgin_accounts_[init,uninit,get_handle].
Ankit Vani <a@nevitus.org>
parents: 32790
diff changeset
102 void pidgin_accounts_uninit(void);
9609
509595c974af [gaim-migrate @ 10452]
Gary Kramlich <grim@pidgin.im>
parents: 8046
diff changeset
103
32790
b95c7c504118 Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 20890
diff changeset
104 G_END_DECLS
b95c7c504118 Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 20890
diff changeset
105
15562
8c8249fe5e3c gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
106 #endif /* _PIDGINACCOUNT_H_ */

mercurial