Mercurial > pidgin
annotate src/gtkprefs.h @ 9422:d4e3356e7bbc
[gaim-migrate @ 10240]
[03:07] <marv> commit message?
[03:07] <grim> 'Thought others mind find this useful' i guess..
committer: Tailor Script <tailor@pidgin.im>
| author | Tim Ringenbach <marv@pidgin.im> |
|---|---|
| date | Tue, 29 Jun 2004 08:10:26 +0000 |
| parents | 438e8d857554 |
| children | db62420a53a2 |
| rev | line source |
|---|---|
| 5530 | 1 /** |
| 2 * @file gtkprefs.h GTK+ Preferences | |
| 3 * @ingroup gtkui | |
| 4 * | |
| 5 * gaim | |
| 6 * | |
| 8046 | 7 * Gaim is the legal property of its developers, whose names are too numerous |
| 8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 * source distribution. | |
| 5530 | 10 * |
| 11 * This program is free software; you can redistribute it and/or modify | |
| 12 * it under the terms of the GNU General Public License as published by | |
| 13 * the Free Software Foundation; either version 2 of the License, or | |
| 14 * (at your option) any later version. | |
| 15 * | |
| 16 * This program is distributed in the hope that it will be useful, | |
| 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 * GNU General Public License for more details. | |
| 20 * | |
| 21 * You should have received a copy of the GNU General Public License | |
| 22 * along with this program; if not, write to the Free Software | |
| 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 * | |
| 25 */ | |
| 26 #ifndef _GAIM_GTK_PREFS_H_ | |
| 27 #define _GAIM_GTK_PREFS_H_ | |
| 7976 | 28 #include "prefs.h" |
| 5530 | 29 |
| 30 /* XXX These should go. */ | |
| 31 extern GtkListStore *prefs_away_store; | |
| 32 extern GtkWidget *prefs_away_menu; | |
| 33 extern GtkWidget *pref_fg_picture; | |
| 34 extern GtkWidget *pref_bg_picture; | |
| 35 | |
| 36 /** | |
| 37 * Initializes all UI-specific preferences. | |
| 38 */ | |
| 39 void gaim_gtk_prefs_init(void); | |
| 40 | |
| 41 /** | |
| 42 * Shows the preferences dialog. | |
| 43 */ | |
| 44 void gaim_gtk_prefs_show(void); | |
| 45 | |
| 46 /** | |
| 47 * Initializes the default away menu. | |
| 48 * | |
| 49 * @todo This should be moved or renamed or something? | |
| 50 */ | |
| 51 void default_away_menu_init(GtkWidget *); | |
| 52 | |
| 53 void apply_font_dlg(GtkWidget *, GtkWidget *); | |
| 54 void apply_color_dlg(GtkWidget *, gpointer); | |
| 55 void destroy_colorsel(GtkWidget *, gpointer); | |
| 56 | |
| 7976 | 57 /** |
| 58 * Add a new checkbox for a boolean preference | |
| 59 * | |
| 60 * @param title The text to be displayed as the checkbox label | |
| 61 * @param key The key of the gaim bool pref that will be represented by the checkbox | |
| 62 * @param page The page to which the new checkbox will be added | |
| 63 */ | |
| 7987 | 64 GtkWidget *gaim_gtk_prefs_checkbox(const char *title, const char *key, |
| 65 GtkWidget *page); | |
| 7976 | 66 |
| 67 /** | |
| 68 * Add a new spin button representing an int preference | |
| 69 * | |
| 70 * @param page The page to which the spin button will be added | |
| 71 * @param title The text to be displayed as the spin button label | |
| 7987 | 72 * @param key The key of the int pref that will be represented by the spin button |
| 7976 | 73 * @param min The minimum value of the spin button |
| 74 * @param max The maximum value of the spin button | |
| 75 * @param sg If not NULL, the size group to which the spin button will be added | |
| 8238 | 76 * @return An hbox containing both the label and the spinner. Can be |
|
8735
92cbf9713795
[gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents:
8713
diff
changeset
|
77 * used to set the widgets to sensitive or insensitive based on the |
| 8238 | 78 * value of a checkbox. |
| 7976 | 79 */ |
| 7987 | 80 GtkWidget *gaim_gtk_prefs_labeled_spin_button(GtkWidget *page, |
| 81 const gchar *title, char *key, int min, int max, GtkSizeGroup *sg); | |
| 7976 | 82 |
| 83 /** | |
| 9422 | 84 * Add a new entry representing a string preference |
| 85 * | |
| 86 * @param page The page to which the entry will be added | |
| 87 * @param title The text to be displayed as the entry label | |
| 88 * @param key The key of the string pref that will be represented by the entry | |
| 89 * @param sg If not NULL, the size group to which the entry will be added | |
| 90 * | |
| 91 * @return An hbox containing both the label and the entry. Can be used to set | |
| 92 * the widgets to sensitive or insensitive based on the value of a | |
| 93 * checkbox. | |
| 94 */ | |
| 95 GtkWidget *gaim_gtk_prefs_labeled_entry(GtkWidget *page, const gchar *title, | |
| 96 char *key, GtkSizeGroup *sg); | |
| 97 | |
| 98 /** | |
| 7976 | 99 * Add a new dropdown representing a preference of the specified type |
| 100 * | |
| 7978 | 101 * @param page The page to which the dropdown will be added |
| 102 * @param title The text to be displayed as the dropdown label | |
| 7976 | 103 * @param type The type of preference to be stored in the generated dropdown |
| 7987 | 104 * @param key The key of the pref that will be represented by the dropdown |
| 8713 | 105 * @param ... The choices to be added to the dropdown, choices should be |
| 106 * paired as label/value | |
| 7976 | 107 */ |
| 7987 | 108 GtkWidget *gaim_gtk_prefs_dropdown(GtkWidget *page, const gchar *title, |
| 109 GaimPrefType type, const char *key, ...); | |
| 7976 | 110 |
| 111 /** | |
| 112 * Add a new dropdown representing a preference of the specified type | |
| 113 * | |
| 7978 | 114 * @param page The page to which the dropdown will be added |
| 115 * @param title The text to be displayed as the dropdown label | |
| 7987 | 116 * @param type The type of preference to be stored in the dropdown |
| 117 * @param key The key of the pref that will be represented by the dropdown | |
| 8713 | 118 * @param menuitems The choices to be added to the dropdown, choices should |
| 119 * be paired as label/value | |
| 7976 | 120 */ |
| 7987 | 121 GtkWidget *gaim_gtk_prefs_dropdown_from_list(GtkWidget *page, |
| 122 const gchar * title, GaimPrefType type, const char *key, | |
| 123 GList *menuitems); | |
| 7976 | 124 |
| 8905 | 125 /** |
| 126 * Rename legacy prefs and delete some that no longer exist. | |
| 127 */ | |
| 128 void gaim_gtk_prefs_update_old(); | |
| 129 | |
| 5530 | 130 #endif /* _GAIM_GTK_PREFS_H_ */ |
