Mercurial > pidgin
annotate src/prefs.c @ 597:3a24fd19ff5f
[gaim-migrate @ 607]
print_to_conv in perl.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 03 Aug 2000 19:27:42 +0000 |
parents | 2838c9ca0823 |
children | eaab8abda2c0 |
rev | line source |
---|---|
1 | 1 /* |
2 * gaim | |
3 * | |
4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net> | |
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 |
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
340
diff
changeset
|
23 #include "../config.h" |
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> | |
34 #include <gtk/gtk.h> | |
35 #include "gaim.h" | |
36 #include "proxy.h" | |
411
a330017b3aa4
[gaim-migrate @ 421]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
378
diff
changeset
|
37 #include "gnome_applet_mgr.h" |
588 | 38 #include "pixmaps/cancel.xpm" |
595 | 39 #include "pixmaps/fontface2.xpm" |
40 #include "pixmaps/refresh.xpm" | |
1 | 41 |
42 struct prefs_data *pd = NULL; | |
43 struct debug_window *dw = NULL; | |
44 | |
45 GtkWidget *debugbutton; | |
46 | |
47 struct chat_page { | |
48 GtkWidget *list1; | |
49 GtkWidget *list2; | |
50 }; | |
51 | |
52 | |
53 char debug_buff[BUF_LONG]; | |
54 | |
55 void do_chat_page(GtkWidget *page); | |
56 | |
57 void list_clicked( GtkWidget *widget, struct away_message *a); | |
58 void list_unclicked( GtkWidget *widget, struct away_message *a); | |
59 | |
171
789c792ed14b
[gaim-migrate @ 181]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
150
diff
changeset
|
60 void show_debug(GtkObject *); |
1 | 61 |
62 void remove_away_message(GtkWidget *widget, void *dummy) | |
63 { | |
64 GList *i; | |
65 struct away_message *a; | |
66 | |
67 i = GTK_LIST(pd->away_list)->selection; | |
68 | |
69 a = gtk_object_get_user_data(GTK_OBJECT(i->data)); | |
70 | |
71 rem_away_mess(NULL, a); | |
72 } | |
73 | |
74 void away_list_clicked( GtkWidget *widget, struct away_message *a) | |
75 { | |
76 gchar buffer[2048]; | |
77 guint text_len; | |
78 | |
79 pd->cur_message = a; | |
80 | |
81 /* Get proper Length */ | |
82 text_len = gtk_text_get_length(GTK_TEXT(pd->away_text)); | |
83 pd->edited_message = gtk_editable_get_chars(GTK_EDITABLE(pd->away_text), 0, text_len); | |
84 | |
85 /* Clear the Box */ | |
86 gtk_text_set_point(GTK_TEXT(pd->away_text), 0 ); | |
87 gtk_text_forward_delete (GTK_TEXT(pd->away_text), text_len); | |
88 | |
89 /* Fill the text box with new message */ | |
90 strcpy(buffer, a->message); | |
91 gtk_text_insert(GTK_TEXT(pd->away_text), NULL, NULL, NULL, buffer, -1); | |
92 | |
93 | |
94 } | |
95 | |
96 void away_list_unclicked( GtkWidget *widget, struct away_message *a) | |
97 { | |
98 if (pd == NULL) | |
99 return; | |
100 strcpy(a->message, pd->edited_message); | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
101 save_prefs(); |
1 | 102 } |
103 | |
104 void set_option(GtkWidget *w, int *option) | |
105 { | |
106 *option = !(*option); | |
107 } | |
108 | |
109 void set_display_option(GtkWidget *w, int *option) | |
110 { | |
111 display_options = display_options ^ (int)option; | |
9 | 112 |
18 | 113 if (blist) update_button_pix(); |
9 | 114 |
84 | 115 #ifdef USE_APPLET |
82 | 116 update_pixmaps(); |
117 #endif | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
118 |
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
119 save_prefs(); |
1 | 120 } |
121 | |
122 void set_sound_option(GtkWidget *w, int *option) | |
123 { | |
124 sound_options = sound_options ^ (int)option; | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
125 save_prefs(); |
1 | 126 } |
127 | |
128 void set_font_option(GtkWidget *w, int *option) | |
129 { | |
130 font_options = font_options ^ (int)option; | |
131 | |
132 update_font_buttons(); | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
133 |
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
134 save_prefs(); |
1 | 135 } |
136 | |
137 void set_general_option(GtkWidget *w, int *option) | |
138 { | |
139 general_options = general_options ^ (int)option; | |
140 | |
141 if ((int)option == OPT_GEN_SHOW_LAGMETER) | |
142 update_lagometer(-1); | |
143 if ((int)option == OPT_GEN_LOG_ALL) | |
144 update_log_convs(); | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
145 save_prefs(); |
1 | 146 |
147 /* | |
148 if (data == &show_grp_nums) | |
149 update_num_groups(); | |
150 if (data == &showidle || data == &showpix) | |
151 update_show_idlepix(); | |
18 | 152 if (data == &button_pix && blist) |
1 | 153 update_button_pix(); |
154 if (data == &transparent) | |
155 update_transparency(); | |
156 */ | |
157 | |
158 } | |
159 | |
160 | |
161 static gint debug_delete(GtkWidget *w, GdkEvent *event, void *dummy) | |
162 { | |
171
789c792ed14b
[gaim-migrate @ 181]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
150
diff
changeset
|
163 if (debugbutton) |
789c792ed14b
[gaim-migrate @ 181]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
150
diff
changeset
|
164 gtk_button_clicked(GTK_BUTTON(debugbutton)); |
789c792ed14b
[gaim-migrate @ 181]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
150
diff
changeset
|
165 if (general_options & OPT_GEN_DEBUG) |
1 | 166 { |
171
789c792ed14b
[gaim-migrate @ 181]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
150
diff
changeset
|
167 general_options = general_options ^ (int)OPT_GEN_DEBUG; |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
168 save_prefs(); |
1 | 169 } |
170 g_free(dw); | |
171 dw=NULL; | |
172 return FALSE; | |
173 | |
174 } | |
175 | |
176 static gint handle_delete(GtkWidget *w, GdkEvent *event, void *dummy) | |
177 { | |
178 guint text_len; | |
179 struct away_message *a; | |
180 | |
181 | |
182 if (pd->cur_message) { | |
183 | |
184 a = pd->cur_message; | |
185 | |
186 | |
187 /* Get proper Length and grab data */ | |
188 text_len = gtk_text_get_length(GTK_TEXT(pd->away_text)); | |
189 pd->edited_message = gtk_editable_get_chars(GTK_EDITABLE(pd->away_text), 0, text_len); | |
190 | |
191 /* Store the data for later use */ | |
192 strcpy(a->message, pd->edited_message); | |
193 | |
194 } | |
195 | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
196 save_prefs(); |
1 | 197 |
198 if (event == NULL) | |
199 { | |
200 gtk_widget_destroy(pd->window); | |
201 debugbutton=NULL; | |
202 } | |
203 g_free(pd); | |
204 pd = NULL; | |
205 | |
206 | |
207 return FALSE; | |
208 } | |
209 | |
210 static int | |
211 manualentry_key_pressed(GtkWidget *w, GdkEvent *event, void *dummy) | |
212 { | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
213 g_snprintf(web_command, sizeof(web_command), "%s", gtk_entry_get_text(GTK_ENTRY(pd->browser_entry))); |
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
214 save_prefs(); |
1 | 215 return TRUE; |
216 } | |
217 | |
218 static int | |
219 connection_key_pressed(GtkWidget *w, GdkEvent *event, void *dummy) | |
220 { | |
221 g_snprintf(aim_host, sizeof(aim_host), "%s", gtk_entry_get_text(GTK_ENTRY(pd->aim_host_entry))); | |
222 sscanf(gtk_entry_get_text(GTK_ENTRY(pd->aim_port_entry)), "%d", &aim_port); | |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
223 if (proxy_type != PROXY_NONE) { |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
224 g_snprintf(proxy_host, sizeof(proxy_host), "%s", gtk_entry_get_text(GTK_ENTRY(pd->proxy_host_entry))); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
225 sscanf(gtk_entry_get_text(GTK_ENTRY(pd->proxy_port_entry)), "%d", &proxy_port); |
253
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
226 } |
1 | 227 |
228 g_snprintf(login_host, sizeof(login_host), "%s", gtk_entry_get_text(GTK_ENTRY(pd->login_host_entry))); | |
229 sscanf(gtk_entry_get_text(GTK_ENTRY(pd->login_port_entry)), "%d", &login_port); | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
230 save_prefs(); |
1 | 231 return TRUE; |
232 } | |
233 | |
234 | |
235 | |
236 | |
237 static void set_browser(GtkWidget *w, int *data) | |
238 { | |
239 web_browser = (int)data; | |
240 if (web_browser != BROWSER_MANUAL) { | |
241 if (pd->browser_entry) | |
242 gtk_widget_set_sensitive(pd->browser_entry, FALSE); | |
243 } else { | |
244 if (pd->browser_entry) | |
245 gtk_widget_set_sensitive(pd->browser_entry, TRUE); | |
246 } | |
247 | |
248 if (web_browser != BROWSER_NETSCAPE) { | |
249 if (pd->nwbutton) | |
250 gtk_widget_set_sensitive(pd->nwbutton, FALSE); | |
251 } else { | |
252 if (pd->nwbutton) | |
253 gtk_widget_set_sensitive(pd->nwbutton, TRUE); | |
254 } | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
255 |
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
256 |
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
257 save_prefs(); |
1 | 258 } |
259 | |
260 static void set_connect(GtkWidget *w, int *data) | |
261 { | |
262 proxy_type = (int)data; | |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
263 if (proxy_type != PROXY_NONE) { |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
264 if (pd->proxy_host_entry) |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
265 gtk_widget_set_sensitive(pd->proxy_host_entry, TRUE); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
266 if (pd->proxy_port_entry) |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
267 gtk_widget_set_sensitive(pd->proxy_port_entry, TRUE); |
1 | 268 } else { |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
269 if (pd->proxy_host_entry) |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
270 gtk_widget_set_sensitive(pd->proxy_host_entry, FALSE); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
271 if (pd->proxy_port_entry) |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
272 gtk_widget_set_sensitive(pd->proxy_port_entry, FALSE); |
1 | 273 } |
274 | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
275 save_prefs(); |
1 | 276 } |
277 | |
278 static void set_idle(GtkWidget *w, int *data) | |
279 { | |
280 report_idle = (int)data; | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
281 save_prefs(); |
1 | 282 } |
283 | |
284 | |
285 GtkWidget *gaim_button(const char *text, int *options, int option, GtkWidget *page) | |
286 { | |
287 GtkWidget *button; | |
288 button = gtk_check_button_new_with_label(text); | |
289 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (*options & option)); | |
290 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); | |
291 | |
292 if (options == &font_options) | |
293 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_font_option), (int *)option); | |
294 | |
295 if (options == &sound_options) | |
296 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_sound_option), (int *)option); | |
297 if (options == &display_options) | |
298 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_display_option), (int *)option); | |
299 | |
300 if (options == &general_options) | |
301 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_general_option), (int *)option); | |
302 gtk_widget_show(button); | |
303 | |
304 return button; | |
305 } | |
306 | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
307 |
1 | 308 void build_prefs() |
309 { | |
310 GtkWidget *bbox; | |
311 GtkWidget *vbox; | |
312 GtkWidget *idlebox; | |
313 GtkWidget *idleframe; | |
314 GtkWidget *genbox; | |
315 GtkWidget *fontbox; | |
316 GtkWidget *fontframe; | |
317 GtkWidget *appbox; | |
318 GtkWidget *away_topbox; | |
319 GtkWidget *away_botbox; | |
320 GtkWidget *add_away; | |
321 GtkWidget *remove_away; | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
322 GtkWidget *close; |
1 | 323 GtkWidget *notebook; |
324 GtkWidget *sound_page; | |
325 /* GtkWidget *debug_page; */ | |
326 GtkWidget *general_page; | |
327 GtkWidget *appearance_page; | |
328 GtkWidget *chat_page; | |
329 GtkWidget *browser_page; | |
330 GtkWidget *connection_page; | |
411
a330017b3aa4
[gaim-migrate @ 421]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
378
diff
changeset
|
331 GtkWidget *connectopt; |
a330017b3aa4
[gaim-migrate @ 421]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
378
diff
changeset
|
332 GtkWidget *hbox; |
a330017b3aa4
[gaim-migrate @ 421]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
378
diff
changeset
|
333 GtkWidget *hbox2; |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
334 #ifdef USE_APPLET |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
335 GtkWidget *applet_page; |
340
0d9cfc3579a5
[gaim-migrate @ 350]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
338
diff
changeset
|
336 GtkWidget *appletbox; |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
337 #endif |
1 | 338 GtkWidget *label; |
339 GtkWidget *browseropt; | |
340 GtkWidget *idleopt; | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
341 |
1 | 342 GList *awy = away_messages; |
343 struct away_message *a; | |
344 GtkWidget *sw; | |
345 GtkWidget *sw2; | |
346 GtkWidget *away_page; | |
230
83dd297aa363
[gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
206
diff
changeset
|
347 GtkWidget *select_font; |
234
985635758c33
[gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
230
diff
changeset
|
348 GtkWidget *font_face_for_text; |
595 | 349 GtkWidget *button_box, *icon_i, *button_label; |
584 | 350 GdkBitmap *mask; |
351 GdkPixmap *icon; | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
352 |
1 | 353 GtkWidget *list_item; |
354 | |
355 gchar buffer[64]; | |
356 | |
357 if (!pd) | |
358 pd = g_new0(struct prefs_data, 1); | |
359 | |
596 | 360 pd->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
597
3a24fd19ff5f
[gaim-migrate @ 607]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
596
diff
changeset
|
361 gtk_widget_realize(pd->window); |
1 | 362 aol_icon(pd->window->window); |
363 gtk_container_border_width(GTK_CONTAINER(pd->window), 10); | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
364 gtk_window_set_title(GTK_WINDOW(pd->window), _("Gaim - Preferences")); |
1 | 365 |
366 vbox = gtk_vbox_new(FALSE, 5); | |
367 gtk_container_add(GTK_CONTAINER(pd->window), vbox); | |
368 | |
369 /* Notebooks */ | |
370 notebook = gtk_notebook_new(); | |
371 gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 5); | |
372 | |
373 | |
374 /* General page */ | |
375 general_page = gtk_hbox_new(FALSE, 0); | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
376 label = gtk_label_new(_("General")); |
1 | 377 gtk_widget_show(label); |
378 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), general_page, label); | |
379 | |
380 genbox = gtk_vbox_new(FALSE, 5); | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
381 idleframe = gtk_frame_new(_("Idle")); |
1 | 382 idlebox = gtk_vbox_new(FALSE, 5); |
383 | |
384 gtk_box_pack_start(GTK_BOX(general_page), genbox, TRUE, TRUE, 5); | |
385 gtk_box_pack_start(GTK_BOX(general_page), idleframe, TRUE, TRUE, 5); | |
386 gtk_container_add(GTK_CONTAINER(idleframe), idlebox); | |
387 | |
388 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
389 gaim_button(_("Enter sends message"), &general_options, OPT_GEN_ENTER_SENDS, genbox); |
575
a33616e4e48d
[gaim-migrate @ 585]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
572
diff
changeset
|
390 gaim_button(_("Control characters for HTML (e.g. Ctrl-I for italics)"), &general_options, OPT_GEN_CTL_CHARS, genbox); |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
391 gaim_button(_("Auto-login"), &general_options, OPT_GEN_AUTO_LOGIN, genbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
392 gaim_button(_("Log All Conversations"), &general_options, OPT_GEN_LOG_ALL, genbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
393 gaim_button(_("Strip HTML from log files"), &general_options, OPT_GEN_STRIP_HTML, genbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
394 gaim_button(_("Raise windows when message recieved"), &general_options, OPT_GEN_POPUP_WINDOWS, genbox); |
373
1d29321843b0
[gaim-migrate @ 383]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
371
diff
changeset
|
395 gaim_button(_("Raise chat windows when people speak"), &general_options, OPT_GEN_POPUP_CHAT, genbox); |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
396 gaim_button(_("Send URLs as links"), &general_options, OPT_GEN_SEND_LINKS, genbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
397 gaim_button(_("Show Lag-O-Meter"), &general_options, OPT_GEN_SHOW_LAGMETER, genbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
398 gaim_button(_("Save some window size/positions"), &general_options, OPT_GEN_SAVED_WINDOWS, genbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
399 gaim_button(_("Ignore new conversations when away"), &general_options, OPT_GEN_DISCARD_WHEN_AWAY, genbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
400 gaim_button(_("Automagically highlight misspelled words"), &general_options, OPT_GEN_CHECK_SPELLING, genbox); |
375
1eae69f076d2
[gaim-migrate @ 385]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
373
diff
changeset
|
401 gaim_button(_("Sending messages removes away status"), &general_options, OPT_GEN_BACK_ON_IM, genbox); |
176
c99d0b82c8a8
[gaim-migrate @ 186]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
171
diff
changeset
|
402 if (!dw && (general_options & OPT_GEN_DEBUG)) |
c99d0b82c8a8
[gaim-migrate @ 186]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
171
diff
changeset
|
403 general_options = general_options ^ OPT_GEN_DEBUG; |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
404 debugbutton = gaim_button(_("Enable debug mode"), &general_options, OPT_GEN_DEBUG, genbox); |
1 | 405 |
406 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
407 idleopt = gtk_radio_button_new_with_label(NULL, _("No Idle")); |
1 | 408 gtk_box_pack_start(GTK_BOX(idlebox), idleopt, FALSE, FALSE, 0); |
409 gtk_signal_connect(GTK_OBJECT(idleopt), "clicked", GTK_SIGNAL_FUNC(set_idle), (void *)IDLE_NONE); | |
410 gtk_widget_show(idleopt); | |
411 if (report_idle == IDLE_NONE) | |
412 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(idleopt), TRUE); | |
413 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
414 idleopt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(idleopt)), _("GAIM Use")); |
1 | 415 gtk_box_pack_start(GTK_BOX(idlebox), idleopt, FALSE, FALSE, 0); |
416 gtk_signal_connect(GTK_OBJECT(idleopt), "clicked", GTK_SIGNAL_FUNC(set_idle), (void *)IDLE_GAIM); | |
417 gtk_widget_show(idleopt); | |
418 if (report_idle == IDLE_GAIM) | |
419 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(idleopt), TRUE); | |
420 | |
421 /* idleopt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(idleopt)), "X Use"); | |
422 gtk_box_pack_start(GTK_BOX(idlebox), idleopt, FALSE, FALSE, 0); | |
423 gtk_signal_connect(GTK_OBJECT(idleopt), "clicked", GTK_SIGNAL_FUNC(set_idle), (void *)IDLE_SYSTEM); | |
424 gtk_widget_show(idleopt); | |
425 if (report_idle == IDLE_SYSTEM) | |
426 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(idleopt), TRUE); | |
427 */ | |
428 | |
429 gtk_widget_show(general_page); | |
430 gtk_widget_show(genbox); | |
431 gtk_widget_show(idlebox); | |
432 gtk_widget_show(idleframe); | |
433 | |
434 | |
171
789c792ed14b
[gaim-migrate @ 181]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
150
diff
changeset
|
435 gtk_signal_connect_object( GTK_OBJECT(debugbutton), "clicked", GTK_SIGNAL_FUNC(show_debug), NULL); |
1 | 436 |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
437 |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
438 /* Applet */ |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
439 #ifdef USE_APPLET |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
440 |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
441 applet_page = gtk_vbox_new(FALSE, 0); |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
442 label = gtk_label_new(_("Applet")); |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
443 gtk_widget_show(label); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
444 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), applet_page, label); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
445 |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
446 appletbox = gtk_vbox_new(FALSE, 5); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
447 gtk_box_pack_start(GTK_BOX(applet_page), appletbox, TRUE, TRUE, 5); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
448 |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
449 gaim_button(_("Automatically Show Buddy List"), &general_options, OPT_GEN_APP_BUDDY_SHOW, appletbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
450 gaim_button(_("Sounds go through GNOME"), &sound_options, OPT_SOUND_THROUGH_GNOME, appletbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
451 gaim_button(_("Buddy list displays near the applet"), &general_options, OPT_GEN_NEAR_APPLET, appletbox); |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
452 |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
453 gtk_widget_show(appletbox); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
454 gtk_widget_show(applet_page); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
455 |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
456 #endif |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
457 |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
458 |
1 | 459 /* Connection */ |
460 | |
461 connection_page = gtk_vbox_new(FALSE, 0); | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
462 label = gtk_label_new(_("Connection")); |
1 | 463 gtk_widget_show(label); |
464 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), connection_page, label); | |
465 | |
423
0d4e80bdb96b
[gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
411
diff
changeset
|
466 gaim_button(_("Use Oscar Protocol (experimental; only takes effect before signon)"), &general_options, OPT_GEN_USE_OSCAR, connection_page); |
0d4e80bdb96b
[gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
411
diff
changeset
|
467 label = gtk_label_new(_("The following options do not apply if you use Oscar.")); |
0d4e80bdb96b
[gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
411
diff
changeset
|
468 gtk_box_pack_start(GTK_BOX(connection_page), label, FALSE, FALSE, 10); |
0d4e80bdb96b
[gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
411
diff
changeset
|
469 gtk_widget_show(label); |
1 | 470 hbox = gtk_hbox_new(FALSE, 0); |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
471 label = gtk_label_new(_("TOC Host:")); |
1 | 472 gtk_widget_show(label); |
473 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); | |
474 pd->aim_host_entry = gtk_entry_new(); | |
475 gtk_widget_show(pd->aim_host_entry); | |
476 gtk_box_pack_start(GTK_BOX(hbox), pd->aim_host_entry, FALSE, FALSE, 0); | |
477 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
478 label = gtk_label_new(_("Port:")); |
1 | 479 gtk_widget_show(label); |
480 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); | |
481 pd->aim_port_entry = gtk_entry_new(); | |
482 gtk_widget_show(pd->aim_port_entry); | |
483 gtk_box_pack_start(GTK_BOX(hbox), pd->aim_port_entry, FALSE, FALSE, 0); | |
484 gtk_widget_show(hbox); | |
485 | |
486 gtk_box_pack_start(GTK_BOX(connection_page), hbox, FALSE, FALSE, 0); | |
487 gtk_entry_set_text(GTK_ENTRY(pd->aim_host_entry), aim_host); | |
488 | |
489 g_snprintf(buffer, sizeof(buffer), "%d", aim_port); | |
490 gtk_entry_set_text(GTK_ENTRY(pd->aim_port_entry), buffer); | |
491 | |
492 hbox2 = gtk_hbox_new(FALSE, 0); | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
493 label = gtk_label_new(_("Login Host:")); |
1 | 494 gtk_widget_show(label); |
495 gtk_box_pack_start(GTK_BOX(hbox2), label, FALSE, FALSE, 5); | |
496 pd->login_host_entry = gtk_entry_new(); | |
497 gtk_widget_show(pd->login_host_entry); | |
498 gtk_box_pack_start(GTK_BOX(hbox2), pd->login_host_entry, FALSE, FALSE, 0); | |
499 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
500 label = gtk_label_new(_("Port:")); |
1 | 501 gtk_widget_show(label); |
502 gtk_box_pack_start(GTK_BOX(hbox2), label, FALSE, FALSE, 5); | |
503 pd->login_port_entry = gtk_entry_new(); | |
504 gtk_widget_show(pd->login_port_entry); | |
505 gtk_box_pack_start(GTK_BOX(hbox2), pd->login_port_entry, FALSE, FALSE, 0); | |
506 gtk_widget_show(hbox2); | |
507 | |
508 gtk_box_pack_start(GTK_BOX(connection_page), hbox2, FALSE, FALSE, 0); | |
509 gtk_entry_set_text(GTK_ENTRY(pd->login_host_entry), login_host); | |
510 | |
511 g_snprintf(buffer, sizeof(buffer), "%d", login_port); | |
512 gtk_entry_set_text(GTK_ENTRY(pd->login_port_entry), buffer); | |
513 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
514 connectopt = gtk_radio_button_new_with_label(NULL, _("No Proxy")); |
1 | 515 gtk_box_pack_start(GTK_BOX(connection_page), connectopt, FALSE, FALSE, 0); |
516 gtk_signal_connect(GTK_OBJECT(connectopt), "clicked", GTK_SIGNAL_FUNC(set_connect), (void *)PROXY_NONE); | |
517 gtk_widget_show(connectopt); | |
518 if (proxy_type == PROXY_NONE) | |
519 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(connectopt), TRUE); | |
520 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
521 connectopt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(connectopt)), _("HTTP Proxy")); |
1 | 522 gtk_box_pack_start(GTK_BOX(connection_page), connectopt, FALSE, FALSE, 0); |
523 gtk_signal_connect(GTK_OBJECT(connectopt), "clicked", GTK_SIGNAL_FUNC(set_connect), (void *)PROXY_HTTP); | |
524 gtk_widget_show(connectopt); | |
525 if (proxy_type == PROXY_HTTP) | |
526 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(connectopt), TRUE); | |
527 | |
528 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
529 connectopt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(connectopt)), _("SOCKS v4 Proxy")); |
253
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
530 gtk_box_pack_start(GTK_BOX(connection_page), connectopt, FALSE, FALSE, 0); |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
531 gtk_signal_connect(GTK_OBJECT(connectopt), "clicked", GTK_SIGNAL_FUNC(set_connect), (void *)PROXY_SOCKS4); |
253
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
532 gtk_widget_show(connectopt); |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
533 if (proxy_type == PROXY_SOCKS4) |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
534 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(connectopt), TRUE); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
535 |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
536 |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
537 connectopt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(connectopt)), _("SOCKS v5 Proxy (DOES NOT WORK!)")); |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
538 gtk_box_pack_start(GTK_BOX(connection_page), connectopt, FALSE, FALSE, 0); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
539 gtk_signal_connect(GTK_OBJECT(connectopt), "clicked", GTK_SIGNAL_FUNC(set_connect), (void *)PROXY_SOCKS5); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
540 gtk_widget_show(connectopt); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
541 if (proxy_type == PROXY_SOCKS5) |
253
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
542 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(connectopt), TRUE); |
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
543 |
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
544 |
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
545 hbox = gtk_hbox_new(FALSE, 0); |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
546 label = gtk_label_new(_("Proxy Host:")); |
253
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
547 gtk_widget_show(label); |
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
548 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
549 pd->proxy_host_entry = gtk_entry_new(); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
550 gtk_widget_show(pd->proxy_host_entry); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
551 gtk_box_pack_start(GTK_BOX(hbox), pd->proxy_host_entry, FALSE, FALSE, 0); |
253
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
552 |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
553 label = gtk_label_new(_("Port:")); |
253
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
554 gtk_widget_show(label); |
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
555 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
556 pd->proxy_port_entry = gtk_entry_new(); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
557 gtk_widget_show(pd->proxy_port_entry); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
558 gtk_box_pack_start(GTK_BOX(hbox), pd->proxy_port_entry, FALSE, FALSE, 0); |
253
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
559 gtk_widget_show(hbox); |
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
560 |
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
561 gtk_box_pack_start(GTK_BOX(connection_page), hbox, FALSE, FALSE, 0); |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
562 gtk_entry_set_text(GTK_ENTRY(pd->proxy_host_entry), proxy_host); |
253
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
563 |
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
564 g_snprintf(buffer, sizeof(buffer), "%d", proxy_port); |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
565 gtk_entry_set_text(GTK_ENTRY(pd->proxy_port_entry), buffer); |
253
5b28ef2b550e
[gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
234
diff
changeset
|
566 |
1 | 567 |
568 gtk_widget_show(connection_page); | |
569 | |
570 | |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
571 if (proxy_type != PROXY_NONE) { |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
572 if (pd->proxy_host_entry) |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
573 gtk_widget_set_sensitive(pd->proxy_host_entry, TRUE); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
574 if (pd->proxy_port_entry) |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
575 gtk_widget_set_sensitive(pd->proxy_port_entry, TRUE); |
1 | 576 } else { |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
577 if (pd->proxy_host_entry) |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
578 gtk_widget_set_sensitive(pd->proxy_host_entry, FALSE); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
579 if (pd->proxy_port_entry) |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
580 gtk_widget_set_sensitive(pd->proxy_port_entry, FALSE); |
1 | 581 } |
582 | |
583 | |
584 | |
585 gtk_signal_connect(GTK_OBJECT(pd->aim_host_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL); | |
586 gtk_signal_connect(GTK_OBJECT(pd->aim_port_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL); | |
587 gtk_signal_connect(GTK_OBJECT(pd->login_host_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL); | |
588 gtk_signal_connect(GTK_OBJECT(pd->login_port_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL); | |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
589 gtk_signal_connect(GTK_OBJECT(pd->proxy_host_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL); |
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
590 gtk_signal_connect(GTK_OBJECT(pd->proxy_port_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL); |
1 | 591 |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
592 |
1 | 593 /* Away */ |
594 | |
595 a = awaymessage; | |
596 pd->cur_message = NULL; | |
597 pd->nwbutton = NULL; | |
598 pd->browser_entry = NULL; | |
599 | |
600 away_page = gtk_vbox_new(FALSE, 0); | |
601 away_topbox = gtk_hbox_new(FALSE, 0); | |
602 away_botbox = gtk_hbox_new(FALSE, 0); | |
603 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
604 label = gtk_label_new(_("Away")); |
1 | 605 gtk_widget_show(label); |
606 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), away_page, label); | |
607 gtk_widget_show(away_page); | |
608 | |
609 sw2 = gtk_scrolled_window_new(NULL, NULL); | |
610 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2), | |
611 GTK_POLICY_AUTOMATIC, | |
612 GTK_POLICY_AUTOMATIC); | |
613 gtk_widget_show(sw2); | |
614 | |
615 pd->away_list = gtk_list_new(); | |
616 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw2), pd->away_list); | |
617 gtk_box_pack_start(GTK_BOX(away_topbox), sw2, TRUE, TRUE, 0); | |
618 | |
619 sw = gtk_scrolled_window_new(NULL, NULL); | |
620 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), | |
621 GTK_POLICY_AUTOMATIC, | |
622 GTK_POLICY_AUTOMATIC); | |
623 gtk_widget_show(sw); | |
624 | |
625 pd->away_text = gtk_text_new(NULL, NULL); | |
626 gtk_container_add(GTK_CONTAINER(sw), pd->away_text); | |
627 gtk_box_pack_start(GTK_BOX(away_topbox), sw, TRUE, TRUE, 0); | |
628 gtk_text_set_word_wrap(GTK_TEXT(pd->away_text), TRUE); | |
629 gtk_text_set_editable(GTK_TEXT(pd->away_text), TRUE ); | |
630 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
631 add_away = gtk_button_new_with_label(_("Create Message")); |
535
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
632 if (display_options & OPT_DISP_COOL_LOOK) |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
633 gtk_button_set_relief(GTK_BUTTON(add_away), GTK_RELIEF_NONE); |
1 | 634 gtk_signal_connect(GTK_OBJECT(add_away), "clicked", GTK_SIGNAL_FUNC(create_away_mess), NULL); |
635 gtk_box_pack_start(GTK_BOX(away_botbox), add_away, TRUE, FALSE, 5); | |
636 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
637 remove_away = gtk_button_new_with_label(_("Remove Message")); |
535
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
638 if (display_options & OPT_DISP_COOL_LOOK) |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
639 gtk_button_set_relief(GTK_BUTTON(remove_away), GTK_RELIEF_NONE); |
1 | 640 gtk_signal_connect(GTK_OBJECT(remove_away), "clicked", GTK_SIGNAL_FUNC(remove_away_message), NULL); |
641 gtk_box_pack_start(GTK_BOX(away_botbox), remove_away, TRUE, FALSE, 5); | |
642 | |
643 gtk_box_pack_start(GTK_BOX(away_page), away_topbox, TRUE, TRUE, 0); | |
644 gtk_box_pack_start(GTK_BOX(away_page), away_botbox, FALSE, FALSE, 0); | |
645 | |
646 gtk_widget_show(add_away); | |
647 gtk_widget_show(remove_away); | |
648 gtk_widget_show(pd->away_list); | |
649 gtk_widget_show(pd->away_text); | |
650 gtk_widget_show(away_topbox); | |
651 gtk_widget_show(away_botbox); | |
652 | |
653 if (awy != NULL) { | |
654 a = (struct away_message *)awy->data; | |
655 g_snprintf(buffer, sizeof(buffer), "%s", a->message); | |
656 gtk_text_insert(GTK_TEXT(pd->away_text), NULL, NULL, NULL, buffer, -1); | |
657 } | |
658 | |
659 while(awy) { | |
660 a = (struct away_message *)awy->data; | |
661 label = gtk_label_new(a->name); | |
662 list_item = gtk_list_item_new(); | |
663 gtk_container_add(GTK_CONTAINER(list_item), label); | |
664 gtk_signal_connect(GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(away_list_clicked), a); | |
665 gtk_signal_connect(GTK_OBJECT(list_item), "deselect", GTK_SIGNAL_FUNC(away_list_unclicked), a); | |
666 gtk_object_set_user_data(GTK_OBJECT(list_item), a); | |
667 | |
668 gtk_widget_show(label); | |
669 gtk_container_add(GTK_CONTAINER(pd->away_list), list_item); | |
670 gtk_widget_show(list_item); | |
671 | |
672 awy = awy->next; | |
673 | |
674 } | |
675 | |
676 /* Sound */ | |
677 sound_page = gtk_vbox_new(FALSE, 0); | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
678 label = gtk_label_new(_("Sounds")); |
1 | 679 gtk_widget_show(label); |
680 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), sound_page, label); | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
681 gaim_button(_("Sound when buddy logs in"), &sound_options, OPT_SOUND_LOGIN, sound_page); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
682 gaim_button(_("Sound when buddy logs out"), &sound_options, OPT_SOUND_LOGOUT, sound_page); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
683 gaim_button(_("Sound when message is received"), &sound_options, OPT_SOUND_RECV, sound_page); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
684 gaim_button(_("Sound when message is sent"), &sound_options, OPT_SOUND_SEND, sound_page); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
685 gaim_button(_("Sound when first message is received"), &sound_options, OPT_SOUND_FIRST_RCV, sound_page); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
686 gaim_button(_("Sound when message is received if away"), &sound_options, OPT_SOUND_WHEN_AWAY, sound_page); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
687 gaim_button(_("No sound for buddies signed on when you log in"), &sound_options, OPT_SOUND_SILENT_SIGNON, sound_page); |
371
9d22acf6db73
[gaim-migrate @ 381]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
353
diff
changeset
|
688 gaim_button(_("Sounds in chat rooms when people enter/leave"), &sound_options, OPT_SOUND_CHAT_JOIN, sound_page); |
9d22acf6db73
[gaim-migrate @ 381]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
353
diff
changeset
|
689 gaim_button(_("Sounds in chat rooms when people talk"), &sound_options, OPT_SOUND_CHAT_SAY, sound_page); |
1 | 690 gtk_widget_show(sound_page); |
691 | |
692 | |
693 /* Browser */ | |
694 browser_page = gtk_vbox_new(FALSE, 0); | |
695 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
696 label = gtk_label_new(_("Browser")); |
1 | 697 gtk_widget_show(label); |
698 | |
699 | |
700 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), browser_page, label); | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
701 browseropt = gtk_radio_button_new_with_label(NULL, _("Netscape")); |
1 | 702 gtk_box_pack_start(GTK_BOX(browser_page), browseropt, FALSE, FALSE, 0); |
703 gtk_signal_connect(GTK_OBJECT(browseropt), "clicked", GTK_SIGNAL_FUNC(set_browser), (void *)BROWSER_NETSCAPE); | |
704 gtk_widget_show(browseropt); | |
705 if (web_browser == BROWSER_NETSCAPE) | |
706 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(browseropt), TRUE); | |
707 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
708 browseropt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(browseropt)), _("KFM (The KDE browser)")); |
1 | 709 gtk_box_pack_start(GTK_BOX(browser_page), browseropt, FALSE, FALSE, 0); |
710 gtk_signal_connect(GTK_OBJECT(browseropt), "clicked", GTK_SIGNAL_FUNC(set_browser), (void *)BROWSER_KFM); | |
711 gtk_widget_show(browseropt); | |
712 if (web_browser == BROWSER_KFM) | |
713 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(browseropt), TRUE); | |
714 | |
715 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
716 browseropt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(browseropt)), _("Internal HTML widget (Quite likely a bad idea!)")); |
1 | 717 gtk_box_pack_start(GTK_BOX(browser_page), browseropt, FALSE, FALSE, 0); |
718 gtk_signal_connect(GTK_OBJECT(browseropt), "clicked", GTK_SIGNAL_FUNC(set_browser), (void *)BROWSER_INTERNAL); | |
719 gtk_widget_show(browseropt); | |
720 if (web_browser == BROWSER_INTERNAL) | |
721 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(browseropt), TRUE); | |
722 | |
723 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
724 browseropt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(browseropt)), _("Manual")); |
1 | 725 gtk_box_pack_start(GTK_BOX(browser_page), browseropt, FALSE, FALSE, 0); |
726 gtk_signal_connect(GTK_OBJECT(browseropt), "clicked", GTK_SIGNAL_FUNC(set_browser), (void *)BROWSER_MANUAL); | |
727 gtk_widget_show(browseropt); | |
728 if (web_browser == BROWSER_MANUAL) | |
729 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(browseropt), TRUE); | |
730 | |
731 | |
732 pd->browser_entry = gtk_entry_new(); | |
733 gtk_widget_show(pd->browser_entry); | |
734 | |
735 gtk_box_pack_start(GTK_BOX(browser_page), pd->browser_entry, FALSE, FALSE, 0); | |
736 gtk_entry_set_text(GTK_ENTRY(pd->browser_entry), web_command); | |
737 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
738 pd->nwbutton = gaim_button(_("Pop up new window by default"), &general_options, OPT_GEN_BROWSER_POPUP, browser_page); |
1 | 739 gtk_widget_show(browser_page); |
740 | |
741 gtk_signal_connect(GTK_OBJECT(pd->browser_entry), "focus_out_event", GTK_SIGNAL_FUNC(manualentry_key_pressed), NULL); | |
742 | |
743 | |
744 | |
745 if (web_browser != BROWSER_MANUAL) { | |
746 gtk_widget_set_sensitive(pd->browser_entry, FALSE); | |
747 } else { | |
748 gtk_widget_set_sensitive(pd->browser_entry, TRUE); | |
749 } | |
750 | |
751 if (web_browser != BROWSER_NETSCAPE) { | |
752 gtk_widget_set_sensitive(pd->nwbutton, FALSE); | |
753 } else { | |
754 gtk_widget_set_sensitive(pd->nwbutton, TRUE); | |
755 } | |
756 | |
757 | |
758 | |
759 | |
760 /* Appearance */ | |
761 appearance_page = gtk_hbox_new(FALSE, 0); | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
762 label = gtk_label_new(_("Appearance")); |
1 | 763 gtk_widget_show(label); |
764 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), appearance_page, label); | |
765 appbox = gtk_vbox_new(FALSE, 5); | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
766 fontframe = gtk_frame_new(_("Font Properties")); |
1 | 767 fontbox = gtk_vbox_new(FALSE, 5); |
768 | |
769 gtk_box_pack_start(GTK_BOX(appearance_page), appbox, TRUE, TRUE, 5); | |
770 gtk_box_pack_start(GTK_BOX(appearance_page), fontframe, TRUE, TRUE, 5); | |
771 gtk_container_add(GTK_CONTAINER(fontframe), fontbox); | |
772 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
773 gaim_button(_("Show time on messages"), &display_options, OPT_DISP_SHOW_TIME, appbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
774 gaim_button(_("Show numbers in groups"), &display_options, OPT_DISP_SHOW_GRPNUM, appbox ); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
775 gaim_button(_("Show buddy-type pixmaps"), &display_options, OPT_DISP_SHOW_PIXMAPS, appbox ); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
776 gaim_button(_("Show idle times"), &display_options, OPT_DISP_SHOW_IDLETIME, appbox ); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
777 gaim_button(_("Show button pixmaps"), &display_options, OPT_DISP_SHOW_BUTTON_XPM, appbox ); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
778 gaim_button(_("Ignore incoming colours"), &display_options, OPT_DISP_IGNORE_COLOUR, appbox ); |
1 | 779 #if 0 |
780 gaim_button("Transparent text window (experimental)", &transparent, appbox ); | |
781 #endif | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
782 gaim_button(_("Show logon/logoffs in conversation windows"), &display_options, OPT_DISP_SHOW_LOGON, appbox ); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
783 gaim_button(_("Use devil icons"), &display_options, OPT_DISP_DEVIL_PIXMAPS, appbox ); |
378 | 784 gaim_button(_("Show graphical smileys (experimental)"), &display_options, OPT_DISP_SHOW_SMILEY, appbox ); |
436 | 785 gaim_button(_("Show Buddy Ticker after restart"), &display_options, OPT_DISP_SHOW_BUDDYTICKER, appbox ); |
535
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
786 gaim_button(_("Use borderless buttons (requires restart for some buttons)"), &display_options, OPT_DISP_COOL_LOOK, appbox); |
1 | 787 |
788 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
789 gaim_button(_("Bold Text"), &font_options, OPT_FONT_BOLD, fontbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
790 gaim_button(_("Italics Text"), &font_options, OPT_FONT_ITALIC, fontbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
791 gaim_button(_("Underlined Text"), &font_options, OPT_FONT_UNDERLINE, fontbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
792 gaim_button(_("Strike Text"), &font_options, OPT_FONT_STRIKE, fontbox); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
793 font_face_for_text = gaim_button(_("Font Face for Text"), &font_options, OPT_FONT_FACE, fontbox); |
234
985635758c33
[gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
230
diff
changeset
|
794 |
595 | 795 /* Build font button */ |
796 select_font = gtk_button_new(); | |
797 button_box = gtk_hbox_new(FALSE, 5); | |
798 icon = gdk_pixmap_create_from_xpm_d (pd->window->window, &mask, NULL, fontface2_xpm); | |
799 icon_i = gtk_pixmap_new(icon, mask); | |
800 button_label = gtk_label_new(_("Select Font Face")); | |
801 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2); | |
802 gtk_box_pack_end(GTK_BOX(button_box), button_label, FALSE, FALSE, 2); | |
803 gtk_widget_show(button_label); | |
804 gtk_widget_show(icon_i); | |
535
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
805 if (display_options & OPT_DISP_COOL_LOOK) |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
806 gtk_button_set_relief(GTK_BUTTON(select_font), GTK_RELIEF_NONE); |
595 | 807 gtk_widget_show(button_box); |
808 gtk_container_add(GTK_CONTAINER(select_font), button_box); | |
230
83dd297aa363
[gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
206
diff
changeset
|
809 gtk_box_pack_start(GTK_BOX(fontbox), select_font, FALSE, FALSE, 0); |
83dd297aa363
[gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
206
diff
changeset
|
810 gtk_signal_connect(GTK_OBJECT(select_font), "clicked", GTK_SIGNAL_FUNC(show_font_dialog), NULL); |
234
985635758c33
[gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
230
diff
changeset
|
811 if (!(font_options & OPT_FONT_FACE)) |
985635758c33
[gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
230
diff
changeset
|
812 gtk_widget_set_sensitive(GTK_WIDGET(select_font), FALSE); |
230
83dd297aa363
[gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
206
diff
changeset
|
813 gtk_widget_show(select_font); |
234
985635758c33
[gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
230
diff
changeset
|
814 gtk_signal_connect(GTK_OBJECT(font_face_for_text), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select_font); |
595 | 815 /* end of font button */ |
234
985635758c33
[gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
230
diff
changeset
|
816 |
1 | 817 gtk_widget_show(appearance_page); |
818 gtk_widget_show(fontbox); | |
819 gtk_widget_show(fontframe); | |
820 gtk_widget_show(appbox); | |
821 | |
822 | |
823 /* Buddy Chats */ | |
824 chat_page = gtk_vbox_new(FALSE, 0); | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
825 label = gtk_label_new(_("Buddy Chats")); |
1 | 826 |
827 gtk_widget_show(label); | |
828 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), chat_page, label); | |
829 | |
830 do_chat_page(chat_page); | |
831 gtk_widget_show(chat_page); | |
832 | |
833 bbox = gtk_hbox_new(FALSE, 5); | |
584 | 834 |
835 /* Build close button */ | |
836 | |
837 close = gtk_button_new(); | |
838 | |
839 button_box = gtk_hbox_new(FALSE, 5); | |
588 | 840 icon = gdk_pixmap_create_from_xpm_d ( pd->window->window, &mask, NULL, cancel_xpm); |
584 | 841 |
842 icon_i = gtk_pixmap_new(icon, mask); | |
843 | |
595 | 844 button_label = gtk_label_new(_("Close")); |
584 | 845 |
846 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2); | |
595 | 847 gtk_box_pack_end(GTK_BOX(button_box), button_label, FALSE, FALSE, 2); |
584 | 848 |
595 | 849 gtk_widget_show(button_label); |
584 | 850 gtk_widget_show(icon_i); |
851 | |
852 gtk_widget_show(button_box); | |
853 | |
854 gtk_container_add(GTK_CONTAINER(close), button_box); | |
588 | 855 gtk_widget_set_usize(close, 75, 30); |
584 | 856 |
857 /* End of close button */ | |
858 | |
859 | |
535
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
860 if (display_options & OPT_DISP_COOL_LOOK) |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
861 gtk_button_set_relief(GTK_BUTTON(close), GTK_RELIEF_NONE); |
584 | 862 |
1 | 863 /* Pack the button(s) in the button box */ |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
864 gtk_box_pack_end(GTK_BOX(bbox), close, FALSE, FALSE, 5); |
1 | 865 gtk_box_pack_start(GTK_BOX(vbox),bbox, FALSE, FALSE, 5); |
866 | |
867 gtk_widget_show(notebook); | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
868 gtk_widget_show(close); |
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
869 |
1 | 870 gtk_widget_show(bbox); |
871 gtk_widget_show(vbox); | |
872 | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
873 gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(handle_delete), NULL); |
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
874 gtk_signal_connect(GTK_OBJECT(pd->window),"delete_event", GTK_SIGNAL_FUNC(handle_delete), NULL); |
1 | 875 |
876 } | |
877 | |
878 void show_prefs() | |
879 { | |
880 if (!pd || !pd->window) | |
881 build_prefs(); | |
882 gtk_widget_show(pd->window); | |
883 } | |
884 void add_chat(GtkWidget *w, struct chat_page *cp) | |
885 { | |
886 GList *sel = GTK_LIST(cp->list1)->selection; | |
887 struct chat_room *cr, *cr2; | |
888 GList *crs = chat_rooms; | |
889 GtkWidget *item; | |
890 | |
891 if (sel) { | |
892 cr = (struct chat_room *)gtk_object_get_user_data(GTK_OBJECT(sel->data)); | |
893 } else | |
894 return; | |
895 | |
896 while(crs) { | |
897 cr2 = (struct chat_room *)crs->data; | |
898 if (!strcasecmp(cr->name, cr2->name)) | |
899 return; | |
900 crs = crs->next; | |
901 } | |
902 item = gtk_list_item_new_with_label(cr->name); | |
903 cr2 = g_new0(struct chat_room, 1); | |
904 strcpy(cr2->name, cr->name); | |
905 cr2->exchange = cr->exchange; | |
906 gtk_object_set_user_data(GTK_OBJECT(item), cr2); | |
907 gtk_widget_show(item); | |
908 sel = g_list_append(NULL, item); | |
909 gtk_list_append_items(GTK_LIST(cp->list2), sel); | |
910 chat_rooms = g_list_append(chat_rooms, cr2); | |
911 | |
912 setup_buddy_chats(); | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
913 save_prefs(); |
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
914 |
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
915 |
1 | 916 } |
917 | |
918 void remove_chat(GtkWidget *w, struct chat_page *cp) | |
919 { | |
920 GList *sel = GTK_LIST(cp->list2)->selection; | |
921 struct chat_room *cr; | |
922 GList *crs; | |
923 GtkWidget *item; | |
924 | |
925 if (sel) { | |
926 item = (GtkWidget *)sel->data; | |
927 cr = (struct chat_room *)gtk_object_get_user_data(GTK_OBJECT(item)); | |
928 } else | |
929 return; | |
930 | |
931 chat_rooms = g_list_remove(chat_rooms, cr); | |
932 | |
933 | |
934 gtk_list_clear_items(GTK_LIST(cp->list2), 0, -1); | |
935 | |
936 if (g_list_length(chat_rooms) == 0) | |
937 chat_rooms = NULL; | |
938 | |
939 crs = chat_rooms; | |
940 | |
941 while(crs) { | |
942 cr = (struct chat_room *)crs->data; | |
943 item = gtk_list_item_new_with_label(cr->name); | |
944 gtk_object_set_user_data(GTK_OBJECT(item), cr); | |
945 gtk_widget_show(item); | |
946 gtk_list_append_items(GTK_LIST(cp->list2), g_list_append(NULL, item)); | |
947 | |
948 | |
949 crs = crs->next; | |
950 } | |
951 | |
952 setup_buddy_chats(); | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
953 save_prefs(); |
1 | 954 } |
955 | |
956 void refresh_list(GtkWidget *w, struct chat_page *cp) | |
957 { | |
958 char *text = grab_url("http://www.aol.com/community/chat/allchats.html"); | |
959 char *c; | |
960 int len = strlen(text); | |
961 GtkWidget *item; | |
962 GList *items = GTK_LIST(cp->list1)->children; | |
963 struct chat_room *cr; | |
964 c = text; | |
965 | |
966 while(items) { | |
967 g_free(gtk_object_get_user_data(GTK_OBJECT(items->data))); | |
968 items = items->next; | |
969 } | |
970 | |
971 items = NULL; | |
972 | |
973 gtk_list_clear_items(GTK_LIST(cp->list1), 0, -1); | |
974 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
975 item = gtk_list_item_new_with_label(_("Gaim Chat")); |
1 | 976 cr = g_new0(struct chat_room, 1); |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
977 strcpy(cr->name, _("Gaim Chat")); |
1 | 978 cr->exchange = 4; |
979 gtk_object_set_user_data(GTK_OBJECT(item), cr); | |
980 gtk_widget_show(item); | |
981 | |
982 items = g_list_append(NULL, item); | |
983 | |
984 while(c) { | |
985 if (c - text > len - 30) | |
986 break; /* assume no chat rooms 30 from end, padding */ | |
987 if (!strncasecmp(AOL_SRCHSTR, c, strlen(AOL_SRCHSTR))) { | |
988 char *t; | |
989 int len=0; | |
990 int exchange; | |
991 char *name = NULL; | |
992 | |
993 c += strlen(AOL_SRCHSTR); | |
994 t = c; | |
995 while(t) { | |
996 len++; | |
997 name = g_realloc(name, len); | |
998 if (*t == '+') | |
999 name[len - 1] = ' '; | |
1000 else if (*t == '&') { | |
1001 name[len - 1] = 0; | |
1002 sscanf(t, "&Exchange=%d", &exchange); | |
1003 c = t + strlen("&Exchange=x"); | |
1004 break; | |
1005 } else | |
1006 name[len - 1] = *t; | |
1007 t++; | |
1008 } | |
1009 cr = g_new0(struct chat_room, 1); | |
1010 strcpy(cr->name, name); | |
1011 cr->exchange = exchange; | |
1012 item = gtk_list_item_new_with_label(name); | |
1013 gtk_widget_show(item); | |
1014 items = g_list_append(items, item); | |
1015 gtk_object_set_user_data(GTK_OBJECT(item), cr); | |
1016 g_free(name); | |
1017 } | |
1018 c++; | |
1019 } | |
1020 gtk_list_append_items(GTK_LIST(cp->list1), items); | |
1021 g_free(text); | |
1022 } | |
1023 | |
1024 | |
1025 | |
1026 void do_chat_page(GtkWidget *page) | |
1027 { | |
1028 GtkWidget *table; | |
1029 GtkWidget *rem_button, *add_button, *ref_button; | |
1030 GtkWidget *list1, *list2; | |
1031 GtkWidget *label; | |
1032 GtkWidget *sw1, *sw2; | |
1033 GtkWidget *item; | |
595 | 1034 GtkWidget *button_box, *icon_i, *button_label; |
1035 GdkPixmap *icon; | |
1036 GdkBitmap *mask; | |
1 | 1037 struct chat_page *cp = g_new0(struct chat_page, 1); |
1038 GList *crs = chat_rooms; | |
1039 GList *items = NULL; | |
1040 struct chat_room *cr; | |
1041 | |
1042 table = gtk_table_new(4, 2, FALSE); | |
1043 gtk_widget_show(table); | |
1044 | |
1045 | |
1046 gtk_box_pack_start(GTK_BOX(page), table, TRUE, TRUE, 0); | |
1047 | |
1048 | |
1049 list1 = gtk_list_new(); | |
1050 list2 = gtk_list_new(); | |
1051 sw1 = gtk_scrolled_window_new(NULL, NULL); | |
1052 sw2 = gtk_scrolled_window_new(NULL, NULL); | |
595 | 1053 |
1054 /* Build refresh button */ | |
1055 ref_button = gtk_button_new(); | |
1056 button_box = gtk_hbox_new(FALSE, 5); | |
1057 icon = gdk_pixmap_create_from_xpm_d ( pd->window->window, &mask, NULL, refresh_xpm); | |
1058 icon_i = gtk_pixmap_new(icon, mask); | |
1059 button_label = gtk_label_new(_("Refresh List")); | |
1060 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2); | |
1061 gtk_box_pack_end(GTK_BOX(button_box), button_label, FALSE, FALSE, 2); | |
1062 gtk_widget_show(button_label); | |
1063 gtk_widget_show(icon_i); | |
1064 if (display_options & OPT_DISP_COOL_LOOK) | |
1065 gtk_button_set_relief(GTK_BUTTON(ref_button), GTK_RELIEF_NONE); | |
1066 gtk_widget_show(button_box); | |
1067 gtk_container_add(GTK_CONTAINER(ref_button), button_box); | |
1068 /* End of refresh button */ | |
1069 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
1070 add_button = gtk_button_new_with_label(_("Add")); |
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
1071 rem_button = gtk_button_new_with_label(_("Remove")); |
535
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
1072 if (display_options & OPT_DISP_COOL_LOOK) |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
1073 { |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
1074 gtk_button_set_relief(GTK_BUTTON(ref_button), GTK_RELIEF_NONE); |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
1075 gtk_button_set_relief(GTK_BUTTON(add_button), GTK_RELIEF_NONE); |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
1076 gtk_button_set_relief(GTK_BUTTON(rem_button), GTK_RELIEF_NONE); |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
436
diff
changeset
|
1077 } |
1 | 1078 gtk_widget_show(list1); |
1079 gtk_widget_show(sw1); | |
1080 gtk_widget_show(list2); | |
1081 gtk_widget_show(sw2); | |
1082 gtk_widget_show(ref_button); | |
1083 gtk_widget_show(add_button); | |
1084 gtk_widget_show(rem_button); | |
1085 | |
1086 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw1), list1); | |
1087 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw2), list2); | |
1088 | |
1089 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw1), | |
1090 GTK_POLICY_AUTOMATIC,GTK_POLICY_ALWAYS); | |
1091 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2), | |
1092 GTK_POLICY_AUTOMATIC,GTK_POLICY_ALWAYS); | |
1093 | |
1094 cp->list1 = list1; | |
1095 cp->list2 = list2; | |
1096 | |
1097 gtk_signal_connect(GTK_OBJECT(ref_button), "clicked", | |
1098 GTK_SIGNAL_FUNC(refresh_list), cp); | |
1099 gtk_signal_connect(GTK_OBJECT(rem_button), "clicked", | |
1100 GTK_SIGNAL_FUNC(remove_chat), cp); | |
1101 gtk_signal_connect(GTK_OBJECT(add_button), "clicked", | |
1102 GTK_SIGNAL_FUNC(add_chat), cp); | |
1103 | |
1104 | |
1105 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
1106 label = gtk_label_new(_("List of available chats")); |
1 | 1107 gtk_widget_show(label); |
1108 | |
1109 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, | |
1110 GTK_SHRINK, GTK_SHRINK, 0, 0); | |
1111 gtk_table_attach(GTK_TABLE(table), ref_button, 0, 1, 1, 2, | |
1112 GTK_SHRINK, GTK_SHRINK, 0, 0); | |
1113 gtk_table_attach(GTK_TABLE(table), sw1, 0, 1, 2, 3, | |
1114 GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, | |
1115 5, 5); | |
1116 gtk_table_attach(GTK_TABLE(table), add_button, 0, 1, 3, 4, | |
1117 GTK_SHRINK, GTK_SHRINK, 0, 0); | |
1118 | |
1119 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
1120 label = gtk_label_new(_("List of subscribed chats")); |
1 | 1121 gtk_widget_show(label); |
1122 | |
1123 gtk_table_attach(GTK_TABLE(table), label, 1, 2, 0, 1, | |
1124 GTK_SHRINK, GTK_SHRINK, 0, 0); | |
1125 gtk_table_attach(GTK_TABLE(table), sw2, 1, 2, 2, 3, | |
1126 GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, | |
1127 5, 5); | |
1128 gtk_table_attach(GTK_TABLE(table), rem_button, 1, 2, 3, 4, | |
1129 GTK_SHRINK, GTK_SHRINK, 0, 0); | |
1130 | |
1131 | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
1132 item = gtk_list_item_new_with_label(_("Gaim Chat")); |
1 | 1133 cr = g_new0(struct chat_room, 1); |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
1134 strcpy(cr->name, _("Gaim Chat")); |
1 | 1135 cr->exchange = 4; |
1136 gtk_object_set_user_data(GTK_OBJECT(item), cr); | |
1137 gtk_widget_show(item); | |
1138 gtk_list_append_items(GTK_LIST(list1), g_list_append(NULL, item)); | |
1139 | |
1140 | |
1141 while(crs) { | |
1142 cr = (struct chat_room *)crs->data; | |
1143 item = gtk_list_item_new_with_label(cr->name); | |
1144 gtk_object_set_user_data(GTK_OBJECT(item), cr); | |
1145 gtk_widget_show(item); | |
1146 items = g_list_append(items, item); | |
1147 | |
1148 crs = crs->next; | |
1149 } | |
1150 | |
1151 gtk_list_append_items(GTK_LIST(list2), items); | |
1152 } | |
1153 | |
1154 | |
1155 | |
1156 | |
1157 | |
1158 void debug_print(char *chars) | |
1159 { | |
18 | 1160 if(general_options & OPT_GEN_DEBUG && dw) |
1 | 1161 gtk_text_insert(GTK_TEXT(dw->entry),NULL, NULL, NULL, chars, strlen(chars)); |
1162 #ifdef DEBUG | |
1163 printf("%s\n", chars); | |
1164 #endif | |
1165 } | |
1166 | |
1167 | |
1168 void build_debug() | |
1169 { | |
1170 GtkWidget *scroll; | |
1171 GtkWidget *box; | |
1172 if (!dw) | |
1173 dw = g_new0(struct debug_window, 1); | |
1174 | |
1175 box = gtk_hbox_new(FALSE,0); | |
1176 dw->window = gtk_window_new(GTK_WINDOW_DIALOG); | |
353
a4df8f1cc61a
[gaim-migrate @ 363]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
1177 gtk_window_set_title(GTK_WINDOW(dw->window), _("GAIM debug output window")); |
1 | 1178 gtk_container_add(GTK_CONTAINER(dw->window), box); |
1179 dw->entry = gtk_text_new(NULL,NULL); | |
1180 gtk_widget_set_usize(dw->entry, 500, 200); | |
1181 scroll = gtk_vscrollbar_new(GTK_TEXT(dw->entry)->vadj); | |
1182 gtk_box_pack_start(GTK_BOX(box), dw->entry, TRUE,TRUE,0); | |
1183 gtk_box_pack_end(GTK_BOX(box), scroll,FALSE,FALSE,0); | |
1184 gtk_widget_show(dw->entry); | |
1185 gtk_widget_show(scroll); | |
1186 gtk_widget_show(box); | |
1187 gtk_signal_connect(GTK_OBJECT(dw->window),"delete_event", GTK_SIGNAL_FUNC(debug_delete), NULL); | |
1188 gtk_widget_show(dw->window); | |
1189 } | |
1190 | |
1191 | |
1192 | |
1193 void show_debug(GtkObject * object) | |
1194 { | |
1195 if((general_options & OPT_GEN_DEBUG)) { | |
1196 if(!dw || !dw->window) | |
1197 build_debug(); | |
1198 gtk_widget_show(dw->window); | |
1199 } else { | |
171
789c792ed14b
[gaim-migrate @ 181]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
150
diff
changeset
|
1200 if (!dw) return; |
1 | 1201 gtk_widget_destroy(dw->window); |
1202 dw->window = NULL; | |
1203 } | |
1204 } | |
1205 |