comparison src/prefs.c @ 1788:c8511181823e

[gaim-migrate @ 1798] You may or may not like it, but at least it matches now. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Mon, 30 Apr 2001 22:52:45 +0000
parents d7cbedd1d651
children c4864ac7792b
comparison
equal deleted inserted replaced
1787:5cd9ed40b34c 1788:c8511181823e
1126 GtkWidget *hbox; 1126 GtkWidget *hbox;
1127 GtkWidget *button; 1127 GtkWidget *button;
1128 GtkWidget *select; 1128 GtkWidget *select;
1129 GtkWidget *spin; 1129 GtkWidget *spin;
1130 GtkObject *adjust; 1130 GtkObject *adjust;
1131 GtkWidget *frame;
1132 GtkWidget *fbox;
1131 1133
1132 parent = prefdialog->parent; 1134 parent = prefdialog->parent;
1133 gtk_widget_destroy(prefdialog); 1135 gtk_widget_destroy(prefdialog);
1134 1136
1135 prefdialog = gtk_frame_new(_("Font Options")); 1137 prefdialog = gtk_frame_new(_("Font Options"));
1142 1144
1143 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); 1145 label = gtk_label_new(_("All options take effect immediately unless otherwise noted."));
1144 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); 1146 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
1145 gtk_widget_show(label); 1147 gtk_widget_show(label);
1146 1148
1147 gaim_button(_("Bold Text"), &font_options, OPT_FONT_BOLD, box); 1149 frame = gtk_frame_new("Font Style");
1148 gaim_button(_("Italics Text"), &font_options, OPT_FONT_ITALIC, box); 1150 fbox = gtk_vbox_new(FALSE, 5);
1149 gaim_button(_("Underlined Text"), &font_options, OPT_FONT_UNDERLINE, box); 1151
1150 gaim_button(_("Strike Text"), &font_options, OPT_FONT_STRIKE, box); 1152 gaim_button(_("Bold Text"), &font_options, OPT_FONT_BOLD, fbox);
1151 1153 gaim_button(_("Italics Text"), &font_options, OPT_FONT_ITALIC, fbox);
1152 sep = gtk_hseparator_new(); 1154 gaim_button(_("Underlined Text"), &font_options, OPT_FONT_UNDERLINE, fbox);
1153 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); 1155 gaim_button(_("Strike Text"), &font_options, OPT_FONT_STRIKE, fbox);
1154 gtk_widget_show(sep); 1156
1155 1157 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5);
1158 gtk_container_add(GTK_CONTAINER(frame), fbox);
1159
1160 gtk_widget_show(fbox);
1161 gtk_widget_show(frame);
1162
1163 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
1164
1165 /* ----------- */
1166
1167 frame = gtk_frame_new("Font Color");
1168 fbox = gtk_vbox_new(FALSE, 5);
1169
1170 gtk_container_add(GTK_CONTAINER(frame), fbox);
1171 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5);
1172
1173 gtk_widget_show(fbox);
1174 gtk_widget_show(frame);
1175
1176 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
1177
1156 hbox = gtk_hbox_new(FALSE, 5); 1178 hbox = gtk_hbox_new(FALSE, 5);
1157 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); 1179 gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 5);
1158 gtk_widget_show(hbox); 1180 gtk_widget_show(hbox);
1159 1181
1160 pref_fg_picture = show_color_pref(hbox, TRUE); 1182 pref_fg_picture = show_color_pref(hbox, TRUE);
1161 button = gaim_button(_("Text Color"), &font_options, OPT_FONT_FGCOL, hbox); 1183 button = gaim_button(_("Text Color"), &font_options, OPT_FONT_FGCOL, hbox);
1162 1184
1170 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); 1192 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select);
1171 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), 1193 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color),
1172 pref_fg_picture); 1194 pref_fg_picture);
1173 1195
1174 hbox = gtk_hbox_new(FALSE, 5); 1196 hbox = gtk_hbox_new(FALSE, 5);
1175 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); 1197 gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 5);
1176 gtk_widget_show(hbox); 1198 gtk_widget_show(hbox);
1177 1199
1178 pref_bg_picture = show_color_pref(hbox, FALSE); 1200 pref_bg_picture = show_color_pref(hbox, FALSE);
1179 button = gaim_button(_("Background Color"), &font_options, OPT_FONT_BGCOL, hbox); 1201 button = gaim_button(_("Background Color"), &font_options, OPT_FONT_BGCOL, hbox);
1180 1202
1187 1209
1188 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); 1210 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select);
1189 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), 1211 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color),
1190 pref_bg_picture); 1212 pref_bg_picture);
1191 1213
1192 sep = gtk_hseparator_new(); 1214 /* ----------- */
1193 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); 1215
1194 gtk_widget_show(sep); 1216 frame = gtk_frame_new("Font Face");
1217 fbox = gtk_vbox_new(FALSE, 5);
1195 1218
1196 hbox = gtk_hbox_new(FALSE, 5); 1219 hbox = gtk_hbox_new(FALSE, 5);
1197 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); 1220 gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 5);
1198 gtk_widget_show(hbox); 1221 gtk_widget_show(hbox);
1199 1222
1200 button = gaim_button(_("Font Face for Text"), &font_options, OPT_FONT_FACE, hbox); 1223 button = gaim_button(_("Font Face for Text"), &font_options, OPT_FONT_FACE, hbox);
1201 1224
1202 select = picture_button(prefs, _("Select"), fontface2_xpm); 1225 select = picture_button(prefs, _("Select"), fontface2_xpm);
1203 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); 1226 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0);
1204 if (!(font_options & OPT_FONT_FACE)) 1227 if (!(font_options & OPT_FONT_FACE))
1207 gtk_widget_show(select); 1230 gtk_widget_show(select);
1208 1231
1209 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); 1232 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select);
1210 1233
1211 hbox = gtk_hbox_new(FALSE, 5); 1234 hbox = gtk_hbox_new(FALSE, 5);
1212 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); 1235 gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 5);
1213 gtk_widget_show(hbox); 1236 gtk_widget_show(hbox);
1214 1237
1215 button = gaim_button(_("Font Size for Text"), &font_options, OPT_FONT_SIZE, hbox); 1238 button = gaim_button(_("Font Size for Text"), &font_options, OPT_FONT_SIZE, hbox);
1216 1239
1217 adjust = gtk_adjustment_new(fontsize, 1, 7, 1, 1, 1); 1240 adjust = gtk_adjustment_new(fontsize, 1, 7, 1, 1, 1);
1222 gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0); 1245 gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0);
1223 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), spin); 1246 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), spin);
1224 gtk_signal_connect(GTK_OBJECT(adjust), "value-changed", GTK_SIGNAL_FUNC(set_font_size), 1247 gtk_signal_connect(GTK_OBJECT(adjust), "value-changed", GTK_SIGNAL_FUNC(set_font_size),
1225 GTK_WIDGET(spin)); 1248 GTK_WIDGET(spin));
1226 gtk_widget_show(spin); 1249 gtk_widget_show(spin);
1250
1251 gtk_container_add(GTK_CONTAINER(frame), fbox);
1252 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5);
1253 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
1254 gtk_widget_show(fbox);
1255 gtk_widget_show(frame);
1227 1256
1228 gtk_widget_show(prefdialog); 1257 gtk_widget_show(prefdialog);
1229 } 1258 }
1230 1259
1231 static GtkWidget *sndent[NUM_SOUNDS]; 1260 static GtkWidget *sndent[NUM_SOUNDS];