Mercurial > pidgin
annotate src/prefs.c @ 3393:2a34734f6a0d
[gaim-migrate @ 3412]
Fixed potential security vulnerability
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 11 Aug 2002 09:03:32 +0000 |
parents | 412d1035d666 |
children | 1be15204741f |
rev | line source |
---|---|
1 | 1 /* |
2 * gaim | |
3 * | |
3366 | 4 * Copyright (C) 1998-2002, Mark Spencer <markster@marko.net> |
1 | 5 * |
6 * This program is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 * | |
20 */ | |
21 | |
349
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
340
diff
changeset
|
22 #ifdef HAVE_CONFIG_H |
2090
b66aca8e8dce
[gaim-migrate @ 2100]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2074
diff
changeset
|
23 #include <config.h> |
349
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
340
diff
changeset
|
24 #endif |
1 | 25 #include <string.h> |
26 #include <sys/time.h> | |
27 | |
28 #include <sys/types.h> | |
29 #include <sys/stat.h> | |
30 | |
31 #include <unistd.h> | |
32 #include <stdio.h> | |
33 #include <stdlib.h> | |
970 | 34 #include <stdarg.h> |
3379 | 35 #include <ctype.h> |
1 | 36 #include <gtk/gtk.h> |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
37 #include "gtkimhtml.h" |
1 | 38 #include "gaim.h" |
1357
783ba886b6b6
[gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1324
diff
changeset
|
39 #include "prpl.h" |
3366 | 40 #include "proxy.h" |
41 | |
42 /* xpms for gtk1.2 */ | |
43 #if !GTK_CHECK_VERSION (1,3,0) | |
588 | 44 #include "pixmaps/cancel.xpm" |
595 | 45 #include "pixmaps/fontface2.xpm" |
617 | 46 #include "pixmaps/gnome_add.xpm" |
47 #include "pixmaps/gnome_remove.xpm" | |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
48 #include "pixmaps/gnome_preferences.xpm" |
855
82673bb41e2f
[gaim-migrate @ 865]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
834
diff
changeset
|
49 #include "pixmaps/bgcolor.xpm" |
82673bb41e2f
[gaim-migrate @ 865]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
834
diff
changeset
|
50 #include "pixmaps/fgcolor.xpm" |
821 | 51 #include "pixmaps/save.xpm" |
3366 | 52 #include "pixmaps/ok.xpm" |
53 #include "pixmaps/join.xpm" | |
54 #endif | |
1 | 55 |
56 | |
3366 | 57 /* temporary preferences */ |
58 static guint misc_options_new; | |
59 static guint logging_options_new; | |
60 static guint blist_options_new; | |
61 static guint convo_options_new; | |
62 static guint im_options_new; | |
63 static guint chat_options_new; | |
64 static guint font_options_new; | |
65 static guint sound_options_new; | |
66 static char *sound_file_new[NUM_SOUNDS]; | |
67 static guint away_options_new; | |
68 static guint away_resend_new; | |
69 static int auto_away_new; | |
70 static int report_idle_new; | |
71 static int proxytype_new; | |
72 static struct away_message* default_away_new; | |
73 static int web_browser_new; | |
74 static char sound_cmd_new[2048]; | |
75 static char web_command_new[2048]; | |
76 static int fontsize_new; | |
77 GdkColor fgcolor_new, bgcolor_new; | |
78 static struct window_size conv_size_new, buddy_chat_size_new; | |
79 char fontface_new[128]; | |
80 #if !GTK_CHECK_VERSION(1,3,0) | |
81 char fontxfld_new[256]; | |
82 char fontfacexfld[256]; | |
83 #endif | |
84 char fontface[128]; | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
85 |
1175 | 86 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
87 GtkWidget *prefs_away_list = NULL; |
1109
c73736fa0b7c
[gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1087
diff
changeset
|
88 GtkWidget *prefs_away_menu = NULL; |
1124
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
89 GtkWidget *preftree = NULL; |
3366 | 90 GtkWidget *fontseld = NULL; |
91 | |
92 #if GTK_CHECK_VERSION(1,3,0) | |
3379 | 93 GtkListStore *prefs_away_store = NULL; |
3366 | 94 #endif |
95 | |
96 static int sound_row_sel = 0; | |
97 static char *last_sound_dir = NULL; | |
98 | |
99 static GtkWidget *sounddialog = NULL; | |
100 static GtkWidget *browser_entry = NULL; | |
101 static GtkWidget *sound_entry = NULL; | |
102 static GtkWidget *away_text = NULL; | |
1124
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
103 GtkCTreeNode *general_node = NULL; |
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
104 GtkCTreeNode *deny_node = NULL; |
2254 | 105 GtkWidget *prefs_proxy_frame = NULL; |
3366 | 106 static GtkWidget *gaim_button(const char *, guint *, int, GtkWidget *); |
107 GtkWidget *gaim_labeled_spin_button(GtkWidget *, const gchar *, int*, int, int); | |
108 static GtkWidget *gaim_dropdown(GtkWidget *, const gchar *, int *, int, ...); | |
109 static GtkWidget *show_color_pref(GtkWidget *, gboolean); | |
110 static void delete_prefs(GtkWidget *, void *); | |
111 void set_default_away(GtkWidget *, gpointer); | |
1026 | 112 |
3366 | 113 struct debug_window *dw = NULL; |
114 static GtkWidget *prefs = NULL; | |
115 GtkWidget *debugbutton = NULL; | |
1525
ba8e6e211af5
[gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1455
diff
changeset
|
116 |
3366 | 117 void delete_prefs(GtkWidget *asdf, void *gdsa) { |
118 int v; | |
119 | |
120 prefs = NULL; | |
121 for (v = 0; v < NUM_SOUNDS; v++) { | |
122 if (sound_file_new[v]) | |
123 g_free(sound_file_new[v]); | |
124 sound_file_new[v] = NULL; | |
125 } | |
126 sound_entry = NULL; | |
127 browser_entry = NULL; | |
128 debugbutton=NULL; | |
3379 | 129 if(sounddialog) |
130 gtk_widget_destroy(sounddialog); | |
3366 | 131 #if GTK_CHECK_VERSION(1,3,0) |
132 g_object_unref(G_OBJECT(prefs_away_store)); | |
133 #endif | |
1525
ba8e6e211af5
[gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1455
diff
changeset
|
134 } |
ba8e6e211af5
[gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1455
diff
changeset
|
135 |
3366 | 136 GtkWidget *preflabel; |
137 GtkWidget *prefsnotebook; | |
138 #if GTK_CHECK_VERSION(1,3,0) | |
139 GtkTreeStore *prefstree; | |
140 #else | |
141 GtkWidget *prefstree; | |
1750
d2eca7a46cfd
[gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1711
diff
changeset
|
142 #endif |
d2eca7a46cfd
[gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1711
diff
changeset
|
143 |
3366 | 144 static void set_misc_options(); |
145 static void set_logging_options(); | |
146 static void set_blist_options(); | |
147 static void set_convo_options(); | |
148 static void set_im_options(); | |
149 static void set_chat_options(); | |
150 static void set_font_options(); | |
151 static void set_sound_options(); | |
152 static void set_away_options(); | |
1750
d2eca7a46cfd
[gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1711
diff
changeset
|
153 |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
154 #define PROXYHOST 0 |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
155 #define PROXYPORT 1 |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
156 #define PROXYTYPE 2 |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
157 #define PROXYUSER 3 |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
158 #define PROXYPASS 4 |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
159 static void proxy_print_option(GtkEntry *entry, int entrynum) |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
160 { |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2323
diff
changeset
|
161 if (entrynum == PROXYHOST) |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
162 g_snprintf(proxyhost, sizeof(proxyhost), "%s", gtk_entry_get_text(entry)); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
163 else if (entrynum == PROXYPORT) |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
164 proxyport = atoi(gtk_entry_get_text(entry)); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
165 else if (entrynum == PROXYUSER) |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
166 g_snprintf(proxyuser, sizeof(proxyuser), "%s", gtk_entry_get_text(entry)); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
167 else if (entrynum == PROXYPASS) |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
168 g_snprintf(proxypass, sizeof(proxypass), "%s", gtk_entry_get_text(entry)); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
169 save_prefs(); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
170 } |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
171 |
3366 | 172 |
173 /* OK, Apply and Cancel */ | |
174 | |
175 static void apply_cb(GtkWidget *button, void *data) | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
176 { |
3366 | 177 int r; |
178 if (misc_options != misc_options_new) | |
179 set_misc_options(); | |
180 if (logging_options != logging_options_new) | |
181 set_logging_options(); | |
182 if (blist_options != blist_options_new) | |
183 set_blist_options(); | |
184 if (convo_options != convo_options_new) | |
185 set_convo_options(); | |
186 if (im_options != im_options_new) | |
187 set_im_options(); | |
188 if (chat_options != chat_options_new) | |
189 set_chat_options(); | |
190 chat_options = chat_options_new; | |
191 if (font_options != font_options_new) | |
192 set_font_options(); | |
193 if (sound_options != sound_options_new) | |
194 set_sound_options(); | |
195 for (r = 0; r < NUM_SOUNDS; r++) { | |
196 if (sound_file[r]) | |
197 g_free(sound_file[r]); | |
198 sound_file[r] = sound_file_new[r]; | |
199 sound_file_new[r] = NULL; | |
200 } | |
201 if (away_options != away_options_new) | |
202 set_away_options(); | |
203 away_resend = away_resend_new; | |
204 auto_away = auto_away_new; | |
205 report_idle = report_idle_new; | |
206 web_browser = web_browser_new; | |
207 proxytype = proxytype_new; | |
208 default_away = default_away_new; | |
209 fontsize = fontsize_new; | |
210 g_snprintf(sound_cmd, sizeof(sound_cmd), "%s", sound_cmd_new); | |
211 g_snprintf(web_command, sizeof(web_command), "%s", web_command_new); | |
212 memcpy(&conv_size, &conv_size_new, sizeof(struct window_size)); | |
213 memcpy(&conv_size, &conv_size_new, sizeof(struct window_size)); | |
214 memcpy(&fgcolor, &fgcolor_new, sizeof(GdkColor)); | |
215 memcpy(&bgcolor, &bgcolor_new, sizeof(GdkColor)); | |
2254 | 216 |
3366 | 217 |
218 g_snprintf(fontface, sizeof(fontface), fontface_new); | |
219 #if !GTK_CHECK_VERSION(1,3,0) | |
220 g_snprintf(fontxfld, sizeof(fontxfld), fontxfld_new); | |
221 #endif | |
222 update_convo_font(); | |
223 update_convo_color(); | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
224 save_prefs(); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
225 } |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
226 |
3366 | 227 |
228 static void ok_cb(GtkWidget *button, void *data) | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
229 { |
3366 | 230 apply_cb(button, data); |
231 gtk_widget_destroy(prefs); | |
232 } | |
233 #if GTK_CHECK_VERSION(1,3,0) | |
234 static void pref_nb_select(GtkTreeSelection *sel, GtkNotebook *nb) { | |
235 GtkTreeIter iter; | |
236 GValue val = { 0, }; | |
237 GtkTreeModel *model = GTK_TREE_MODEL(prefstree); | |
238 | |
239 if (! gtk_tree_selection_get_selected (sel, &model, &iter)) | |
240 return; | |
241 gtk_tree_model_get_value (model, &iter, 1, &val); | |
242 gtk_label_set_text (GTK_LABEL(preflabel), g_value_get_string (&val)); | |
243 g_value_unset (&val); | |
244 gtk_tree_model_get_value (model, &iter, 2, &val); | |
245 gtk_notebook_set_current_page (GTK_NOTEBOOK (prefsnotebook), g_value_get_int (&val)); | |
246 | |
247 } | |
248 #else | |
249 static void pref_nb_select(GtkCTree *ctree, GtkCTreeNode *node, gint column, GtkNotebook *nb) { | |
250 char *text; | |
251 gtk_ctree_get_node_info(GTK_CTREE(ctree), node, &text, NULL, NULL, NULL, NULL, NULL, NULL, NULL); | |
252 gtk_label_set_text (GTK_LABEL(preflabel), text); | |
253 gtk_notebook_set_page (GTK_NOTEBOOK (prefsnotebook), gtk_ctree_node_get_row_data(GTK_CTREE(ctree), node)); | |
254 | |
255 } | |
256 #endif /* GTK_CHECK_VERSION */ | |
257 | |
258 /* These are the pages in the preferences notebook */ | |
259 GtkWidget *interface_page() { | |
260 GtkWidget *ret; | |
261 GtkWidget *frame; | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
262 GtkWidget *vbox; |
3366 | 263 ret = gtk_vbox_new(FALSE, 5); |
264 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
265 | |
266 /* All the pages are pretty similar--a vbox packed with frames... */ | |
267 frame = gtk_frame_new (_("Windows")); | |
268 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
269 gtk_widget_show (frame); | |
270 | |
271 /* And a vbox in each frame */ | |
272 vbox = gtk_vbox_new(FALSE, 5); | |
273 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
274 | |
275 /* These shouldn't have to wait for user to click OK or APPLY or whatnot */ | |
276 /* They really shouldn't be in preferences at all */ | |
277 debugbutton = gaim_button(_("Show Debug Window"), &misc_options, OPT_MISC_DEBUG, vbox); | |
278 gtk_widget_show (vbox); | |
279 | |
280 | |
281 frame = gtk_frame_new (_("Style")); | |
282 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
283 gtk_widget_show (frame); | |
284 | |
285 vbox = gtk_vbox_new(FALSE, 5); | |
286 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
287 gaim_button(_("Use borderless buttons"), &misc_options_new, OPT_MISC_COOL_LOOK, vbox); | |
288 gtk_widget_show (vbox); | |
289 | |
290 gtk_widget_show(ret); | |
291 return ret; | |
292 } | |
293 | |
294 GtkWidget *font_page() { | |
295 GtkWidget *ret; | |
2254 | 296 GtkWidget *frame; |
3366 | 297 GtkWidget *button; |
298 GtkWidget *vbox, *hbox; | |
299 GtkWidget *select = NULL; | |
300 ret = gtk_vbox_new(FALSE, 5); | |
301 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
302 | |
303 frame = gtk_frame_new (_("Style")); | |
304 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
305 gtk_widget_show (frame); | |
306 | |
307 vbox = gtk_vbox_new(FALSE, 5); | |
308 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
309 gaim_button(_("Bold"), &font_options_new, OPT_FONT_BOLD, vbox); | |
310 gaim_button(_("Italics"), &font_options_new, OPT_FONT_ITALIC, vbox); | |
311 gaim_button(_("Underline"), &font_options_new, OPT_FONT_UNDERLINE, vbox); | |
312 gaim_button(_("Strikethough"), &font_options_new, OPT_FONT_STRIKE, vbox); | |
313 gtk_widget_show (vbox); | |
314 | |
315 | |
316 frame = gtk_frame_new (_("Face")); | |
317 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
318 gtk_widget_show (frame); | |
319 | |
320 vbox = gtk_vbox_new(FALSE, 5); | |
321 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
322 hbox = gtk_hbox_new(FALSE, 5); | |
323 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
324 button = gaim_button(_("Use custom face"), &font_options_new, OPT_FONT_FACE, hbox); | |
325 #if GTK_CHECK_VERSION(1,3,0) | |
326 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_FONT); | |
327 #else | |
328 select = picture_button(prefs, _("Select"), fontface2_xpm); | |
329 #endif | |
330 if (!(font_options_new & OPT_FONT_FACE)) | |
331 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); | |
332 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); | |
333 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_font_dialog), NULL); | |
334 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | |
335 if (misc_options & OPT_MISC_COOL_LOOK) | |
336 gtk_button_set_relief(GTK_BUTTON(select), GTK_RELIEF_NONE); | |
337 gtk_widget_show(select); | |
338 gtk_widget_show(hbox); | |
339 | |
340 hbox = gtk_hbox_new(FALSE, 5); | |
341 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
342 button = gaim_button(_("Use custom size"), &font_options_new, OPT_FONT_SIZE, hbox); | |
343 select = gaim_labeled_spin_button(hbox, NULL, &fontsize_new, 1, 7); | |
344 if (!(font_options_new & OPT_FONT_SIZE)) | |
345 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); | |
346 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); | |
347 gtk_widget_show(hbox); | |
348 gtk_widget_show (vbox); | |
349 | |
350 | |
351 frame = gtk_frame_new ("Color"); | |
352 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
353 gtk_widget_show (frame); | |
354 vbox = gtk_vbox_new(FALSE, 5); | |
355 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
356 hbox = gtk_hbox_new(FALSE, 5); | |
357 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
358 | |
359 pref_fg_picture = show_color_pref(hbox, TRUE); | |
360 button = gaim_button(_("Text color"), &font_options_new, OPT_FONT_FGCOL, hbox); | |
361 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), | |
362 pref_fg_picture); | |
363 | |
364 #if GTK_CHECK_VERSION(1,3,0) | |
365 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); | |
366 #else | |
367 select = picture_button(prefs, _("Select"), fgcolor_xpm); | |
368 #endif | |
369 if (!(font_options_new & OPT_FONT_FGCOL)) | |
370 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); | |
371 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); | |
372 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_fgcolor_dialog), NULL); | |
373 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | |
374 if (misc_options & OPT_MISC_COOL_LOOK) | |
375 gtk_button_set_relief(GTK_BUTTON(select), GTK_RELIEF_NONE); | |
376 gtk_widget_show(select); | |
377 gtk_widget_show(hbox); | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
378 |
3366 | 379 hbox = gtk_hbox_new(FALSE, 5); |
380 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
381 pref_bg_picture = show_color_pref(hbox, FALSE); | |
382 button = gaim_button(_("Background color"), &font_options_new, OPT_FONT_BGCOL, hbox); | |
383 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), | |
384 pref_bg_picture); | |
385 #if GTK_CHECK_VERSION(1,3,0) | |
386 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); | |
387 #else | |
388 select = picture_button(prefs, _("Select"), bgcolor_xpm); | |
389 #endif | |
390 if (!(font_options_new & OPT_FONT_BGCOL)) | |
391 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); | |
392 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_bgcolor_dialog), NULL); | |
393 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); | |
394 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | |
395 if (misc_options & OPT_MISC_COOL_LOOK) | |
396 gtk_button_set_relief(GTK_BUTTON(select), GTK_RELIEF_NONE); | |
397 gtk_widget_show(select); | |
398 gtk_widget_show(hbox); | |
399 gtk_widget_show (vbox); | |
400 | |
401 | |
402 gtk_widget_show(ret); | |
403 return ret; | |
404 } | |
405 | |
406 | |
407 GtkWidget *messages_page() { | |
408 GtkWidget *ret; | |
409 GtkWidget *frame; | |
410 GtkWidget *vbox; | |
411 ret = gtk_vbox_new(FALSE, 5); | |
412 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
413 | |
414 frame = gtk_frame_new ("Display"); | |
415 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
416 gtk_widget_show (frame); | |
417 | |
418 vbox = gtk_vbox_new(FALSE, 5); | |
419 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
420 gaim_button(_("Show graphical smileys"), &convo_options_new, OPT_CONVO_SHOW_SMILEY, vbox); | |
421 gaim_button(_("Show timestamp on messages"), &convo_options_new, OPT_CONVO_SHOW_TIME, vbox); | |
422 gaim_button(_("Show URLs as links"), &convo_options_new, OPT_CONVO_SEND_LINKS, vbox); | |
423 gaim_button(_("Highlight misspelled words"), &convo_options_new, OPT_CONVO_CHECK_SPELLING, vbox); | |
424 gtk_widget_show (vbox); | |
425 | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
426 |
3366 | 427 frame = gtk_frame_new ("Ignore"); |
428 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
429 gtk_widget_show (frame); | |
430 | |
431 vbox = gtk_vbox_new(FALSE, 5); | |
432 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
433 gaim_button(_("Ignore colors"), &convo_options_new, OPT_CONVO_IGNORE_COLOUR, vbox); | |
434 gaim_button(_("Ignore font faces"), &convo_options_new, OPT_CONVO_IGNORE_FONTS, vbox); | |
435 gaim_button(_("Ignore font sizes"), &convo_options_new, OPT_CONVO_IGNORE_SIZES, vbox); | |
436 gaim_button(_("Ignore TiK Automated Messages"), &away_options_new, OPT_AWAY_TIK_HACK, vbox); | |
437 gtk_widget_show (vbox); | |
438 | |
439 gtk_widget_show(ret); | |
440 return ret; | |
441 } | |
442 | |
443 GtkWidget *hotkeys_page() { | |
444 GtkWidget *ret; | |
445 GtkWidget *frame; | |
446 GtkWidget *vbox; | |
447 ret = gtk_vbox_new(FALSE, 5); | |
448 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
449 | |
450 frame = gtk_frame_new ("Send Message"); | |
451 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
452 gtk_widget_show (frame); | |
453 | |
454 vbox = gtk_vbox_new(FALSE, 5); | |
455 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
456 gaim_button(_("Enter sends message"), &convo_options_new, OPT_CONVO_ENTER_SENDS, vbox); | |
457 gaim_button(_("Control-Enter sends message"), &convo_options_new, OPT_CONVO_CTL_ENTER, vbox); | |
458 gtk_widget_show (vbox); | |
459 | |
460 frame = gtk_frame_new ("Window Closing"); | |
461 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
462 gtk_widget_show (frame); | |
463 | |
464 vbox = gtk_vbox_new(FALSE, 5); | |
465 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
466 gaim_button(_("Escape closes window"), &convo_options_new, OPT_CONVO_ESC_CAN_CLOSE, vbox); | |
467 gaim_button(_("Control-W closes window"), &convo_options_new, OPT_CONVO_CTL_W_CLOSES, vbox); | |
468 gtk_widget_show (vbox); | |
469 | |
470 | |
471 frame = gtk_frame_new ("Insertions"); | |
472 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
473 gtk_widget_show (frame); | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
474 |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
475 vbox = gtk_vbox_new(FALSE, 5); |
3366 | 476 gtk_container_add (GTK_CONTAINER (frame), vbox); |
477 gaim_button(_("Control-{B/I/U/S} inserts HTML tags"), &convo_options_new, OPT_CONVO_CTL_CHARS, vbox); | |
478 gaim_button(_("Control-(number) inserts smileys"), &convo_options_new, OPT_CONVO_CTL_SMILEYS, vbox); | |
479 gtk_widget_show (vbox); | |
480 | |
481 gtk_widget_show(ret); | |
482 return ret; | |
483 } | |
484 | |
485 GtkWidget *list_page() { | |
486 GtkWidget *ret; | |
487 GtkWidget *frame; | |
488 GtkWidget *vbox; | |
489 ret = gtk_vbox_new(FALSE, 5); | |
490 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
491 | |
492 frame = gtk_frame_new ("Buttons"); | |
493 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
494 gtk_widget_show (frame); | |
495 vbox = gtk_vbox_new(FALSE, 5); | |
496 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
497 gaim_button(_("Hide IM/Info/Chat buttons"), &blist_options_new, OPT_BLIST_NO_BUTTONS, vbox); | |
498 gaim_button(_("Show pictures on buttons"), &blist_options_new, OPT_BLIST_SHOW_BUTTON_XPM, vbox); | |
499 gtk_widget_show (vbox); | |
500 | |
501 | |
502 frame = gtk_frame_new ("Buddy List Window"); | |
503 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
504 gtk_widget_show (frame); | |
505 vbox = gtk_vbox_new(FALSE, 5); | |
506 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
507 #ifdef USE_APPLET | |
508 gaim_button(_("Automatically show buddy list on sign on"), &blist_options_new, | |
509 OPT_BLIST_APP_BUDDY_SHOW, vbox); | |
510 gaim_button(_("Display Buddy List near applet"), &blist_options_new, OPT_BLIST_NEAR_APPLET, vbox); | |
511 | |
512 #endif | |
513 gaim_button(_("Save Window Size/Position"), &blist_options_new, OPT_BLIST_SAVED_WINDOWS, vbox); | |
514 gaim_button(_("Raise Window on Events"), &blist_options_new, OPT_BLIST_POPUP, vbox); | |
515 gtk_widget_show(vbox); | |
516 | |
517 | |
518 frame = gtk_frame_new ("Group Display"); | |
519 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
520 gtk_widget_show (frame); | |
521 vbox = gtk_vbox_new(FALSE, 5); | |
522 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
523 gaim_button(_("Hide groups with no online buddies"), &blist_options_new, OPT_BLIST_NO_MT_GRP, vbox); | |
524 gaim_button(_("Show numbers in groups"), &blist_options_new, OPT_BLIST_SHOW_GRPNUM, vbox); | |
525 gtk_widget_show(vbox); | |
526 | |
527 | |
528 frame = gtk_frame_new ("Buddy Display"); | |
529 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
530 gtk_widget_show (frame); | |
531 vbox = gtk_vbox_new(FALSE, 5); | |
532 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
533 gaim_button(_("Show buddy type icons"), &blist_options_new, OPT_BLIST_SHOW_PIXMAPS, vbox); | |
534 gaim_button(_("Show warning levels"), &blist_options_new, OPT_BLIST_SHOW_WARN, vbox); | |
535 gaim_button(_("Show idle times"), &blist_options_new, OPT_BLIST_SHOW_IDLETIME, vbox); | |
536 gaim_button(_("Grey idle buddies"), &blist_options_new, OPT_BLIST_GREY_IDLERS, vbox); | |
537 gtk_widget_show(vbox); | |
538 | |
539 | |
540 | |
541 gtk_widget_show (vbox); | |
542 | |
543 gtk_widget_show(ret); | |
544 return ret; | |
545 } | |
546 | |
547 GtkWidget *im_page() { | |
548 GtkWidget *ret; | |
549 GtkWidget *frame; | |
550 GtkWidget *vbox; | |
551 GtkWidget *typingbutton; | |
552 | |
553 ret = gtk_vbox_new(FALSE, 5); | |
554 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
555 | |
556 frame = gtk_frame_new ("Window"); | |
557 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
558 gtk_widget_show (frame); | |
559 vbox = gtk_vbox_new(FALSE, 5); | |
560 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
561 gaim_dropdown(vbox, "Show buttons as:", &im_options_new, OPT_IM_BUTTON_TEXT | OPT_IM_BUTTON_XPM, | |
562 "Pictures", OPT_IM_BUTTON_XPM, | |
563 "Text", OPT_IM_BUTTON_TEXT, | |
564 "Pictures and text", OPT_IM_BUTTON_XPM | OPT_IM_BUTTON_TEXT, NULL); | |
565 gaim_labeled_spin_button(vbox, _("New window width:"), &conv_size_new.width, 25, 9999); | |
566 gaim_labeled_spin_button(vbox, _("New window height:"), &conv_size_new.height, 25, 9999); | |
567 gaim_labeled_spin_button(vbox, _("Entry widget height:"), &conv_size_new.entry_height, 25, 9999); | |
568 gaim_button(_("Raise windows on events"), &im_options_new, OPT_IM_POPUP, vbox); | |
569 gaim_button(_("Hide window on send"), &im_options_new, OPT_IM_POPDOWN, vbox); | |
570 gtk_widget_show (vbox); | |
571 | |
572 | |
573 frame = gtk_frame_new ("Buddy Icons"); | |
574 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
575 gtk_widget_show (frame); | |
576 vbox = gtk_vbox_new(FALSE, 5); | |
577 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
578 gaim_button(_("Hide Buddy Icons"), &im_options_new, OPT_IM_HIDE_ICONS, vbox); | |
579 gaim_button(_("Disable Buddy Icon Animation"), &im_options_new, OPT_IM_NO_ANIMATION, vbox); | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
580 gtk_widget_show(vbox); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
581 |
3366 | 582 |
583 frame = gtk_frame_new ("Display"); | |
584 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
585 gtk_widget_show (frame); | |
586 vbox = gtk_vbox_new(FALSE, 5); | |
587 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
588 gaim_button(_("Show logins in window"), &im_options_new, OPT_IM_LOGON, vbox); | |
589 gtk_widget_show(vbox); | |
590 | |
591 | |
592 frame = gtk_frame_new ("Typing Notification"); | |
593 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
594 gtk_widget_show (frame); | |
595 vbox = gtk_vbox_new(FALSE, 5); | |
596 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
597 typingbutton = gaim_button(_("Notify buddies that you are typing to them"), &misc_options_new, | |
598 OPT_MISC_STEALTH_TYPING, vbox); | |
599 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(typingbutton), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(typingbutton))); | |
600 misc_options ^= OPT_MISC_STEALTH_TYPING; | |
601 gtk_widget_show(vbox); | |
602 | |
603 | |
604 | |
605 gtk_widget_show (vbox); | |
606 | |
607 gtk_widget_show(ret); | |
608 return ret; | |
609 } | |
610 | |
611 GtkWidget *chat_page() { | |
612 GtkWidget *ret; | |
613 GtkWidget *frame; | |
614 GtkWidget *vbox; | |
615 ret = gtk_vbox_new(FALSE, 5); | |
616 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
617 | |
618 frame = gtk_frame_new ("Window"); | |
619 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
620 gtk_widget_show (frame); | |
621 vbox = gtk_vbox_new(FALSE, 5); | |
622 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
623 gaim_dropdown(vbox, "Show buttons as:", &chat_options_new, OPT_CHAT_BUTTON_TEXT | OPT_CHAT_BUTTON_XPM, | |
624 "Pictures", OPT_CHAT_BUTTON_XPM, | |
625 "Text", OPT_CHAT_BUTTON_TEXT, | |
626 "Pictures and Text", OPT_CHAT_BUTTON_XPM | OPT_CHAT_BUTTON_TEXT, NULL); | |
627 gaim_labeled_spin_button(vbox, _("New window width:"), &buddy_chat_size_new.width, 25, 9999); | |
628 gaim_labeled_spin_button(vbox, _("New window height:"), &buddy_chat_size_new.height, 25, 9999); | |
629 gaim_labeled_spin_button(vbox, _("Entry widget height:"), &buddy_chat_size_new.entry_height, 25, 9999); | |
630 gaim_button(_("Raise windows on events"), &chat_options, OPT_CHAT_POPUP, vbox); | |
631 gtk_widget_show (vbox); | |
632 | |
633 | |
634 frame = gtk_frame_new ("Tab Completion"); | |
635 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
636 gtk_widget_show (frame); | |
637 vbox = gtk_vbox_new(FALSE, 5); | |
638 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
639 gaim_button(_("Tab-Complete Nicks"), &chat_options_new, OPT_CHAT_TAB_COMPLETE, vbox); | |
640 gaim_button(_("Old-Style Tab Completion"), &chat_options_new, OPT_CHAT_OLD_STYLE_TAB, vbox); | |
641 gtk_widget_show(vbox); | |
642 | |
643 | |
644 frame = gtk_frame_new ("Display"); | |
645 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
646 gtk_widget_show (frame); | |
647 vbox = gtk_vbox_new(FALSE, 5); | |
648 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
649 gaim_button(_("Show people joining/leaving in window"), &chat_options_new, OPT_CHAT_LOGON, vbox); | |
650 gaim_button(_("Colorize screennames"), &chat_options_new, OPT_CHAT_COLORIZE, vbox); | |
651 gtk_widget_show(vbox); | |
652 | |
653 gtk_widget_show(ret); | |
654 return ret; | |
655 } | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
656 |
3366 | 657 GtkWidget *tab_page() { |
658 GtkWidget *ret; | |
659 GtkWidget *frame; | |
660 GtkWidget *vbox; | |
661 ret = gtk_vbox_new(FALSE, 5); | |
662 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
663 | |
664 frame = gtk_frame_new ("IM Tabs"); | |
665 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
666 gtk_widget_show (frame); | |
667 vbox = gtk_vbox_new(FALSE, 5); | |
668 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
669 | |
670 gaim_dropdown(vbox, "Tab Placement:", &im_options_new, OPT_IM_SIDE_TAB | OPT_IM_BR_TAB, | |
671 "Top", 0, | |
672 "Bottom", OPT_IM_BR_TAB, | |
673 "Left", OPT_IM_SIDE_TAB, | |
674 "Right", OPT_IM_BR_TAB | OPT_IM_SIDE_TAB, NULL); | |
675 gaim_button(_("Show all Instant Messages in one tabbed\nwindow"), &im_options_new, OPT_IM_ONE_WINDOW, vbox); | |
676 gaim_button(_("Show aliases in tabs/titles"), &im_options_new, OPT_IM_ALIAS_TAB, vbox); | |
677 gtk_widget_show (vbox); | |
678 | |
679 | |
680 frame = gtk_frame_new ("Chat Tabs"); | |
681 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
682 gtk_widget_show (frame); | |
683 vbox = gtk_vbox_new(FALSE, 5); | |
684 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
685 | |
686 gaim_dropdown(vbox, "Tab Placement:", &chat_options_new, OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, | |
687 "Top", 0, | |
688 "Bottom", OPT_CHAT_BR_TAB, | |
689 "Left", OPT_CHAT_SIDE_TAB, | |
690 "Right", OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, NULL); | |
691 gaim_button(_("Show all chats in one tabbed window"), &chat_options_new, OPT_CHAT_ONE_WINDOW, | |
692 vbox); | |
693 gtk_widget_show(vbox); | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
694 |
3366 | 695 frame = gtk_frame_new ("Combined Tabs"); |
696 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
697 gtk_widget_show (frame); | |
698 vbox = gtk_vbox_new(FALSE, 5); | |
699 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
700 gtk_widget_show(vbox); | |
701 gaim_button(_("Show IMs and chats in same tabbed\nwindow."), &convo_options_new, OPT_CONVO_COMBINE, vbox); | |
702 | |
703 frame = gtk_frame_new ("Buddy List Tabs"); | |
704 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
705 gtk_widget_show (frame); | |
706 vbox = gtk_vbox_new(FALSE, 5); | |
707 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
708 | |
709 gaim_dropdown(vbox, "Tab Placement:", &blist_options_new, OPT_BLIST_BOTTOM_TAB, | |
710 "Top", 0, | |
711 "Bottom", OPT_BLIST_BOTTOM_TAB, NULL); | |
712 gtk_widget_show(vbox); | |
713 | |
714 gtk_widget_show(ret); | |
715 return ret; | |
716 } | |
717 | |
718 GtkWidget *proxy_page() { | |
719 GtkWidget *ret; | |
720 GtkWidget *frame; | |
721 GtkWidget *vbox; | |
722 GtkWidget *entry; | |
723 GtkWidget *label; | |
724 GtkWidget *hbox; | |
725 GtkWidget *table; | |
726 | |
727 ret = gtk_vbox_new(FALSE, 5); | |
728 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
729 | |
730 frame = gtk_frame_new ("Proxy Type"); | |
731 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
732 gtk_widget_show (frame); | |
733 vbox = gtk_vbox_new(FALSE, 5); | |
734 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
735 gaim_dropdown(vbox, "Proxy Type:", &proxytype_new, -1, | |
736 "No Proxy", PROXY_NONE, | |
737 "SOCKS 4", PROXY_SOCKS4, | |
738 "SOCKS 5", PROXY_SOCKS5, | |
739 "HTTP", PROXY_HTTP, NULL); | |
740 gtk_widget_show (vbox); | |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2323
diff
changeset
|
741 |
2254 | 742 table = gtk_table_new(2, 2, FALSE); |
743 gtk_container_set_border_width(GTK_CONTAINER(table), 5); | |
744 gtk_table_set_col_spacings(GTK_TABLE(table), 5); | |
745 gtk_table_set_row_spacings(GTK_TABLE(table), 5); | |
746 gtk_widget_show(table); | |
747 | |
2839
c936163f916a
[gaim-migrate @ 2852]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2836
diff
changeset
|
748 frame = gtk_frame_new(_("Proxy Server")); |
c936163f916a
[gaim-migrate @ 2852]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2836
diff
changeset
|
749 prefs_proxy_frame = frame; |
c936163f916a
[gaim-migrate @ 2852]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2836
diff
changeset
|
750 |
2254 | 751 gtk_widget_show(frame); |
3366 | 752 gtk_box_pack_start(GTK_BOX(ret), frame, FALSE, FALSE, 5); |
2254 | 753 |
754 if (proxytype == PROXY_NONE) | |
755 gtk_widget_set_sensitive(GTK_WIDGET(frame), FALSE); | |
756 | |
757 table = gtk_table_new(2, 4, FALSE); | |
758 gtk_container_set_border_width(GTK_CONTAINER(table), 5); | |
759 gtk_table_set_col_spacings(GTK_TABLE(table), 5); | |
760 gtk_table_set_row_spacings(GTK_TABLE(table), 10); | |
761 gtk_widget_show(table); | |
762 gtk_container_add(GTK_CONTAINER(frame), table); | |
763 | |
764 | |
765 label = gtk_label_new(_("Host")); | |
766 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
767 gtk_widget_show(label); |
2254 | 768 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0); |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
769 |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
770 entry = gtk_entry_new(); |
3366 | 771 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 0, 1, GTK_FILL, 0, 0, 0); |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
772 gtk_signal_connect(GTK_OBJECT(entry), "changed", |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2323
diff
changeset
|
773 GTK_SIGNAL_FUNC(proxy_print_option), (void *)PROXYHOST); |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
774 gtk_entry_set_text(GTK_ENTRY(entry), proxyhost); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
775 gtk_widget_show(entry); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
776 |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
777 hbox = gtk_hbox_new(TRUE, 5); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
778 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
779 gtk_widget_show(hbox); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
780 |
2254 | 781 label = gtk_label_new(_("Port")); |
782 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | |
783 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0); | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
784 gtk_widget_show(label); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
785 |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
786 entry = gtk_entry_new(); |
3366 | 787 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 1, 2, GTK_FILL, 0, 0, 0); |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
788 gtk_signal_connect(GTK_OBJECT(entry), "changed", |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2323
diff
changeset
|
789 GTK_SIGNAL_FUNC(proxy_print_option), (void *)PROXYPORT); |
2254 | 790 |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
791 if (proxyport) { |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
792 char buf[128]; |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
793 g_snprintf(buf, sizeof(buf), "%d", proxyport); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
794 gtk_entry_set_text(GTK_ENTRY(entry), buf); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
795 } |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
796 gtk_widget_show(entry); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
797 |
2254 | 798 label = gtk_label_new(_("User")); |
799 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | |
800 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0); | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
801 gtk_widget_show(label); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
802 |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
803 entry = gtk_entry_new(); |
3366 | 804 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 2, 3, GTK_FILL, 0, 0, 0); |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
805 gtk_signal_connect(GTK_OBJECT(entry), "changed", |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2323
diff
changeset
|
806 GTK_SIGNAL_FUNC(proxy_print_option), (void *)PROXYUSER); |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
807 gtk_entry_set_text(GTK_ENTRY(entry), proxyuser); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
808 gtk_widget_show(entry); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
809 |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
810 hbox = gtk_hbox_new(TRUE, 5); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
811 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
812 gtk_widget_show(hbox); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
813 |
2254 | 814 label = gtk_label_new(_("Password")); |
815 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | |
816 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, GTK_FILL, 0, 0, 0); | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
817 gtk_widget_show(label); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
818 |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
819 entry = gtk_entry_new(); |
3366 | 820 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 3, 4, GTK_FILL , 0, 0, 0); |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
821 gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
822 gtk_signal_connect(GTK_OBJECT(entry), "changed", |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2323
diff
changeset
|
823 GTK_SIGNAL_FUNC(proxy_print_option), (void *)PROXYPASS); |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
824 gtk_entry_set_text(GTK_ENTRY(entry), proxypass); |
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
825 gtk_widget_show(entry); |
3032 | 826 |
3366 | 827 gtk_widget_show(ret); |
828 return ret; | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
829 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
830 |
3366 | 831 GtkWidget *browser_page() { |
832 GtkWidget *ret; | |
833 GtkWidget *frame; | |
834 GtkWidget *vbox, *hbox; | |
835 GtkWidget *label; | |
836 ret = gtk_vbox_new(FALSE, 5); | |
837 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
1757
3dfe4aefd366
[gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1755
diff
changeset
|
838 |
3366 | 839 frame = gtk_frame_new ("Browser Selection"); |
840 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
841 gtk_widget_show (frame); | |
842 vbox = gtk_vbox_new(FALSE, 5); | |
843 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
3374 | 844 gaim_dropdown(vbox, "Browser", &web_browser_new, -1, |
3366 | 845 "Netscape", BROWSER_NETSCAPE, |
846 "Konqueror", BROWSER_KONQ, | |
847 "Mozilla", BROWSER_MOZILLA, | |
848 "Manual", BROWSER_MANUAL, | |
849 #ifdef USE_GNOME | |
850 "GNOME URL Handler", BROWSER_GNOME, | |
851 #endif /* USE_GNOME */ | |
852 "Galeon", BROWSER_GALEON, | |
853 "Opera", BROWSER_OPERA, NULL); | |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
854 |
3366 | 855 hbox = gtk_hbox_new(FALSE, 5); |
856 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
857 label = gtk_label_new("Manual: "); | |
858 gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); | |
859 gtk_widget_show(label); | |
860 browser_entry = gtk_entry_new(); | |
861 if (web_browser_new != BROWSER_MANUAL) | |
862 gtk_widget_set_sensitive(browser_entry, FALSE); | |
863 gtk_box_pack_start (GTK_BOX (hbox), browser_entry, FALSE, FALSE, 0); | |
864 gtk_widget_show(browser_entry); | |
865 gtk_widget_show(hbox); | |
866 gtk_widget_show (vbox); | |
867 | |
1750
d2eca7a46cfd
[gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1711
diff
changeset
|
868 |
3366 | 869 frame = gtk_frame_new ("Browser Options"); |
870 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
871 gtk_widget_show (frame); | |
872 vbox = gtk_vbox_new(FALSE, 5); | |
873 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
874 gaim_button(_("Open new window by default"), &misc_options_new, OPT_MISC_BROWSER_POPUP, vbox); | |
875 gtk_widget_show(vbox); | |
876 | |
877 gtk_widget_show(ret); | |
878 return ret; | |
879 } | |
880 | |
881 GtkWidget *logging_page() { | |
882 GtkWidget *ret; | |
883 GtkWidget *frame; | |
884 GtkWidget *vbox; | |
885 ret = gtk_vbox_new(FALSE, 5); | |
886 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
887 |
3366 | 888 frame = gtk_frame_new ("Message Logs"); |
889 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
890 gtk_widget_show (frame); | |
891 vbox = gtk_vbox_new(FALSE, 5); | |
892 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
893 gaim_button(_("Log all conversations"), &logging_options_new, OPT_LOG_ALL, vbox); | |
894 gaim_button(_("Strip HTML from logs"), &logging_options_new, OPT_LOG_STRIP_HTML, vbox); | |
895 gtk_widget_show (vbox); | |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
896 |
2843
87d11d2a7d59
[gaim-migrate @ 2856]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2839
diff
changeset
|
897 |
3366 | 898 frame = gtk_frame_new ("System Logs"); |
899 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
900 gtk_widget_show (frame); | |
901 vbox = gtk_vbox_new(FALSE, 5); | |
902 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
903 gaim_button(_("Log when buddies sign on/sign off"), &logging_options_new, OPT_LOG_BUDDY_SIGNON, | |
904 vbox); | |
905 gaim_button(_("Log when buddies become idle/un-idle"), &logging_options_new, OPT_LOG_BUDDY_IDLE, | |
906 vbox); | |
907 gaim_button(_("Log when buddies go away/come back"), &logging_options_new, OPT_LOG_BUDDY_AWAY, vbox); | |
908 gaim_button(_("Log your own signons/idleness/awayness"), &logging_options_new, OPT_LOG_MY_SIGNON, | |
909 vbox); | |
910 gaim_button(_("Individual log file for each buddy's signons"), &logging_options_new, | |
911 OPT_LOG_INDIVIDUAL, vbox); | |
912 gtk_widget_show(vbox); | |
1757
3dfe4aefd366
[gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1755
diff
changeset
|
913 |
3366 | 914 gtk_widget_show(ret); |
915 return ret; | |
1757
3dfe4aefd366
[gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1755
diff
changeset
|
916 } |
3dfe4aefd366
[gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1755
diff
changeset
|
917 |
3366 | 918 static GtkWidget *sndcmd = NULL; |
919 /* static void set_sound_driver(GtkWidget *w, int option) | |
1757
3dfe4aefd366
[gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1755
diff
changeset
|
920 { |
3366 | 921 if (option == OPT_SOUND_CMD) |
922 gtk_widget_set_sensitive(sndcmd, TRUE); | |
1757
3dfe4aefd366
[gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1755
diff
changeset
|
923 else |
3366 | 924 gtk_widget_set_sensitive(sndcmd, FALSE); |
1757
3dfe4aefd366
[gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1755
diff
changeset
|
925 |
3366 | 926 sound_options &= ~(OPT_SOUND_NORMAL | OPT_SOUND_BEEP | |
927 OPT_SOUND_NAS | OPT_SOUND_ARTSC | | |
928 OPT_SOUND_ESD | OPT_SOUND_CMD); | |
929 sound_options |= option; | |
930 save_prefs(); | |
931 } */ | |
1757
3dfe4aefd366
[gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1755
diff
changeset
|
932 |
3366 | 933 static gint sound_cmd_yeah(GtkEntry *entry, GdkEvent *event, gpointer d) |
1813
998a6a032874
[gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1805
diff
changeset
|
934 { |
3366 | 935 g_snprintf(sound_cmd_new, sizeof(sound_cmd_new), "%s", gtk_entry_get_text(GTK_ENTRY(sndcmd))); |
936 return TRUE; | |
1813
998a6a032874
[gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1805
diff
changeset
|
937 } |
998a6a032874
[gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1805
diff
changeset
|
938 |
3366 | 939 GtkWidget *sound_page() { |
940 GtkWidget *ret; | |
941 GtkWidget *frame; | |
1750
d2eca7a46cfd
[gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1711
diff
changeset
|
942 GtkWidget *label; |
3366 | 943 GtkWidget *vbox, *hbox; |
944 | |
945 ret = gtk_vbox_new(FALSE, 5); | |
946 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
947 |
3366 | 948 frame = gtk_frame_new ("Sound Options"); |
949 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
950 gtk_widget_show (frame); | |
951 vbox = gtk_vbox_new(FALSE, 5); | |
952 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
953 gaim_button(_("No sounds when you log in"), &sound_options, OPT_SOUND_SILENT_SIGNON, vbox); | |
954 gaim_button(_("Sounds while away"), &sound_options, OPT_SOUND_WHEN_AWAY, vbox); | |
955 gtk_widget_show (vbox); | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
956 |
2843
87d11d2a7d59
[gaim-migrate @ 2856]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2839
diff
changeset
|
957 |
3366 | 958 frame = gtk_frame_new ("Sound Method"); |
959 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
960 gtk_widget_show (frame); | |
961 vbox = gtk_vbox_new(FALSE, 5); | |
962 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
963 |
3366 | 964 gaim_dropdown(vbox, "Method", &sound_options_new, OPT_SOUND_BEEP | |
965 OPT_SOUND_ESD | OPT_SOUND_ARTSC | OPT_SOUND_NAS | OPT_SOUND_NORMAL | | |
966 OPT_SOUND_CMD, | |
967 "Console Beep", OPT_SOUND_BEEP, | |
968 #ifdef ESD_SOUND | |
969 "ESD", OPT_SOUND_ESD, | |
970 #endif /* ESD_SOUND */ | |
971 #ifdef ARTSC_SOUND | |
972 "ArtsC", OPT_SOUND_ARTSC, | |
973 #endif /* ARTSC_SOUND */ | |
974 #ifdef NAS_SOUND | |
975 "NAS", OPT_SOUND_NAS, | |
976 #endif /* NAS_SOUND */ | |
977 "Internal", OPT_SOUND_NORMAL, | |
978 "Command", OPT_SOUND_CMD, NULL); | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
979 |
3366 | 980 |
1813
998a6a032874
[gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1805
diff
changeset
|
981 hbox = gtk_hbox_new(FALSE, 5); |
998a6a032874
[gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1805
diff
changeset
|
982 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); |
998a6a032874
[gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1805
diff
changeset
|
983 gtk_widget_show(hbox); |
3366 | 984 label = gtk_label_new("Sound Method"); |
985 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); | |
986 gtk_widget_show(label); | |
987 | |
988 hbox = gtk_hbox_new(FALSE, 5); | |
989 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
990 gtk_widget_show(hbox); | |
991 label = gtk_label_new(_("Sound command\n(%s for filename)")); | |
992 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); | |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
993 gtk_widget_show(label); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
994 |
3366 | 995 sndcmd = gtk_entry_new(); |
1813
998a6a032874
[gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1805
diff
changeset
|
996 |
3366 | 997 gtk_entry_set_editable(GTK_ENTRY(sndcmd), TRUE); |
998 gtk_entry_set_text(GTK_ENTRY(sndcmd), sound_cmd); | |
999 #if GTK_CHECK_VERSION(1,3,0) | |
1000 gtk_widget_set_size_request(sndcmd, 75, -1); | |
1001 #else | |
1002 gtk_widget_set_usize(sndcmd, 75, -1); | |
1003 #endif | |
1004 gtk_widget_set_sensitive(sndcmd, (sound_options_new & OPT_SOUND_CMD)); | |
1005 gtk_box_pack_start(GTK_BOX(hbox), sndcmd, TRUE, TRUE, 5); | |
1006 gtk_signal_connect(GTK_OBJECT(sndcmd), "focus_out_event", GTK_SIGNAL_FUNC(sound_cmd_yeah), NULL); | |
1007 gtk_widget_show(sndcmd); | |
2746
a0da8be3db45
[gaim-migrate @ 2759]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2745
diff
changeset
|
1008 |
2262
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1009 |
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1010 gtk_widget_show(vbox); |
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1011 |
3366 | 1012 gtk_widget_show(ret); |
1013 return ret; | |
2262
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1014 } |
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1015 |
3366 | 1016 GtkWidget *away_page() { |
1017 GtkWidget *ret; | |
2262
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1018 GtkWidget *frame; |
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1019 GtkWidget *vbox; |
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1020 GtkWidget *hbox; |
3366 | 1021 GtkWidget *label; |
2262
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1022 GtkWidget *button; |
3366 | 1023 GtkWidget *select; |
2262
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1024 |
3366 | 1025 ret = gtk_vbox_new(FALSE, 5); |
1026 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
2262
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1027 |
3366 | 1028 frame = gtk_frame_new ("Away"); |
1029 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
1030 gtk_widget_show (frame); | |
1813
998a6a032874
[gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1805
diff
changeset
|
1031 vbox = gtk_vbox_new(FALSE, 5); |
3366 | 1032 gtk_container_add (GTK_CONTAINER (frame), vbox); |
1033 gaim_button(_("Sending messages removes away status"), &away_options_new, OPT_AWAY_BACK_ON_IM, vbox); | |
1034 gaim_button(_("Queue new messages when away"), &away_options_new, OPT_AWAY_QUEUE, vbox); | |
1035 gaim_button(_("Ignore new conversations when away"), &away_options_new, OPT_AWAY_DISCARD, vbox); | |
1036 gtk_widget_show (vbox); | |
1813
998a6a032874
[gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1805
diff
changeset
|
1037 |
998a6a032874
[gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1805
diff
changeset
|
1038 |
3366 | 1039 frame = gtk_frame_new ("Auto-response"); |
1040 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
1041 gtk_widget_show (frame); | |
1042 vbox = gtk_vbox_new(FALSE, 5); | |
1043 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
1750
d2eca7a46cfd
[gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1711
diff
changeset
|
1044 |
3366 | 1045 hbox = gtk_hbox_new(FALSE, 0); |
1046 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
1047 gaim_labeled_spin_button(hbox, _("Seconds before resending:"), | |
1048 &away_resend_new, 1, 24 * 60 * 60); | |
1049 gtk_widget_show(hbox); | |
3386 | 1050 gaim_button(_("Don't send auto-response"), &away_options_new, OPT_AWAY_NO_AUTO_RESP, vbox); |
3366 | 1051 gaim_button(_("Only send auto-response when idle"), &away_options_new, OPT_AWAY_IDLE_RESP, vbox); |
1813
998a6a032874
[gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1805
diff
changeset
|
1052 |
3366 | 1053 if (away_options_new & OPT_AWAY_NO_AUTO_RESP) |
1054 gtk_widget_set_sensitive(hbox, FALSE); | |
2262
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1055 gtk_widget_show(vbox); |
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1056 |
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
1057 |
3366 | 1058 frame = gtk_frame_new ("Idle"); |
1059 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
1060 gtk_widget_show (frame); | |
1757
3dfe4aefd366
[gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1755
diff
changeset
|
1061 vbox = gtk_vbox_new(FALSE, 5); |
3366 | 1062 gtk_container_add (GTK_CONTAINER (frame), vbox); |
1063 gaim_dropdown(vbox, "Idle Time Reporting:", &away_resend_new, -1, | |
1064 "None", IDLE_NONE, | |
1065 "Gaim Usage", IDLE_GAIM, | |
1066 #ifdef USE_SCREENSAVER | |
1067 "X Usage", IDLE_SCREENSAVER, | |
1068 #endif | |
1069 NULL); | |
1757
3dfe4aefd366
[gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1755
diff
changeset
|
1070 gtk_widget_show(vbox); |
3366 | 1071 |
1072 frame = gtk_frame_new ("Auto-away"); | |
1073 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
1074 gtk_widget_show (frame); | |
2385
bdc74764245c
[gaim-migrate @ 2398]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2372
diff
changeset
|
1075 vbox = gtk_vbox_new(FALSE, 5); |
3366 | 1076 gtk_container_add (GTK_CONTAINER (frame), vbox); |
2385
bdc74764245c
[gaim-migrate @ 2398]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2372
diff
changeset
|
1077 |
3366 | 1078 button = gaim_button(_("Set away when idle"), &away_options_new, OPT_AWAY_AUTO, vbox); |
1079 select = gaim_labeled_spin_button(vbox, "Minutes before setting away:", &auto_away_new, 1, 24 * 60); | |
1080 if (!(away_options_new & OPT_AWAY_AUTO)) | |
1081 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); | |
1082 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); | |
1 | 1083 |
3366 | 1084 label = gtk_label_new("Away message:"); |
1085 hbox = gtk_hbox_new(FALSE, 0); | |
1086 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
1087 gtk_widget_show(hbox); | |
1088 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
1089 gtk_widget_show(label); | |
1090 prefs_away_menu = gtk_option_menu_new(); | |
1091 if (!(away_options_new & OPT_AWAY_AUTO)) | |
1092 gtk_widget_set_sensitive(GTK_WIDGET(prefs_away_menu), FALSE); | |
1093 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), prefs_away_menu); | |
1094 default_away_menu_init(prefs_away_menu); | |
1095 gtk_widget_show(prefs_away_menu); | |
1096 gtk_box_pack_start(GTK_BOX(hbox), prefs_away_menu, FALSE, FALSE, 0); | |
1097 gtk_widget_show (vbox); | |
1098 | |
1099 gtk_widget_show(ret); | |
1100 return ret; | |
873
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1101 } |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1102 |
3366 | 1103 #if GTK_CHECK_VERSION (1,3,0) |
1104 static void event_toggled (GtkCellRendererToggle *cell, gchar *pth, gpointer data) | |
873
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1105 { |
3366 | 1106 GtkTreeModel *model = (GtkTreeModel *)data; |
1107 GtkTreeIter iter; | |
1108 GtkTreePath *path = gtk_tree_path_new_from_string(pth); | |
1109 gint soundnum; | |
1110 | |
1111 gtk_tree_model_get_iter (model, &iter, path); | |
1112 gtk_tree_model_get (model, &iter, 2, &soundnum, -1); | |
873
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1113 |
3366 | 1114 sound_options_new ^= sounds[soundnum].opt; |
1115 gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, sound_options_new & sounds[soundnum].opt, -1); | |
1116 } | |
1117 #endif | |
1118 | |
1119 static void test_sound(GtkWidget *button, gpointer i_am_NULL) | |
1120 { | |
1121 guint32 tmp_sound = sound_options; | |
1122 if (!(sound_options & OPT_SOUND_WHEN_AWAY)) | |
1123 sound_options ^= OPT_SOUND_WHEN_AWAY; | |
1124 if (!(sound_options & sounds[sound_row_sel].opt)) | |
1125 sound_options ^= sounds[sound_row_sel].opt; | |
1126 play_sound(sound_row_sel); | |
1127 sound_options = tmp_sound; | |
873
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1128 } |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1129 |
3366 | 1130 static void reset_sound(GtkWidget *button, gpointer i_am_also_NULL) |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1131 { |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2323
diff
changeset
|
1132 |
3366 | 1133 /* This just resets a sound file back to default */ |
1134 sound_file_new[sound_row_sel] = NULL; | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1135 |
3366 | 1136 gtk_entry_set_text(GTK_ENTRY(sound_entry), "(default)"); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1137 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1138 |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1139 void close_sounddialog(GtkWidget *w, GtkWidget *w2) |
1170 | 1140 { |
1141 | |
1142 GtkWidget *dest; | |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1143 |
1170 | 1144 if (!GTK_IS_WIDGET(w2)) |
1145 dest = w; | |
1146 else | |
1147 dest = w2; | |
1148 | |
1149 sounddialog = NULL; | |
1150 | |
1151 gtk_widget_destroy(dest); | |
1152 } | |
1153 | |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1154 void do_select_sound(GtkWidget *w, int snd) |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1155 { |
1953
f0ff0b367e3d
[gaim-migrate @ 1963]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1930
diff
changeset
|
1156 const char *file; |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1157 |
1170 | 1158 file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(sounddialog)); |
1159 | |
1160 /* If they type in a directory, change there */ | |
1161 if (file_is_dir(file, sounddialog)) | |
1162 return; | |
1163 | |
1164 /* Let's just be safe */ | |
3366 | 1165 if (sound_file_new[snd]) |
1166 free(sound_file_new[snd]); | |
1170 | 1167 |
1168 /* Set it -- and forget it */ | |
3366 | 1169 sound_file_new[snd] = g_strdup(file); |
1170 | |
1175 | 1171 /* Set our text entry */ |
3366 | 1172 gtk_entry_set_text(GTK_ENTRY(sound_entry), sound_file_new[snd]); |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1173 |
1170 | 1174 /* Close the window! It's getting cold in here! */ |
1175 close_sounddialog(NULL, sounddialog); | |
2471
612efbf62c35
[gaim-migrate @ 2484]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2385
diff
changeset
|
1176 |
612efbf62c35
[gaim-migrate @ 2484]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2385
diff
changeset
|
1177 if (last_sound_dir) |
612efbf62c35
[gaim-migrate @ 2484]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2385
diff
changeset
|
1178 g_free(last_sound_dir); |
612efbf62c35
[gaim-migrate @ 2484]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2385
diff
changeset
|
1179 last_sound_dir = g_dirname(sound_file[snd]); |
1170 | 1180 } |
1181 | |
3366 | 1182 static void sel_sound(GtkWidget *button, gpointer being_NULL_is_fun) |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1183 { |
1170 | 1184 char *buf = g_malloc(BUF_LEN); |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1185 |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1186 if (!sounddialog) { |
1170 | 1187 sounddialog = gtk_file_selection_new(_("Gaim - Sound Configuration")); |
1188 | |
1189 gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(sounddialog)); | |
1190 | |
2471
612efbf62c35
[gaim-migrate @ 2484]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2385
diff
changeset
|
1191 g_snprintf(buf, BUF_LEN - 1, "%s/", last_sound_dir ? last_sound_dir : g_get_home_dir()); |
1170 | 1192 |
1193 gtk_file_selection_set_filename(GTK_FILE_SELECTION(sounddialog), buf); | |
1194 | |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1195 gtk_signal_connect(GTK_OBJECT(sounddialog), "destroy", |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1196 GTK_SIGNAL_FUNC(close_sounddialog), sounddialog); |
1170 | 1197 |
1198 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(sounddialog)->ok_button), | |
3366 | 1199 "clicked", GTK_SIGNAL_FUNC(do_select_sound), (int *)sound_row_sel); |
1170 | 1200 |
1201 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(sounddialog)->cancel_button), | |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1202 "clicked", GTK_SIGNAL_FUNC(close_sounddialog), sounddialog); |
1170 | 1203 } |
1204 | |
1205 g_free(buf); | |
1206 gtk_widget_show(sounddialog); | |
1207 gdk_window_raise(sounddialog->window); | |
1006
0a4d0ed65e17
[gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1002
diff
changeset
|
1208 } |
0a4d0ed65e17
[gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1002
diff
changeset
|
1209 |
3366 | 1210 |
1211 #if GTK_CHECK_VERSION (1,3,0) | |
1212 static void prefs_sound_sel (GtkTreeSelection *sel, GtkTreeModel *model) { | |
1213 GtkTreeIter iter; | |
1214 GValue val = { 0, }; | |
1215 | |
1216 if (! gtk_tree_selection_get_selected (sel, &model, &iter)) | |
1217 return; | |
1218 gtk_tree_model_get_value (model, &iter, 2, &val); | |
1219 sound_row_sel = g_value_get_uint(&val); | |
1220 if (sound_entry) | |
3374 | 1221 gtk_entry_set_text(GTK_ENTRY(sound_entry), sound_file_new[sound_row_sel] ? sound_file_new[sound_row_sel] : "(default)"); |
3366 | 1222 g_value_unset (&val); |
1223 if (sounddialog) | |
1224 gtk_widget_destroy(sounddialog); | |
1225 } | |
1226 #endif | |
1227 | |
1228 GtkWidget *sound_events_page() { | |
1229 | |
1230 GtkWidget *ret; | |
1231 GtkWidget *frame; | |
1232 GtkWidget *vbox; | |
1233 GtkWidget *sw; | |
1234 GtkWidget *button, *hbox; | |
1235 | |
1236 #if GTK_CHECK_VERSION(1,3,0) | |
1237 GtkTreeIter iter; | |
1238 GtkWidget *event_view; | |
1239 GtkListStore *event_store; | |
1240 GtkCellRenderer *rend; | |
1241 GtkTreeViewColumn *col; | |
1242 GtkTreeSelection *sel; | |
1243 GtkTreePath *path; | |
1244 #else | |
1245 GtkWidget *list; | |
1246 #endif | |
1247 int j; | |
1248 | |
1249 ret = gtk_vbox_new(FALSE, 5); | |
1250 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
1251 | |
1252 frame = gtk_frame_new ("Sound Events"); | |
1253 gtk_box_pack_start (GTK_BOX (ret), frame, TRUE, TRUE, 0); | |
1254 gtk_widget_show (frame); | |
1255 vbox = gtk_vbox_new(FALSE, 5); | |
1256 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
1257 sw = gtk_scrolled_window_new(NULL,NULL); | |
1258 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); | |
1259 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); | |
1260 | |
1261 #if GTK_CHECK_VERSION(1,3,0) | |
1262 event_store = gtk_list_store_new (3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_UINT); | |
1263 | |
1264 for (j=0; j < NUM_SOUNDS; j++) { | |
1265 if (sounds[j].opt == 0) | |
1266 continue; | |
1267 | |
1268 gtk_list_store_append (event_store, &iter); | |
1269 gtk_list_store_set(event_store, &iter, | |
1270 0, sound_options & sounds[j].opt, | |
1271 1, sounds[j].label, | |
1272 2, j, -1); | |
1273 } | |
1274 | |
1275 event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(event_store)); | |
1276 | |
1277 rend = gtk_cell_renderer_toggle_new(); | |
1278 sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view)); | |
1279 g_signal_connect (G_OBJECT (sel), "changed", | |
1280 G_CALLBACK (prefs_sound_sel), | |
1281 NULL); | |
1282 g_signal_connect (G_OBJECT(rend), "toggled", | |
1283 G_CALLBACK(event_toggled), event_store); | |
1284 path = gtk_tree_path_new_first(); | |
1285 gtk_tree_selection_select_path(sel, path); | |
1286 | |
1287 col = gtk_tree_view_column_new_with_attributes ("Play", | |
1288 rend, | |
1289 "active", 0, | |
1290 NULL); | |
1291 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | |
1292 | |
1293 rend = gtk_cell_renderer_text_new(); | |
1294 col = gtk_tree_view_column_new_with_attributes ("Event", | |
1295 rend, | |
1296 "text", 1, | |
1297 NULL); | |
1298 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | |
1299 gtk_widget_show(event_view); | |
1300 g_object_unref(G_OBJECT(event_store)); | |
1301 gtk_container_add(GTK_CONTAINER(sw), event_view); | |
1302 #else | |
1303 list = gtk_clist_new(1); | |
1304 for (j=0; sound_order[j] != 0; j++) { | |
1305 if (sounds[sound_order[j]].opt == 0) | |
1306 continue; | |
1307 gtk_clist_append(GTK_CLIST(list), &(sounds[sound_order[j]].label)); | |
1308 } | |
1309 gtk_widget_show(list); | |
1310 gtk_container_add(GTK_CONTAINER(sw), list); | |
1311 #endif | |
1312 | |
1313 gtk_widget_show (vbox); | |
1314 gtk_widget_show_all (ret); | |
1315 | |
1316 frame = gtk_frame_new ("Event Options"); | |
1317 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
1318 gtk_widget_show (frame); | |
1319 vbox = gtk_vbox_new(FALSE, 5); | |
1320 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
1321 | |
1322 hbox = gtk_hbox_new(FALSE, 0); | |
1323 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
1324 gtk_widget_show(hbox); | |
1325 sound_entry = gtk_entry_new(); | |
1326 gtk_entry_set_text(GTK_ENTRY(sound_entry), sound_file_new[0] ? sound_file_new[0] : "(default)"); | |
1327 gtk_entry_set_editable(GTK_ENTRY(sound_entry), FALSE); | |
1328 gtk_box_pack_start(GTK_BOX(hbox), sound_entry, FALSE, FALSE, 5); | |
1329 gtk_widget_show(sound_entry); | |
1330 | |
1006
0a4d0ed65e17
[gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1002
diff
changeset
|
1331 |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1332 hbox = gtk_hbox_new(FALSE, 0); |
3366 | 1333 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
1006
0a4d0ed65e17
[gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1002
diff
changeset
|
1334 gtk_widget_show(hbox); |
3025 | 1335 button = gtk_button_new_with_label(_("Test")); |
3366 | 1336 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(test_sound), NULL); |
1337 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); | |
2759
f26f1d139615
[gaim-migrate @ 2772]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2746
diff
changeset
|
1338 gtk_widget_show(button); |
f26f1d139615
[gaim-migrate @ 2772]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2746
diff
changeset
|
1339 |
1175 | 1340 button = gtk_button_new_with_label(_("Reset")); |
3366 | 1341 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(reset_sound), NULL); |
1342 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); | |
1175 | 1343 gtk_widget_show(button); |
1344 | |
1381 | 1345 button = gtk_button_new_with_label(_("Choose...")); |
3366 | 1346 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(sel_sound), NULL); |
1347 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); | |
1006
0a4d0ed65e17
[gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1002
diff
changeset
|
1348 gtk_widget_show(button); |
3366 | 1349 |
1350 gtk_widget_show (vbox); | |
1006
0a4d0ed65e17
[gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1002
diff
changeset
|
1351 |
3366 | 1352 return ret; |
2580
86eaeb064e82
[gaim-migrate @ 2593]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2566
diff
changeset
|
1353 } |
86eaeb064e82
[gaim-migrate @ 2593]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2566
diff
changeset
|
1354 |
3366 | 1355 #if GTK_CHECK_VERSION (1,3,0) |
1356 void away_message_sel(GtkTreeSelection *sel, GtkTreeModel *model) | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1357 { |
3366 | 1358 GtkTreeIter iter; |
1359 GValue val = { 0, }; | |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1360 gchar buffer[BUF_LONG]; |
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1361 char *tmp; |
3374 | 1362 struct away_message *am; |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1363 |
3366 | 1364 if (! gtk_tree_selection_get_selected (sel, &model, &iter)) |
1365 return; | |
1366 gtk_tree_model_get_value (model, &iter, 1, &val); | |
3374 | 1367 am = g_value_get_pointer(&val); |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1368 gtk_imhtml_clear(GTK_IMHTML(away_text)); |
3374 | 1369 strncpy(buffer, am->message, BUF_LONG); |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1370 tmp = stylize(buffer, BUF_LONG); |
2856
b1e300a85678
[gaim-migrate @ 2869]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2843
diff
changeset
|
1371 gtk_imhtml_append_text(GTK_IMHTML(away_text), tmp, -1, GTK_IMHTML_NO_TITLE | |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2323
diff
changeset
|
1372 GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); |
2856
b1e300a85678
[gaim-migrate @ 2869]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2843
diff
changeset
|
1373 gtk_imhtml_append_text(GTK_IMHTML(away_text), "<BR>", -1, GTK_IMHTML_NO_TITLE | |
2372
2927c2c26fe6
[gaim-migrate @ 2385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2323
diff
changeset
|
1374 GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1375 g_free(tmp); |
3366 | 1376 g_value_unset (&val); |
1377 | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1378 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1379 |
3366 | 1380 void remove_away_message(GtkWidget *widget, GtkTreeView *tv) { |
1381 struct away_message *am; | |
1382 GtkTreeIter iter; | |
1383 GtkTreePath *path; | |
1384 GtkTreeStore *ts = GTK_TREE_STORE(gtk_tree_view_get_model(tv)); | |
1385 GtkTreeSelection *sel = gtk_tree_view_get_selection(tv); | |
3379 | 1386 GtkTreeModel *model = GTK_TREE_MODEL(prefs_away_store); |
3366 | 1387 GValue val = { 0, }; |
1388 | |
3379 | 1389 if (! gtk_tree_selection_get_selected (sel, &model, &iter)) |
3366 | 1390 return; |
3379 | 1391 gtk_tree_model_get_value (GTK_TREE_MODEL(prefs_away_store), &iter, 1, &val); |
3366 | 1392 am = g_value_get_pointer (&val); |
1393 gtk_imhtml_clear(GTK_IMHTML(away_text)); | |
1394 rem_away_mess(NULL, am); | |
3379 | 1395 gtk_list_store_remove(GTK_LIST_STORE(ts), &iter); |
1396 path = gtk_tree_path_new_first(); | |
3366 | 1397 gtk_tree_selection_select_path(sel, path); |
1109
c73736fa0b7c
[gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1087
diff
changeset
|
1398 } |
c73736fa0b7c
[gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1087
diff
changeset
|
1399 |
3366 | 1400 #else |
3374 | 1401 static struct away_message *cur_message; |
1402 void away_message_sel(GtkWidget *w, struct away_message *a) { | |
1403 gchar buffer[BUF_LONG]; | |
1404 char *tmp; | |
1405 | |
1406 cur_message = a; | |
1407 | |
1408 /* Clear the Box */ | |
1409 gtk_imhtml_clear(GTK_IMHTML(away_text)); | |
1410 | |
1411 /* Fill the text box with new message */ | |
1412 strncpy(buffer, a->message, BUF_LONG); | |
1413 tmp = stylize(buffer, BUF_LONG); | |
1414 | |
1415 debug_printf("FSD: %s\n", tmp); | |
1416 gtk_imhtml_append_text(GTK_IMHTML(away_text), tmp, -1, GTK_IMHTML_NO_TITLE | | |
1417 GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); | |
1418 gtk_imhtml_append_text(GTK_IMHTML(away_text), "<BR>", -1, GTK_IMHTML_NO_TITLE | | |
1419 GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); | |
1420 g_free(tmp); | |
1421 } | |
1422 void remove_away_message(GtkWidget *widget, GtkWidget *list) { | |
1423 GList *i; | |
1424 struct away_message *a; | |
1425 | |
1426 i = GTK_LIST(prefs_away_list)->selection; | |
1427 | |
1428 if (!i) | |
1429 return; | |
1430 if (!i->next) { | |
1431 gtk_imhtml_clear(GTK_IMHTML(away_text)); | |
1432 } | |
1433 a = gtk_object_get_user_data(GTK_OBJECT(i->data)); | |
1434 rem_away_mess(NULL, a); | |
1435 } | |
3366 | 1436 #endif |
1109
c73736fa0b7c
[gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1087
diff
changeset
|
1437 |
3366 | 1438 GtkWidget *away_message_page() { |
1439 GtkWidget *ret; | |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1440 GtkWidget *frame; |
3379 | 1441 GtkWidget *vbox, *hbox; |
1442 GtkWidget *button; | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1443 GtkWidget *sw; |
3366 | 1444 |
1445 #if GTK_CHECK_VERSION(1,3,0) | |
1446 GtkTreeIter iter; | |
1447 GtkWidget *event_view; | |
1448 GtkCellRenderer *rend; | |
1449 GtkTreeViewColumn *col; | |
1450 GtkTreeSelection *sel; | |
1451 GtkTreePath *path; | |
1452 #endif | |
940 | 1453 GSList *awy = away_messages; |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1454 struct away_message *a; |
3366 | 1455 GtkWidget *sw2; |
1456 | |
1457 ret = gtk_vbox_new(FALSE, 5); | |
1458 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1459 |
3366 | 1460 frame = gtk_frame_new ("Title"); |
1461 gtk_box_pack_start (GTK_BOX (ret), frame, TRUE, TRUE, 0); | |
1462 gtk_widget_show (frame); | |
1463 vbox = gtk_vbox_new(FALSE, 5); | |
1464 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
1465 sw = gtk_scrolled_window_new(NULL,NULL); | |
1466 away_text = gtk_imhtml_new(NULL, NULL); | |
1467 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); | |
3379 | 1468 #if GTK_CHECK_VERSION(1,3,0) |
1469 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), | |
1470 GTK_SHADOW_IN); | |
1471 #endif | |
3366 | 1472 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); |
1473 | |
1474 #if GTK_CHECK_VERSION(1,3,0) | |
3374 | 1475 prefs_away_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); |
3366 | 1476 while (awy) { |
1477 a = (struct away_message *)awy->data; | |
1478 gtk_list_store_append (prefs_away_store, &iter); | |
1479 gtk_list_store_set(prefs_away_store, &iter, | |
3374 | 1480 0, a->name, |
1481 1, a, -1); | |
3366 | 1482 awy = awy->next; |
1483 } | |
1484 event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(prefs_away_store)); | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1485 |
2906
538c58b43eff
[gaim-migrate @ 2919]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2856
diff
changeset
|
1486 |
3366 | 1487 rend = gtk_cell_renderer_text_new(); |
1488 col = gtk_tree_view_column_new_with_attributes ("NULL", | |
1489 rend, | |
1490 "text", 0, | |
1491 NULL); | |
1492 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | |
1493 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(event_view), FALSE); | |
1494 gtk_widget_show(event_view); | |
1495 gtk_container_add(GTK_CONTAINER(sw), event_view); | |
1496 #else | |
3374 | 1497 prefs_away_list = gtk_list_new(); |
3366 | 1498 while (awy) { |
3374 | 1499 GtkWidget *ambox = gtk_hbox_new(FALSE, 5); |
1500 GtkWidget *list_item =gtk_list_item_new(); | |
1501 GtkWidget *label; | |
3366 | 1502 a = (struct away_message *)awy->data; |
3374 | 1503 gtk_container_add(GTK_CONTAINER(prefs_away_list), list_item); |
1504 gtk_signal_connect(GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(away_message_sel), | |
1505 a); | |
1506 gtk_object_set_user_data(GTK_OBJECT(list_item), a); | |
1507 | |
1508 gtk_widget_show(list_item); | |
1509 | |
1510 ambox = gtk_hbox_new(FALSE, 5); | |
1511 gtk_container_add(GTK_CONTAINER(list_item), ambox); | |
1512 gtk_widget_show(ambox); | |
1513 | |
1514 label = gtk_label_new(a->name); | |
1515 gtk_box_pack_start(GTK_BOX(ambox), label, FALSE, FALSE, 5); | |
1516 gtk_widget_show(label); | |
1517 | |
3366 | 1518 awy = awy->next; |
3374 | 1519 |
3366 | 1520 } |
3374 | 1521 gtk_widget_show(prefs_away_list); |
1522 gtk_container_add(GTK_CONTAINER(sw), prefs_away_list); | |
3366 | 1523 #endif |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1524 |
3366 | 1525 gtk_widget_show (vbox); |
1526 gtk_widget_show (sw); | |
1527 | |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1528 |
3366 | 1529 frame = gtk_frame_new ("Message"); |
1530 gtk_box_pack_start (GTK_BOX (ret), frame, TRUE, TRUE, 0); | |
1531 gtk_widget_show (frame); | |
1532 vbox = gtk_vbox_new(FALSE, 5); | |
1533 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
1534 | |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1535 sw2 = gtk_scrolled_window_new(NULL, NULL); |
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1536 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2), |
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1537 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); |
3366 | 1538 gtk_box_pack_start(GTK_BOX(vbox), sw2, TRUE, TRUE, 0); |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1539 gtk_widget_show(sw2); |
3366 | 1540 |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1541 gtk_container_add(GTK_CONTAINER(sw2), away_text); |
2906
538c58b43eff
[gaim-migrate @ 2919]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2856
diff
changeset
|
1542 GTK_LAYOUT(away_text)->hadjustment->step_increment = 10.0; |
538c58b43eff
[gaim-migrate @ 2919]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2856
diff
changeset
|
1543 GTK_LAYOUT(away_text)->vadjustment->step_increment = 10.0; |
1815
f15d449b3167
[gaim-migrate @ 1825]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1813
diff
changeset
|
1544 gaim_setup_imhtml(away_text); |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1545 gtk_widget_show(away_text); |
3366 | 1546 gtk_widget_show (vbox); |
1547 gtk_widget_show (ret); | |
1548 gtk_imhtml_set_defaults(GTK_IMHTML(away_text), NULL, NULL, NULL); | |
1549 #if GTK_CHECK_VERSION(1,3,0) | |
1550 sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view)); | |
1551 path = gtk_tree_path_new_first(); | |
1552 g_signal_connect (G_OBJECT (sel), "changed", | |
1553 G_CALLBACK (away_message_sel), | |
1554 NULL); | |
1555 #endif | |
1556 hbox = gtk_hbox_new(TRUE, 5); | |
1557 gtk_widget_show(hbox); | |
1558 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
1559 #if GTK_CHECK_VERSION (1,3,0) | |
1560 button = gtk_button_new_from_stock (GTK_STOCK_ADD); | |
1561 #else | |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1562 button = picture_button(prefs, _("Add"), gnome_add_xpm); |
3366 | 1563 #endif |
1564 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
1565 if (misc_options & OPT_MISC_COOL_LOOK) | |
1566 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
1567 gtk_widget_show(button); | |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1568 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), NULL); |
3366 | 1569 |
1570 #if GTK_CHECK_VERSION (1,3,0) | |
1571 button = gtk_button_new_from_stock (GTK_STOCK_REMOVE); | |
1572 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(remove_away_message), event_view); | |
1573 #else | |
1574 button = picture_button(prefs, _("Remove"), gnome_remove_xpm); | |
3374 | 1575 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(remove_away_message), prefs_away_list); |
3366 | 1576 #endif |
1577 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
1578 if (misc_options & OPT_MISC_COOL_LOOK) | |
1579 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
1580 gtk_widget_show(button); | |
1581 | |
1582 #if GTK_CHECK_VERSION (1,3,0) | |
1583 button = pixbuf_button(_("_Edit"), "edit.png"); | |
3374 | 1584 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), event_view); |
3366 | 1585 #else |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1586 button = picture_button(prefs, _("Edit"), save_xpm); |
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1587 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), button); |
3366 | 1588 #endif |
1589 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
1590 if (misc_options & OPT_MISC_COOL_LOOK) | |
1591 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
1592 gtk_widget_show(button); | |
1593 | |
1594 return ret; | |
1595 } | |
1596 #if GTK_CHECK_VERSION (1,3,0) | |
1597 GtkTreeIter *prefs_notebook_add_page(char *text, | |
1598 GdkPixbuf *pixbuf, | |
1599 GtkWidget *page, | |
1600 GtkTreeIter *iter, | |
1601 GtkTreeIter *parent, | |
1602 int ind) { | |
1603 GdkPixbuf *icon = NULL; | |
1604 | |
1605 if (pixbuf) | |
1606 icon = gdk_pixbuf_scale_simple (pixbuf, 18, 18, GDK_INTERP_BILINEAR); | |
1780
d7cbedd1d651
[gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1773
diff
changeset
|
1607 |
3366 | 1608 gtk_tree_store_append (prefstree, iter, parent); |
1609 gtk_tree_store_set (prefstree, iter, 0, icon, 1, text, 2, ind, -1); | |
1610 | |
1611 if (pixbuf) | |
1612 g_object_unref(pixbuf); | |
1613 if (icon) | |
1614 g_object_unref(icon); | |
1615 gtk_notebook_append_page(GTK_NOTEBOOK(prefsnotebook), page, gtk_label_new(text)); | |
1616 return iter; | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1617 } |
3366 | 1618 #else |
1619 GtkCTreeNode *prefs_notebook_add_page(char *text, | |
1620 GdkPixmap *pixmap, | |
1621 GtkWidget *page, | |
1622 GtkCTreeNode **iter, | |
1623 GtkCTreeNode **parent, | |
1624 int ind) { | |
1124
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
1625 |
3366 | 1626 GtkCTreeNode *itern; |
1627 char *texts[1]; | |
1124
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
1628 |
3366 | 1629 texts[0] = text; |
2074
a4367a6478eb
[gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2048
diff
changeset
|
1630 |
3366 | 1631 *iter = gtk_ctree_insert_node (GTK_CTREE(prefstree), parent ? *parent : NULL, NULL, &text, |
1632 0, NULL, NULL, NULL, NULL, 0, 1); | |
1633 gtk_ctree_node_set_row_data(GTK_CTREE(prefstree), GTK_CTREE_NODE(*iter), (void *)ind); | |
1634 if (pixmap) | |
1635 gdk_pixmap_unref(pixmap); | |
1636 | |
1637 debug_printf("%s\n", texts[0]); | |
2074
a4367a6478eb
[gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2048
diff
changeset
|
1638 |
3366 | 1639 gtk_notebook_append_page(GTK_NOTEBOOK(prefsnotebook), page, gtk_label_new(text)); |
1640 return iter; | |
2074
a4367a6478eb
[gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2048
diff
changeset
|
1641 } |
3366 | 1642 #endif |
1124
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
1643 |
3366 | 1644 void prefs_notebook_init() { |
1645 int a = 0; | |
1646 #if GTK_CHECK_VERSION(1,3,0) | |
1647 GtkTreeIter p, c; | |
1648 #else | |
1649 GtkCTreeNode *p = NULL; | |
1650 GtkCTreeNode *c = NULL; | |
1651 #endif | |
3373 | 1652 prefs_notebook_add_page(_("Interface"), NULL, interface_page(), &p, NULL, a++); |
1653 prefs_notebook_add_page(_("Fonts"), NULL, font_page(), &c, &p, a++); | |
1654 prefs_notebook_add_page(_("Message Text"), NULL, messages_page(), &c, &p, a++); | |
1655 prefs_notebook_add_page(_("Shortcuts"), NULL, hotkeys_page(), &c, &p, a++); | |
1656 prefs_notebook_add_page(_("Buddy List"), NULL, list_page(), &c, &p, a++); | |
1657 prefs_notebook_add_page(_("IM Window"), NULL, im_page(), &c, &p, a++); | |
1658 prefs_notebook_add_page(_("Chat Window"), NULL, chat_page(), &c, &p, a++); | |
1659 prefs_notebook_add_page(_("Tabs"), NULL, tab_page(), &c, &p, a++); | |
1660 prefs_notebook_add_page(_("Proxy"), NULL, proxy_page(), &p, NULL, a++); | |
1661 prefs_notebook_add_page(_("Browser"), NULL, browser_page(), &p, NULL, a++); | |
1130
d31fad9abb32
[gaim-migrate @ 1140]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1125
diff
changeset
|
1662 |
3373 | 1663 prefs_notebook_add_page(_("Logging"), NULL, logging_page(), &p, NULL, a++); |
1664 prefs_notebook_add_page(_("Sounds"), NULL, sound_page(), &p, NULL, a++); | |
1665 prefs_notebook_add_page(_("Sound Events"), NULL, sound_events_page(), &c, &p, a++); | |
1666 prefs_notebook_add_page(_("Away / Idle"), NULL, away_page(), &p, NULL, a++); | |
1667 prefs_notebook_add_page(_("Away Messages"), NULL, away_message_page(), &c, &p, a++); | |
1124
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
1668 } |
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
1669 |
3366 | 1670 void show_prefs() |
1124
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
1671 { |
3366 | 1672 GtkWidget *vbox, *vbox2; |
1124
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
1673 GtkWidget *hbox; |
3366 | 1674 GtkWidget *frame; |
1675 #if GTK_CHECK_VERSION (1,3,0) | |
1676 GtkWidget *tree_v; | |
1677 GtkTreeViewColumn *column; | |
1678 GtkCellRenderer *cell; | |
1679 GtkTreeSelection *sel; | |
1680 #endif | |
1681 GtkWidget *notebook; | |
1682 GtkWidget *sep; | |
1124
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
1683 GtkWidget *button; |
3366 | 1684 |
1685 int r; | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1686 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1687 if (prefs) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1688 gtk_widget_show(prefs); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1689 return; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1690 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1691 |
3366 | 1692 /* copy the preferences to tmp values... |
1693 * I liked "take affect immediately" Oh well :-( */ | |
1694 misc_options_new = misc_options; | |
1695 logging_options_new = logging_options; | |
1696 blist_options_new = blist_options; | |
1697 convo_options_new = convo_options; | |
1698 im_options_new = im_options; | |
1699 chat_options_new = chat_options; | |
1700 font_options_new = font_options; | |
1701 sound_options_new = sound_options; | |
1702 for (r = 0; r < NUM_SOUNDS; r++) | |
1703 sound_file_new[r] = g_strdup(sound_file[r]); | |
1704 away_options_new = away_options; | |
1705 away_resend_new = away_resend; | |
1706 report_idle_new = report_idle; | |
1707 auto_away_new = auto_away; | |
1708 default_away_new = default_away; | |
1709 fontsize_new = fontsize; | |
1710 web_browser_new = web_browser; | |
1711 proxytype_new = proxytype; | |
1712 g_snprintf(sound_cmd_new, sizeof(sound_cmd_new), "%s", sound_cmd); | |
1713 g_snprintf(web_command_new, sizeof(web_command_new), "%s", web_command); | |
1714 g_snprintf(fontface_new, sizeof(fontface_new), fontface); | |
1715 #if !GTK_CHECK_VERSION(1,3,0) | |
1716 g_snprintf(fontxfld_new, sizeof(fontxfld_new), fontxfld); | |
1717 #endif | |
1718 memcpy(&conv_size_new, &conv_size, sizeof(struct window_size)); | |
1719 memcpy(&buddy_chat_size_new, &buddy_chat_size, sizeof(struct window_size)); | |
1720 memcpy(&fgcolor_new, &fgcolor, sizeof(GdkColor)); | |
1721 memcpy(&bgcolor_new, &bgcolor, sizeof(GdkColor)); | |
1722 | |
1723 /* Create the window */ | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1724 prefs = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
905 | 1725 gtk_window_set_wmclass(GTK_WINDOW(prefs), "preferences", "Gaim"); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1726 gtk_widget_realize(prefs); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1727 aol_icon(prefs->window); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1728 gtk_window_set_title(GTK_WINDOW(prefs), _("Gaim - Preferences")); |
3366 | 1729 gtk_window_set_policy (GTK_WINDOW(prefs), FALSE, FALSE, TRUE); |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1730 gtk_signal_connect(GTK_OBJECT(prefs), "destroy", GTK_SIGNAL_FUNC(delete_prefs), NULL); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1731 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1732 vbox = gtk_vbox_new(FALSE, 5); |
1185 | 1733 gtk_container_border_width(GTK_CONTAINER(vbox), 5); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1734 gtk_container_add(GTK_CONTAINER(prefs), vbox); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1735 gtk_widget_show(vbox); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1736 |
3366 | 1737 hbox = gtk_hbox_new (FALSE, 6); |
1738 gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); | |
1739 gtk_container_add (GTK_CONTAINER(vbox), hbox); | |
1740 gtk_widget_show (hbox); | |
1741 | |
1742 frame = gtk_frame_new (NULL); | |
1743 gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); | |
1744 gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0); | |
1745 gtk_widget_show (frame); | |
1746 | |
1747 /* The tree -- much inspired by the Gimp */ | |
1748 #if GTK_CHECK_VERSION(1,3,0) | |
1749 prefstree = gtk_tree_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT); | |
1750 tree_v = gtk_tree_view_new_with_model (GTK_TREE_MODEL (prefstree)); | |
1751 gtk_container_add (GTK_CONTAINER (frame), tree_v); | |
1752 | |
1753 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (tree_v), FALSE); | |
1754 gtk_widget_show(tree_v); | |
1755 /* icons */ | |
1756 cell = gtk_cell_renderer_pixbuf_new (); | |
1757 column = gtk_tree_view_column_new_with_attributes ("icons", cell, "pixbuf", 0, NULL); | |
1758 | |
1759 /* text */ | |
1760 cell = gtk_cell_renderer_text_new (); | |
1761 column = gtk_tree_view_column_new_with_attributes ("text", cell, "text", 1, NULL); | |
1762 | |
1763 gtk_tree_view_append_column (GTK_TREE_VIEW (tree_v), column); | |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1764 |
3366 | 1765 #else |
1766 prefstree = gtk_ctree_new(1,0); | |
1767 gtk_ctree_set_line_style(prefstree, GTK_CTREE_LINES_NONE); | |
1768 gtk_ctree_set_expander_style(GTK_CTREE(prefstree), GTK_CTREE_EXPANDER_TRIANGLE); | |
1769 gtk_container_add(GTK_CONTAINER (frame), prefstree); | |
1770 gtk_widget_set_usize(prefstree, 150, -1); | |
1771 gtk_widget_show(prefstree); | |
1772 #endif /* GTK_CHECK_VERSION */ | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1773 |
3366 | 1774 /* The right side */ |
1775 frame = gtk_frame_new (NULL); | |
1776 gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); | |
1777 gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); | |
1778 gtk_widget_show (frame); | |
1779 | |
1780 vbox2 = gtk_vbox_new (FALSE, 4); | |
1781 gtk_container_add (GTK_CONTAINER (frame), vbox2); | |
1782 gtk_widget_show (vbox2); | |
1783 | |
1784 frame = gtk_frame_new (NULL); | |
1785 gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT); | |
1786 gtk_box_pack_start (GTK_BOX (vbox2), frame, FALSE, TRUE, 0); | |
1787 gtk_widget_show (frame); | |
1788 | |
1789 hbox = gtk_hbox_new (FALSE, 4); | |
1790 gtk_container_set_border_width (GTK_CONTAINER (hbox), 4); | |
1791 gtk_container_add (GTK_CONTAINER (frame), hbox); | |
1792 gtk_widget_show (hbox); | |
1793 | |
1794 preflabel = gtk_label_new(NULL); | |
1795 gtk_box_pack_end (GTK_BOX (hbox), preflabel, FALSE, FALSE, 0); | |
1796 gtk_widget_show (preflabel); | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1797 |
3366 | 1798 |
1799 /* The notebook */ | |
1800 prefsnotebook = notebook = gtk_notebook_new (); | |
1801 gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE); | |
1802 gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE); | |
1803 gtk_box_pack_start (GTK_BOX (vbox2), notebook, FALSE, FALSE, 0); | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1804 |
3366 | 1805 #if GTK_CHECK_VERSION(1,3,0) |
1806 sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_v)); | |
1807 g_signal_connect (G_OBJECT (sel), "changed", | |
1808 G_CALLBACK (pref_nb_select), | |
1809 notebook); | |
1810 #else | |
1811 gtk_signal_connect(GTK_OBJECT(prefstree), "tree-select-row", GTK_SIGNAL_FUNC(pref_nb_select), notebook); | |
1812 #endif | |
1813 gtk_widget_show(notebook); | |
1814 sep = gtk_hseparator_new(); | |
1815 gtk_widget_show(sep); | |
1816 gtk_box_pack_start (GTK_BOX (vbox), sep, FALSE, FALSE, 0); | |
1817 | |
1818 /* The buttons to press! */ | |
1819 hbox = gtk_hbox_new (FALSE, 6); | |
1820 gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); | |
1821 gtk_container_add (GTK_CONTAINER(vbox), hbox); | |
1822 gtk_widget_show (hbox); | |
3377 | 1823 |
3366 | 1824 #if GTK_CHECK_VERSION(1,3,0) |
3377 | 1825 button = gtk_button_new_from_stock (GTK_STOCK_OK); |
3366 | 1826 #else |
3377 | 1827 button = picture_button(prefs, _("OK"), join_xpm); |
3366 | 1828 #endif |
3377 | 1829 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ok_cb), prefs); |
3366 | 1830 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1831 if (misc_options & OPT_MISC_COOL_LOOK) | |
1832 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
1833 gtk_widget_show(button); | |
3377 | 1834 |
3366 | 1835 #if GTK_CHECK_VERSION(1,3,0) |
1836 button = gtk_button_new_from_stock (GTK_STOCK_APPLY); | |
1837 #else | |
1838 button = picture_button(prefs, _("Apply"), ok_xpm); | |
1839 #endif | |
1840 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(apply_cb), prefs); | |
1841 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
1842 if (misc_options & OPT_MISC_COOL_LOOK) | |
1843 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
1844 gtk_widget_show(button); | |
1845 | |
3377 | 1846 |
3366 | 1847 #if GTK_CHECK_VERSION(1,3,0) |
3377 | 1848 button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); |
3366 | 1849 #else |
3377 | 1850 button = picture_button(prefs, _("Close"), cancel_xpm); |
3366 | 1851 #endif |
3377 | 1852 gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), prefs); |
3366 | 1853 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1854 if (misc_options & OPT_MISC_COOL_LOOK) | |
1855 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
1856 gtk_widget_show(button); | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1857 |
3366 | 1858 prefs_notebook_init(); |
1859 #if GTK_CHECK_VERSION(1,3,0) | |
1860 gtk_tree_view_expand_all (GTK_TREE_VIEW(tree_v)); | |
1861 #endif | |
1862 gtk_widget_show(prefs); | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1863 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1864 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1865 static gint debug_delete(GtkWidget *w, GdkEvent *event, void *dummy) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1866 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1867 if (debugbutton) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1868 gtk_button_clicked(GTK_BUTTON(debugbutton)); |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1869 if (misc_options & OPT_MISC_DEBUG) { |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1870 misc_options ^= OPT_MISC_DEBUG; |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1871 save_prefs(); |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1872 } |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1873 g_free(dw); |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1874 dw = NULL; |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1875 return FALSE; |
1 | 1876 |
1877 } | |
1878 | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1879 static void build_debug() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1880 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1881 GtkWidget *scroll; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1882 GtkWidget *box; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1883 if (!dw) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1884 dw = g_new0(struct debug_window, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1885 |
2725
f3c094e78609
[gaim-migrate @ 2738]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2676
diff
changeset
|
1886 GAIM_DIALOG(dw->window); |
2536
0e0a54e5819a
[gaim-migrate @ 2549]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2471
diff
changeset
|
1887 gtk_window_set_title(GTK_WINDOW(dw->window), _("Gaim debug output window")); |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1888 gtk_window_set_wmclass(GTK_WINDOW(dw->window), "debug_out", "Gaim"); |
2282
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1889 gtk_signal_connect(GTK_OBJECT(dw->window), "delete_event", GTK_SIGNAL_FUNC(debug_delete), NULL); |
2547
ab55ac6234b8
[gaim-migrate @ 2560]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2536
diff
changeset
|
1890 gtk_widget_realize(dw->window); |
ab55ac6234b8
[gaim-migrate @ 2560]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2536
diff
changeset
|
1891 aol_icon(dw->window->window); |
2282
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1892 |
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1893 box = gtk_hbox_new(FALSE, 0); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1894 gtk_container_add(GTK_CONTAINER(dw->window), box); |
2282
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1895 gtk_widget_show(box); |
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1896 |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1897 dw->entry = gtk_text_new(NULL, NULL); |
2282
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1898 gtk_text_set_word_wrap(GTK_TEXT(dw->entry), TRUE); |
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1899 gtk_text_set_editable(GTK_TEXT(dw->entry), FALSE); |
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1900 gtk_container_add(GTK_CONTAINER(box), dw->entry); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1901 gtk_widget_set_usize(dw->entry, 500, 200); |
2282
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1902 gtk_widget_show(dw->entry); |
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1903 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1904 scroll = gtk_vscrollbar_new(GTK_TEXT(dw->entry)->vadj); |
2282
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1905 gtk_box_pack_start(GTK_BOX(box), scroll, FALSE, FALSE, 0); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1906 gtk_widget_show(scroll); |
2282
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1907 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1908 gtk_widget_show(dw->window); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1909 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1910 |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1911 void show_debug() |
1 | 1912 { |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1913 if ((misc_options & OPT_MISC_DEBUG)) { |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1914 if (!dw || !dw->window) |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1915 build_debug(); |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1916 gtk_widget_show(dw->window); |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1917 } else { |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1918 if (!dw) |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1919 return; |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1920 gtk_widget_destroy(dw->window); |
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1921 dw->window = NULL; |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1922 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1923 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1924 |
970 | 1925 void debug_printf(char *fmt, ...) |
1926 { | |
1927 va_list ap; | |
1928 gchar *s; | |
1929 | |
1366
155db3303ebb
[gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1357
diff
changeset
|
1930 va_start(ap, fmt); |
155db3303ebb
[gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1357
diff
changeset
|
1931 s = g_strdup_vprintf(fmt, ap); |
155db3303ebb
[gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1357
diff
changeset
|
1932 va_end(ap); |
155db3303ebb
[gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1357
diff
changeset
|
1933 |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1934 if (misc_options & OPT_MISC_DEBUG && dw) { |
2282
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1935 GtkAdjustment *adj = GTK_TEXT(dw->entry)->vadj; |
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1936 gboolean scroll = (adj->value == adj->upper - adj->lower - adj->page_size); |
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1937 |
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1938 gtk_text_freeze(GTK_TEXT(dw->entry)); |
970 | 1939 gtk_text_insert(GTK_TEXT(dw->entry), NULL, NULL, NULL, s, -1); |
2282
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1940 gtk_text_thaw(GTK_TEXT(dw->entry)); |
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1941 |
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1942 if (scroll) |
0dea5214d63f
[gaim-migrate @ 2292]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2269
diff
changeset
|
1943 gtk_adjustment_set_value(adj, adj->upper - adj->lower - adj->page_size); |
1366
155db3303ebb
[gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1357
diff
changeset
|
1944 } |
2823
cd23279122ed
[gaim-migrate @ 2836]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2794
diff
changeset
|
1945 if (opt_debug) |
cd23279122ed
[gaim-migrate @ 2836]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2794
diff
changeset
|
1946 g_print("%s", s); |
1366
155db3303ebb
[gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1357
diff
changeset
|
1947 g_free(s); |
970 | 1948 } |
3366 | 1949 |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1950 |
3366 | 1951 |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
1952 |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
1953 |
3366 | 1954 |
1 | 1955 void set_option(GtkWidget *w, int *option) |
1956 { | |
1957 *option = !(*option); | |
1958 } | |
1959 | |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1960 static void set_misc_option(GtkWidget *w, int option) |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1961 { |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1962 misc_options ^= option; |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1963 |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1964 if (option == OPT_MISC_DEBUG) |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1965 show_debug(); |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1966 |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1967 save_prefs(); |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1968 } |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1969 |
3366 | 1970 |
1971 /* Functions for each _options variable that sees what's changed, and makes | |
1972 * effective those changes that take place immediately (UI stuff) */ | |
1973 static void set_misc_options() | |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1974 { |
3366 | 1975 |
1976 /* int option = misc_options ^ misc_options_new; */ | |
1977 misc_options = misc_options_new; | |
1978 | |
1979 } | |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1980 |
3366 | 1981 static void set_logging_options() |
1982 { | |
1983 int option = logging_options ^ logging_options_new; | |
1984 logging_options = logging_options_new; | |
1985 | |
1986 if (option & OPT_LOG_ALL) | |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1987 update_log_convs(); |
1773 | 1988 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1989 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1990 |
3366 | 1991 static void set_blist_options() |
1 | 1992 { |
3366 | 1993 int option = blist_options ^ blist_options_new; |
1994 blist_options = blist_options_new; | |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1995 |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1996 if (!blist) |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
1997 return; |
3366 | 1998 |
1999 if (option & OPT_BLIST_BOTTOM_TAB) | |
2000 set_blist_tab(); | |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2001 |
3366 | 2002 if (option & OPT_BLIST_NO_BUTTONS) |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2003 build_imchat_box(!(blist_options & OPT_BLIST_NO_BUTTONS)); |
696
97b75ed155b0
[gaim-migrate @ 706]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
683
diff
changeset
|
2004 |
3366 | 2005 if (option & OPT_BLIST_SHOW_GRPNUM) |
1070
b288f17c2fb2
[gaim-migrate @ 1080]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1030
diff
changeset
|
2006 update_num_groups(); |
9 | 2007 |
3366 | 2008 if (option & OPT_BLIST_NO_MT_GRP) |
1072
81d19577285a
[gaim-migrate @ 1082]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1070
diff
changeset
|
2009 toggle_show_empty_groups(); |
81d19577285a
[gaim-migrate @ 1082]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1070
diff
changeset
|
2010 |
3366 | 2011 if ((option & OPT_BLIST_SHOW_BUTTON_XPM) || (option & OPT_BLIST_NO_BUTTONS)) |
1296
11e5b1220028
[gaim-migrate @ 1306]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1269
diff
changeset
|
2012 update_button_pix(); |
11e5b1220028
[gaim-migrate @ 1306]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1269
diff
changeset
|
2013 |
3366 | 2014 if (option & OPT_BLIST_SHOW_PIXMAPS) |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2015 toggle_buddy_pixmaps(); |
2593
5ba9ef368b8e
[gaim-migrate @ 2606]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2592
diff
changeset
|
2016 |
3366 | 2017 if ((option & OPT_BLIST_GREY_IDLERS) || (option & OPT_BLIST_SHOW_IDLETIME)) |
2594 | 2018 update_idle_times(); |
3032 | 2019 |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2020 } |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2021 |
3366 | 2022 static void set_convo_options() |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2023 { |
3366 | 2024 int option = convo_options ^ convo_options_new; |
2025 convo_options = convo_options_new; | |
2026 | |
2027 if (option & OPT_CONVO_SHOW_SMILEY) | |
1428
00b3d02a2168
[gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1411
diff
changeset
|
2028 toggle_smileys(); |
00b3d02a2168
[gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1411
diff
changeset
|
2029 |
3366 | 2030 if (option & OPT_CONVO_SHOW_TIME) |
1428
00b3d02a2168
[gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1411
diff
changeset
|
2031 toggle_timestamps(); |
00b3d02a2168
[gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1411
diff
changeset
|
2032 |
3366 | 2033 if (option & OPT_CONVO_CHECK_SPELLING) |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2034 toggle_spellchk(); |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
2035 |
3366 | 2036 if (option & OPT_CONVO_COMBINE) { |
2843
87d11d2a7d59
[gaim-migrate @ 2856]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2839
diff
changeset
|
2037 /* (OPT_IM_SIDE_TAB | OPT_IM_BR_TAB) == (OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB) */ |
3366 | 2038 |
2843
87d11d2a7d59
[gaim-migrate @ 2856]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2839
diff
changeset
|
2039 } |
87d11d2a7d59
[gaim-migrate @ 2856]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2839
diff
changeset
|
2040 |
1 | 2041 } |
2042 | |
3366 | 2043 static void set_im_options() |
1 | 2044 { |
3366 | 2045 int option = im_options ^ im_options_new; |
2046 im_options = im_options_new; | |
2047 | |
2048 if (option & OPT_IM_ONE_WINDOW) | |
2843
87d11d2a7d59
[gaim-migrate @ 2856]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2839
diff
changeset
|
2049 im_tabize(); |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2050 |
3366 | 2051 if (option & OPT_IM_SIDE_TAB || option & OPT_IM_BR_TAB) |
2052 update_im_tabs(); | |
2053 | |
2054 if (option & OPT_IM_HIDE_ICONS) | |
2323
bde2481bb4db
[gaim-migrate @ 2333]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2322
diff
changeset
|
2055 set_hide_icons(); |
bde2481bb4db
[gaim-migrate @ 2333]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2322
diff
changeset
|
2056 |
3366 | 2057 if (option & OPT_IM_ALIAS_TAB) |
2787
feea7103a235
[gaim-migrate @ 2800]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2760
diff
changeset
|
2058 set_convo_titles(); |
feea7103a235
[gaim-migrate @ 2800]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2760
diff
changeset
|
2059 |
3366 | 2060 if (option & OPT_IM_NO_ANIMATION) |
3013 | 2061 set_anim(); |
3366 | 2062 |
2063 if (option & OPT_IM_BUTTON_TEXT || option & OPT_IM_BUTTON_XPM) | |
2064 update_im_button_pix(); | |
1 | 2065 } |
2066 | |
3366 | 2067 static void set_chat_options() |
1 | 2068 { |
3366 | 2069 int option = chat_options ^ chat_options_new; |
2070 chat_options = chat_options_new; | |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2071 |
3366 | 2072 if (option & OPT_CHAT_ONE_WINDOW) |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2073 chat_tabize(); |
3366 | 2074 |
2075 if (option & OPT_CHAT_BUTTON_TEXT || option & OPT_CHAT_BUTTON_XPM) | |
2076 update_chat_button_pix(); | |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2077 } |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2078 |
3366 | 2079 void set_sound_options() |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2080 { |
3366 | 2081 /* int option = sound_options ^ sound_options_new; */ |
2082 sound_options = sound_options_new; | |
2083 | |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2084 } |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2085 |
3366 | 2086 static void set_font_options() |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2087 { |
3366 | 2088 /* int option = font_options ^ font_options_new; */ |
2089 font_options = font_options_new; | |
2090 | |
1253
8342d3aab1f1
[gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1250
diff
changeset
|
2091 update_font_buttons(); |
1 | 2092 } |
2093 | |
3366 | 2094 static void set_away_options() |
1525
ba8e6e211af5
[gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1455
diff
changeset
|
2095 { |
3366 | 2096 int option = away_options ^ away_options_new; |
2097 away_options = away_options_new; | |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2098 |
3366 | 2099 if (option & OPT_AWAY_QUEUE) |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2100 toggle_away_queue(); |
3366 | 2101 } |
1525
ba8e6e211af5
[gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1455
diff
changeset
|
2102 |
3366 | 2103 static void toggle_option(GtkWidget *w, int option) { |
2104 int *o = gtk_object_get_user_data(GTK_OBJECT(w)); | |
2105 *o ^= option; | |
1525
ba8e6e211af5
[gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1455
diff
changeset
|
2106 } |
ba8e6e211af5
[gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1455
diff
changeset
|
2107 |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2108 GtkWidget *gaim_button(const char *text, guint *options, int option, GtkWidget *page) |
1 | 2109 { |
2110 GtkWidget *button; | |
2111 button = gtk_check_button_new_with_label(text); | |
2112 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (*options & option)); | |
2113 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); | |
3366 | 2114 gtk_object_set_user_data(GTK_OBJECT(button), options); |
1 | 2115 |
3391 | 2116 /* So that the debug window happens immediately |
2117 * I don't think it should be "preferences," anyway. */ | |
2118 if (options == &misc_options && option == OPT_MISC_DEBUG) | |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2119 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_misc_option), |
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2120 (int *)option); |
3366 | 2121 else |
2122 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_option), | |
2313
bd9d403fb15b
[gaim-migrate @ 2323]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2282
diff
changeset
|
2123 (int *)option); |
3366 | 2124 |
1 | 2125 gtk_widget_show(button); |
2126 | |
2127 return button; | |
2128 } | |
2129 | |
3366 | 2130 void away_list_clicked(GtkWidget *widget, struct away_message *a) |
2131 {} | |
2132 void default_away_menu_init(GtkWidget *omenu) | |
3032 | 2133 { |
3366 | 2134 GtkWidget *menu, *opt; |
2135 int index = 0; | |
2136 GSList *awy = away_messages; | |
2137 struct away_message *a; | |
2138 | |
2139 menu = gtk_menu_new(); | |
2140 | |
2141 while (awy) { | |
2142 a = (struct away_message *)awy->data; | |
2143 opt = gtk_menu_item_new_with_label(a->name); | |
2144 gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(set_default_away), | |
2145 (gpointer)index); | |
2146 gtk_widget_show(opt); | |
2147 gtk_menu_append(GTK_MENU(menu), opt); | |
2148 | |
2149 awy = awy->next; | |
2150 index++; | |
2151 } | |
2152 | |
2153 gtk_option_menu_remove_menu(GTK_OPTION_MENU(omenu)); | |
2154 gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), menu); | |
2155 gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), g_slist_index(away_messages, default_away)); | |
2156 } | |
2157 | |
2158 GtkWidget *pref_fg_picture = NULL; | |
2159 GtkWidget *pref_bg_picture = NULL; | |
2160 | |
2161 void destroy_colorsel(GtkWidget *w, gpointer d) | |
2162 { | |
2163 if (d) { | |
2164 gtk_widget_destroy(fgcseld); | |
2165 fgcseld = NULL; | |
2166 } else { | |
2167 gtk_widget_destroy(bgcseld); | |
2168 bgcseld = NULL; | |
2169 } | |
3032 | 2170 } |
2171 | |
3366 | 2172 void apply_color_dlg(GtkWidget *w, gpointer d) |
3032 | 2173 { |
3379 | 2174 #if GTK_CHECK_VERSION(1,3,0) |
3366 | 2175 if ((int)d == 1) { |
2176 gtk_color_selection_get_current_color(GTK_COLOR_SELECTION | |
2177 (GTK_COLOR_SELECTION_DIALOG(fgcseld)->colorsel), | |
2178 &fgcolor_new); | |
2179 #else | |
3379 | 2180 gdouble color[3]; |
2181 if ((int)d == 1) { | |
3366 | 2182 gtk_color_selection_get_color(GTK_COLOR_SELECTION |
2183 (GTK_COLOR_SELECTION_DIALOG(fgcseld)->colorsel), color); | |
3032 | 2184 |
3366 | 2185 fgcolor_new.red = ((guint16)(color[0] * 65535)) >> 8; |
2186 fgcolor_new.green = ((guint16)(color[1] * 65535)) >> 8; | |
2187 fgcolor_new.blue = ((guint16)(color[2] * 65535)) >> 8; | |
2188 #endif | |
2189 destroy_colorsel(NULL, (void *)1); | |
2190 update_color(NULL, pref_fg_picture); | |
2191 } else { | |
2192 #if GTK_CHECK_VERSION(1,3,0) | |
2193 gtk_color_selection_get_current_color(GTK_COLOR_SELECTION | |
2194 (GTK_COLOR_SELECTION_DIALOG(bgcseld)->colorsel), | |
2195 &bgcolor_new); | |
2196 #else | |
2197 gtk_color_selection_get_color(GTK_COLOR_SELECTION | |
2198 (GTK_COLOR_SELECTION_DIALOG(bgcseld)->colorsel), color); | |
2199 | |
2200 bgcolor_new.red = ((guint16)(color[0] * 65535)) >> 8; | |
2201 bgcolor_new.green = ((guint16)(color[1] * 65535)) >> 8; | |
2202 bgcolor_new.blue = ((guint16)(color[2] * 65535)) >> 8; | |
2203 #endif | |
2204 destroy_colorsel(NULL, (void *)0); | |
2205 update_color(NULL, pref_bg_picture); | |
2206 } | |
3032 | 2207 } |
2208 | |
3366 | 2209 void update_color(GtkWidget *w, GtkWidget *pic) |
1 | 2210 { |
3366 | 2211 GdkColor c; |
2212 GtkStyle *style; | |
2213 c.pixel = 0; | |
2214 | |
2215 if (pic == pref_fg_picture) { | |
2216 if (font_options_new & OPT_FONT_FGCOL) { | |
2217 c.red = fgcolor_new.red; | |
2218 c.blue = fgcolor_new.blue; | |
2219 c.green = fgcolor_new.green; | |
2220 } else { | |
2221 c.red = 0; | |
2222 c.blue = 0; | |
2223 c.green = 0; | |
2224 } | |
2225 } else { | |
2226 if (font_options_new & OPT_FONT_BGCOL) { | |
2227 c.red = bgcolor_new.red; | |
2228 c.blue = bgcolor_new.blue; | |
2229 c.green = bgcolor_new.green; | |
2230 } else { | |
2231 c.red = 0xffff; | |
2232 c.blue = 0xffff; | |
2233 c.green = 0xffff; | |
2234 } | |
2235 } | |
2236 | |
2237 style = gtk_style_new(); | |
2238 style->bg[0] = c; | |
2239 gtk_widget_set_style(pic, style); | |
2240 gtk_style_unref(style); | |
2241 } | |
2242 void set_default_away(GtkWidget *w, gpointer i) | |
2243 { | |
2244 | |
2245 int length = g_slist_length(away_messages); | |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
2246 |
3366 | 2247 if (away_messages == NULL) |
2248 default_away_new = NULL; | |
2249 else if ((int)i >= length) | |
2250 default_away_new = g_slist_nth_data(away_messages, length - 1); | |
2251 else | |
2252 default_away_new = g_slist_nth_data(away_messages, (int)i); | |
2253 } | |
2254 | |
2255 static void update_spin_value(GtkWidget *w, GtkWidget *spin) | |
2256 { | |
2257 int *value = gtk_object_get_user_data(GTK_OBJECT(spin)); | |
2258 *value = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin)); | |
2259 } | |
2260 GtkWidget *gaim_labeled_spin_button(GtkWidget *box, const gchar *title, int *val, int min, int max) | |
2261 { | |
2262 GtkWidget *hbox; | |
2263 GtkWidget *label; | |
2264 GtkWidget *spin; | |
2265 GtkObject *adjust; | |
901
f168f2c7b357
[gaim-migrate @ 911]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
893
diff
changeset
|
2266 |
3366 | 2267 hbox = gtk_hbox_new(FALSE, 5); |
2268 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); | |
2269 gtk_widget_show(hbox); | |
2270 | |
2271 label = gtk_label_new(title); | |
2272 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
2273 gtk_widget_show(label); | |
1881
a02584b98823
[gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1840
diff
changeset
|
2274 |
3366 | 2275 adjust = gtk_adjustment_new(*val, min, max, 1, 1, 1); |
2276 spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0); | |
2277 gtk_object_set_user_data(GTK_OBJECT(spin), val); | |
2278 gtk_widget_set_usize(spin, 50, -1); | |
2279 gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0); | |
2280 gtk_signal_connect(GTK_OBJECT(adjust), "value-changed", | |
2281 GTK_SIGNAL_FUNC(update_spin_value), GTK_WIDGET(spin)); | |
2282 gtk_widget_show(spin); | |
2283 return spin; | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2284 } |
1 | 2285 |
3366 | 2286 void dropdown_set(GtkObject *w, int *option) |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2287 { |
3366 | 2288 int opt = (int)gtk_object_get_user_data(w); |
2289 int clear = (int)gtk_object_get_data(w, "clear"); | |
2290 | |
2291 if (clear != -1) { | |
2292 *option = *option & ~clear; | |
2293 *option = *option | opt; | |
2294 } else { | |
2295 debug_printf("HELLO %d\n", opt); | |
2296 *option = opt; | |
2297 } | |
2298 | |
2299 if (option == &proxytype_new) { | |
2300 if (opt == PROXY_NONE) | |
2301 gtk_widget_set_sensitive(prefs_proxy_frame, FALSE); | |
2302 else | |
2303 gtk_widget_set_sensitive(prefs_proxy_frame, TRUE); | |
2304 } else if (option == &web_browser_new) { | |
2305 if (opt == BROWSER_MANUAL) | |
2306 gtk_widget_set_sensitive(browser_entry, TRUE); | |
2307 else | |
2308 gtk_widget_set_sensitive(browser_entry, FALSE); | |
3379 | 2309 } else if (*option == sound_options_new) { |
3366 | 2310 if (opt == OPT_SOUND_CMD) |
2311 gtk_widget_set_sensitive(sndcmd, TRUE); | |
2312 else | |
2313 gtk_widget_set_sensitive(sndcmd, FALSE); | |
2314 } | |
2315 | |
1 | 2316 } |
2317 | |
3366 | 2318 static GtkWidget *gaim_dropdown(GtkWidget *box, const gchar *title, int *option, int clear, ...) |
1 | 2319 { |
3366 | 2320 va_list menuitems; |
2321 GtkWidget *dropdown, *opt, *menu; | |
2322 GtkWidget *label; | |
2323 gchar *text; | |
2324 int value; | |
2325 int o = 0; | |
2326 GtkWidget *hbox; | |
1 | 2327 |
3366 | 2328 hbox = gtk_hbox_new(FALSE, 5); |
2329 gtk_container_add (GTK_CONTAINER (box), hbox); | |
2330 gtk_widget_show(hbox); | |
2331 | |
2332 label = gtk_label_new(title); | |
2333 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
2334 gtk_widget_show(label); | |
2335 | |
2336 va_start(menuitems, clear); | |
2337 text = va_arg(menuitems, gchar *); | |
2338 | |
2339 if (!text) | |
2340 return NULL; | |
2341 | |
2342 dropdown = gtk_option_menu_new(); | |
2343 menu = gtk_menu_new(); | |
1 | 2344 |
3366 | 2345 while (text) { |
2346 value = va_arg(menuitems, int); | |
2347 opt = gtk_menu_item_new_with_label(text); | |
2348 gtk_object_set_user_data(GTK_OBJECT(opt), (void *)value); | |
2349 gtk_object_set_data(GTK_OBJECT(opt), "clear", (void *)clear); | |
2350 gtk_signal_connect(GTK_OBJECT(opt), "activate", | |
2351 GTK_SIGNAL_FUNC(dropdown_set), (void *)option); | |
2352 gtk_widget_show(opt); | |
2353 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); | |
1 | 2354 |
3366 | 2355 if (((clear > -1) && ((*option & value) == value)) || *option == value) { |
2356 gtk_menu_set_active(GTK_MENU(menu), o); | |
2357 } | |
2358 text = va_arg(menuitems, gchar *); | |
2359 o++; | |
2360 } | |
2262
9c8f353331e7
[gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2254
diff
changeset
|
2361 |
3366 | 2362 va_end(menuitems); |
1 | 2363 |
3366 | 2364 gtk_option_menu_set_menu(GTK_OPTION_MENU(dropdown), menu); |
2365 gtk_box_pack_start(GTK_BOX(hbox), dropdown, FALSE, FALSE, 0); | |
2366 gtk_widget_show(dropdown); | |
2367 return dropdown; | |
2368 } | |
2369 | |
2370 static GtkWidget *show_color_pref(GtkWidget *box, gboolean fgc) | |
1 | 2371 { |
3366 | 2372 /* more stuff stolen from X-Chat */ |
2373 GtkWidget *swid; | |
2374 GdkColor c; | |
2375 GtkStyle *style; | |
2376 c.pixel = 0; | |
2377 if (fgc) { | |
2378 if (font_options_new & OPT_FONT_FGCOL) { | |
2379 c.red = fgcolor_new.red; | |
2380 c.blue = fgcolor_new.blue; | |
2381 c.green = fgcolor_new.green; | |
2382 } else { | |
2383 c.red = 0; | |
2384 c.blue = 0; | |
2385 c.green = 0; | |
2386 } | |
2387 } else { | |
2388 if (font_options_new & OPT_FONT_BGCOL) { | |
2389 c.red = bgcolor_new.red; | |
2390 c.blue = bgcolor_new.blue; | |
2391 c.green = bgcolor_new.green; | |
2392 } else { | |
2393 c.red = 0xffff; | |
2394 c.blue = 0xffff; | |
2395 c.green = 0xffff; | |
2396 } | |
2397 } | |
1 | 2398 |
3366 | 2399 style = gtk_style_new(); |
2400 style->bg[0] = c; | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2401 |
3366 | 2402 swid = gtk_event_box_new(); |
2403 gtk_widget_set_style(GTK_WIDGET(swid), style); | |
2404 gtk_style_unref(style); | |
2405 gtk_widget_set_usize(GTK_WIDGET(swid), 40, -1); | |
2406 gtk_box_pack_start(GTK_BOX(box), swid, FALSE, FALSE, 5); | |
2407 gtk_widget_show(swid); | |
2408 return swid; | |
1 | 2409 } |
3366 | 2410 void apply_font_dlg(GtkWidget *w, GtkWidget *f) |
1124
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
2411 { |
3366 | 2412 int i = 0; |
2413 #if !GTK_CHECK_VERSION(1,3,0) | |
2414 int j = 0, k = 0; | |
2415 #endif | |
2416 char *fontname; | |
2417 | |
2418 fontname = g_strdup(gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(fontseld))); | |
2419 destroy_fontsel(0, 0); | |
1124
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
2420 |
3366 | 2421 #if !GTK_CHECK_VERSION(1,3,0) |
2422 for (i = 0; i < strlen(fontname); i++) { | |
2423 if (fontname[i] == '-') { | |
2424 if (++j > 2) | |
2425 break; | |
2426 } else if (j == 2) | |
2427 fontface_new[k++] = fontname[i]; | |
1124
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
2428 } |
3366 | 2429 fontface_new[k] = '\0'; |
2430 g_snprintf(fontxfld_new, sizeof(fontxfld_new), "%s", fontname); | |
2431 #else | |
2432 while(fontname[i] && !isdigit(fontname[i]) && i < sizeof(fontface_new)) { | |
2433 fontface_new[i] = fontname[i]; | |
2434 i++; | |
2435 } | |
2436 | |
2437 #endif | |
2438 g_free(fontname); | |
1124
a70d5200edde
[gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1123
diff
changeset
|
2439 } |