comparison src/prefs.c @ 3432:d40f96a0169b

[gaim-migrate @ 3459] Cool camels use Gaim! And even cowboys! Thanks, Etan. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sun, 25 Aug 2002 23:06:36 +0000
parents 1b18d4693d32
children 0f6a26952be7
comparison
equal deleted inserted replaced
3431:bc9c71d74842 3432:d40f96a0169b
1 /* 1 /*
2 * gaim 2 * gaim
3 * 3 *
4 * Copyright (C) 1998-2002, Mark Spencer <markster@marko.net> 4 * Copyright (C) 2002, Sean Egan <bj91704@binghamton.edu>
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 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 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 8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version. 9 * (at your option) any later version.
650 650
651 gtk_widget_show_all(ret); 651 gtk_widget_show_all(ret);
652 return ret; 652 return ret;
653 } 653 }
654 654
655 static void browser_print_option(GtkEntry *entry, void *nullish) {
656 g_snprintf(web_command_new, sizeof(web_command_new), "%s", gtk_entry_get_text(entry));
657 }
658
655 GtkWidget *browser_page() { 659 GtkWidget *browser_page() {
656 GtkWidget *ret; 660 GtkWidget *ret;
657 GtkWidget *vbox, *hbox; 661 GtkWidget *vbox, *hbox;
658 GtkWidget *label; 662 GtkWidget *label;
659 GtkSizeGroup *sg; 663 GtkSizeGroup *sg;
683 browser_entry = gtk_entry_new(); 687 browser_entry = gtk_entry_new();
684 gtk_label_set_mnemonic_widget(GTK_LABEL(label), browser_entry); 688 gtk_label_set_mnemonic_widget(GTK_LABEL(label), browser_entry);
685 if (web_browser_new != BROWSER_MANUAL) 689 if (web_browser_new != BROWSER_MANUAL)
686 gtk_widget_set_sensitive(browser_entry, FALSE); 690 gtk_widget_set_sensitive(browser_entry, FALSE);
687 gtk_box_pack_start (GTK_BOX (hbox), browser_entry, FALSE, FALSE, 0); 691 gtk_box_pack_start (GTK_BOX (hbox), browser_entry, FALSE, FALSE, 0);
692
693 gtk_entry_set_text(GTK_ENTRY(browser_entry), web_command_new);
694 gtk_signal_connect(GTK_OBJECT(browser_entry), "changed",
695 GTK_SIGNAL_FUNC(browser_print_option), NULL);
688 696
689 vbox = make_frame (ret, _("Browser Options")); 697 vbox = make_frame (ret, _("Browser Options"));
690 gaim_button(_("Open new _window by default"), &misc_options_new, OPT_MISC_BROWSER_POPUP, vbox); 698 gaim_button(_("Open new _window by default"), &misc_options_new, OPT_MISC_BROWSER_POPUP, vbox);
691 699
692 gtk_widget_show_all(ret); 700 gtk_widget_show_all(ret);
1351 default_away_new = default_away; 1359 default_away_new = default_away;
1352 fontsize_new = fontsize; 1360 fontsize_new = fontsize;
1353 web_browser_new = web_browser; 1361 web_browser_new = web_browser;
1354 proxytype_new = proxytype; 1362 proxytype_new = proxytype;
1355 g_snprintf(sound_cmd_new, sizeof(sound_cmd_new), "%s", sound_cmd); 1363 g_snprintf(sound_cmd_new, sizeof(sound_cmd_new), "%s", sound_cmd);
1356 g_snprintf(web_command_new, sizeof(web_command_new), "%s", web_command); 1364 g_snprintf(web_command_new, sizeof(web_command_new), "%s",
1365 web_command ? web_command : "xterm -e lynx \"%%s\"");
1357 g_snprintf(fontface_new, sizeof(fontface_new), fontface); 1366 g_snprintf(fontface_new, sizeof(fontface_new), fontface);
1358 #if !GTK_CHECK_VERSION(1,3,0) 1367 #if !GTK_CHECK_VERSION(1,3,0)
1359 g_snprintf(fontxfld_new, sizeof(fontxfld_new), fontxfld); 1368 g_snprintf(fontxfld_new, sizeof(fontxfld_new), fontxfld);
1360 #endif 1369 #endif
1361 memcpy(&conv_size_new, &conv_size, sizeof(struct window_size)); 1370 memcpy(&conv_size_new, &conv_size, sizeof(struct window_size));