3 * Pidgin is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 #ifndef _PIDGINPREFS_H_
24 #define _PIDGINPREFS_H_
27 * @section_id: pidgin-gtkprefs
28 * @short_description: <filename>gtkprefs.h</filename>
36 #define PIDGIN_TYPE_PREFS_WINDOW (pidgin_prefs_window_get_type())
37 G_DECLARE_FINAL_TYPE(PidginPrefsWindow
, pidgin_prefs_window
, PIDGIN
, PREFS_WINDOW
, GtkDialog
)
42 * Initializes all UI-specific preferences.
44 void pidgin_prefs_init(void);
49 * Shows the preferences dialog.
51 void pidgin_prefs_show(void);
54 * pidgin_prefs_checkbox:
55 * @title: The text to be displayed as the checkbox label
56 * @key: The key of the purple bool pref that will be represented by the checkbox
57 * @page: The page to which the new checkbox will be added
59 * Add a new checkbox for a boolean preference
61 * Returns: (transfer full): The new checkbox
63 GtkWidget
*pidgin_prefs_checkbox(const char *title
, const char *key
,
67 * pidgin_prefs_labeled_spin_button:
68 * @page: The page to which the spin button will be added
69 * @title: The text to be displayed as the spin button label
70 * @key: The key of the int pref that will be represented by the spin button
71 * @min: The minimum value of the spin button
72 * @max: The maximum value of the spin button
73 * @sg: If not NULL, the size group to which the spin button will be added
75 * Add a new spin button representing an int preference
77 * Returns: (transfer full): An hbox containing both the label and the spinner. Can be
78 * used to set the widgets to sensitive or insensitive based on the
79 * value of a checkbox.
81 GtkWidget
*pidgin_prefs_labeled_spin_button(GtkWidget
*page
,
82 const gchar
*title
, const char *key
, int min
, int max
, GtkSizeGroup
*sg
);
85 * pidgin_prefs_labeled_entry:
86 * @page: The page to which the entry will be added
87 * @title: The text to be displayed as the entry label
88 * @key: The key of the string pref that will be represented by the entry
89 * @sg: If not NULL, the size group to which the entry will be added
91 * Add a new entry representing a string preference
93 * Returns: (transfer full) :An hbox containing both the label and the entry. Can be used to set
94 * the widgets to sensitive or insensitive based on the value of a
97 GtkWidget
*pidgin_prefs_labeled_entry(GtkWidget
*page
, const gchar
*title
,
98 const char *key
, GtkSizeGroup
*sg
);
101 * pidgin_prefs_labeled_password:
102 * @page: The page to which the entry will be added
103 * @title: The text to be displayed as the entry label
104 * @key: The key of the string pref that will be represented by the entry
105 * @sg: If not NULL, the size group to which the entry will be added
107 * Add a new entry representing a password (string) preference
108 * The entry will use a password-style text entry (the text is substituded)
110 * Returns: (transfer full): An hbox containing both the label and the entry. Can be used to set
111 * the widgets to sensitive or insensitive based on the value of a
114 GtkWidget
*pidgin_prefs_labeled_password(GtkWidget
*page
, const gchar
*title
,
115 const char *key
, GtkSizeGroup
*sg
);
118 * pidgin_prefs_dropdown:
119 * @page: The page to which the dropdown will be added
120 * @title: The text to be displayed as the dropdown label
121 * @type: The type of preference to be stored in the generated dropdown
122 * @key: The key of the pref that will be represented by the dropdown
123 * @...: The choices to be added to the dropdown, choices should be
124 * paired as label/value
126 * Add a new dropdown representing a preference of the specified type
128 * Returns: (transfer full): The new dropdown.
130 GtkWidget
*pidgin_prefs_dropdown(GtkWidget
*page
, const gchar
*title
,
131 PurplePrefType type
, const char *key
, ...);
134 * pidgin_prefs_dropdown_from_list:
135 * @page: The page to which the dropdown will be added
136 * @title: The text to be displayed as the dropdown label
137 * @type: The type of preference to be stored in the dropdown
138 * @key: The key of the pref that will be represented by the dropdown
139 * @menuitems: The choices to be added to the dropdown, choices should
140 * be paired as label/value
142 * Add a new dropdown representing a preference of the specified type
144 * Returns: (transfer full): The new dropdown.
146 GtkWidget
*pidgin_prefs_dropdown_from_list(GtkWidget
*page
,
147 const gchar
* title
, PurplePrefType type
, const char *key
,
151 * pidgin_prefs_update_old:
153 * Rename legacy prefs and delete some that no longer exist.
155 void pidgin_prefs_update_old(void);
159 #endif /* _PIDGINPREFS_H_ */