comparison src/prefs.c @ 666:71ea550c22ac

[gaim-migrate @ 676] la la la. i also modified how fonts work a bit to make the convo window smaller and the code more understandable. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 11 Aug 2000 03:04:29 +0000
parents b3b5d9d18eea
children 45ed2ca0756e
comparison
equal deleted inserted replaced
665:0bbcdd94e5b0 666:71ea550c22ac
38 #include "pixmaps/cancel.xpm" 38 #include "pixmaps/cancel.xpm"
39 #include "pixmaps/fontface2.xpm" 39 #include "pixmaps/fontface2.xpm"
40 #include "pixmaps/refresh.xpm" 40 #include "pixmaps/refresh.xpm"
41 #include "pixmaps/gnome_add.xpm" 41 #include "pixmaps/gnome_add.xpm"
42 #include "pixmaps/gnome_remove.xpm" 42 #include "pixmaps/gnome_remove.xpm"
43 #include "pixmaps/palette.xpm"
43 44
44 struct debug_window *dw = NULL; 45 struct debug_window *dw = NULL;
45 static GtkWidget *prefs = NULL; 46 static GtkWidget *prefs = NULL;
46 47
47 static GtkWidget *gaim_button(const char *, int *, int, GtkWidget *); 48 static GtkWidget *gaim_button(const char *, int *, int, GtkWidget *);
154 else 155 else
155 opt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)), label); 156 opt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)), label);
156 gtk_box_pack_start(GTK_BOX(box), opt, FALSE, FALSE, 0); 157 gtk_box_pack_start(GTK_BOX(box), opt, FALSE, FALSE, 0);
157 gtk_signal_connect(GTK_OBJECT(opt), "clicked", GTK_SIGNAL_FUNC(set_connect), (void *)which); 158 gtk_signal_connect(GTK_OBJECT(opt), "clicked", GTK_SIGNAL_FUNC(set_connect), (void *)which);
158 gtk_widget_show(opt); 159 gtk_widget_show(opt);
159 if (web_browser == which) 160 if (proxy_type == which)
160 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE); 161 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
161 162
162 return opt; 163 return opt;
164 }
165
166 static void connect_destroy(GtkWidget *n, gpointer d)
167 {
168 proxy_host_entry = NULL;
169 proxy_port_entry = NULL;
163 } 170 }
164 171
165 static void connect_page() 172 static void connect_page()
166 { 173 {
167 GtkWidget *parent; 174 GtkWidget *parent;
177 debugbutton = NULL; 184 debugbutton = NULL;
178 prefs_away_list = NULL; 185 prefs_away_list = NULL;
179 186
180 prefdialog = gtk_frame_new(_("Connection Options")); 187 prefdialog = gtk_frame_new(_("Connection Options"));
181 gtk_container_add(GTK_CONTAINER(parent), prefdialog); 188 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
189 gtk_signal_connect(GTK_OBJECT(prefdialog), "destroy", GTK_SIGNAL_FUNC(connect_destroy), 0);
182 190
183 box = gtk_vbox_new(FALSE, 5); 191 box = gtk_vbox_new(FALSE, 5);
184 gtk_container_add(GTK_CONTAINER(prefdialog), box); 192 gtk_container_add(GTK_CONTAINER(prefdialog), box);
185 gtk_widget_show(box); 193 gtk_widget_show(box);
186 194
725 733
726 sep = gtk_hseparator_new(); 734 sep = gtk_hseparator_new();
727 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); 735 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5);
728 gtk_widget_show(sep); 736 gtk_widget_show(sep);
729 737
730 /* 738 hbox = gtk_hbox_new(FALSE, 5);
731 label = gtk_label_new(_("FIXME : This is where bg/fg color should go")); 739 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5);
732 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); 740 gtk_widget_show(hbox);
733 gtk_widget_show(label); 741
742 button = gaim_button(_("Text Color"), &font_options, OPT_FONT_FGCOL, hbox);
743
744 select = picture_button(prefs, _("Select"), palette_xpm);
745 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 5);
746 if (!(font_options & OPT_FONT_FGCOL))
747 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE);
748 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_color_dialog), (void *)1);
749 gtk_widget_show(select);
750
751 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select);
752
753 hbox = gtk_hbox_new(FALSE, 5);
754 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5);
755 gtk_widget_show(hbox);
756
757 button = gaim_button(_("Background Color"), &font_options, OPT_FONT_BGCOL, hbox);
758
759 select = picture_button(prefs, _("Select"), palette_xpm);
760 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 5);
761 if (!(font_options & OPT_FONT_BGCOL))
762 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE);
763 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_color_dialog), (void *)2);
764 gtk_widget_show(select);
765
766 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select);
734 767
735 sep = gtk_hseparator_new(); 768 sep = gtk_hseparator_new();
736 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); 769 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5);
737 gtk_widget_show(sep); 770 gtk_widget_show(sep);
738 */
739 771
740 hbox = gtk_hbox_new(FALSE, 5); 772 hbox = gtk_hbox_new(FALSE, 5);
741 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); 773 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5);
742 gtk_widget_show(hbox); 774 gtk_widget_show(hbox);
743 775