Mercurial > pidgin
diff src/gtkprefs.h @ 7976:8e5a21b1efa6
[gaim-migrate @ 8653]
Daniel (not David) Atallah sent me this, which is useful for the plugin writing folk
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 03 Jan 2004 06:25:24 +0000 |
parents | 2a781d4178ba |
children | 4ed44e5e0df3 |
line wrap: on
line diff
--- a/src/gtkprefs.h Sat Jan 03 06:22:54 2004 +0000 +++ b/src/gtkprefs.h Sat Jan 03 06:25:24 2004 +0000 @@ -23,6 +23,7 @@ */ #ifndef _GAIM_GTK_PREFS_H_ #define _GAIM_GTK_PREFS_H_ +#include "prefs.h" /* XXX These should go. */ extern GtkListStore *prefs_away_store; @@ -51,4 +52,56 @@ void apply_color_dlg(GtkWidget *, gpointer); void destroy_colorsel(GtkWidget *, gpointer); +/** + * Add a new checkbox for a boolean preference + * + * @param title The text to be displayed as the checkbox label + * @param key The key of the gaim bool pref that will be represented by the checkbox + * @param page The page to which the new checkbox will be added + */ +GtkWidget *prefs_checkbox(const char *title, const char *key, + GtkWidget *page); + +/** + * Add a new spin button representing an int preference + * + * @param page The page to which the spin button will be added + * @param title The text to be displayed as the spin button label + * @param key The key of the gaim int pref that will be represented by the spin button + * @param min The minimum value of the spin button + * @param max The maximum value of the spin button + * @param sg If not NULL, the size group to which the spin button will be added + */ +GtkWidget *prefs_labeled_spin_button(GtkWidget *page, + const gchar *title, + char *key, int min, int max, + GtkSizeGroup *sg); + +/** + * Add a new dropdown representing a preference of the specified type + * + * @param page The page to which the spin button will be added + * @param title The text to be displayed as the spin button label + * @param type The type of preference to be stored in the generated dropdown + * @param key The key of the gaim int pref that will be represented by the spin button + * @param ... The choices to be added to the dropdown + */ +GtkWidget *prefs_dropdown(GtkWidget *page, const gchar *title, + GaimPrefType type, + const char *key, ...); + +/** + * Add a new dropdown representing a preference of the specified type + * + * @param page The page to which the spin button will be added + * @param title The text to be displayed as the spin button label + * @param type The type of preference to be stored in the generated dropdown + * @param key The key of the gaim int pref that will be represented by the spin button + * @param menuitems The choices to be added to the dropdown + */ +GtkWidget *prefs_dropdown_from_list(GtkWidget *page, + const gchar * title, + GaimPrefType type, const char *key, + GList *menuitems); + #endif /* _GAIM_GTK_PREFS_H_ */