Tue, 07 May 2013 05:04:46 -0400
Rewrite debug window filter in JS.
Note, this does cause a couple regressions, but they are probably not
that big a deal. First, the JS regular expression syntax is slightly
different. Second, the JS regex API lacks a way to reliably determine
the location of matched groups, so we can't highlight just the groups
and must highlight the entire expression.
I suspect that none of our users ever had to use any fancy regex in the
debug window, and that most of our developers didn't even know it could
be done. So I doubt these regressions will cause much pain.
| 5530 | 1 | /** |
| 2 | * @file gtkprefs.h GTK+ Preferences | |
|
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 |
| 5530 | 7 | * |
| 15572 | 8 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 8046 | 9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 10 | * source distribution. | |
| 5530 | 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 |
| 5530 | 25 | * |
| 26 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
27 | #ifndef _PIDGINPREFS_H_ |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
28 | #define _PIDGINPREFS_H_ |
|
9713
bb37562302a1
[gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents:
9422
diff
changeset
|
29 | |
| 7976 | 30 | #include "prefs.h" |
| 5530 | 31 | |
|
32790
b95c7c504118
Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32604
diff
changeset
|
32 | 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:
32604
diff
changeset
|
33 | |
| 5530 | 34 | /** |
| 35 | * Initializes all UI-specific preferences. | |
| 36 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
37 | void pidgin_prefs_init(void); |
| 5530 | 38 | |
| 39 | /** | |
| 40 | * Shows the preferences dialog. | |
| 41 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
42 | void pidgin_prefs_show(void); |
| 5530 | 43 | |
| 44 | /** | |
| 7976 | 45 | * Add a new checkbox for a boolean preference |
| 46 | * | |
| 47 | * @param title The text to be displayed as the checkbox label | |
| 15884 | 48 | * @param key The key of the purple bool pref that will be represented by the checkbox |
| 7976 | 49 | * @param page The page to which the new checkbox will be added |
| 50 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
51 | GtkWidget *pidgin_prefs_checkbox(const char *title, const char *key, |
| 7987 | 52 | GtkWidget *page); |
| 7976 | 53 | |
| 54 | /** | |
| 55 | * Add a new spin button representing an int preference | |
| 56 | * | |
| 57 | * @param page The page to which the spin button will be added | |
| 58 | * @param title The text to be displayed as the spin button label | |
| 7987 | 59 | * @param key The key of the int pref that will be represented by the spin button |
| 7976 | 60 | * @param min The minimum value of the spin button |
| 61 | * @param max The maximum value of the spin button | |
| 62 | * @param sg If not NULL, the size group to which the spin button will be added | |
|
8238
f7d22f952df5
[gaim-migrate @ 8961]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
63 | * @return An hbox containing both the label and the spinner. Can be |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
20147
diff
changeset
|
64 | * used to set the widgets to sensitive or insensitive based on the |
|
8238
f7d22f952df5
[gaim-migrate @ 8961]
Mark Doliner <markdoliner@pidgin.im>
parents:
8046
diff
changeset
|
65 | * value of a checkbox. |
| 7976 | 66 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
67 | GtkWidget *pidgin_prefs_labeled_spin_button(GtkWidget *page, |
| 10367 | 68 | const gchar *title, const char *key, int min, int max, GtkSizeGroup *sg); |
| 7976 | 69 | |
| 70 | /** | |
| 9422 | 71 | * Add a new entry representing a string preference |
| 72 | * | |
| 73 | * @param page The page to which the entry will be added | |
| 74 | * @param title The text to be displayed as the entry label | |
| 75 | * @param key The key of the string pref that will be represented by the entry | |
| 76 | * @param sg If not NULL, the size group to which the entry will be added | |
| 77 | * | |
| 78 | * @return An hbox containing both the label and the entry. Can be used to set | |
| 79 | * the widgets to sensitive or insensitive based on the value of a | |
| 80 | * checkbox. | |
| 81 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
82 | GtkWidget *pidgin_prefs_labeled_entry(GtkWidget *page, const gchar *title, |
| 10367 | 83 | const char *key, GtkSizeGroup *sg); |
| 9422 | 84 | |
| 85 | /** | |
|
26261
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
86 | * Add a new entry representing a password (string) preference |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
87 | * The entry will use a password-style text entry (the text is substituded) |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
88 | * |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
89 | * @param page The page to which the entry will be added |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
90 | * @param title The text to be displayed as the entry label |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
91 | * @param key The key of the string pref that will be represented by the entry |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
92 | * @param sg If not NULL, the size group to which the entry will be added |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
93 | * |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
94 | * @return An hbox containing both the label and the entry. Can be used to set |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
95 | * the widgets to sensitive or insensitive based on the value of a |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
96 | * checkbox. |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
97 | */ |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
98 | GtkWidget *pidgin_prefs_labeled_password(GtkWidget *page, const gchar *title, |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
99 | const char *key, GtkSizeGroup *sg); |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
100 | |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
22648
diff
changeset
|
101 | /** |
| 7976 | 102 | * Add a new dropdown representing a preference of the specified type |
| 103 | * | |
| 7978 | 104 | * @param page The page to which the dropdown will be added |
| 105 | * @param title The text to be displayed as the dropdown label | |
| 7976 | 106 | * @param type The type of preference to be stored in the generated dropdown |
| 7987 | 107 | * @param key The key of the pref that will be represented by the dropdown |
| 8713 | 108 | * @param ... The choices to be added to the dropdown, choices should be |
| 109 | * paired as label/value | |
| 7976 | 110 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
111 | GtkWidget *pidgin_prefs_dropdown(GtkWidget *page, const gchar *title, |
| 15884 | 112 | PurplePrefType type, const char *key, ...); |
| 7976 | 113 | |
| 114 | /** | |
| 115 | * Add a new dropdown representing a preference of the specified type | |
| 116 | * | |
| 7978 | 117 | * @param page The page to which the dropdown will be added |
| 118 | * @param title The text to be displayed as the dropdown label | |
| 7987 | 119 | * @param type The type of preference to be stored in the dropdown |
| 120 | * @param key The key of the pref that will be represented by the dropdown | |
| 8713 | 121 | * @param menuitems The choices to be added to the dropdown, choices should |
| 122 | * be paired as label/value | |
| 7976 | 123 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
124 | GtkWidget *pidgin_prefs_dropdown_from_list(GtkWidget *page, |
| 15884 | 125 | const gchar * title, PurplePrefType type, const char *key, |
| 7987 | 126 | GList *menuitems); |
| 7976 | 127 | |
|
8905
cedfa637389f
[gaim-migrate @ 9674]
Mark Doliner <markdoliner@pidgin.im>
parents:
8900
diff
changeset
|
128 | /** |
|
cedfa637389f
[gaim-migrate @ 9674]
Mark Doliner <markdoliner@pidgin.im>
parents:
8900
diff
changeset
|
129 | * Rename legacy prefs and delete some that no longer exist. |
|
cedfa637389f
[gaim-migrate @ 9674]
Mark Doliner <markdoliner@pidgin.im>
parents:
8900
diff
changeset
|
130 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
131 | void pidgin_prefs_update_old(void); |
|
8905
cedfa637389f
[gaim-migrate @ 9674]
Mark Doliner <markdoliner@pidgin.im>
parents:
8900
diff
changeset
|
132 | |
|
32790
b95c7c504118
Add G_BEGIN/END_DECLS to Pidgin public headers, most of which did
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32604
diff
changeset
|
133 | 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:
32604
diff
changeset
|
134 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
135 | #endif /* _PIDGINPREFS_H_ */ |