src/gtkprefs.h

Sat, 21 Aug 2004 15:05:45 +0000

author
Stu Tomlinson <nosnilmot@pidgin.im>
date
Sat, 21 Aug 2004 15:05:45 +0000
changeset 9801
c061a7280591
parent 9713
bb37562302a1
child 10207
e6578b73e8bb
permissions
-rw-r--r--

[gaim-migrate @ 10669]
On Fri, 2004-08-20 at 23:57, Tim Ringenbach wrote:
> > relative buddy icon paths instead of absolute ones from nosnilmot. this
> > should save some headaches migrating a ~/.gaim around
> I think you broke something here. On start up I notice all buddy icons
> are fetched again, and they only show up in my buddy list, never my
> conversation window.

I did break something. I think the logic of "if the old file doesn't
exist, then delete the new one instead" when removing old icons isn't
exactly what I meant to do.

You were also correct to point out that prpls might use them directly -
oscar does.

Patch attached to fix both cases.

Regards,


Stu.

committer: Luke Schierer <lschiere@pidgin.im>

5530
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file gtkprefs.h GTK+ Preferences
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 * @ingroup gtkui
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 *
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 * gaim
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 *
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7987
diff changeset
7 * Gaim is the legal property of its developers, whose names are too numerous
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7987
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7987
diff changeset
9 * source distribution.
5530
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 *
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
ba1ad464b56f [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
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * (at your option) any later version.
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 *
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * GNU General Public License for more details.
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 *
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 *
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 */
9713
bb37562302a1 [gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents: 9422
diff changeset
26 #ifndef _GAIM_GTKPREFS_H_
bb37562302a1 [gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents: 9422
diff changeset
27 #define _GAIM_GTKPREFS_H_
bb37562302a1 [gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents: 9422
diff changeset
28
7976
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
29 #include "prefs.h"
5530
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 /* XXX These should go. */
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32 extern GtkListStore *prefs_away_store;
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 extern GtkWidget *prefs_away_menu;
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34 extern GtkWidget *pref_fg_picture;
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 extern GtkWidget *pref_bg_picture;
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37 /**
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
38 * Initializes all UI-specific preferences.
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39 */
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40 void gaim_gtk_prefs_init(void);
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 /**
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43 * Shows the preferences dialog.
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 */
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45 void gaim_gtk_prefs_show(void);
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47 /**
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48 * Initializes the default away menu.
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49 *
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50 * @todo This should be moved or renamed or something?
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 */
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 void default_away_menu_init(GtkWidget *);
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54 void apply_font_dlg(GtkWidget *, GtkWidget *);
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 void apply_color_dlg(GtkWidget *, gpointer);
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56 void destroy_colorsel(GtkWidget *, gpointer);
ba1ad464b56f [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57
7976
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
58 /**
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
59 * Add a new checkbox for a boolean preference
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
60 *
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
61 * @param title The text to be displayed as the checkbox label
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
62 * @param key The key of the gaim bool pref that will be represented by the checkbox
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
63 * @param page The page to which the new checkbox will be added
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
64 */
7987
3678cf633995 [gaim-migrate @ 8664]
Nathan Walp <nwalp@pidgin.im>
parents: 7978
diff changeset
65 GtkWidget *gaim_gtk_prefs_checkbox(const char *title, const char *key,
3678cf633995 [gaim-migrate @ 8664]
Nathan Walp <nwalp@pidgin.im>
parents: 7978
diff changeset
66 GtkWidget *page);
7976
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
67
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
68 /**
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
69 * Add a new spin button representing an int preference
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
70 *
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
71 * @param page The page to which the spin button will be added
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
72 * @param title The text to be displayed as the spin button label
7987
3678cf633995 [gaim-migrate @ 8664]
Nathan Walp <nwalp@pidgin.im>
parents: 7978
diff changeset
73 * @param key The key of the int pref that will be represented by the spin button
7976
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
74 * @param min The minimum value of the spin button
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
75 * @param max The maximum value of the spin button
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
76 * @param sg If not NULL, the size group to which the spin button will be added
8238
f7d22f952df5 [gaim-migrate @ 8961]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
77 * @return An hbox containing both the label and the spinner. Can be
8735
01248ea222d3 [gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents: 8713
diff changeset
78 * used to set the widgets to sensitive or insensitive based on the
8238
f7d22f952df5 [gaim-migrate @ 8961]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
79 * value of a checkbox.
7976
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
80 */
7987
3678cf633995 [gaim-migrate @ 8664]
Nathan Walp <nwalp@pidgin.im>
parents: 7978
diff changeset
81 GtkWidget *gaim_gtk_prefs_labeled_spin_button(GtkWidget *page,
3678cf633995 [gaim-migrate @ 8664]
Nathan Walp <nwalp@pidgin.im>
parents: 7978
diff changeset
82 const gchar *title, char *key, int min, int max, GtkSizeGroup *sg);
7976
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
83
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
84 /**
9422
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
85 * Add a new entry representing a string preference
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
86 *
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
87 * @param page The page to which the entry will be added
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
88 * @param title The text to be displayed as the entry label
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
89 * @param key The key of the string pref that will be represented by the entry
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
90 * @param sg If not NULL, the size group to which the entry will be added
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
91 *
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
92 * @return An hbox containing both the label and the entry. Can be used to set
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
93 * the widgets to sensitive or insensitive based on the value of a
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
94 * checkbox.
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
95 */
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
96 GtkWidget *gaim_gtk_prefs_labeled_entry(GtkWidget *page, const gchar *title,
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
97 char *key, GtkSizeGroup *sg);
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
98
fda18b808f1c [gaim-migrate @ 10240]
Gary Kramlich <grim@pidgin.im>
parents: 8905
diff changeset
99 /**
7976
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
100 * Add a new dropdown representing a preference of the specified type
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
101 *
7978
de1f34b43e0b [gaim-migrate @ 8655]
Nathan Walp <nwalp@pidgin.im>
parents: 7976
diff changeset
102 * @param page The page to which the dropdown will be added
de1f34b43e0b [gaim-migrate @ 8655]
Nathan Walp <nwalp@pidgin.im>
parents: 7976
diff changeset
103 * @param title The text to be displayed as the dropdown label
7976
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
104 * @param type The type of preference to be stored in the generated dropdown
7987
3678cf633995 [gaim-migrate @ 8664]
Nathan Walp <nwalp@pidgin.im>
parents: 7978
diff changeset
105 * @param key The key of the pref that will be represented by the dropdown
8713
8a7baa8f8460 [gaim-migrate @ 9467]
Gary Kramlich <grim@pidgin.im>
parents: 8705
diff changeset
106 * @param ... The choices to be added to the dropdown, choices should be
8a7baa8f8460 [gaim-migrate @ 9467]
Gary Kramlich <grim@pidgin.im>
parents: 8705
diff changeset
107 * paired as label/value
7976
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
108 */
7987
3678cf633995 [gaim-migrate @ 8664]
Nathan Walp <nwalp@pidgin.im>
parents: 7978
diff changeset
109 GtkWidget *gaim_gtk_prefs_dropdown(GtkWidget *page, const gchar *title,
3678cf633995 [gaim-migrate @ 8664]
Nathan Walp <nwalp@pidgin.im>
parents: 7978
diff changeset
110 GaimPrefType type, const char *key, ...);
7976
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
111
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
112 /**
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
113 * Add a new dropdown representing a preference of the specified type
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
114 *
7978
de1f34b43e0b [gaim-migrate @ 8655]
Nathan Walp <nwalp@pidgin.im>
parents: 7976
diff changeset
115 * @param page The page to which the dropdown will be added
de1f34b43e0b [gaim-migrate @ 8655]
Nathan Walp <nwalp@pidgin.im>
parents: 7976
diff changeset
116 * @param title The text to be displayed as the dropdown label
7987
3678cf633995 [gaim-migrate @ 8664]
Nathan Walp <nwalp@pidgin.im>
parents: 7978
diff changeset
117 * @param type The type of preference to be stored in the dropdown
3678cf633995 [gaim-migrate @ 8664]
Nathan Walp <nwalp@pidgin.im>
parents: 7978
diff changeset
118 * @param key The key of the pref that will be represented by the dropdown
8713
8a7baa8f8460 [gaim-migrate @ 9467]
Gary Kramlich <grim@pidgin.im>
parents: 8705
diff changeset
119 * @param menuitems The choices to be added to the dropdown, choices should
8a7baa8f8460 [gaim-migrate @ 9467]
Gary Kramlich <grim@pidgin.im>
parents: 8705
diff changeset
120 * be paired as label/value
7976
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
121 */
7987
3678cf633995 [gaim-migrate @ 8664]
Nathan Walp <nwalp@pidgin.im>
parents: 7978
diff changeset
122 GtkWidget *gaim_gtk_prefs_dropdown_from_list(GtkWidget *page,
3678cf633995 [gaim-migrate @ 8664]
Nathan Walp <nwalp@pidgin.im>
parents: 7978
diff changeset
123 const gchar * title, GaimPrefType type, const char *key,
3678cf633995 [gaim-migrate @ 8664]
Nathan Walp <nwalp@pidgin.im>
parents: 7978
diff changeset
124 GList *menuitems);
7976
fa3b5ed4ac97 [gaim-migrate @ 8653]
Daniel Atallah <datallah@pidgin.im>
parents: 7931
diff changeset
125
8905
cedfa637389f [gaim-migrate @ 9674]
Mark Doliner <markdoliner@pidgin.im>
parents: 8900
diff changeset
126 /**
cedfa637389f [gaim-migrate @ 9674]
Mark Doliner <markdoliner@pidgin.im>
parents: 8900
diff changeset
127 * Rename legacy prefs and delete some that no longer exist.
cedfa637389f [gaim-migrate @ 9674]
Mark Doliner <markdoliner@pidgin.im>
parents: 8900
diff changeset
128 */
cedfa637389f [gaim-migrate @ 9674]
Mark Doliner <markdoliner@pidgin.im>
parents: 8900
diff changeset
129 void gaim_gtk_prefs_update_old();
cedfa637389f [gaim-migrate @ 9674]
Mark Doliner <markdoliner@pidgin.im>
parents: 8900
diff changeset
130
9713
bb37562302a1 [gaim-migrate @ 10574]
Mark Doliner <markdoliner@pidgin.im>
parents: 9422
diff changeset
131 #endif /* _GAIM_GTKPREFS_H_ */

mercurial