Mercurial > pidgin
comparison src/prefs.c @ 3427:8fa61405af2b
[gaim-migrate @ 3453]
Who never commits anything *now*, Etan?
I changed most of the error message text around. If you think any of it
should be different, just let me know, or send a patch.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 25 Aug 2002 10:51:24 +0000 |
parents | a84c5f21e630 |
children | 1b18d4693d32 |
comparison
equal
deleted
inserted
replaced
3426:ccbcc11a68c2 | 3427:8fa61405af2b |
---|---|
81 char fontxfld_new[256]; | 81 char fontxfld_new[256]; |
82 char fontfacexfld[256]; | 82 char fontfacexfld[256]; |
83 #endif | 83 #endif |
84 char fontface[128]; | 84 char fontface[128]; |
85 | 85 |
86 | |
87 GtkWidget *prefs_away_list = NULL; | 86 GtkWidget *prefs_away_list = NULL; |
88 GtkWidget *prefs_away_menu = NULL; | 87 GtkWidget *prefs_away_menu = NULL; |
89 GtkWidget *preftree = NULL; | 88 GtkWidget *preftree = NULL; |
90 GtkWidget *fontseld = NULL; | 89 GtkWidget *fontseld = NULL; |
91 | 90 |
102 static GtkWidget *away_text = NULL; | 101 static GtkWidget *away_text = NULL; |
103 GtkCTreeNode *general_node = NULL; | 102 GtkCTreeNode *general_node = NULL; |
104 GtkCTreeNode *deny_node = NULL; | 103 GtkCTreeNode *deny_node = NULL; |
105 GtkWidget *prefs_proxy_frame = NULL; | 104 GtkWidget *prefs_proxy_frame = NULL; |
106 static GtkWidget *gaim_button(const char *, guint *, int, GtkWidget *); | 105 static GtkWidget *gaim_button(const char *, guint *, int, GtkWidget *); |
107 GtkWidget *gaim_labeled_spin_button(GtkWidget *, const gchar *, int*, int, int); | 106 GtkWidget *gaim_labeled_spin_button(GtkWidget *, const gchar *, int*, int, int, GtkSizeGroup *); |
108 static GtkWidget *gaim_dropdown(GtkWidget *, const gchar *, int *, int, ...); | 107 static GtkWidget *gaim_dropdown(GtkWidget *, const gchar *, int *, int, ...); |
109 static GtkWidget *show_color_pref(GtkWidget *, gboolean); | 108 static GtkWidget *show_color_pref(GtkWidget *, gboolean); |
110 static void delete_prefs(GtkWidget *, void *); | 109 static void delete_prefs(GtkWidget *, void *); |
111 void set_default_away(GtkWidget *, gpointer); | 110 void set_default_away(GtkWidget *, gpointer); |
112 | 111 |
167 else if (entrynum == PROXYPASS) | 166 else if (entrynum == PROXYPASS) |
168 g_snprintf(proxypass, sizeof(proxypass), "%s", gtk_entry_get_text(entry)); | 167 g_snprintf(proxypass, sizeof(proxypass), "%s", gtk_entry_get_text(entry)); |
169 save_prefs(); | 168 save_prefs(); |
170 } | 169 } |
171 | 170 |
171 | |
172 static GtkWidget *make_frame(GtkWidget *ret, char *text) { | |
173 GtkWidget *vbox, *label, *hbox; | |
174 char labeltext[256]; | |
175 | |
176 vbox = gtk_vbox_new(FALSE, 6); | |
177 gtk_box_pack_start(GTK_BOX(ret), vbox, FALSE, FALSE, 0); | |
178 label = gtk_label_new(NULL); | |
179 g_snprintf(labeltext, sizeof(labeltext), "<span weight=\"bold\">%s</span>", text); | |
180 gtk_label_set_markup(GTK_LABEL(label), labeltext); | |
181 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
182 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); | |
183 hbox = gtk_hbox_new(FALSE, 6); | |
184 gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); | |
185 label = gtk_label_new(" "); | |
186 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
187 vbox = gtk_vbox_new(FALSE, 6); | |
188 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); | |
189 return vbox; | |
190 } | |
172 | 191 |
173 /* OK, Apply and Cancel */ | 192 /* OK, Apply and Cancel */ |
174 | 193 |
175 static void apply_cb(GtkWidget *button, void *data) | 194 static void apply_cb(GtkWidget *button, void *data) |
176 { | 195 { |
227 static void ok_cb(GtkWidget *button, void *data) | 246 static void ok_cb(GtkWidget *button, void *data) |
228 { | 247 { |
229 apply_cb(button, data); | 248 apply_cb(button, data); |
230 gtk_widget_destroy(prefs); | 249 gtk_widget_destroy(prefs); |
231 } | 250 } |
232 #if GTK_CHECK_VERSION(1,3,0) | 251 |
233 static void pref_nb_select(GtkTreeSelection *sel, GtkNotebook *nb) { | 252 static void pref_nb_select(GtkTreeSelection *sel, GtkNotebook *nb) { |
234 GtkTreeIter iter; | 253 GtkTreeIter iter; |
254 char text[128]; | |
235 GValue val = { 0, }; | 255 GValue val = { 0, }; |
236 GtkTreeModel *model = GTK_TREE_MODEL(prefstree); | 256 GtkTreeModel *model = GTK_TREE_MODEL(prefstree); |
237 | 257 |
238 if (! gtk_tree_selection_get_selected (sel, &model, &iter)) | 258 if (! gtk_tree_selection_get_selected (sel, &model, &iter)) |
239 return; | 259 return; |
240 gtk_tree_model_get_value (model, &iter, 1, &val); | 260 gtk_tree_model_get_value (model, &iter, 1, &val); |
241 gtk_label_set_text (GTK_LABEL(preflabel), g_value_get_string (&val)); | 261 g_snprintf(text, sizeof(text), "<span weight=\"bold\" size=\"larger\">%s</span>", |
262 g_value_get_string(&val)); | |
263 gtk_label_set_markup (GTK_LABEL(preflabel), text); | |
242 g_value_unset (&val); | 264 g_value_unset (&val); |
243 gtk_tree_model_get_value (model, &iter, 2, &val); | 265 gtk_tree_model_get_value (model, &iter, 2, &val); |
244 gtk_notebook_set_current_page (GTK_NOTEBOOK (prefsnotebook), g_value_get_int (&val)); | 266 gtk_notebook_set_current_page (GTK_NOTEBOOK (prefsnotebook), g_value_get_int (&val)); |
245 | 267 |
246 } | 268 } |
247 #else | 269 |
248 static void pref_nb_select(GtkCTree *ctree, GtkCTreeNode *node, gint column, GtkNotebook *nb) { | |
249 char *text; | |
250 gtk_ctree_get_node_info(GTK_CTREE(ctree), node, &text, NULL, NULL, NULL, NULL, NULL, NULL, NULL); | |
251 gtk_label_set_text (GTK_LABEL(preflabel), text); | |
252 gtk_notebook_set_page (GTK_NOTEBOOK (prefsnotebook), gtk_ctree_node_get_row_data(GTK_CTREE(ctree), node)); | |
253 | |
254 } | |
255 #endif /* GTK_CHECK_VERSION */ | |
256 | 270 |
257 /* These are the pages in the preferences notebook */ | 271 /* These are the pages in the preferences notebook */ |
258 GtkWidget *interface_page() { | 272 GtkWidget *interface_page() { |
259 GtkWidget *ret; | 273 GtkWidget *ret; |
260 GtkWidget *frame; | 274 GtkWidget *frame; |
261 GtkWidget *vbox; | 275 GtkWidget *vbox; |
262 ret = gtk_vbox_new(FALSE, 5); | 276 ret = gtk_vbox_new(FALSE, 18); |
263 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 277 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
264 | 278 |
265 /* All the pages are pretty similar--a vbox packed with frames... */ | 279 vbox = make_frame(ret, _("Interface Options")); |
266 frame = gtk_frame_new (_("Windows")); | 280 /* This shouldn't have to wait for user to click OK or APPLY or whatnot */ |
267 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 281 /* This really shouldn't be in preferences at all */ |
268 gtk_widget_show (frame); | 282 debugbutton = gaim_button(_("Show _Debug Window"), &misc_options, OPT_MISC_DEBUG, vbox); |
269 | 283 |
270 /* And a vbox in each frame */ | 284 |
271 vbox = gtk_vbox_new(FALSE, 5); | 285 gaim_button(_("Use _borderless buttons"), &misc_options_new, OPT_MISC_COOL_LOOK, vbox); |
272 gtk_container_add (GTK_CONTAINER (frame), vbox); | 286 |
273 | 287 gtk_widget_show_all(ret); |
274 /* These shouldn't have to wait for user to click OK or APPLY or whatnot */ | |
275 /* They really shouldn't be in preferences at all */ | |
276 debugbutton = gaim_button(_("Show Debug Window"), &misc_options, OPT_MISC_DEBUG, vbox); | |
277 gtk_widget_show (vbox); | |
278 | |
279 | |
280 frame = gtk_frame_new (_("Style")); | |
281 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
282 gtk_widget_show (frame); | |
283 | |
284 vbox = gtk_vbox_new(FALSE, 5); | |
285 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
286 gaim_button(_("Use borderless buttons"), &misc_options_new, OPT_MISC_COOL_LOOK, vbox); | |
287 gtk_widget_show (vbox); | |
288 | |
289 gtk_widget_show(ret); | |
290 return ret; | 288 return ret; |
291 } | 289 } |
292 | 290 |
293 GtkWidget *font_page() { | 291 GtkWidget *font_page() { |
294 GtkWidget *ret; | 292 GtkWidget *ret; |
295 GtkWidget *frame; | |
296 GtkWidget *button; | 293 GtkWidget *button; |
297 GtkWidget *vbox, *hbox; | 294 GtkWidget *vbox, *hbox; |
298 GtkWidget *select = NULL; | 295 GtkWidget *select = NULL; |
299 ret = gtk_vbox_new(FALSE, 5); | 296 GtkSizeGroup *sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
300 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 297 |
301 | 298 ret = gtk_vbox_new(FALSE, 18); |
302 frame = gtk_frame_new (_("Style")); | 299 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
303 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 300 |
304 gtk_widget_show (frame); | 301 vbox = make_frame(ret, _("Style")); |
305 | 302 gaim_button(_("_Bold"), &font_options_new, OPT_FONT_BOLD, vbox); |
306 vbox = gtk_vbox_new(FALSE, 5); | 303 gaim_button(_("_Italics"), &font_options_new, OPT_FONT_ITALIC, vbox); |
307 gtk_container_add (GTK_CONTAINER (frame), vbox); | 304 gaim_button(_("_Underline"), &font_options_new, OPT_FONT_UNDERLINE, vbox); |
308 gaim_button(_("Bold"), &font_options_new, OPT_FONT_BOLD, vbox); | 305 gaim_button(_("_Strikethough"), &font_options_new, OPT_FONT_STRIKE, vbox); |
309 gaim_button(_("Italics"), &font_options_new, OPT_FONT_ITALIC, vbox); | 306 |
310 gaim_button(_("Underline"), &font_options_new, OPT_FONT_UNDERLINE, vbox); | 307 vbox = make_frame(ret, _("Face")); |
311 gaim_button(_("Strikethough"), &font_options_new, OPT_FONT_STRIKE, vbox); | 308 hbox = gtk_hbox_new(FALSE, 6); |
312 gtk_widget_show (vbox); | |
313 | |
314 | |
315 frame = gtk_frame_new (_("Face")); | |
316 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
317 gtk_widget_show (frame); | |
318 | |
319 vbox = gtk_vbox_new(FALSE, 5); | |
320 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
321 hbox = gtk_hbox_new(FALSE, 5); | |
322 gtk_container_add(GTK_CONTAINER(vbox), hbox); | 309 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
323 button = gaim_button(_("Use custom face"), &font_options_new, OPT_FONT_FACE, hbox); | 310 button = gaim_button(_("Use custo_m face"), &font_options_new, OPT_FONT_FACE, hbox); |
324 #if GTK_CHECK_VERSION(1,3,0) | 311 gtk_size_group_add_widget(sg, button); |
325 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_FONT); | 312 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_FONT); |
326 #else | 313 |
327 select = picture_button(prefs, _("Select"), fontface2_xpm); | |
328 #endif | |
329 if (!(font_options_new & OPT_FONT_FACE)) | 314 if (!(font_options_new & OPT_FONT_FACE)) |
330 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); | 315 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
331 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); | 316 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
332 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_font_dialog), NULL); | 317 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_font_dialog), NULL); |
333 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | 318 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); |
334 if (misc_options & OPT_MISC_COOL_LOOK) | |
335 gtk_button_set_relief(GTK_BUTTON(select), GTK_RELIEF_NONE); | |
336 gtk_widget_show(select); | |
337 gtk_widget_show(hbox); | |
338 | 319 |
339 hbox = gtk_hbox_new(FALSE, 5); | 320 hbox = gtk_hbox_new(FALSE, 5); |
340 gtk_container_add(GTK_CONTAINER(vbox), hbox); | 321 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
341 button = gaim_button(_("Use custom size"), &font_options_new, OPT_FONT_SIZE, hbox); | 322 button = gaim_button(_("Use custom si_ze"), &font_options_new, OPT_FONT_SIZE, hbox); |
342 select = gaim_labeled_spin_button(hbox, NULL, &fontsize_new, 1, 7); | 323 gtk_size_group_add_widget(sg, button); |
324 select = gaim_labeled_spin_button(hbox, NULL, &fontsize_new, 1, 7, NULL); | |
343 if (!(font_options_new & OPT_FONT_SIZE)) | 325 if (!(font_options_new & OPT_FONT_SIZE)) |
344 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); | 326 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
345 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); | 327 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
346 gtk_widget_show(hbox); | 328 |
347 gtk_widget_show (vbox); | 329 vbox = make_frame(ret, _("Color")); |
348 | |
349 | |
350 frame = gtk_frame_new ("Color"); | |
351 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
352 gtk_widget_show (frame); | |
353 vbox = gtk_vbox_new(FALSE, 5); | |
354 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
355 hbox = gtk_hbox_new(FALSE, 5); | 330 hbox = gtk_hbox_new(FALSE, 5); |
356 gtk_container_add(GTK_CONTAINER(vbox), hbox); | 331 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
357 | 332 |
333 | |
334 button = gaim_button(_("_Text color"), &font_options_new, OPT_FONT_FGCOL, hbox); | |
335 gtk_size_group_add_widget(sg, button); | |
336 | |
337 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); | |
338 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | |
358 pref_fg_picture = show_color_pref(hbox, TRUE); | 339 pref_fg_picture = show_color_pref(hbox, TRUE); |
359 button = gaim_button(_("Text color"), &font_options_new, OPT_FONT_FGCOL, hbox); | |
360 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), | 340 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), |
361 pref_fg_picture); | 341 pref_fg_picture); |
362 | 342 |
363 #if GTK_CHECK_VERSION(1,3,0) | |
364 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); | |
365 #else | |
366 select = picture_button(prefs, _("Select"), fgcolor_xpm); | |
367 #endif | |
368 if (!(font_options_new & OPT_FONT_FGCOL)) | 343 if (!(font_options_new & OPT_FONT_FGCOL)) |
369 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); | 344 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
370 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); | 345 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
371 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_fgcolor_dialog), NULL); | 346 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_fgcolor_dialog), NULL); |
372 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | |
373 if (misc_options & OPT_MISC_COOL_LOOK) | |
374 gtk_button_set_relief(GTK_BUTTON(select), GTK_RELIEF_NONE); | |
375 gtk_widget_show(select); | |
376 gtk_widget_show(hbox); | |
377 | |
378 hbox = gtk_hbox_new(FALSE, 5); | 347 hbox = gtk_hbox_new(FALSE, 5); |
379 gtk_container_add(GTK_CONTAINER(vbox), hbox); | 348 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
349 | |
350 button = gaim_button(_("Bac_kground color"), &font_options_new, OPT_FONT_BGCOL, hbox); | |
351 gtk_size_group_add_widget(sg, button); | |
352 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); | |
353 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | |
380 pref_bg_picture = show_color_pref(hbox, FALSE); | 354 pref_bg_picture = show_color_pref(hbox, FALSE); |
381 button = gaim_button(_("Background color"), &font_options_new, OPT_FONT_BGCOL, hbox); | 355 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), |
382 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), | |
383 pref_bg_picture); | 356 pref_bg_picture); |
384 #if GTK_CHECK_VERSION(1,3,0) | |
385 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); | |
386 #else | |
387 select = picture_button(prefs, _("Select"), bgcolor_xpm); | |
388 #endif | |
389 if (!(font_options_new & OPT_FONT_BGCOL)) | 357 if (!(font_options_new & OPT_FONT_BGCOL)) |
390 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); | 358 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
391 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_bgcolor_dialog), NULL); | 359 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_bgcolor_dialog), NULL); |
392 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); | 360 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
393 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | 361 |
394 if (misc_options & OPT_MISC_COOL_LOOK) | 362 gtk_widget_show_all(ret); |
395 gtk_button_set_relief(GTK_BUTTON(select), GTK_RELIEF_NONE); | |
396 gtk_widget_show(select); | |
397 gtk_widget_show(hbox); | |
398 gtk_widget_show (vbox); | |
399 | |
400 | |
401 gtk_widget_show(ret); | |
402 return ret; | 363 return ret; |
403 } | 364 } |
404 | 365 |
405 | 366 |
406 GtkWidget *messages_page() { | 367 GtkWidget *messages_page() { |
407 GtkWidget *ret; | 368 GtkWidget *ret; |
408 GtkWidget *frame; | |
409 GtkWidget *vbox; | 369 GtkWidget *vbox; |
410 ret = gtk_vbox_new(FALSE, 5); | 370 ret = gtk_vbox_new(FALSE, 18); |
411 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 371 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
412 | 372 |
413 frame = gtk_frame_new ("Display"); | 373 vbox = make_frame (ret, _("Display")); |
414 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 374 gaim_button(_("Show graphical _smileys"), &convo_options_new, OPT_CONVO_SHOW_SMILEY, vbox); |
415 gtk_widget_show (frame); | 375 gaim_button(_("Show _timestamp on messages"), &convo_options_new, OPT_CONVO_SHOW_TIME, vbox); |
416 | 376 gaim_button(_("Show _URLs as links"), &convo_options_new, OPT_CONVO_SEND_LINKS, vbox); |
417 vbox = gtk_vbox_new(FALSE, 5); | 377 gaim_button(_("_Highlight misspelled words"), &convo_options_new, OPT_CONVO_CHECK_SPELLING, vbox); |
418 gtk_container_add (GTK_CONTAINER (frame), vbox); | 378 |
419 gaim_button(_("Show graphical smileys"), &convo_options_new, OPT_CONVO_SHOW_SMILEY, vbox); | 379 vbox = make_frame (ret, _("Ignore")); |
420 gaim_button(_("Show timestamp on messages"), &convo_options_new, OPT_CONVO_SHOW_TIME, vbox); | 380 gaim_button(_("Ignore c_olors"), &convo_options_new, OPT_CONVO_IGNORE_COLOUR, vbox); |
421 gaim_button(_("Show URLs as links"), &convo_options_new, OPT_CONVO_SEND_LINKS, vbox); | 381 gaim_button(_("Ignore font _faces"), &convo_options_new, OPT_CONVO_IGNORE_FONTS, vbox); |
422 gaim_button(_("Highlight misspelled words"), &convo_options_new, OPT_CONVO_CHECK_SPELLING, vbox); | 382 gaim_button(_("Ignore font si_zes"), &convo_options_new, OPT_CONVO_IGNORE_SIZES, vbox); |
423 gtk_widget_show (vbox); | 383 gaim_button(_("Ignore Ti_K Automated Messages"), &away_options_new, OPT_AWAY_TIK_HACK, vbox); |
424 | 384 |
425 | 385 gtk_widget_show_all(ret); |
426 frame = gtk_frame_new ("Ignore"); | |
427 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
428 gtk_widget_show (frame); | |
429 | |
430 vbox = gtk_vbox_new(FALSE, 5); | |
431 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
432 gaim_button(_("Ignore colors"), &convo_options_new, OPT_CONVO_IGNORE_COLOUR, vbox); | |
433 gaim_button(_("Ignore font faces"), &convo_options_new, OPT_CONVO_IGNORE_FONTS, vbox); | |
434 gaim_button(_("Ignore font sizes"), &convo_options_new, OPT_CONVO_IGNORE_SIZES, vbox); | |
435 gaim_button(_("Ignore TiK Automated Messages"), &away_options_new, OPT_AWAY_TIK_HACK, vbox); | |
436 gtk_widget_show (vbox); | |
437 | |
438 gtk_widget_show(ret); | |
439 return ret; | 386 return ret; |
440 } | 387 } |
441 | 388 |
442 GtkWidget *hotkeys_page() { | 389 GtkWidget *hotkeys_page() { |
443 GtkWidget *ret; | 390 GtkWidget *ret; |
444 GtkWidget *frame; | |
445 GtkWidget *vbox; | 391 GtkWidget *vbox; |
446 ret = gtk_vbox_new(FALSE, 5); | 392 ret = gtk_vbox_new(FALSE, 18); |
447 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 393 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
448 | 394 |
449 frame = gtk_frame_new ("Send Message"); | 395 vbox = make_frame(ret, _("Send Message")); |
450 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 396 gaim_button(_("_Enter sends message"), &convo_options_new, OPT_CONVO_ENTER_SENDS, vbox); |
451 gtk_widget_show (frame); | 397 gaim_button(_("C_ontrol-Enter sends message"), &convo_options_new, OPT_CONVO_CTL_ENTER, vbox); |
452 | 398 |
453 vbox = gtk_vbox_new(FALSE, 5); | 399 vbox = make_frame (ret, _("Window Closing")); |
454 gtk_container_add (GTK_CONTAINER (frame), vbox); | 400 gaim_button(_("E_scape closes window"), &convo_options_new, OPT_CONVO_ESC_CAN_CLOSE, vbox); |
455 gaim_button(_("Enter sends message"), &convo_options_new, OPT_CONVO_ENTER_SENDS, vbox); | 401 gaim_button(_("Control-_W closes window"), &convo_options_new, OPT_CONVO_CTL_W_CLOSES, vbox); |
456 gaim_button(_("Control-Enter sends message"), &convo_options_new, OPT_CONVO_CTL_ENTER, vbox); | 402 |
457 gtk_widget_show (vbox); | 403 vbox = make_frame(ret, "Insertions"); |
458 | 404 gaim_button(_("Control-{B/I/U/S} inserts _HTML tags"), &convo_options_new, OPT_CONVO_CTL_CHARS, vbox); |
459 frame = gtk_frame_new ("Window Closing"); | 405 gaim_button(_("Control-(number) inserts _smileys"), &convo_options_new, OPT_CONVO_CTL_SMILEYS, vbox); |
460 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 406 |
461 gtk_widget_show (frame); | 407 gtk_widget_show_all(ret); |
462 | |
463 vbox = gtk_vbox_new(FALSE, 5); | |
464 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
465 gaim_button(_("Escape closes window"), &convo_options_new, OPT_CONVO_ESC_CAN_CLOSE, vbox); | |
466 gaim_button(_("Control-W closes window"), &convo_options_new, OPT_CONVO_CTL_W_CLOSES, vbox); | |
467 gtk_widget_show (vbox); | |
468 | |
469 | |
470 frame = gtk_frame_new ("Insertions"); | |
471 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
472 gtk_widget_show (frame); | |
473 | |
474 vbox = gtk_vbox_new(FALSE, 5); | |
475 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
476 gaim_button(_("Control-{B/I/U/S} inserts HTML tags"), &convo_options_new, OPT_CONVO_CTL_CHARS, vbox); | |
477 gaim_button(_("Control-(number) inserts smileys"), &convo_options_new, OPT_CONVO_CTL_SMILEYS, vbox); | |
478 gtk_widget_show (vbox); | |
479 | |
480 gtk_widget_show(ret); | |
481 return ret; | 408 return ret; |
482 } | 409 } |
483 | 410 |
484 GtkWidget *list_page() { | 411 GtkWidget *list_page() { |
485 GtkWidget *ret; | 412 GtkWidget *ret; |
486 GtkWidget *frame; | |
487 GtkWidget *vbox; | 413 GtkWidget *vbox; |
488 ret = gtk_vbox_new(FALSE, 5); | 414 ret = gtk_vbox_new(FALSE, 18); |
489 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 415 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
490 | 416 |
491 frame = gtk_frame_new ("Buttons"); | 417 vbox = make_frame (ret, _("Buttons")); |
492 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 418 gaim_button(_("_Hide IM/Info/Chat buttons"), &blist_options_new, OPT_BLIST_NO_BUTTONS, vbox); |
493 gtk_widget_show (frame); | 419 gaim_button(_("Show _pictures on buttons"), &blist_options_new, OPT_BLIST_SHOW_BUTTON_XPM, vbox); |
494 vbox = gtk_vbox_new(FALSE, 5); | 420 |
495 gtk_container_add (GTK_CONTAINER (frame), vbox); | 421 vbox = make_frame (ret, _("Buddy List Window")); |
496 gaim_button(_("Hide IM/Info/Chat buttons"), &blist_options_new, OPT_BLIST_NO_BUTTONS, vbox); | 422 gaim_button(_("_Save Window Size/Position"), &blist_options_new, OPT_BLIST_SAVED_WINDOWS, vbox); |
497 gaim_button(_("Show pictures on buttons"), &blist_options_new, OPT_BLIST_SHOW_BUTTON_XPM, vbox); | 423 gaim_button(_("_Raise Window on Events"), &blist_options_new, OPT_BLIST_POPUP, vbox); |
498 gtk_widget_show (vbox); | 424 |
499 | 425 vbox = make_frame (ret, _("Group Display")); |
500 | 426 gaim_button(_("Hide _groups with no online buddies"), &blist_options_new, OPT_BLIST_NO_MT_GRP, vbox); |
501 frame = gtk_frame_new ("Buddy List Window"); | 427 gaim_button(_("Show _numbers in groups"), &blist_options_new, OPT_BLIST_SHOW_GRPNUM, vbox); |
502 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 428 |
503 gtk_widget_show (frame); | 429 vbox = make_frame (ret, _("Buddy Display")); |
504 vbox = gtk_vbox_new(FALSE, 5); | 430 gaim_button(_("Show buddy type _icons"), &blist_options_new, OPT_BLIST_SHOW_PIXMAPS, vbox); |
505 gtk_container_add (GTK_CONTAINER (frame), vbox); | 431 gaim_button(_("Show _warning levels"), &blist_options_new, OPT_BLIST_SHOW_WARN, vbox); |
506 #ifdef USE_APPLET | 432 gaim_button(_("Show idle _times"), &blist_options_new, OPT_BLIST_SHOW_IDLETIME, vbox); |
507 gaim_button(_("Automatically show buddy list on sign on"), &blist_options_new, | 433 gaim_button(_("Grey i_dle buddies"), &blist_options_new, OPT_BLIST_GREY_IDLERS, vbox); |
508 OPT_BLIST_APP_BUDDY_SHOW, vbox); | 434 |
509 gaim_button(_("Display Buddy List near applet"), &blist_options_new, OPT_BLIST_NEAR_APPLET, vbox); | 435 gtk_widget_show_all(ret); |
510 | |
511 #endif | |
512 gaim_button(_("Save Window Size/Position"), &blist_options_new, OPT_BLIST_SAVED_WINDOWS, vbox); | |
513 gaim_button(_("Raise Window on Events"), &blist_options_new, OPT_BLIST_POPUP, vbox); | |
514 gtk_widget_show(vbox); | |
515 | |
516 | |
517 frame = gtk_frame_new ("Group Display"); | |
518 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
519 gtk_widget_show (frame); | |
520 vbox = gtk_vbox_new(FALSE, 5); | |
521 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
522 gaim_button(_("Hide groups with no online buddies"), &blist_options_new, OPT_BLIST_NO_MT_GRP, vbox); | |
523 gaim_button(_("Show numbers in groups"), &blist_options_new, OPT_BLIST_SHOW_GRPNUM, vbox); | |
524 gtk_widget_show(vbox); | |
525 | |
526 | |
527 frame = gtk_frame_new ("Buddy Display"); | |
528 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
529 gtk_widget_show (frame); | |
530 vbox = gtk_vbox_new(FALSE, 5); | |
531 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
532 gaim_button(_("Show buddy type icons"), &blist_options_new, OPT_BLIST_SHOW_PIXMAPS, vbox); | |
533 gaim_button(_("Show warning levels"), &blist_options_new, OPT_BLIST_SHOW_WARN, vbox); | |
534 gaim_button(_("Show idle times"), &blist_options_new, OPT_BLIST_SHOW_IDLETIME, vbox); | |
535 gaim_button(_("Grey idle buddies"), &blist_options_new, OPT_BLIST_GREY_IDLERS, vbox); | |
536 gtk_widget_show(vbox); | |
537 | |
538 | |
539 | |
540 gtk_widget_show (vbox); | |
541 | |
542 gtk_widget_show(ret); | |
543 return ret; | 436 return ret; |
544 } | 437 } |
545 | 438 |
546 GtkWidget *im_page() { | 439 GtkWidget *im_page() { |
547 GtkWidget *ret; | 440 GtkWidget *ret; |
548 GtkWidget *frame; | |
549 GtkWidget *vbox; | 441 GtkWidget *vbox; |
550 GtkWidget *typingbutton; | 442 GtkWidget *typingbutton, *widge; |
551 | 443 GtkSizeGroup *sg; |
552 ret = gtk_vbox_new(FALSE, 5); | 444 |
553 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 445 ret = gtk_vbox_new(FALSE, 18); |
554 | 446 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
555 frame = gtk_frame_new ("Window"); | 447 |
556 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 448 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
557 gtk_widget_show (frame); | 449 |
558 vbox = gtk_vbox_new(FALSE, 5); | 450 vbox = make_frame (ret, _("Window")); |
559 gtk_container_add (GTK_CONTAINER (frame), vbox); | 451 widge = gaim_dropdown(vbox, "Show _buttons as:", &im_options_new, OPT_IM_BUTTON_TEXT | OPT_IM_BUTTON_XPM, |
560 gaim_dropdown(vbox, "Show buttons as:", &im_options_new, OPT_IM_BUTTON_TEXT | OPT_IM_BUTTON_XPM, | |
561 "Pictures", OPT_IM_BUTTON_XPM, | 452 "Pictures", OPT_IM_BUTTON_XPM, |
562 "Text", OPT_IM_BUTTON_TEXT, | 453 "Text", OPT_IM_BUTTON_TEXT, |
563 "Pictures and text", OPT_IM_BUTTON_XPM | OPT_IM_BUTTON_TEXT, NULL); | 454 "Pictures and text", OPT_IM_BUTTON_XPM | OPT_IM_BUTTON_TEXT, NULL); |
564 gaim_labeled_spin_button(vbox, _("New window width:"), &conv_size_new.width, 25, 9999); | 455 gtk_size_group_add_widget(sg, widge); |
565 gaim_labeled_spin_button(vbox, _("New window height:"), &conv_size_new.height, 25, 9999); | 456 gtk_misc_set_alignment(GTK_MISC(widge), 0, 0); |
566 gaim_labeled_spin_button(vbox, _("Entry widget height:"), &conv_size_new.entry_height, 25, 9999); | 457 gaim_labeled_spin_button(vbox, _("New window _width:"), &conv_size_new.width, 25, 9999, sg); |
567 gaim_button(_("Raise windows on events"), &im_options_new, OPT_IM_POPUP, vbox); | 458 gaim_labeled_spin_button(vbox, _("New window _height:"), &conv_size_new.height, 25, 9999, sg); |
568 gaim_button(_("Hide window on send"), &im_options_new, OPT_IM_POPDOWN, vbox); | 459 gaim_labeled_spin_button(vbox, _("_Entry widget height:"), &conv_size_new.entry_height, 25, 9999, sg); |
460 gaim_button(_("_Raise windows on events"), &im_options_new, OPT_IM_POPUP, vbox); | |
461 gaim_button(_("Hide window on _send"), &im_options_new, OPT_IM_POPDOWN, vbox); | |
569 gtk_widget_show (vbox); | 462 gtk_widget_show (vbox); |
570 | 463 |
571 | 464 vbox = make_frame (ret, _("Buddy Icons")); |
572 frame = gtk_frame_new ("Buddy Icons"); | 465 gaim_button(_("Hide Buddy _Icons"), &im_options_new, OPT_IM_HIDE_ICONS, vbox); |
573 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 466 gaim_button(_("Disable Buddy Icon A_nimation"), &im_options_new, OPT_IM_NO_ANIMATION, vbox); |
574 gtk_widget_show (frame); | 467 |
575 vbox = gtk_vbox_new(FALSE, 5); | 468 vbox = make_frame (ret, _("Display")); |
576 gtk_container_add (GTK_CONTAINER (frame), vbox); | 469 gaim_button(_("Show _logins in window"), &im_options_new, OPT_IM_LOGON, vbox); |
577 gaim_button(_("Hide Buddy Icons"), &im_options_new, OPT_IM_HIDE_ICONS, vbox); | 470 |
578 gaim_button(_("Disable Buddy Icon Animation"), &im_options_new, OPT_IM_NO_ANIMATION, vbox); | 471 vbox = make_frame (ret, _("Typing Notification")); |
579 gtk_widget_show(vbox); | 472 typingbutton = gaim_button(_("Notify buddies that you are _typing to them"), &misc_options_new, |
580 | |
581 | |
582 frame = gtk_frame_new ("Display"); | |
583 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
584 gtk_widget_show (frame); | |
585 vbox = gtk_vbox_new(FALSE, 5); | |
586 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
587 gaim_button(_("Show logins in window"), &im_options_new, OPT_IM_LOGON, vbox); | |
588 gtk_widget_show(vbox); | |
589 | |
590 | |
591 frame = gtk_frame_new ("Typing Notification"); | |
592 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
593 gtk_widget_show (frame); | |
594 vbox = gtk_vbox_new(FALSE, 5); | |
595 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
596 typingbutton = gaim_button(_("Notify buddies that you are typing to them"), &misc_options_new, | |
597 OPT_MISC_STEALTH_TYPING, vbox); | 473 OPT_MISC_STEALTH_TYPING, vbox); |
598 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(typingbutton), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(typingbutton))); | 474 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(typingbutton), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(typingbutton))); |
599 misc_options_new ^= OPT_MISC_STEALTH_TYPING; | 475 misc_options_new ^= OPT_MISC_STEALTH_TYPING; |
600 gtk_widget_show(vbox); | 476 |
601 | 477 gtk_widget_show_all(ret); |
602 | |
603 | |
604 gtk_widget_show (vbox); | |
605 | |
606 gtk_widget_show(ret); | |
607 return ret; | 478 return ret; |
608 } | 479 } |
609 | 480 |
610 GtkWidget *chat_page() { | 481 GtkWidget *chat_page() { |
611 GtkWidget *ret; | 482 GtkWidget *ret; |
612 GtkWidget *frame; | |
613 GtkWidget *vbox; | 483 GtkWidget *vbox; |
614 ret = gtk_vbox_new(FALSE, 5); | 484 GtkWidget *dd; |
615 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 485 GtkSizeGroup *sg; |
616 | 486 |
617 frame = gtk_frame_new ("Window"); | 487 ret = gtk_vbox_new(FALSE, 18); |
618 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 488 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
619 gtk_widget_show (frame); | 489 |
620 vbox = gtk_vbox_new(FALSE, 5); | 490 sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); |
621 gtk_container_add (GTK_CONTAINER (frame), vbox); | 491 |
622 gaim_dropdown(vbox, "Show buttons as:", &chat_options_new, OPT_CHAT_BUTTON_TEXT | OPT_CHAT_BUTTON_XPM, | 492 vbox = make_frame (ret, _("Window")); |
623 "Pictures", OPT_CHAT_BUTTON_XPM, | 493 dd = gaim_dropdown(vbox, "Show _buttons as:", &chat_options_new, OPT_CHAT_BUTTON_TEXT | OPT_CHAT_BUTTON_XPM, |
624 "Text", OPT_CHAT_BUTTON_TEXT, | 494 "Pictures", OPT_CHAT_BUTTON_XPM, |
625 "Pictures and Text", OPT_CHAT_BUTTON_XPM | OPT_CHAT_BUTTON_TEXT, NULL); | 495 "Text", OPT_CHAT_BUTTON_TEXT, |
626 gaim_labeled_spin_button(vbox, _("New window width:"), &buddy_chat_size_new.width, 25, 9999); | 496 "Pictures and Text", OPT_CHAT_BUTTON_XPM | OPT_CHAT_BUTTON_TEXT, NULL); |
627 gaim_labeled_spin_button(vbox, _("New window height:"), &buddy_chat_size_new.height, 25, 9999); | 497 gtk_size_group_add_widget(sg, dd); |
628 gaim_labeled_spin_button(vbox, _("Entry widget height:"), &buddy_chat_size_new.entry_height, 25, 9999); | 498 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); |
629 gaim_button(_("Raise windows on events"), &chat_options_new, OPT_CHAT_POPUP, vbox); | 499 gaim_labeled_spin_button(vbox, _("New window _width:"), &buddy_chat_size_new.width, 25, 9999, sg); |
630 gtk_widget_show (vbox); | 500 gaim_labeled_spin_button(vbox, _("New window _height:"), &buddy_chat_size_new.height, 25, 9999, sg); |
631 | 501 gaim_labeled_spin_button(vbox, _("_Entry widget height:"), &buddy_chat_size_new.entry_height, 25, 9999, sg); |
632 | 502 gaim_button(_("_Raise windows on events"), &chat_options_new, OPT_CHAT_POPUP, vbox); |
633 frame = gtk_frame_new ("Tab Completion"); | 503 |
634 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 504 vbox = make_frame (ret, _("Tab Completion")); |
635 gtk_widget_show (frame); | 505 gaim_button(_("_Tab-Complete Nicks"), &chat_options_new, OPT_CHAT_TAB_COMPLETE, vbox); |
636 vbox = gtk_vbox_new(FALSE, 5); | 506 gaim_button(_("_Old-Style Tab Completion"), &chat_options_new, OPT_CHAT_OLD_STYLE_TAB, vbox); |
637 gtk_container_add (GTK_CONTAINER (frame), vbox); | 507 |
638 gaim_button(_("Tab-Complete Nicks"), &chat_options_new, OPT_CHAT_TAB_COMPLETE, vbox); | 508 vbox = make_frame (ret, _("Display")); |
639 gaim_button(_("Old-Style Tab Completion"), &chat_options_new, OPT_CHAT_OLD_STYLE_TAB, vbox); | 509 gaim_button(_("_Show people joining/leaving in window"), &chat_options_new, OPT_CHAT_LOGON, vbox); |
640 gtk_widget_show(vbox); | 510 gaim_button(_("Co_lorize screennames"), &chat_options_new, OPT_CHAT_COLORIZE, vbox); |
641 | 511 |
642 | 512 gtk_widget_show_all(ret); |
643 frame = gtk_frame_new ("Display"); | |
644 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
645 gtk_widget_show (frame); | |
646 vbox = gtk_vbox_new(FALSE, 5); | |
647 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
648 gaim_button(_("Show people joining/leaving in window"), &chat_options_new, OPT_CHAT_LOGON, vbox); | |
649 gaim_button(_("Colorize screennames"), &chat_options_new, OPT_CHAT_COLORIZE, vbox); | |
650 gtk_widget_show(vbox); | |
651 | |
652 gtk_widget_show(ret); | |
653 return ret; | 513 return ret; |
654 } | 514 } |
655 | 515 |
656 GtkWidget *tab_page() { | 516 GtkWidget *tab_page() { |
657 GtkWidget *ret; | 517 GtkWidget *ret; |
658 GtkWidget *frame; | |
659 GtkWidget *vbox; | 518 GtkWidget *vbox; |
660 ret = gtk_vbox_new(FALSE, 5); | 519 GtkWidget *dd; |
661 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 520 GtkSizeGroup *sg; |
662 | 521 ret = gtk_vbox_new(FALSE, 18); |
663 frame = gtk_frame_new ("IM Tabs"); | 522 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
664 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 523 |
665 gtk_widget_show (frame); | 524 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
666 vbox = gtk_vbox_new(FALSE, 5); | 525 |
667 gtk_container_add (GTK_CONTAINER (frame), vbox); | 526 vbox = make_frame (ret, _("IM Tabs")); |
668 | 527 dd = gaim_dropdown(vbox, "Tab _Placement:", &im_options_new, OPT_IM_SIDE_TAB | OPT_IM_BR_TAB, |
669 gaim_dropdown(vbox, "Tab Placement:", &im_options_new, OPT_IM_SIDE_TAB | OPT_IM_BR_TAB, | |
670 "Top", 0, | 528 "Top", 0, |
671 "Bottom", OPT_IM_BR_TAB, | 529 "Bottom", OPT_IM_BR_TAB, |
672 "Left", OPT_IM_SIDE_TAB, | 530 "Left", OPT_IM_SIDE_TAB, |
673 "Right", OPT_IM_BR_TAB | OPT_IM_SIDE_TAB, NULL); | 531 "Right", OPT_IM_BR_TAB | OPT_IM_SIDE_TAB, NULL); |
674 gaim_button(_("Show all Instant Messages in one tabbed\nwindow"), &im_options_new, OPT_IM_ONE_WINDOW, vbox); | 532 gtk_size_group_add_widget(sg, dd); |
675 gaim_button(_("Show aliases in tabs/titles"), &im_options_new, OPT_IM_ALIAS_TAB, vbox); | 533 gaim_button(_("Show all _Instant Messages in one tabbed\nwindow"), &im_options_new, OPT_IM_ONE_WINDOW, vbox); |
676 gtk_widget_show (vbox); | 534 gaim_button(_("Show a_liases in tabs/titles"), &im_options_new, OPT_IM_ALIAS_TAB, vbox); |
677 | 535 |
678 | 536 vbox = make_frame (ret, _("Chat Tabs")); |
679 frame = gtk_frame_new ("Chat Tabs"); | 537 dd = gaim_dropdown(vbox, "Tab _Placement:", &chat_options_new, OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, |
680 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 538 "Top", 0, |
681 gtk_widget_show (frame); | 539 "Bottom", OPT_CHAT_BR_TAB, |
682 vbox = gtk_vbox_new(FALSE, 5); | 540 "Left", OPT_CHAT_SIDE_TAB, |
683 gtk_container_add (GTK_CONTAINER (frame), vbox); | 541 "Right", OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, NULL); |
684 | 542 gtk_size_group_add_widget(sg, dd); |
685 gaim_dropdown(vbox, "Tab Placement:", &chat_options_new, OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, | 543 gaim_button(_("Show all c_hats in one tabbed window"), &chat_options_new, OPT_CHAT_ONE_WINDOW, |
686 "Top", 0, | |
687 "Bottom", OPT_CHAT_BR_TAB, | |
688 "Left", OPT_CHAT_SIDE_TAB, | |
689 "Right", OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, NULL); | |
690 gaim_button(_("Show all chats in one tabbed window"), &chat_options_new, OPT_CHAT_ONE_WINDOW, | |
691 vbox); | 544 vbox); |
692 gtk_widget_show(vbox); | 545 |
693 | 546 vbox = make_frame (ret, _("Combined Tabs")); |
694 frame = gtk_frame_new ("Combined Tabs"); | 547 gaim_button(_("Show IMs and chats in _same tabbed\nwindow."), &convo_options_new, OPT_CONVO_COMBINE, vbox); |
695 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 548 |
696 gtk_widget_show (frame); | 549 vbox = make_frame (ret, _("Buddy List Tabs")); |
697 vbox = gtk_vbox_new(FALSE, 5); | 550 dd = gaim_dropdown(vbox, "Tab _Placement:", &blist_options_new, OPT_BLIST_BOTTOM_TAB, |
698 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
699 gtk_widget_show(vbox); | |
700 gaim_button(_("Show IMs and chats in same tabbed\nwindow."), &convo_options_new, OPT_CONVO_COMBINE, vbox); | |
701 | |
702 frame = gtk_frame_new ("Buddy List Tabs"); | |
703 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
704 gtk_widget_show (frame); | |
705 vbox = gtk_vbox_new(FALSE, 5); | |
706 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
707 | |
708 gaim_dropdown(vbox, "Tab Placement:", &blist_options_new, OPT_BLIST_BOTTOM_TAB, | |
709 "Top", 0, | 551 "Top", 0, |
710 "Bottom", OPT_BLIST_BOTTOM_TAB, NULL); | 552 "Bottom", OPT_BLIST_BOTTOM_TAB, NULL); |
711 gtk_widget_show(vbox); | 553 gtk_size_group_add_widget(sg, dd); |
712 | 554 |
713 gtk_widget_show(ret); | 555 gtk_widget_show_all(ret); |
714 return ret; | 556 return ret; |
715 } | 557 } |
716 | 558 |
717 GtkWidget *proxy_page() { | 559 GtkWidget *proxy_page() { |
718 GtkWidget *ret; | 560 GtkWidget *ret; |
719 GtkWidget *frame; | |
720 GtkWidget *vbox; | 561 GtkWidget *vbox; |
721 GtkWidget *entry; | 562 GtkWidget *entry; |
722 GtkWidget *label; | 563 GtkWidget *label; |
723 GtkWidget *hbox; | 564 GtkWidget *hbox; |
724 GtkWidget *table; | 565 GtkWidget *table; |
725 | 566 |
726 ret = gtk_vbox_new(FALSE, 5); | 567 ret = gtk_vbox_new(FALSE, 18); |
727 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 568 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
728 | 569 |
729 frame = gtk_frame_new ("Proxy Type"); | 570 vbox = make_frame (ret, _("Proxy Type")); |
730 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 571 gaim_dropdown(vbox, "Proxy _Type:", &proxytype_new, -1, |
731 gtk_widget_show (frame); | |
732 vbox = gtk_vbox_new(FALSE, 5); | |
733 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
734 gaim_dropdown(vbox, "Proxy Type:", &proxytype_new, -1, | |
735 "No Proxy", PROXY_NONE, | 572 "No Proxy", PROXY_NONE, |
736 "SOCKS 4", PROXY_SOCKS4, | 573 "SOCKS 4", PROXY_SOCKS4, |
737 "SOCKS 5", PROXY_SOCKS5, | 574 "SOCKS 5", PROXY_SOCKS5, |
738 "HTTP", PROXY_HTTP, NULL); | 575 "HTTP", PROXY_HTTP, NULL); |
739 gtk_widget_show (vbox); | |
740 | 576 |
741 table = gtk_table_new(2, 2, FALSE); | 577 table = gtk_table_new(2, 2, FALSE); |
742 gtk_container_set_border_width(GTK_CONTAINER(table), 5); | 578 gtk_container_set_border_width(GTK_CONTAINER(table), 5); |
743 gtk_table_set_col_spacings(GTK_TABLE(table), 5); | 579 gtk_table_set_col_spacings(GTK_TABLE(table), 5); |
744 gtk_table_set_row_spacings(GTK_TABLE(table), 5); | 580 gtk_table_set_row_spacings(GTK_TABLE(table), 5); |
745 gtk_widget_show(table); | 581 |
746 | 582 vbox = make_frame(ret, _("Proxy Server")); |
747 frame = gtk_frame_new(_("Proxy Server")); | 583 prefs_proxy_frame = vbox; |
748 prefs_proxy_frame = frame; | |
749 | |
750 gtk_widget_show(frame); | |
751 gtk_box_pack_start(GTK_BOX(ret), frame, FALSE, FALSE, 5); | |
752 | 584 |
753 if (proxytype == PROXY_NONE) | 585 if (proxytype == PROXY_NONE) |
754 gtk_widget_set_sensitive(GTK_WIDGET(frame), FALSE); | 586 gtk_widget_set_sensitive(GTK_WIDGET(vbox), FALSE); |
755 | 587 |
756 table = gtk_table_new(2, 4, FALSE); | 588 table = gtk_table_new(2, 4, FALSE); |
757 gtk_container_set_border_width(GTK_CONTAINER(table), 5); | 589 gtk_container_set_border_width(GTK_CONTAINER(table), 5); |
758 gtk_table_set_col_spacings(GTK_TABLE(table), 5); | 590 gtk_table_set_col_spacings(GTK_TABLE(table), 5); |
759 gtk_table_set_row_spacings(GTK_TABLE(table), 10); | 591 gtk_table_set_row_spacings(GTK_TABLE(table), 10); |
760 gtk_widget_show(table); | 592 gtk_container_add(GTK_CONTAINER(vbox), table); |
761 gtk_container_add(GTK_CONTAINER(frame), table); | 593 |
762 | 594 |
763 | 595 label = gtk_label_new_with_mnemonic(_("_Host")); |
764 label = gtk_label_new(_("Host")); | |
765 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | 596 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); |
766 gtk_widget_show(label); | |
767 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0); | 597 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0); |
768 | 598 |
769 entry = gtk_entry_new(); | 599 entry = gtk_entry_new(); |
600 gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); | |
770 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 0, 1, GTK_FILL, 0, 0, 0); | 601 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 0, 1, GTK_FILL, 0, 0, 0); |
771 gtk_signal_connect(GTK_OBJECT(entry), "changed", | 602 gtk_signal_connect(GTK_OBJECT(entry), "changed", |
772 GTK_SIGNAL_FUNC(proxy_print_option), (void *)PROXYHOST); | 603 GTK_SIGNAL_FUNC(proxy_print_option), (void *)PROXYHOST); |
773 gtk_entry_set_text(GTK_ENTRY(entry), proxyhost); | 604 gtk_entry_set_text(GTK_ENTRY(entry), proxyhost); |
774 gtk_widget_show(entry); | |
775 | 605 |
776 hbox = gtk_hbox_new(TRUE, 5); | 606 hbox = gtk_hbox_new(TRUE, 5); |
777 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | 607 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
778 gtk_widget_show(hbox); | 608 |
779 | 609 label = gtk_label_new_with_mnemonic(_("Port")); |
780 label = gtk_label_new(_("Port")); | |
781 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | 610 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); |
782 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0); | 611 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0); |
783 gtk_widget_show(label); | |
784 | 612 |
785 entry = gtk_entry_new(); | 613 entry = gtk_entry_new(); |
614 gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); | |
786 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 1, 2, GTK_FILL, 0, 0, 0); | 615 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 1, 2, GTK_FILL, 0, 0, 0); |
787 gtk_signal_connect(GTK_OBJECT(entry), "changed", | 616 gtk_signal_connect(GTK_OBJECT(entry), "changed", |
788 GTK_SIGNAL_FUNC(proxy_print_option), (void *)PROXYPORT); | 617 GTK_SIGNAL_FUNC(proxy_print_option), (void *)PROXYPORT); |
789 | 618 |
790 if (proxyport) { | 619 if (proxyport) { |
791 char buf[128]; | 620 char buf[128]; |
792 g_snprintf(buf, sizeof(buf), "%d", proxyport); | 621 g_snprintf(buf, sizeof(buf), "%d", proxyport); |
793 gtk_entry_set_text(GTK_ENTRY(entry), buf); | 622 gtk_entry_set_text(GTK_ENTRY(entry), buf); |
794 } | 623 } |
795 gtk_widget_show(entry); | 624 |
796 | 625 label = gtk_label_new_with_mnemonic(_("_User")); |
797 label = gtk_label_new(_("User")); | |
798 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | 626 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); |
799 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0); | 627 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0); |
800 gtk_widget_show(label); | |
801 | 628 |
802 entry = gtk_entry_new(); | 629 entry = gtk_entry_new(); |
630 gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); | |
803 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 2, 3, GTK_FILL, 0, 0, 0); | 631 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 2, 3, GTK_FILL, 0, 0, 0); |
804 gtk_signal_connect(GTK_OBJECT(entry), "changed", | 632 gtk_signal_connect(GTK_OBJECT(entry), "changed", |
805 GTK_SIGNAL_FUNC(proxy_print_option), (void *)PROXYUSER); | 633 GTK_SIGNAL_FUNC(proxy_print_option), (void *)PROXYUSER); |
806 gtk_entry_set_text(GTK_ENTRY(entry), proxyuser); | 634 gtk_entry_set_text(GTK_ENTRY(entry), proxyuser); |
807 gtk_widget_show(entry); | |
808 | 635 |
809 hbox = gtk_hbox_new(TRUE, 5); | 636 hbox = gtk_hbox_new(TRUE, 5); |
810 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | 637 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
811 gtk_widget_show(hbox); | 638 |
812 | 639 label = gtk_label_new_with_mnemonic(_("Pa_ssword")); |
813 label = gtk_label_new(_("Password")); | |
814 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | 640 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); |
815 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, GTK_FILL, 0, 0, 0); | 641 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, GTK_FILL, 0, 0, 0); |
816 gtk_widget_show(label); | |
817 | 642 |
818 entry = gtk_entry_new(); | 643 entry = gtk_entry_new(); |
644 gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); | |
819 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 3, 4, GTK_FILL , 0, 0, 0); | 645 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 3, 4, GTK_FILL , 0, 0, 0); |
820 gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE); | 646 gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE); |
821 gtk_signal_connect(GTK_OBJECT(entry), "changed", | 647 gtk_signal_connect(GTK_OBJECT(entry), "changed", |
822 GTK_SIGNAL_FUNC(proxy_print_option), (void *)PROXYPASS); | 648 GTK_SIGNAL_FUNC(proxy_print_option), (void *)PROXYPASS); |
823 gtk_entry_set_text(GTK_ENTRY(entry), proxypass); | 649 gtk_entry_set_text(GTK_ENTRY(entry), proxypass); |
824 gtk_widget_show(entry); | 650 |
825 | 651 gtk_widget_show_all(ret); |
826 gtk_widget_show(ret); | |
827 return ret; | 652 return ret; |
828 } | 653 } |
829 | 654 |
830 GtkWidget *browser_page() { | 655 GtkWidget *browser_page() { |
831 GtkWidget *ret; | 656 GtkWidget *ret; |
832 GtkWidget *frame; | |
833 GtkWidget *vbox, *hbox; | 657 GtkWidget *vbox, *hbox; |
834 GtkWidget *label; | 658 GtkWidget *label; |
835 ret = gtk_vbox_new(FALSE, 5); | 659 GtkSizeGroup *sg; |
836 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 660 |
837 | 661 ret = gtk_vbox_new(FALSE, 18); |
838 frame = gtk_frame_new ("Browser Selection"); | 662 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
839 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 663 |
840 gtk_widget_show (frame); | 664 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
841 vbox = gtk_vbox_new(FALSE, 5); | 665 |
842 gtk_container_add (GTK_CONTAINER (frame), vbox); | 666 vbox = make_frame (ret, _("Browser Selection")); |
843 gaim_dropdown(vbox, "Browser", &web_browser_new, -1, | 667 label = gaim_dropdown(vbox, "_Browser", &web_browser_new, -1, |
844 "Netscape", BROWSER_NETSCAPE, | 668 "Netscape", BROWSER_NETSCAPE, |
845 "Konqueror", BROWSER_KONQ, | 669 "Konqueror", BROWSER_KONQ, |
846 "Mozilla", BROWSER_MOZILLA, | 670 "Mozilla", BROWSER_MOZILLA, |
847 "Manual", BROWSER_MANUAL, | 671 "Manual", BROWSER_MANUAL, |
848 #ifdef USE_GNOME | 672 "Galeon", BROWSER_GALEON, |
849 "GNOME URL Handler", BROWSER_GNOME, | 673 "Opera", BROWSER_OPERA, NULL); |
850 #endif /* USE_GNOME */ | 674 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
851 "Galeon", BROWSER_GALEON, | 675 gtk_size_group_add_widget(sg, label); |
852 "Opera", BROWSER_OPERA, NULL); | |
853 | 676 |
854 hbox = gtk_hbox_new(FALSE, 5); | 677 hbox = gtk_hbox_new(FALSE, 5); |
855 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | 678 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
856 label = gtk_label_new("Manual: "); | 679 label = gtk_label_new_with_mnemonic("_Manual: "); |
857 gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); | 680 gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); |
858 gtk_widget_show(label); | 681 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
682 gtk_size_group_add_widget(sg, label); | |
859 browser_entry = gtk_entry_new(); | 683 browser_entry = gtk_entry_new(); |
684 gtk_label_set_mnemonic_widget(GTK_LABEL(label), browser_entry); | |
860 if (web_browser_new != BROWSER_MANUAL) | 685 if (web_browser_new != BROWSER_MANUAL) |
861 gtk_widget_set_sensitive(browser_entry, FALSE); | 686 gtk_widget_set_sensitive(browser_entry, FALSE); |
862 gtk_box_pack_start (GTK_BOX (hbox), browser_entry, FALSE, FALSE, 0); | 687 gtk_box_pack_start (GTK_BOX (hbox), browser_entry, FALSE, FALSE, 0); |
863 gtk_widget_show(browser_entry); | 688 |
864 gtk_widget_show(hbox); | 689 vbox = make_frame (ret, _("Browser Options")); |
865 gtk_widget_show (vbox); | 690 gaim_button(_("Open new _window by default"), &misc_options_new, OPT_MISC_BROWSER_POPUP, vbox); |
866 | 691 |
867 | 692 gtk_widget_show_all(ret); |
868 frame = gtk_frame_new ("Browser Options"); | |
869 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
870 gtk_widget_show (frame); | |
871 vbox = gtk_vbox_new(FALSE, 5); | |
872 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
873 gaim_button(_("Open new window by default"), &misc_options_new, OPT_MISC_BROWSER_POPUP, vbox); | |
874 gtk_widget_show(vbox); | |
875 | |
876 gtk_widget_show(ret); | |
877 return ret; | 693 return ret; |
878 } | 694 } |
879 | 695 |
880 GtkWidget *logging_page() { | 696 GtkWidget *logging_page() { |
881 GtkWidget *ret; | 697 GtkWidget *ret; |
882 GtkWidget *frame; | |
883 GtkWidget *vbox; | 698 GtkWidget *vbox; |
884 ret = gtk_vbox_new(FALSE, 5); | 699 ret = gtk_vbox_new(FALSE, 18); |
885 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 700 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
886 | 701 |
887 frame = gtk_frame_new ("Message Logs"); | 702 vbox = make_frame (ret, _("Message Logs")); |
888 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 703 gaim_button(_("_Log all conversations"), &logging_options_new, OPT_LOG_ALL, vbox); |
889 gtk_widget_show (frame); | 704 gaim_button(_("Strip _HTML from logs"), &logging_options_new, OPT_LOG_STRIP_HTML, vbox); |
890 vbox = gtk_vbox_new(FALSE, 5); | 705 |
891 gtk_container_add (GTK_CONTAINER (frame), vbox); | 706 vbox = make_frame (ret, _("System Logs")); |
892 gaim_button(_("Log all conversations"), &logging_options_new, OPT_LOG_ALL, vbox); | 707 gaim_button(_("Log when buddies _sign on/sign off"), &logging_options_new, OPT_LOG_BUDDY_SIGNON, |
893 gaim_button(_("Strip HTML from logs"), &logging_options_new, OPT_LOG_STRIP_HTML, vbox); | |
894 gtk_widget_show (vbox); | |
895 | |
896 | |
897 frame = gtk_frame_new ("System Logs"); | |
898 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
899 gtk_widget_show (frame); | |
900 vbox = gtk_vbox_new(FALSE, 5); | |
901 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
902 gaim_button(_("Log when buddies sign on/sign off"), &logging_options_new, OPT_LOG_BUDDY_SIGNON, | |
903 vbox); | 708 vbox); |
904 gaim_button(_("Log when buddies become idle/un-idle"), &logging_options_new, OPT_LOG_BUDDY_IDLE, | 709 gaim_button(_("Log when buddies become _idle/un-idle"), &logging_options_new, OPT_LOG_BUDDY_IDLE, |
905 vbox); | 710 vbox); |
906 gaim_button(_("Log when buddies go away/come back"), &logging_options_new, OPT_LOG_BUDDY_AWAY, vbox); | 711 gaim_button(_("Log when buddies go away/come _back"), &logging_options_new, OPT_LOG_BUDDY_AWAY, vbox); |
907 gaim_button(_("Log your own signons/idleness/awayness"), &logging_options_new, OPT_LOG_MY_SIGNON, | 712 gaim_button(_("Log your _own signons/idleness/awayness"), &logging_options_new, OPT_LOG_MY_SIGNON, |
908 vbox); | 713 vbox); |
909 gaim_button(_("Individual log file for each buddy's signons"), &logging_options_new, | 714 gaim_button(_("I_ndividual log file for each buddy's signons"), &logging_options_new, |
910 OPT_LOG_INDIVIDUAL, vbox); | 715 OPT_LOG_INDIVIDUAL, vbox); |
911 gtk_widget_show(vbox); | 716 |
912 | 717 gtk_widget_show_all(ret); |
913 gtk_widget_show(ret); | |
914 return ret; | 718 return ret; |
915 } | 719 } |
916 | 720 |
917 static GtkWidget *sndcmd = NULL; | 721 static GtkWidget *sndcmd = NULL; |
918 /* static void set_sound_driver(GtkWidget *w, int option) | |
919 { | |
920 if (option == OPT_SOUND_CMD) | |
921 gtk_widget_set_sensitive(sndcmd, TRUE); | |
922 else | |
923 gtk_widget_set_sensitive(sndcmd, FALSE); | |
924 | |
925 sound_options &= ~(OPT_SOUND_NORMAL | OPT_SOUND_BEEP | | |
926 OPT_SOUND_NAS | OPT_SOUND_ARTSC | | |
927 OPT_SOUND_ESD | OPT_SOUND_CMD); | |
928 sound_options |= option; | |
929 save_prefs(); | |
930 } */ | |
931 | 722 |
932 static gint sound_cmd_yeah(GtkEntry *entry, GdkEvent *event, gpointer d) | 723 static gint sound_cmd_yeah(GtkEntry *entry, GdkEvent *event, gpointer d) |
933 { | 724 { |
934 g_snprintf(sound_cmd_new, sizeof(sound_cmd_new), "%s", gtk_entry_get_text(GTK_ENTRY(sndcmd))); | 725 g_snprintf(sound_cmd_new, sizeof(sound_cmd_new), "%s", gtk_entry_get_text(GTK_ENTRY(sndcmd))); |
935 return TRUE; | 726 return TRUE; |
936 } | 727 } |
937 | 728 |
938 GtkWidget *sound_page() { | 729 GtkWidget *sound_page() { |
939 GtkWidget *ret; | 730 GtkWidget *ret; |
940 GtkWidget *frame; | |
941 GtkWidget *label; | 731 GtkWidget *label; |
942 GtkWidget *vbox, *hbox; | 732 GtkWidget *vbox, *hbox; |
943 | 733 GtkSizeGroup *sg; |
944 ret = gtk_vbox_new(FALSE, 5); | 734 GtkWidget *dd; |
945 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 735 |
946 | 736 ret = gtk_vbox_new(FALSE, 18); |
947 frame = gtk_frame_new ("Sound Options"); | 737 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
948 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 738 |
949 gtk_widget_show (frame); | 739 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
950 vbox = gtk_vbox_new(FALSE, 5); | 740 |
951 gtk_container_add (GTK_CONTAINER (frame), vbox); | 741 vbox = make_frame (ret, _("Sound Options")); |
952 gaim_button(_("No sounds when you log in"), &sound_options, OPT_SOUND_SILENT_SIGNON, vbox); | 742 gaim_button(_("_No sounds when you log in"), &sound_options, OPT_SOUND_SILENT_SIGNON, vbox); |
953 gaim_button(_("Sounds while away"), &sound_options, OPT_SOUND_WHEN_AWAY, vbox); | 743 gaim_button(_("_Sounds while away"), &sound_options, OPT_SOUND_WHEN_AWAY, vbox); |
954 gtk_widget_show (vbox); | 744 |
955 | 745 vbox = make_frame (ret, _("Sound Method")); |
956 | 746 dd = gaim_dropdown(vbox, "_Method", &sound_options_new, OPT_SOUND_BEEP | |
957 frame = gtk_frame_new ("Sound Method"); | |
958 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
959 gtk_widget_show (frame); | |
960 vbox = gtk_vbox_new(FALSE, 5); | |
961 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
962 | |
963 gaim_dropdown(vbox, "Method", &sound_options_new, OPT_SOUND_BEEP | | |
964 OPT_SOUND_ESD | OPT_SOUND_ARTSC | OPT_SOUND_NAS | OPT_SOUND_NORMAL | | 747 OPT_SOUND_ESD | OPT_SOUND_ARTSC | OPT_SOUND_NAS | OPT_SOUND_NORMAL | |
965 OPT_SOUND_CMD, | 748 OPT_SOUND_CMD, |
966 "Console Beep", OPT_SOUND_BEEP, | 749 "Console Beep", OPT_SOUND_BEEP, |
967 #ifdef ESD_SOUND | 750 #ifdef ESD_SOUND |
968 "ESD", OPT_SOUND_ESD, | 751 "ESD", OPT_SOUND_ESD, |
973 #ifdef NAS_SOUND | 756 #ifdef NAS_SOUND |
974 "NAS", OPT_SOUND_NAS, | 757 "NAS", OPT_SOUND_NAS, |
975 #endif /* NAS_SOUND */ | 758 #endif /* NAS_SOUND */ |
976 "Internal", OPT_SOUND_NORMAL, | 759 "Internal", OPT_SOUND_NORMAL, |
977 "Command", OPT_SOUND_CMD, NULL); | 760 "Command", OPT_SOUND_CMD, NULL); |
978 | 761 gtk_size_group_add_widget(sg, dd); |
979 | 762 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); |
763 | |
980 hbox = gtk_hbox_new(FALSE, 5); | 764 hbox = gtk_hbox_new(FALSE, 5); |
981 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); | 765 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); |
982 gtk_widget_show(hbox); | 766 |
983 label = gtk_label_new("Sound Method"); | |
984 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); | |
985 gtk_widget_show(label); | |
986 | |
987 hbox = gtk_hbox_new(FALSE, 5); | 767 hbox = gtk_hbox_new(FALSE, 5); |
988 gtk_container_add(GTK_CONTAINER(vbox), hbox); | 768 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
989 gtk_widget_show(hbox); | 769 label = gtk_label_new_with_mnemonic(_("Sound c_ommand\n(%s for filename)")); |
990 label = gtk_label_new(_("Sound command\n(%s for filename)")); | 770 gtk_size_group_add_widget(sg, label); |
771 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
991 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); | 772 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
992 gtk_widget_show(label); | |
993 | 773 |
994 sndcmd = gtk_entry_new(); | 774 sndcmd = gtk_entry_new(); |
775 gtk_label_set_mnemonic_widget(GTK_LABEL(label), sndcmd); | |
995 | 776 |
996 gtk_entry_set_editable(GTK_ENTRY(sndcmd), TRUE); | 777 gtk_entry_set_editable(GTK_ENTRY(sndcmd), TRUE); |
997 gtk_entry_set_text(GTK_ENTRY(sndcmd), sound_cmd); | 778 gtk_entry_set_text(GTK_ENTRY(sndcmd), sound_cmd); |
998 #if GTK_CHECK_VERSION(1,3,0) | |
999 gtk_widget_set_size_request(sndcmd, 75, -1); | 779 gtk_widget_set_size_request(sndcmd, 75, -1); |
1000 #else | 780 |
1001 gtk_widget_set_usize(sndcmd, 75, -1); | |
1002 #endif | |
1003 gtk_widget_set_sensitive(sndcmd, (sound_options_new & OPT_SOUND_CMD)); | 781 gtk_widget_set_sensitive(sndcmd, (sound_options_new & OPT_SOUND_CMD)); |
1004 gtk_box_pack_start(GTK_BOX(hbox), sndcmd, TRUE, TRUE, 5); | 782 gtk_box_pack_start(GTK_BOX(hbox), sndcmd, TRUE, TRUE, 5); |
1005 gtk_signal_connect(GTK_OBJECT(sndcmd), "focus_out_event", GTK_SIGNAL_FUNC(sound_cmd_yeah), NULL); | 783 gtk_signal_connect(GTK_OBJECT(sndcmd), "focus_out_event", GTK_SIGNAL_FUNC(sound_cmd_yeah), NULL); |
1006 gtk_widget_show(sndcmd); | 784 |
1007 | 785 gtk_widget_show_all(ret); |
1008 | |
1009 gtk_widget_show(vbox); | |
1010 | |
1011 gtk_widget_show(ret); | |
1012 return ret; | 786 return ret; |
1013 } | 787 } |
1014 | 788 |
1015 GtkWidget *away_page() { | 789 GtkWidget *away_page() { |
1016 GtkWidget *ret; | 790 GtkWidget *ret; |
1017 GtkWidget *frame; | |
1018 GtkWidget *vbox; | 791 GtkWidget *vbox; |
1019 GtkWidget *hbox; | 792 GtkWidget *hbox; |
1020 GtkWidget *label; | 793 GtkWidget *label; |
1021 GtkWidget *button; | 794 GtkWidget *button; |
1022 GtkWidget *select; | 795 GtkWidget *select; |
1023 | 796 GtkWidget *dd; |
1024 ret = gtk_vbox_new(FALSE, 5); | 797 GtkSizeGroup *sg; |
1025 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 798 |
1026 | 799 ret = gtk_vbox_new(FALSE, 18); |
1027 frame = gtk_frame_new ("Away"); | 800 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
1028 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 801 |
1029 gtk_widget_show (frame); | 802 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
1030 vbox = gtk_vbox_new(FALSE, 5); | 803 |
1031 gtk_container_add (GTK_CONTAINER (frame), vbox); | 804 vbox = make_frame (ret, _("Away")); |
1032 gaim_button(_("Sending messages removes away status"), &away_options_new, OPT_AWAY_BACK_ON_IM, vbox); | 805 gaim_button(_("_Sending messages removes away status"), &away_options_new, OPT_AWAY_BACK_ON_IM, vbox); |
1033 gaim_button(_("Queue new messages when away"), &away_options_new, OPT_AWAY_QUEUE, vbox); | 806 gaim_button(_("_Queue new messages when away"), &away_options_new, OPT_AWAY_QUEUE, vbox); |
1034 gaim_button(_("Ignore new conversations when away"), &away_options_new, OPT_AWAY_DISCARD, vbox); | 807 gaim_button(_("_Ignore new conversations when away"), &away_options_new, OPT_AWAY_DISCARD, vbox); |
1035 gtk_widget_show (vbox); | 808 |
1036 | 809 vbox = make_frame (ret, _("Auto-response")); |
1037 | |
1038 frame = gtk_frame_new ("Auto-response"); | |
1039 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
1040 gtk_widget_show (frame); | |
1041 vbox = gtk_vbox_new(FALSE, 5); | |
1042 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
1043 | |
1044 hbox = gtk_hbox_new(FALSE, 0); | 810 hbox = gtk_hbox_new(FALSE, 0); |
1045 gtk_container_add(GTK_CONTAINER(vbox), hbox); | 811 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
1046 gaim_labeled_spin_button(hbox, _("Seconds before resending:"), | 812 gaim_labeled_spin_button(hbox, _("Seconds before _resending:"), |
1047 &away_resend_new, 1, 24 * 60 * 60); | 813 &away_resend_new, 1, 24 * 60 * 60, sg); |
1048 gtk_widget_show(hbox); | 814 gaim_button(_("_Don't send auto-response"), &away_options_new, OPT_AWAY_NO_AUTO_RESP, vbox); |
1049 gaim_button(_("Don't send auto-response"), &away_options_new, OPT_AWAY_NO_AUTO_RESP, vbox); | 815 gaim_button(_("_Only send auto-response when idle"), &away_options_new, OPT_AWAY_IDLE_RESP, vbox); |
1050 gaim_button(_("Only send auto-response when idle"), &away_options_new, OPT_AWAY_IDLE_RESP, vbox); | |
1051 | 816 |
1052 if (away_options_new & OPT_AWAY_NO_AUTO_RESP) | 817 if (away_options_new & OPT_AWAY_NO_AUTO_RESP) |
1053 gtk_widget_set_sensitive(hbox, FALSE); | 818 gtk_widget_set_sensitive(hbox, FALSE); |
1054 gtk_widget_show(vbox); | 819 |
1055 | 820 vbox = make_frame (ret, _("Idle")); |
1056 | 821 dd = gaim_dropdown(vbox, "Idle _Time Reporting:", &away_resend_new, -1, |
1057 frame = gtk_frame_new ("Idle"); | 822 "None", IDLE_NONE, |
1058 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 823 "Gaim Usage", IDLE_GAIM, |
1059 gtk_widget_show (frame); | |
1060 vbox = gtk_vbox_new(FALSE, 5); | |
1061 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
1062 gaim_dropdown(vbox, "Idle Time Reporting:", &away_resend_new, -1, | |
1063 "None", IDLE_NONE, | |
1064 "Gaim Usage", IDLE_GAIM, | |
1065 #ifdef USE_SCREENSAVER | 824 #ifdef USE_SCREENSAVER |
1066 "X Usage", IDLE_SCREENSAVER, | 825 "X Usage", IDLE_SCREENSAVER, |
1067 #endif | 826 #endif |
1068 NULL); | 827 NULL); |
1069 gtk_widget_show(vbox); | 828 gtk_size_group_add_widget(sg, dd); |
1070 | 829 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); |
1071 frame = gtk_frame_new ("Auto-away"); | 830 |
1072 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | 831 vbox = make_frame (ret, _("Auto-away")); |
1073 gtk_widget_show (frame); | 832 button = gaim_button(_("Set away _when idle"), &away_options_new, OPT_AWAY_AUTO, vbox); |
1074 vbox = gtk_vbox_new(FALSE, 5); | 833 select = gaim_labeled_spin_button(vbox, "_Minutes before setting away:", &auto_away_new, 1, 24 * 60, sg); |
1075 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
1076 | |
1077 button = gaim_button(_("Set away when idle"), &away_options_new, OPT_AWAY_AUTO, vbox); | |
1078 select = gaim_labeled_spin_button(vbox, "Minutes before setting away:", &auto_away_new, 1, 24 * 60); | |
1079 if (!(away_options_new & OPT_AWAY_AUTO)) | 834 if (!(away_options_new & OPT_AWAY_AUTO)) |
1080 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); | 835 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
1081 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); | 836 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
1082 | 837 |
1083 label = gtk_label_new("Away message:"); | 838 label = gtk_label_new_with_mnemonic("Away m_essage:"); |
839 gtk_size_group_add_widget(sg, label); | |
840 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
1084 hbox = gtk_hbox_new(FALSE, 0); | 841 hbox = gtk_hbox_new(FALSE, 0); |
1085 gtk_container_add(GTK_CONTAINER(vbox), hbox); | 842 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
1086 gtk_widget_show(hbox); | |
1087 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | 843 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
1088 gtk_widget_show(label); | |
1089 prefs_away_menu = gtk_option_menu_new(); | 844 prefs_away_menu = gtk_option_menu_new(); |
845 gtk_label_set_mnemonic_widget(GTK_LABEL(label), prefs_away_menu); | |
1090 if (!(away_options_new & OPT_AWAY_AUTO)) | 846 if (!(away_options_new & OPT_AWAY_AUTO)) |
1091 gtk_widget_set_sensitive(GTK_WIDGET(prefs_away_menu), FALSE); | 847 gtk_widget_set_sensitive(GTK_WIDGET(prefs_away_menu), FALSE); |
1092 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), prefs_away_menu); | 848 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), prefs_away_menu); |
1093 default_away_menu_init(prefs_away_menu); | 849 default_away_menu_init(prefs_away_menu); |
1094 gtk_widget_show(prefs_away_menu); | 850 gtk_widget_show(prefs_away_menu); |
1095 gtk_box_pack_start(GTK_BOX(hbox), prefs_away_menu, FALSE, FALSE, 0); | 851 gtk_box_pack_start(GTK_BOX(hbox), prefs_away_menu, FALSE, FALSE, 0); |
1096 gtk_widget_show (vbox); | 852 |
1097 | 853 gtk_widget_show_all(ret); |
1098 gtk_widget_show(ret); | |
1099 return ret; | 854 return ret; |
1100 } | 855 } |
1101 | 856 |
1102 #if GTK_CHECK_VERSION (1,3,0) | 857 #if GTK_CHECK_VERSION (1,3,0) |
1103 static void event_toggled (GtkCellRendererToggle *cell, gchar *pth, gpointer data) | 858 static void event_toggled (GtkCellRendererToggle *cell, gchar *pth, gpointer data) |
1230 #endif | 985 #endif |
1231 | 986 |
1232 GtkWidget *sound_events_page() { | 987 GtkWidget *sound_events_page() { |
1233 | 988 |
1234 GtkWidget *ret; | 989 GtkWidget *ret; |
1235 GtkWidget *frame; | |
1236 GtkWidget *vbox; | |
1237 GtkWidget *sw; | 990 GtkWidget *sw; |
1238 GtkWidget *button, *hbox; | 991 GtkWidget *button, *hbox; |
1239 | |
1240 #if GTK_CHECK_VERSION(1,3,0) | |
1241 GtkTreeIter iter; | 992 GtkTreeIter iter; |
1242 GtkWidget *event_view; | 993 GtkWidget *event_view; |
1243 GtkListStore *event_store; | 994 GtkListStore *event_store; |
1244 GtkCellRenderer *rend; | 995 GtkCellRenderer *rend; |
1245 GtkTreeViewColumn *col; | 996 GtkTreeViewColumn *col; |
1246 GtkTreeSelection *sel; | 997 GtkTreeSelection *sel; |
1247 GtkTreePath *path; | 998 GtkTreePath *path; |
1248 #else | |
1249 GtkWidget *list; | |
1250 #endif | |
1251 int j; | 999 int j; |
1252 | 1000 |
1253 ret = gtk_vbox_new(FALSE, 5); | 1001 ret = gtk_vbox_new(FALSE, 18); |
1254 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 1002 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
1255 | 1003 |
1256 frame = gtk_frame_new ("Sound Events"); | |
1257 gtk_box_pack_start (GTK_BOX (ret), frame, TRUE, TRUE, 0); | |
1258 gtk_widget_show (frame); | |
1259 vbox = gtk_vbox_new(FALSE, 5); | |
1260 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
1261 sw = gtk_scrolled_window_new(NULL,NULL); | 1004 sw = gtk_scrolled_window_new(NULL,NULL); |
1262 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); | 1005 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); |
1263 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); | 1006 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); |
1264 | |
1265 #if GTK_CHECK_VERSION(1,3,0) | |
1266 event_store = gtk_list_store_new (3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_UINT); | 1007 event_store = gtk_list_store_new (3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_UINT); |
1267 | 1008 |
1268 for (j=0; j < NUM_SOUNDS; j++) { | 1009 for (j=0; j < NUM_SOUNDS; j++) { |
1269 if (sounds[j].opt == 0) | 1010 if (sounds[j].opt == 0) |
1270 continue; | 1011 continue; |
1298 col = gtk_tree_view_column_new_with_attributes ("Event", | 1039 col = gtk_tree_view_column_new_with_attributes ("Event", |
1299 rend, | 1040 rend, |
1300 "text", 1, | 1041 "text", 1, |
1301 NULL); | 1042 NULL); |
1302 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | 1043 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); |
1303 gtk_widget_show(event_view); | |
1304 g_object_unref(G_OBJECT(event_store)); | 1044 g_object_unref(G_OBJECT(event_store)); |
1305 gtk_container_add(GTK_CONTAINER(sw), event_view); | 1045 gtk_container_add(GTK_CONTAINER(sw), event_view); |
1306 #else | 1046 |
1307 list = gtk_clist_new(1); | 1047 hbox = gtk_hbox_new(FALSE, 6); |
1308 for (j=0; sound_order[j] != 0; j++) { | 1048 gtk_box_pack_start(GTK_BOX(ret), hbox, FALSE, FALSE, 0); |
1309 if (sounds[sound_order[j]].opt == 0) | |
1310 continue; | |
1311 gtk_clist_append(GTK_CLIST(list), &(sounds[sound_order[j]].label)); | |
1312 } | |
1313 gtk_widget_show(list); | |
1314 gtk_container_add(GTK_CONTAINER(sw), list); | |
1315 #endif | |
1316 | |
1317 gtk_widget_show (vbox); | |
1318 gtk_widget_show_all (ret); | |
1319 | |
1320 frame = gtk_frame_new ("Event Options"); | |
1321 gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0); | |
1322 gtk_widget_show (frame); | |
1323 vbox = gtk_vbox_new(FALSE, 5); | |
1324 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
1325 | |
1326 hbox = gtk_hbox_new(FALSE, 0); | |
1327 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
1328 gtk_widget_show(hbox); | |
1329 sound_entry = gtk_entry_new(); | 1049 sound_entry = gtk_entry_new(); |
1330 gtk_entry_set_text(GTK_ENTRY(sound_entry), sound_file_new[0] ? sound_file_new[0] : "(default)"); | 1050 gtk_entry_set_text(GTK_ENTRY(sound_entry), sound_file_new[0] ? sound_file_new[0] : "(default)"); |
1331 gtk_entry_set_editable(GTK_ENTRY(sound_entry), FALSE); | 1051 gtk_entry_set_editable(GTK_ENTRY(sound_entry), FALSE); |
1332 gtk_box_pack_start(GTK_BOX(hbox), sound_entry, FALSE, FALSE, 5); | 1052 gtk_box_pack_start(GTK_BOX(hbox), sound_entry, FALSE, FALSE, 5); |
1333 gtk_widget_show(sound_entry); | 1053 |
1334 | |
1335 | |
1336 hbox = gtk_hbox_new(FALSE, 0); | |
1337 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
1338 gtk_widget_show(hbox); | |
1339 button = gtk_button_new_with_label(_("Test")); | 1054 button = gtk_button_new_with_label(_("Test")); |
1340 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(test_sound), NULL); | 1055 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(test_sound), NULL); |
1341 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); | 1056 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); |
1342 gtk_widget_show(button); | |
1343 | 1057 |
1344 button = gtk_button_new_with_label(_("Reset")); | 1058 button = gtk_button_new_with_label(_("Reset")); |
1345 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(reset_sound), NULL); | 1059 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(reset_sound), NULL); |
1346 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); | 1060 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); |
1347 gtk_widget_show(button); | |
1348 | 1061 |
1349 button = gtk_button_new_with_label(_("Choose...")); | 1062 button = gtk_button_new_with_label(_("Choose...")); |
1350 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(sel_sound), NULL); | 1063 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(sel_sound), NULL); |
1351 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); | 1064 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); |
1352 gtk_widget_show(button); | 1065 |
1353 | 1066 gtk_widget_show_all (ret); |
1354 gtk_widget_show (vbox); | |
1355 | 1067 |
1356 return ret; | 1068 return ret; |
1357 } | 1069 } |
1358 | 1070 |
1359 #if GTK_CHECK_VERSION (1,3,0) | 1071 #if GTK_CHECK_VERSION (1,3,0) |
1439 } | 1151 } |
1440 #endif | 1152 #endif |
1441 | 1153 |
1442 GtkWidget *away_message_page() { | 1154 GtkWidget *away_message_page() { |
1443 GtkWidget *ret; | 1155 GtkWidget *ret; |
1444 GtkWidget *frame; | 1156 GtkWidget *hbox; |
1445 GtkWidget *vbox, *hbox; | |
1446 GtkWidget *button; | 1157 GtkWidget *button; |
1447 GtkWidget *sw; | 1158 GtkWidget *sw; |
1448 | |
1449 #if GTK_CHECK_VERSION(1,3,0) | |
1450 GtkTreeIter iter; | 1159 GtkTreeIter iter; |
1451 GtkWidget *event_view; | 1160 GtkWidget *event_view; |
1452 GtkCellRenderer *rend; | 1161 GtkCellRenderer *rend; |
1453 GtkTreeViewColumn *col; | 1162 GtkTreeViewColumn *col; |
1454 GtkTreeSelection *sel; | 1163 GtkTreeSelection *sel; |
1455 GtkTreePath *path; | 1164 GtkTreePath *path; |
1456 #endif | |
1457 GSList *awy = away_messages; | 1165 GSList *awy = away_messages; |
1458 struct away_message *a; | 1166 struct away_message *a; |
1459 GtkWidget *sw2; | 1167 GtkWidget *sw2; |
1460 | 1168 GtkSizeGroup *sg; |
1461 ret = gtk_vbox_new(FALSE, 5); | 1169 |
1462 gtk_container_set_border_width (GTK_CONTAINER (ret), 6); | 1170 ret = gtk_vbox_new(FALSE, 18); |
1463 | 1171 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
1464 frame = gtk_frame_new ("Title"); | 1172 |
1465 gtk_box_pack_start (GTK_BOX (ret), frame, TRUE, TRUE, 0); | 1173 sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); |
1466 gtk_widget_show (frame); | 1174 |
1467 vbox = gtk_vbox_new(FALSE, 5); | |
1468 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
1469 sw = gtk_scrolled_window_new(NULL,NULL); | 1175 sw = gtk_scrolled_window_new(NULL,NULL); |
1470 away_text = gtk_imhtml_new(NULL, NULL); | 1176 away_text = gtk_imhtml_new(NULL, NULL); |
1471 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); | 1177 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); |
1472 #if GTK_CHECK_VERSION(1,3,0) | |
1473 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), | 1178 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), |
1474 GTK_SHADOW_IN); | 1179 GTK_SHADOW_IN); |
1475 #endif | 1180 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); |
1476 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); | |
1477 | 1181 |
1478 #if GTK_CHECK_VERSION(1,3,0) | |
1479 prefs_away_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); | 1182 prefs_away_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); |
1480 while (awy) { | 1183 while (awy) { |
1481 a = (struct away_message *)awy->data; | 1184 a = (struct away_message *)awy->data; |
1482 gtk_list_store_append (prefs_away_store, &iter); | 1185 gtk_list_store_append (prefs_away_store, &iter); |
1483 gtk_list_store_set(prefs_away_store, &iter, | 1186 gtk_list_store_set(prefs_away_store, &iter, |
1494 "text", 0, | 1197 "text", 0, |
1495 NULL); | 1198 NULL); |
1496 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | 1199 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); |
1497 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(event_view), FALSE); | 1200 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(event_view), FALSE); |
1498 gtk_widget_show(event_view); | 1201 gtk_widget_show(event_view); |
1499 gtk_container_add(GTK_CONTAINER(sw), event_view); | 1202 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), event_view); |
1500 #else | 1203 |
1501 prefs_away_list = gtk_list_new(); | |
1502 while (awy) { | |
1503 GtkWidget *ambox = gtk_hbox_new(FALSE, 5); | |
1504 GtkWidget *list_item =gtk_list_item_new(); | |
1505 GtkWidget *label; | |
1506 a = (struct away_message *)awy->data; | |
1507 gtk_container_add(GTK_CONTAINER(prefs_away_list), list_item); | |
1508 gtk_signal_connect(GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(away_message_sel), | |
1509 a); | |
1510 gtk_object_set_user_data(GTK_OBJECT(list_item), a); | |
1511 | |
1512 gtk_widget_show(list_item); | |
1513 | |
1514 ambox = gtk_hbox_new(FALSE, 5); | |
1515 gtk_container_add(GTK_CONTAINER(list_item), ambox); | |
1516 gtk_widget_show(ambox); | |
1517 | |
1518 label = gtk_label_new(a->name); | |
1519 gtk_box_pack_start(GTK_BOX(ambox), label, FALSE, FALSE, 5); | |
1520 gtk_widget_show(label); | |
1521 | |
1522 awy = awy->next; | |
1523 | |
1524 } | |
1525 gtk_widget_show(prefs_away_list); | |
1526 gtk_container_add(GTK_CONTAINER(sw), prefs_away_list); | |
1527 #endif | |
1528 | |
1529 gtk_widget_show (vbox); | |
1530 gtk_widget_show (sw); | |
1531 | |
1532 | |
1533 frame = gtk_frame_new ("Message"); | |
1534 gtk_box_pack_start (GTK_BOX (ret), frame, TRUE, TRUE, 0); | |
1535 gtk_widget_show (frame); | |
1536 vbox = gtk_vbox_new(FALSE, 5); | |
1537 gtk_container_add (GTK_CONTAINER (frame), vbox); | |
1538 | |
1539 sw2 = gtk_scrolled_window_new(NULL, NULL); | 1204 sw2 = gtk_scrolled_window_new(NULL, NULL); |
1540 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2), | 1205 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2), |
1541 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); | 1206 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); |
1542 gtk_box_pack_start(GTK_BOX(vbox), sw2, TRUE, TRUE, 0); | 1207 gtk_box_pack_start(GTK_BOX(ret), sw2, TRUE, TRUE, 0); |
1543 gtk_widget_show(sw2); | 1208 |
1544 | 1209 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw2), away_text); |
1545 gtk_container_add(GTK_CONTAINER(sw2), away_text); | |
1546 GTK_LAYOUT(away_text)->hadjustment->step_increment = 10.0; | 1210 GTK_LAYOUT(away_text)->hadjustment->step_increment = 10.0; |
1547 GTK_LAYOUT(away_text)->vadjustment->step_increment = 10.0; | 1211 GTK_LAYOUT(away_text)->vadjustment->step_increment = 10.0; |
1548 gaim_setup_imhtml(away_text); | 1212 gaim_setup_imhtml(away_text); |
1549 gtk_widget_show(away_text); | |
1550 gtk_widget_show (vbox); | |
1551 gtk_widget_show (ret); | |
1552 gtk_imhtml_set_defaults(GTK_IMHTML(away_text), NULL, NULL, NULL); | 1213 gtk_imhtml_set_defaults(GTK_IMHTML(away_text), NULL, NULL, NULL); |
1553 #if GTK_CHECK_VERSION(1,3,0) | |
1554 sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view)); | 1214 sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view)); |
1555 path = gtk_tree_path_new_first(); | 1215 path = gtk_tree_path_new_first(); |
1556 g_signal_connect (G_OBJECT (sel), "changed", | 1216 g_signal_connect (G_OBJECT (sel), "changed", |
1557 G_CALLBACK (away_message_sel), | 1217 G_CALLBACK (away_message_sel), |
1558 NULL); | 1218 NULL); |
1559 #endif | |
1560 hbox = gtk_hbox_new(TRUE, 5); | 1219 hbox = gtk_hbox_new(TRUE, 5); |
1561 gtk_widget_show(hbox); | 1220 gtk_box_pack_start(GTK_BOX(ret), hbox, FALSE, FALSE, 0); |
1562 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
1563 #if GTK_CHECK_VERSION (1,3,0) | |
1564 button = gtk_button_new_from_stock (GTK_STOCK_ADD); | 1221 button = gtk_button_new_from_stock (GTK_STOCK_ADD); |
1565 #else | |
1566 button = picture_button(prefs, _("Add"), gnome_add_xpm); | |
1567 #endif | |
1568 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 1222 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1569 if (misc_options & OPT_MISC_COOL_LOOK) | 1223 gtk_size_group_add_widget(sg, button); |
1570 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
1571 gtk_widget_show(button); | |
1572 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), NULL); | 1224 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), NULL); |
1573 | 1225 |
1574 #if GTK_CHECK_VERSION (1,3,0) | |
1575 button = gtk_button_new_from_stock (GTK_STOCK_REMOVE); | 1226 button = gtk_button_new_from_stock (GTK_STOCK_REMOVE); |
1227 gtk_size_group_add_widget(sg, button); | |
1576 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(remove_away_message), event_view); | 1228 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(remove_away_message), event_view); |
1577 #else | 1229 |
1578 button = picture_button(prefs, _("Remove"), gnome_remove_xpm); | |
1579 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(remove_away_message), prefs_away_list); | |
1580 #endif | |
1581 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 1230 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1582 if (misc_options & OPT_MISC_COOL_LOOK) | |
1583 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
1584 gtk_widget_show(button); | |
1585 | |
1586 #if GTK_CHECK_VERSION (1,3,0) | |
1587 button = pixbuf_button(_("_Edit"), "edit.png"); | 1231 button = pixbuf_button(_("_Edit"), "edit.png"); |
1232 gtk_size_group_add_widget(sg, button); | |
1588 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), event_view); | 1233 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), event_view); |
1589 #else | |
1590 button = picture_button(prefs, _("Edit"), save_xpm); | |
1591 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), button); | |
1592 #endif | |
1593 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 1234 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1594 if (misc_options & OPT_MISC_COOL_LOOK) | 1235 |
1595 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | 1236 gtk_widget_show_all(ret); |
1596 gtk_widget_show(button); | |
1597 | |
1598 return ret; | 1237 return ret; |
1599 } | 1238 } |
1600 #if GTK_CHECK_VERSION (1,3,0) | 1239 #if GTK_CHECK_VERSION (1,3,0) |
1601 GtkTreeIter *prefs_notebook_add_page(char *text, | 1240 GtkTreeIter *prefs_notebook_add_page(char *text, |
1602 GdkPixbuf *pixbuf, | 1241 GdkPixbuf *pixbuf, |
1823 hbox = gtk_hbox_new (FALSE, 6); | 1462 hbox = gtk_hbox_new (FALSE, 6); |
1824 gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); | 1463 gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); |
1825 gtk_container_add (GTK_CONTAINER(vbox), hbox); | 1464 gtk_container_add (GTK_CONTAINER(vbox), hbox); |
1826 gtk_widget_show (hbox); | 1465 gtk_widget_show (hbox); |
1827 | 1466 |
1828 #if GTK_CHECK_VERSION(1,3,0) | |
1829 button = gtk_button_new_from_stock (GTK_STOCK_OK); | 1467 button = gtk_button_new_from_stock (GTK_STOCK_OK); |
1830 #else | |
1831 button = picture_button(prefs, _("OK"), join_xpm); | |
1832 #endif | |
1833 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ok_cb), prefs); | 1468 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ok_cb), prefs); |
1834 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 1469 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1835 if (misc_options & OPT_MISC_COOL_LOOK) | |
1836 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
1837 gtk_widget_show(button); | 1470 gtk_widget_show(button); |
1838 | 1471 |
1839 #if GTK_CHECK_VERSION(1,3,0) | |
1840 button = gtk_button_new_from_stock (GTK_STOCK_APPLY); | 1472 button = gtk_button_new_from_stock (GTK_STOCK_APPLY); |
1841 #else | |
1842 button = picture_button(prefs, _("Apply"), ok_xpm); | |
1843 #endif | |
1844 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(apply_cb), prefs); | 1473 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(apply_cb), prefs); |
1845 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 1474 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1846 if (misc_options & OPT_MISC_COOL_LOOK) | |
1847 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
1848 gtk_widget_show(button); | 1475 gtk_widget_show(button); |
1849 | 1476 |
1850 | |
1851 #if GTK_CHECK_VERSION(1,3,0) | |
1852 button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); | 1477 button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); |
1853 #else | |
1854 button = picture_button(prefs, _("Close"), cancel_xpm); | |
1855 #endif | |
1856 gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), prefs); | 1478 gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), prefs); |
1857 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 1479 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1858 if (misc_options & OPT_MISC_COOL_LOOK) | |
1859 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | |
1860 gtk_widget_show(button); | 1480 gtk_widget_show(button); |
1861 | 1481 |
1862 prefs_notebook_init(); | 1482 prefs_notebook_init(); |
1863 #if GTK_CHECK_VERSION(1,3,0) | 1483 |
1864 gtk_tree_view_expand_all (GTK_TREE_VIEW(tree_v)); | 1484 gtk_tree_view_expand_all (GTK_TREE_VIEW(tree_v)); |
1865 #endif | |
1866 gtk_widget_show(prefs); | 1485 gtk_widget_show(prefs); |
1867 } | 1486 } |
1868 | 1487 |
1869 static gint debug_delete(GtkWidget *w, GdkEvent *event, void *dummy) | 1488 static gint debug_delete(GtkWidget *w, GdkEvent *event, void *dummy) |
1870 { | 1489 { |
2110 } | 1729 } |
2111 | 1730 |
2112 GtkWidget *gaim_button(const char *text, guint *options, int option, GtkWidget *page) | 1731 GtkWidget *gaim_button(const char *text, guint *options, int option, GtkWidget *page) |
2113 { | 1732 { |
2114 GtkWidget *button; | 1733 GtkWidget *button; |
2115 button = gtk_check_button_new_with_label(text); | 1734 button = gtk_check_button_new_with_mnemonic(text); |
2116 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (*options & option)); | 1735 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (*options & option)); |
2117 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); | 1736 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); |
2118 gtk_object_set_user_data(GTK_OBJECT(button), options); | 1737 gtk_object_set_user_data(GTK_OBJECT(button), options); |
2119 | 1738 |
2120 /* So that the debug window happens immediately | 1739 /* So that the debug window happens immediately |
2259 static void update_spin_value(GtkWidget *w, GtkWidget *spin) | 1878 static void update_spin_value(GtkWidget *w, GtkWidget *spin) |
2260 { | 1879 { |
2261 int *value = gtk_object_get_user_data(GTK_OBJECT(spin)); | 1880 int *value = gtk_object_get_user_data(GTK_OBJECT(spin)); |
2262 *value = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin)); | 1881 *value = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin)); |
2263 } | 1882 } |
2264 GtkWidget *gaim_labeled_spin_button(GtkWidget *box, const gchar *title, int *val, int min, int max) | 1883 GtkWidget *gaim_labeled_spin_button(GtkWidget *box, const gchar *title, int *val, int min, int max, GtkSizeGroup *sg) |
2265 { | 1884 { |
2266 GtkWidget *hbox; | 1885 GtkWidget *hbox; |
2267 GtkWidget *label; | 1886 GtkWidget *label; |
2268 GtkWidget *spin; | 1887 GtkWidget *spin; |
2269 GtkObject *adjust; | 1888 GtkObject *adjust; |
2270 | 1889 |
2271 hbox = gtk_hbox_new(FALSE, 5); | 1890 hbox = gtk_hbox_new(FALSE, 5); |
2272 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); | 1891 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); |
2273 gtk_widget_show(hbox); | 1892 gtk_widget_show(hbox); |
2274 | 1893 |
2275 label = gtk_label_new(title); | 1894 label = gtk_label_new_with_mnemonic(title); |
2276 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | 1895 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
2277 gtk_widget_show(label); | 1896 gtk_widget_show(label); |
2278 | 1897 |
2279 adjust = gtk_adjustment_new(*val, min, max, 1, 1, 1); | 1898 adjust = gtk_adjustment_new(*val, min, max, 1, 1, 1); |
2280 spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0); | 1899 spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0); |
2282 gtk_widget_set_usize(spin, 50, -1); | 1901 gtk_widget_set_usize(spin, 50, -1); |
2283 gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0); | 1902 gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0); |
2284 gtk_signal_connect(GTK_OBJECT(adjust), "value-changed", | 1903 gtk_signal_connect(GTK_OBJECT(adjust), "value-changed", |
2285 GTK_SIGNAL_FUNC(update_spin_value), GTK_WIDGET(spin)); | 1904 GTK_SIGNAL_FUNC(update_spin_value), GTK_WIDGET(spin)); |
2286 gtk_widget_show(spin); | 1905 gtk_widget_show(spin); |
2287 return spin; | 1906 |
1907 gtk_label_set_mnemonic_widget(GTK_LABEL(label), spin); | |
1908 | |
1909 if (sg) { | |
1910 gtk_size_group_add_widget(sg, label); | |
1911 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
1912 | |
1913 } | |
1914 return label; | |
2288 } | 1915 } |
2289 | 1916 |
2290 void dropdown_set(GtkObject *w, int *option) | 1917 void dropdown_set(GtkObject *w, int *option) |
2291 { | 1918 { |
2292 int opt = (int)gtk_object_get_user_data(w); | 1919 int opt = (int)gtk_object_get_user_data(w); |
2331 | 1958 |
2332 hbox = gtk_hbox_new(FALSE, 5); | 1959 hbox = gtk_hbox_new(FALSE, 5); |
2333 gtk_container_add (GTK_CONTAINER (box), hbox); | 1960 gtk_container_add (GTK_CONTAINER (box), hbox); |
2334 gtk_widget_show(hbox); | 1961 gtk_widget_show(hbox); |
2335 | 1962 |
2336 label = gtk_label_new(title); | 1963 label = gtk_label_new_with_mnemonic(title); |
2337 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | 1964 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
2338 gtk_widget_show(label); | 1965 gtk_widget_show(label); |
2339 | 1966 |
2340 va_start(menuitems, clear); | 1967 va_start(menuitems, clear); |
2341 text = va_arg(menuitems, gchar *); | 1968 text = va_arg(menuitems, gchar *); |
2343 if (!text) | 1970 if (!text) |
2344 return NULL; | 1971 return NULL; |
2345 | 1972 |
2346 dropdown = gtk_option_menu_new(); | 1973 dropdown = gtk_option_menu_new(); |
2347 menu = gtk_menu_new(); | 1974 menu = gtk_menu_new(); |
2348 | 1975 |
1976 gtk_label_set_mnemonic_widget(GTK_LABEL(label), dropdown); | |
1977 | |
2349 while (text) { | 1978 while (text) { |
2350 value = va_arg(menuitems, int); | 1979 value = va_arg(menuitems, int); |
2351 opt = gtk_menu_item_new_with_label(text); | 1980 opt = gtk_menu_item_new_with_label(text); |
2352 gtk_object_set_user_data(GTK_OBJECT(opt), (void *)value); | 1981 gtk_object_set_user_data(GTK_OBJECT(opt), (void *)value); |
2353 gtk_object_set_data(GTK_OBJECT(opt), "clear", (void *)clear); | 1982 gtk_object_set_data(GTK_OBJECT(opt), "clear", (void *)clear); |
2366 va_end(menuitems); | 1995 va_end(menuitems); |
2367 | 1996 |
2368 gtk_option_menu_set_menu(GTK_OPTION_MENU(dropdown), menu); | 1997 gtk_option_menu_set_menu(GTK_OPTION_MENU(dropdown), menu); |
2369 gtk_box_pack_start(GTK_BOX(hbox), dropdown, FALSE, FALSE, 0); | 1998 gtk_box_pack_start(GTK_BOX(hbox), dropdown, FALSE, FALSE, 0); |
2370 gtk_widget_show(dropdown); | 1999 gtk_widget_show(dropdown); |
2371 return dropdown; | 2000 return label; |
2372 } | 2001 } |
2373 | 2002 |
2374 static GtkWidget *show_color_pref(GtkWidget *box, gboolean fgc) | 2003 static GtkWidget *show_color_pref(GtkWidget *box, gboolean fgc) |
2375 { | 2004 { |
2376 /* more stuff stolen from X-Chat */ | 2005 /* more stuff stolen from X-Chat */ |