pidgin/gtkprefs.h

branch
cpw.khc.msnp14
changeset 20478
46933dc62880
parent 20472
6a6d2ef151e6
parent 15931
716b5fac1895
child 20481
65485e2ed8a3
equal deleted inserted replaced
20476:198222e01a7d 20478:46933dc62880
1 /**
2 * @file gtkprefs.h GTK+ Preferences
3 * @ingroup gtkui
4 *
5 * pidgin
6 *
7 * Pidgin 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.
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 _PIDGINPREFS_H_
27 #define _PIDGINPREFS_H_
28
29 #include "prefs.h"
30
31 /**
32 * Initializes all UI-specific preferences.
33 */
34 void pidgin_prefs_init(void);
35
36 /**
37 * Shows the preferences dialog.
38 */
39 void pidgin_prefs_show(void);
40
41 /**
42 * Add a new checkbox for a boolean preference
43 *
44 * @param title The text to be displayed as the checkbox label
45 * @param key The key of the purple bool pref that will be represented by the checkbox
46 * @param page The page to which the new checkbox will be added
47 */
48 GtkWidget *pidgin_prefs_checkbox(const char *title, const char *key,
49 GtkWidget *page);
50
51 /**
52 * Add a new spin button representing an int preference
53 *
54 * @param page The page to which the spin button will be added
55 * @param title The text to be displayed as the spin button label
56 * @param key The key of the int pref that will be represented by the spin button
57 * @param min The minimum value of the spin button
58 * @param max The maximum value of the spin button
59 * @param sg If not NULL, the size group to which the spin button will be added
60 * @return An hbox containing both the label and the spinner. Can be
61 * used to set the widgets to sensitive or insensitive based on the
62 * value of a checkbox.
63 */
64 GtkWidget *pidgin_prefs_labeled_spin_button(GtkWidget *page,
65 const gchar *title, const char *key, int min, int max, GtkSizeGroup *sg);
66
67 /**
68 * Add a new entry representing a string preference
69 *
70 * @param page The page to which the entry will be added
71 * @param title The text to be displayed as the entry label
72 * @param key The key of the string pref that will be represented by the entry
73 * @param sg If not NULL, the size group to which the entry will be added
74 *
75 * @return An hbox containing both the label and the entry. Can be used to set
76 * the widgets to sensitive or insensitive based on the value of a
77 * checkbox.
78 */
79 GtkWidget *pidgin_prefs_labeled_entry(GtkWidget *page, const gchar *title,
80 const char *key, GtkSizeGroup *sg);
81
82 /**
83 * Add a new dropdown representing a preference of the specified type
84 *
85 * @param page The page to which the dropdown will be added
86 * @param title The text to be displayed as the dropdown label
87 * @param type The type of preference to be stored in the generated dropdown
88 * @param key The key of the pref that will be represented by the dropdown
89 * @param ... The choices to be added to the dropdown, choices should be
90 * paired as label/value
91 */
92 GtkWidget *pidgin_prefs_dropdown(GtkWidget *page, const gchar *title,
93 PurplePrefType type, const char *key, ...);
94
95 /**
96 * Add a new dropdown representing a preference of the specified type
97 *
98 * @param page The page to which the dropdown will be added
99 * @param title The text to be displayed as the dropdown label
100 * @param type The type of preference to be stored in the dropdown
101 * @param key The key of the pref that will be represented by the dropdown
102 * @param menuitems The choices to be added to the dropdown, choices should
103 * be paired as label/value
104 */
105 GtkWidget *pidgin_prefs_dropdown_from_list(GtkWidget *page,
106 const gchar * title, PurplePrefType type, const char *key,
107 GList *menuitems);
108
109 /**
110 * Rename legacy prefs and delete some that no longer exist.
111 */
112 void pidgin_prefs_update_old(void);
113
114 #endif /* _PIDGINPREFS_H_ */

mercurial