Migrate certificates, icons, logs to XDG dirs
[pidgin-git.git] / pidgin / gtkprefs.h
blob9c13781359ba3d44c7c216ff72fe9a17b505cbe3
1 /* pidgin
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
5 * source distribution.
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_
25 /**
26 * SECTION:gtkprefs
27 * @section_id: pidgin-gtkprefs
28 * @short_description: <filename>gtkprefs.h</filename>
29 * @title: Preferences
32 #include "prefs.h"
34 G_BEGIN_DECLS
36 /**
37 * pidgin_prefs_init:
39 * Initializes all UI-specific preferences.
41 void pidgin_prefs_init(void);
43 /**
44 * pidgin_prefs_show:
46 * Shows the preferences dialog.
48 void pidgin_prefs_show(void);
50 /**
51 * pidgin_prefs_checkbox:
52 * @title: The text to be displayed as the checkbox label
53 * @key: The key of the purple bool pref that will be represented by the checkbox
54 * @page: The page to which the new checkbox will be added
56 * Add a new checkbox for a boolean preference
58 GtkWidget *pidgin_prefs_checkbox(const char *title, const char *key,
59 GtkWidget *page);
61 /**
62 * pidgin_prefs_labeled_spin_button:
63 * @page: The page to which the spin button will be added
64 * @title: The text to be displayed as the spin button label
65 * @key: The key of the int pref that will be represented by the spin button
66 * @min: The minimum value of the spin button
67 * @max: The maximum value of the spin button
68 * @sg: If not NULL, the size group to which the spin button will be added
70 * Add a new spin button representing an int preference
72 * Returns: An hbox containing both the label and the spinner. Can be
73 * used to set the widgets to sensitive or insensitive based on the
74 * value of a checkbox.
76 GtkWidget *pidgin_prefs_labeled_spin_button(GtkWidget *page,
77 const gchar *title, const char *key, int min, int max, GtkSizeGroup *sg);
79 /**
80 * pidgin_prefs_labeled_entry:
81 * @page: The page to which the entry will be added
82 * @title: The text to be displayed as the entry label
83 * @key: The key of the string pref that will be represented by the entry
84 * @sg: If not NULL, the size group to which the entry will be added
86 * Add a new entry representing a string preference
88 * Returns: An hbox containing both the label and the entry. Can be used to set
89 * the widgets to sensitive or insensitive based on the value of a
90 * checkbox.
92 GtkWidget *pidgin_prefs_labeled_entry(GtkWidget *page, const gchar *title,
93 const char *key, GtkSizeGroup *sg);
95 /**
96 * pidgin_prefs_labeled_password:
97 * @page: The page to which the entry will be added
98 * @title: The text to be displayed as the entry label
99 * @key: The key of the string pref that will be represented by the entry
100 * @sg: If not NULL, the size group to which the entry will be added
102 * Add a new entry representing a password (string) preference
103 * The entry will use a password-style text entry (the text is substituded)
105 * Returns: An hbox containing both the label and the entry. Can be used to set
106 * the widgets to sensitive or insensitive based on the value of a
107 * checkbox.
109 GtkWidget *pidgin_prefs_labeled_password(GtkWidget *page, const gchar *title,
110 const char *key, GtkSizeGroup *sg);
113 * pidgin_prefs_dropdown:
114 * @page: The page to which the dropdown will be added
115 * @title: The text to be displayed as the dropdown label
116 * @type: The type of preference to be stored in the generated dropdown
117 * @key: The key of the pref that will be represented by the dropdown
118 * @...: The choices to be added to the dropdown, choices should be
119 * paired as label/value
121 * Add a new dropdown representing a preference of the specified type
123 GtkWidget *pidgin_prefs_dropdown(GtkWidget *page, const gchar *title,
124 PurplePrefType type, const char *key, ...);
127 * pidgin_prefs_dropdown_from_list:
128 * @page: The page to which the dropdown will be added
129 * @title: The text to be displayed as the dropdown label
130 * @type: The type of preference to be stored in the dropdown
131 * @key: The key of the pref that will be represented by the dropdown
132 * @menuitems: The choices to be added to the dropdown, choices should
133 * be paired as label/value
135 * Add a new dropdown representing a preference of the specified type
137 GtkWidget *pidgin_prefs_dropdown_from_list(GtkWidget *page,
138 const gchar * title, PurplePrefType type, const char *key,
139 GList *menuitems);
142 * pidgin_prefs_update_old:
144 * Rename legacy prefs and delete some that no longer exist.
146 void pidgin_prefs_update_old(void);
148 G_END_DECLS
150 #endif /* _PIDGINPREFS_H_ */