Tue, 07 Jul 2009 17:44:13 +0000
Plug a leak of an account dropdown selection dialog or two.
The optmenu was being assigned to the wrong field, meaning it would be
created twice (the latter when pidgin_request_fields hits that field). On
top of that, the dropdown was being created even when the field isn't
visible (which, in the case of one active account and the New IM dialog,
it isn't).
Fixes a bunch of failed assertions in the debug log like:
g_log: purple_request_field_account_set_value: assertion `field->type == PURPLE_REQUEST_FIELD_ACCOUNT' failed
| 10418 | 1 | /** |
|
10469
3edb0348ba88
[gaim-migrate @ 11751]
Mark Doliner <markdoliner@pidgin.im>
parents:
10447
diff
changeset
|
2 | * @file gtksavedstatuses.h GTK+ Saved Status Editor UI |
|
16254
eeb2bba4dc94
Rename the Doxygen group from gtkui to pidgin.
Richard Laager <rlaager@pidgin.im>
parents:
15931
diff
changeset
|
3 | * @ingroup pidgin |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
4 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
5 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
6 | /* pidgin |
| 10418 | 7 | * |
| 15572 | 8 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 10418 | 9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 10 | * source distribution. | |
| 11 | * | |
| 12 | * This program is free software; you can redistribute it and/or modify | |
| 13 | * it under the terms of the GNU General Public License as published by | |
| 14 | * the Free Software Foundation; either version 2 of the License, or | |
| 15 | * (at your option) any later version. | |
| 16 | * | |
| 17 | * This program is distributed in the hope that it will be useful, | |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 20 | * GNU General Public License for more details. | |
| 21 | * | |
| 22 | * You should have received a copy of the GNU General Public License | |
| 23 | * 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
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 10418 | 25 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
26 | #ifndef _PIDGINSAVEDSTATUSES_H_ |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
27 | #define _PIDGINSAVEDSTATUSES_H_ |
| 10418 | 28 | |
|
10421
34797f8b5742
[gaim-migrate @ 11672]
Mark Doliner <markdoliner@pidgin.im>
parents:
10418
diff
changeset
|
29 | #include "savedstatuses.h" |
| 10418 | 30 | #include "status.h" |
| 31 | ||
| 32 | /** | |
| 33 | * Shows the status window. | |
| 34 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
35 | void pidgin_status_window_show(void); |
| 10418 | 36 | |
| 37 | /** | |
| 38 | * Hides the status window. | |
| 39 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
40 | void pidgin_status_window_hide(void); |
| 10418 | 41 | |
| 42 | /** | |
|
10447
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10421
diff
changeset
|
43 | * Shows a status editor (used for adding a new saved status or |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10421
diff
changeset
|
44 | * editing an already existing saved status). |
|
887380ec66f5
[gaim-migrate @ 11712]
Mark Doliner <markdoliner@pidgin.im>
parents:
10421
diff
changeset
|
45 | * |
|
13176
df549de66219
[gaim-migrate @ 15538]
Mark Doliner <markdoliner@pidgin.im>
parents:
13014
diff
changeset
|
46 | * @param edit TRUE if we want to edit an existing saved |
|
df549de66219
[gaim-migrate @ 15538]
Mark Doliner <markdoliner@pidgin.im>
parents:
13014
diff
changeset
|
47 | * status or FALSE to create a new one. You |
|
df549de66219
[gaim-migrate @ 15538]
Mark Doliner <markdoliner@pidgin.im>
parents:
13014
diff
changeset
|
48 | * can not edit transient statuses--they don't |
|
df549de66219
[gaim-migrate @ 15538]
Mark Doliner <markdoliner@pidgin.im>
parents:
13014
diff
changeset
|
49 | * have titles. If you want to edit a transient |
|
df549de66219
[gaim-migrate @ 15538]
Mark Doliner <markdoliner@pidgin.im>
parents:
13014
diff
changeset
|
50 | * status, set this to FALSE and seed the dialog |
|
df549de66219
[gaim-migrate @ 15538]
Mark Doliner <markdoliner@pidgin.im>
parents:
13014
diff
changeset
|
51 | * with the transient status using the status |
|
df549de66219
[gaim-migrate @ 15538]
Mark Doliner <markdoliner@pidgin.im>
parents:
13014
diff
changeset
|
52 | * parameter to this function. |
|
df549de66219
[gaim-migrate @ 15538]
Mark Doliner <markdoliner@pidgin.im>
parents:
13014
diff
changeset
|
53 | * @param status If edit is TRUE then this should be a |
| 15884 | 54 | * pointer to the PurpleSavedStatus to edit. |
|
13176
df549de66219
[gaim-migrate @ 15538]
Mark Doliner <markdoliner@pidgin.im>
parents:
13014
diff
changeset
|
55 | * If edit is FALSE then this can be NULL, |
|
df549de66219
[gaim-migrate @ 15538]
Mark Doliner <markdoliner@pidgin.im>
parents:
13014
diff
changeset
|
56 | * or you can pass in a saved status to |
|
df549de66219
[gaim-migrate @ 15538]
Mark Doliner <markdoliner@pidgin.im>
parents:
13014
diff
changeset
|
57 | * seed the initial values of the new status. |
|
10421
34797f8b5742
[gaim-migrate @ 11672]
Mark Doliner <markdoliner@pidgin.im>
parents:
10418
diff
changeset
|
58 | */ |
| 15884 | 59 | void pidgin_status_editor_show(gboolean edit, PurpleSavedStatus *status); |
|
10421
34797f8b5742
[gaim-migrate @ 11672]
Mark Doliner <markdoliner@pidgin.im>
parents:
10418
diff
changeset
|
60 | |
|
34797f8b5742
[gaim-migrate @ 11672]
Mark Doliner <markdoliner@pidgin.im>
parents:
10418
diff
changeset
|
61 | /** |
|
13014
fa17f785b6fe
[gaim-migrate @ 15367]
Mark Doliner <markdoliner@pidgin.im>
parents:
12245
diff
changeset
|
62 | * Creates a dropdown menu of saved statuses and calls a callback |
|
fa17f785b6fe
[gaim-migrate @ 15367]
Mark Doliner <markdoliner@pidgin.im>
parents:
12245
diff
changeset
|
63 | * when one is selected |
|
fa17f785b6fe
[gaim-migrate @ 15367]
Mark Doliner <markdoliner@pidgin.im>
parents:
12245
diff
changeset
|
64 | * |
|
fa17f785b6fe
[gaim-migrate @ 15367]
Mark Doliner <markdoliner@pidgin.im>
parents:
12245
diff
changeset
|
65 | * @param status The default saved_status to show as 'selected' |
|
fa17f785b6fe
[gaim-migrate @ 15367]
Mark Doliner <markdoliner@pidgin.im>
parents:
12245
diff
changeset
|
66 | * @param callback The callback to call when the selection changes |
|
fa17f785b6fe
[gaim-migrate @ 15367]
Mark Doliner <markdoliner@pidgin.im>
parents:
12245
diff
changeset
|
67 | * @return The menu widget |
|
fa17f785b6fe
[gaim-migrate @ 15367]
Mark Doliner <markdoliner@pidgin.im>
parents:
12245
diff
changeset
|
68 | */ |
| 15884 | 69 | GtkWidget *pidgin_status_menu(PurpleSavedStatus *status, GCallback callback); |
|
13014
fa17f785b6fe
[gaim-migrate @ 15367]
Mark Doliner <markdoliner@pidgin.im>
parents:
12245
diff
changeset
|
70 | |
|
fa17f785b6fe
[gaim-migrate @ 15367]
Mark Doliner <markdoliner@pidgin.im>
parents:
12245
diff
changeset
|
71 | /** |
|
fa17f785b6fe
[gaim-migrate @ 15367]
Mark Doliner <markdoliner@pidgin.im>
parents:
12245
diff
changeset
|
72 | * Returns the GTK+ status handle. |
| 10418 | 73 | * |
| 74 | * @return The handle to the GTK+ status system. | |
| 75 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
76 | void *pidgin_status_get_handle(void); |
| 10418 | 77 | |
| 78 | /** | |
| 79 | * Initializes the GTK+ status system. | |
| 80 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
81 | void pidgin_status_init(void); |
| 10418 | 82 | |
| 83 | /** | |
| 84 | * Uninitializes the GTK+ status system. | |
| 85 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
86 | void pidgin_status_uninit(void); |
| 10418 | 87 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
88 | #endif /* _PIDGINSAVEDSTATUSES_H_ */ |