comparison src/prefs.c @ 2269:7ff6170d84a0

[gaim-migrate @ 2279] The top section of the fonts prefs was buggin' me. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Tue, 11 Sep 2001 21:05:16 +0000
parents 9c8f353331e7
children 0dea5214d63f
comparison
equal deleted inserted replaced
2268:a9787aad60f3 2269:7ff6170d84a0
57 static void prefs_build_away(); 57 static void prefs_build_away();
58 static void prefs_build_deny(); 58 static void prefs_build_deny();
59 static gint handle_delete(GtkWidget *, GdkEvent *, void *); 59 static gint handle_delete(GtkWidget *, GdkEvent *, void *);
60 static void delete_prefs(GtkWidget *, void *); 60 static void delete_prefs(GtkWidget *, void *);
61 void set_default_away(GtkWidget *, gpointer); 61 void set_default_away(GtkWidget *, gpointer);
62 void set_font_option(GtkWidget *w, int *option);
62 63
63 static GtkWidget *sounddialog = NULL; 64 static GtkWidget *sounddialog = NULL;
64 static GtkWidget *prefdialog = NULL; 65 static GtkWidget *prefdialog = NULL;
65 static GtkWidget *debugbutton = NULL; 66 static GtkWidget *debugbutton = NULL;
66 static GtkWidget *tickerbutton = NULL; 67 static GtkWidget *tickerbutton = NULL;
1150 GtkWidget *select; 1151 GtkWidget *select;
1151 GtkWidget *spin; 1152 GtkWidget *spin;
1152 GtkObject *adjust; 1153 GtkObject *adjust;
1153 GtkWidget *frame; 1154 GtkWidget *frame;
1154 GtkWidget *fbox; 1155 GtkWidget *fbox;
1156 GtkWidget *table;
1155 1157
1156 parent = prefdialog->parent; 1158 parent = prefdialog->parent;
1157 gtk_widget_destroy(prefdialog); 1159 gtk_widget_destroy(prefdialog);
1158 1160
1159 prefdialog = gtk_frame_new(_("Font Options")); 1161 prefdialog = gtk_frame_new(_("Font Options"));
1167 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); 1169 label = gtk_label_new(_("All options take effect immediately unless otherwise noted."));
1168 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); 1170 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
1169 gtk_widget_show(label); 1171 gtk_widget_show(label);
1170 1172
1171 frame = gtk_frame_new("Font Style"); 1173 frame = gtk_frame_new("Font Style");
1172 fbox = gtk_vbox_new(FALSE, 5); 1174
1173 1175 table = gtk_table_new(2, 2, FALSE);
1174 gaim_button(_("Bold Text"), &font_options, OPT_FONT_BOLD, fbox); 1176 gtk_container_set_border_width(GTK_CONTAINER(table), 5);
1175 gaim_button(_("Italics Text"), &font_options, OPT_FONT_ITALIC, fbox); 1177 gtk_table_set_col_spacings(GTK_TABLE(table), 5);
1176 gaim_button(_("Underlined Text"), &font_options, OPT_FONT_UNDERLINE, fbox); 1178 gtk_table_set_row_spacings(GTK_TABLE(table), 5);
1177 gaim_button(_("Strike Text"), &font_options, OPT_FONT_STRIKE, fbox); 1179 gtk_container_add(GTK_CONTAINER(frame), table);
1178 1180
1179 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); 1181 button = gtk_check_button_new_with_label(_("Bold Text"));
1180 gtk_container_add(GTK_CONTAINER(frame), fbox); 1182 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (font_options & OPT_FONT_BOLD));
1181 1183 gtk_table_attach(GTK_TABLE(table), button, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
1182 gtk_widget_show(fbox); 1184 gtk_signal_connect(GTK_OBJECT(button), "clicked",
1185 GTK_SIGNAL_FUNC(set_font_option), (int*)OPT_FONT_BOLD);
1186
1187 button = gtk_check_button_new_with_label(_("Italic Text"));
1188 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (font_options & OPT_FONT_ITALIC));
1189 gtk_table_attach(GTK_TABLE(table), button, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
1190 gtk_signal_connect(GTK_OBJECT(button), "clicked",
1191 GTK_SIGNAL_FUNC(set_font_option), (int*)OPT_FONT_ITALIC);
1192
1193 button = gtk_check_button_new_with_label(_("Underline Text"));
1194 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (font_options & OPT_FONT_UNDERLINE));
1195 gtk_table_attach(GTK_TABLE(table), button, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
1196 gtk_signal_connect(GTK_OBJECT(button), "clicked",
1197 GTK_SIGNAL_FUNC(set_font_option), (int*)OPT_FONT_UNDERLINE);
1198
1199 button = gtk_check_button_new_with_label(_("Strike through Text"));
1200 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (font_options & OPT_FONT_STRIKE));
1201 gtk_table_attach(GTK_TABLE(table), button, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
1202 gtk_signal_connect(GTK_OBJECT(button), "clicked",
1203 GTK_SIGNAL_FUNC(set_font_option), (int*)OPT_FONT_STRIKE);
1204
1205
1206 gtk_widget_show_all(table);
1183 gtk_widget_show(frame); 1207 gtk_widget_show(frame);
1184 1208
1185 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5); 1209 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
1186 1210
1187 /* ----------- */ 1211 /* ----------- */