annotate src/gtkprefs.h @ 9522:4399fc6e667a

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