| 175 return vbox; |
142 return vbox; |
| 176 } |
143 } |
| 177 |
144 |
| 178 /* OK, Apply and Cancel */ |
145 /* OK, Apply and Cancel */ |
| 179 |
146 |
| 180 static void apply_cb(GtkWidget *button, void *data) |
|
| 181 { |
|
| 182 apply_prefs(); |
|
| 183 } |
|
| 184 |
|
| 185 static void apply_prefs() |
|
| 186 { |
|
| 187 int r; |
|
| 188 if (misc_options != misc_options_new) |
|
| 189 set_misc_options(); |
|
| 190 if (logging_options != logging_options_new) |
|
| 191 set_logging_options(); |
|
| 192 if (blist_options != blist_options_new) |
|
| 193 set_blist_options(); |
|
| 194 if (convo_options != convo_options_new) |
|
| 195 set_convo_options(); |
|
| 196 if (im_options != im_options_new) |
|
| 197 set_im_options(); |
|
| 198 if (chat_options != chat_options_new) |
|
| 199 set_chat_options(); |
|
| 200 chat_options = chat_options_new; |
|
| 201 if (font_options != font_options_new) |
|
| 202 set_font_options(); |
|
| 203 if (sound_options != sound_options_new) |
|
| 204 set_sound_options(); |
|
| 205 for (r = 0; r < NUM_SOUNDS; r++) { |
|
| 206 if (sound_file[r]) |
|
| 207 g_free(sound_file[r]); |
|
| 208 sound_file[r] = g_strdup(sound_file_new[r]); |
|
| 209 } |
|
| 210 if (away_options != away_options_new) |
|
| 211 set_away_options(); |
|
| 212 away_resend = away_resend_new; |
|
| 213 auto_away = auto_away_new; |
|
| 214 report_idle = report_idle_new; |
|
| 215 web_browser = web_browser_new; |
|
| 216 proxytype = proxytype_new; |
|
| 217 default_away = default_away_new; |
|
| 218 fontsize = fontsize_new; |
|
| 219 #ifndef _WIN32 |
|
| 220 g_snprintf(sound_cmd, sizeof(sound_cmd), "%s", sound_cmd_new); |
|
| 221 #endif |
|
| 222 g_snprintf(web_command, sizeof(web_command), "%s", web_command_new); |
|
| 223 memcpy(&conv_size, &conv_size_new, sizeof(struct window_size)); |
|
| 224 memcpy(&conv_size, &conv_size_new, sizeof(struct window_size)); |
|
| 225 memcpy(&fgcolor, &fgcolor_new, sizeof(GdkColor)); |
|
| 226 memcpy(&bgcolor, &bgcolor_new, sizeof(GdkColor)); |
|
| 227 |
|
| 228 |
|
| 229 g_snprintf(fontface, sizeof(fontface), fontface_new); |
|
| 230 update_convo_font(); |
|
| 231 update_convo_color(); |
|
| 232 save_prefs(); |
|
| 233 } |
|
| 234 |
|
| 235 |
|
| 236 static void ok_cb(GtkWidget *button, void *data) |
|
| 237 { |
|
| 238 apply_cb(button, data); |
|
| 239 gtk_widget_destroy(prefs); |
|
| 240 } |
|
| 241 |
147 |
| 242 static void pref_nb_select(GtkTreeSelection *sel, GtkNotebook *nb) { |
148 static void pref_nb_select(GtkTreeSelection *sel, GtkNotebook *nb) { |
| 243 GtkTreeIter iter; |
149 GtkTreeIter iter; |
| 244 char text[128]; |
150 char text[128]; |
| 245 GValue val = { 0, }; |
151 GValue val = { 0, }; |
| 285 |
191 |
| 286 ret = gtk_vbox_new(FALSE, 18); |
192 ret = gtk_vbox_new(FALSE, 18); |
| 287 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
193 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
| 288 |
194 |
| 289 vbox = make_frame(ret, _("Style")); |
195 vbox = make_frame(ret, _("Style")); |
| 290 gaim_button(_("_Bold"), &font_options_new, OPT_FONT_BOLD, vbox); |
196 gaim_button(_("_Bold"), &font_options, OPT_FONT_BOLD, vbox); |
| 291 gaim_button(_("_Italics"), &font_options_new, OPT_FONT_ITALIC, vbox); |
197 gaim_button(_("_Italics"), &font_options, OPT_FONT_ITALIC, vbox); |
| 292 gaim_button(_("_Underline"), &font_options_new, OPT_FONT_UNDERLINE, vbox); |
198 gaim_button(_("_Underline"), &font_options, OPT_FONT_UNDERLINE, vbox); |
| 293 gaim_button(_("_Strikethough"), &font_options_new, OPT_FONT_STRIKE, vbox); |
199 gaim_button(_("_Strikethough"), &font_options, OPT_FONT_STRIKE, vbox); |
| 294 |
200 |
| 295 vbox = make_frame(ret, _("Face")); |
201 vbox = make_frame(ret, _("Face")); |
| 296 hbox = gtk_hbox_new(FALSE, 6); |
202 hbox = gtk_hbox_new(FALSE, 6); |
| 297 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
203 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
| 298 button = gaim_button(_("Use custo_m face"), &font_options_new, OPT_FONT_FACE, hbox); |
204 button = gaim_button(_("Use custo_m face"), &font_options, OPT_FONT_FACE, hbox); |
| 299 gtk_size_group_add_widget(sg, button); |
205 gtk_size_group_add_widget(sg, button); |
| 300 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_FONT); |
206 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_FONT); |
| 301 |
207 |
| 302 if (!(font_options_new & OPT_FONT_FACE)) |
208 if (!(font_options & OPT_FONT_FACE)) |
| 303 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
209 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
| 304 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
210 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
| 305 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_font_dialog), NULL); |
211 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_font_dialog), NULL); |
| 306 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); |
212 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); |
| 307 |
213 |
| 308 hbox = gtk_hbox_new(FALSE, 5); |
214 hbox = gtk_hbox_new(FALSE, 5); |
| 309 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
215 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
| 310 button = gaim_button(_("Use custom si_ze"), &font_options_new, OPT_FONT_SIZE, hbox); |
216 button = gaim_button(_("Use custom si_ze"), &font_options, OPT_FONT_SIZE, hbox); |
| 311 gtk_size_group_add_widget(sg, button); |
217 gtk_size_group_add_widget(sg, button); |
| 312 select = gaim_labeled_spin_button(hbox, NULL, &fontsize_new, 1, 7, NULL); |
218 select = gaim_labeled_spin_button(hbox, NULL, &fontsize, 1, 7, NULL); |
| 313 if (!(font_options_new & OPT_FONT_SIZE)) |
219 if (!(font_options & OPT_FONT_SIZE)) |
| 314 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
220 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
| 315 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
221 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
| 316 |
222 |
| 317 vbox = make_frame(ret, _("Color")); |
223 vbox = make_frame(ret, _("Color")); |
| 318 hbox = gtk_hbox_new(FALSE, 5); |
224 hbox = gtk_hbox_new(FALSE, 5); |
| 319 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
225 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
| 320 |
226 |
| 321 |
227 |
| 322 button = gaim_button(_("_Text color"), &font_options_new, OPT_FONT_FGCOL, hbox); |
228 button = gaim_button(_("_Text color"), &font_options, OPT_FONT_FGCOL, hbox); |
| 323 gtk_size_group_add_widget(sg, button); |
229 gtk_size_group_add_widget(sg, button); |
| 324 |
230 |
| 325 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); |
231 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); |
| 326 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); |
232 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); |
| 327 pref_fg_picture = show_color_pref(hbox, TRUE); |
233 pref_fg_picture = show_color_pref(hbox, TRUE); |
| 328 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), |
234 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), |
| 329 pref_fg_picture); |
235 pref_fg_picture); |
| 330 |
236 |
| 331 if (!(font_options_new & OPT_FONT_FGCOL)) |
237 if (!(font_options & OPT_FONT_FGCOL)) |
| 332 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
238 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
| 333 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
239 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
| 334 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_fgcolor_dialog), NULL); |
240 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_fgcolor_dialog), NULL); |
| 335 hbox = gtk_hbox_new(FALSE, 5); |
241 hbox = gtk_hbox_new(FALSE, 5); |
| 336 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
242 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
| 337 |
243 |
| 338 button = gaim_button(_("Bac_kground color"), &font_options_new, OPT_FONT_BGCOL, hbox); |
244 button = gaim_button(_("Bac_kground color"), &font_options, OPT_FONT_BGCOL, hbox); |
| 339 gtk_size_group_add_widget(sg, button); |
245 gtk_size_group_add_widget(sg, button); |
| 340 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); |
246 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); |
| 341 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); |
247 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); |
| 342 pref_bg_picture = show_color_pref(hbox, FALSE); |
248 pref_bg_picture = show_color_pref(hbox, FALSE); |
| 343 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), |
249 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), |
| 344 pref_bg_picture); |
250 pref_bg_picture); |
| 345 |
251 |
| 346 if (!(font_options_new & OPT_FONT_BGCOL)) |
252 if (!(font_options & OPT_FONT_BGCOL)) |
| 347 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
253 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
| 348 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_bgcolor_dialog), NULL); |
254 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_bgcolor_dialog), NULL); |
| 349 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
255 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
| 350 |
256 |
| 351 gtk_widget_show_all(ret); |
257 gtk_widget_show_all(ret); |
| 358 GtkWidget *vbox; |
264 GtkWidget *vbox; |
| 359 ret = gtk_vbox_new(FALSE, 18); |
265 ret = gtk_vbox_new(FALSE, 18); |
| 360 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
266 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
| 361 |
267 |
| 362 vbox = make_frame (ret, _("Display")); |
268 vbox = make_frame (ret, _("Display")); |
| 363 gaim_button(_("Show graphical _smileys"), &convo_options_new, OPT_CONVO_SHOW_SMILEY, vbox); |
269 gaim_button(_("Show graphical _smileys"), &convo_options, OPT_CONVO_SHOW_SMILEY, vbox); |
| 364 gaim_button(_("Show _timestamp on messages"), &convo_options_new, OPT_CONVO_SHOW_TIME, vbox); |
270 gaim_button(_("Show _timestamp on messages"), &convo_options, OPT_CONVO_SHOW_TIME, vbox); |
| 365 gaim_button(_("Show _URLs as links"), &convo_options_new, OPT_CONVO_SEND_LINKS, vbox); |
271 gaim_button(_("Show _URLs as links"), &convo_options, OPT_CONVO_SEND_LINKS, vbox); |
| 366 #ifdef USE_GTKSPELL |
272 #ifdef USE_GTKSPELL |
| 367 gaim_button(_("_Highlight misspelled words"), &convo_options_new, OPT_CONVO_CHECK_SPELLING, vbox); |
273 gaim_button(_("_Highlight misspelled words"), &convo_options, OPT_CONVO_CHECK_SPELLING, vbox); |
| 368 #endif |
274 #endif |
| 369 vbox = make_frame (ret, _("Ignore")); |
275 vbox = make_frame (ret, _("Ignore")); |
| 370 gaim_button(_("Ignore c_olors"), &convo_options_new, OPT_CONVO_IGNORE_COLOUR, vbox); |
276 gaim_button(_("Ignore c_olors"), &convo_options, OPT_CONVO_IGNORE_COLOUR, vbox); |
| 371 gaim_button(_("Ignore font _faces"), &convo_options_new, OPT_CONVO_IGNORE_FONTS, vbox); |
277 gaim_button(_("Ignore font _faces"), &convo_options, OPT_CONVO_IGNORE_FONTS, vbox); |
| 372 gaim_button(_("Ignore font si_zes"), &convo_options_new, OPT_CONVO_IGNORE_SIZES, vbox); |
278 gaim_button(_("Ignore font si_zes"), &convo_options, OPT_CONVO_IGNORE_SIZES, vbox); |
| 373 /* gaim_button(_("Ignore Ti_K Automated Messages"), &away_options_new, OPT_AWAY_TIK_HACK, vbox); */ |
279 /* gaim_button(_("Ignore Ti_K Automated Messages"), &away_options, OPT_AWAY_TIK_HACK, vbox); */ |
| 374 |
280 |
| 375 gtk_widget_show_all(ret); |
281 gtk_widget_show_all(ret); |
| 376 return ret; |
282 return ret; |
| 377 } |
283 } |
| 378 |
284 |
| 381 GtkWidget *vbox; |
287 GtkWidget *vbox; |
| 382 ret = gtk_vbox_new(FALSE, 18); |
288 ret = gtk_vbox_new(FALSE, 18); |
| 383 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
289 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
| 384 |
290 |
| 385 vbox = make_frame(ret, _("Send Message")); |
291 vbox = make_frame(ret, _("Send Message")); |
| 386 gaim_button(_("_Enter sends message"), &convo_options_new, OPT_CONVO_ENTER_SENDS, vbox); |
292 gaim_button(_("_Enter sends message"), &convo_options, OPT_CONVO_ENTER_SENDS, vbox); |
| 387 gaim_button(_("C_ontrol-Enter sends message"), &convo_options_new, OPT_CONVO_CTL_ENTER, vbox); |
293 gaim_button(_("C_ontrol-Enter sends message"), &convo_options, OPT_CONVO_CTL_ENTER, vbox); |
| 388 |
294 |
| 389 vbox = make_frame (ret, _("Window Closing")); |
295 vbox = make_frame (ret, _("Window Closing")); |
| 390 gaim_button(_("E_scape closes window"), &convo_options_new, OPT_CONVO_ESC_CAN_CLOSE, vbox); |
296 gaim_button(_("E_scape closes window"), &convo_options, OPT_CONVO_ESC_CAN_CLOSE, vbox); |
| 391 gaim_button(_("Control-_W closes window"), &convo_options_new, OPT_CONVO_CTL_W_CLOSES, vbox); |
297 gaim_button(_("Control-_W closes window"), &convo_options, OPT_CONVO_CTL_W_CLOSES, vbox); |
| 392 |
298 |
| 393 vbox = make_frame(ret, "Insertions"); |
299 vbox = make_frame(ret, "Insertions"); |
| 394 gaim_button(_("Control-{B/I/U/S} inserts _HTML tags"), &convo_options_new, OPT_CONVO_CTL_CHARS, vbox); |
300 gaim_button(_("Control-{B/I/U/S} inserts _HTML tags"), &convo_options, OPT_CONVO_CTL_CHARS, vbox); |
| 395 gaim_button(_("Control-(number) inserts _smileys"), &convo_options_new, OPT_CONVO_CTL_SMILEYS, vbox); |
301 gaim_button(_("Control-(number) inserts _smileys"), &convo_options, OPT_CONVO_CTL_SMILEYS, vbox); |
| 396 |
302 |
| 397 gtk_widget_show_all(ret); |
303 gtk_widget_show_all(ret); |
| 398 return ret; |
304 return ret; |
| 399 } |
305 } |
| 400 |
306 |
| 403 GtkWidget *vbox; |
309 GtkWidget *vbox; |
| 404 ret = gtk_vbox_new(FALSE, 18); |
310 ret = gtk_vbox_new(FALSE, 18); |
| 405 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
311 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
| 406 |
312 |
| 407 vbox = make_frame (ret, _("Buttons")); |
313 vbox = make_frame (ret, _("Buttons")); |
| 408 gaim_button(_("_Hide IM/Info/Chat buttons"), &blist_options_new, OPT_BLIST_NO_BUTTONS, vbox); |
314 gaim_button(_("_Hide IM/Info/Chat buttons"), &blist_options, OPT_BLIST_NO_BUTTONS, vbox); |
| 409 gaim_button(_("Show _pictures on buttons"), &blist_options_new, OPT_BLIST_SHOW_BUTTON_XPM, vbox); |
315 gaim_button(_("Show _pictures on buttons"), &blist_options, OPT_BLIST_SHOW_BUTTON_XPM, vbox); |
| 410 |
316 |
| 411 vbox = make_frame (ret, _("Buddy List Window")); |
317 vbox = make_frame (ret, _("Buddy List Window")); |
| 412 gaim_button(_("_Save Window Size/Position"), &blist_options_new, OPT_BLIST_SAVED_WINDOWS, vbox); |
318 gaim_button(_("_Save Window Size/Position"), &blist_options, OPT_BLIST_SAVED_WINDOWS, vbox); |
| 413 gaim_button(_("_Raise Window on Events"), &blist_options_new, OPT_BLIST_POPUP, vbox); |
319 gaim_button(_("_Raise Window on Events"), &blist_options, OPT_BLIST_POPUP, vbox); |
| 414 |
320 |
| 415 vbox = make_frame (ret, _("Group Display")); |
321 vbox = make_frame (ret, _("Group Display")); |
| 416 gaim_button(_("Hide _groups with no online buddies"), &blist_options_new, OPT_BLIST_NO_MT_GRP, vbox); |
322 gaim_button(_("Hide _groups with no online buddies"), &blist_options, OPT_BLIST_NO_MT_GRP, vbox); |
| 417 gaim_button(_("Show _numbers in groups"), &blist_options_new, OPT_BLIST_SHOW_GRPNUM, vbox); |
323 gaim_button(_("Show _numbers in groups"), &blist_options, OPT_BLIST_SHOW_GRPNUM, vbox); |
| 418 |
324 |
| 419 vbox = make_frame (ret, _("Buddy Display")); |
325 vbox = make_frame (ret, _("Buddy Display")); |
| 420 gaim_button(_("Show buddy type _icons"), &blist_options_new, OPT_BLIST_SHOW_PIXMAPS, vbox); |
326 gaim_button(_("Show buddy type _icons"), &blist_options, OPT_BLIST_SHOW_PIXMAPS, vbox); |
| 421 gaim_button(_("Show _warning levels"), &blist_options_new, OPT_BLIST_SHOW_WARN, vbox); |
327 gaim_button(_("Show _warning levels"), &blist_options, OPT_BLIST_SHOW_WARN, vbox); |
| 422 gaim_button(_("Show idle _times"), &blist_options_new, OPT_BLIST_SHOW_IDLETIME, vbox); |
328 gaim_button(_("Show idle _times"), &blist_options, OPT_BLIST_SHOW_IDLETIME, vbox); |
| 423 gaim_button(_("Grey i_dle buddies"), &blist_options_new, OPT_BLIST_GREY_IDLERS, vbox); |
329 gaim_button(_("Grey i_dle buddies"), &blist_options, OPT_BLIST_GREY_IDLERS, vbox); |
| 424 |
330 |
| 425 gtk_widget_show_all(ret); |
331 gtk_widget_show_all(ret); |
| 426 return ret; |
332 return ret; |
| 427 } |
333 } |
| 428 |
334 |
| 436 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
342 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
| 437 |
343 |
| 438 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
344 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
| 439 |
345 |
| 440 vbox = make_frame (ret, _("Window")); |
346 vbox = make_frame (ret, _("Window")); |
| 441 widge = gaim_dropdown(vbox, "Show _buttons as:", &im_options_new, OPT_IM_BUTTON_TEXT | OPT_IM_BUTTON_XPM, |
347 widge = gaim_dropdown(vbox, "Show _buttons as:", &im_options, OPT_IM_BUTTON_TEXT | OPT_IM_BUTTON_XPM, |
| 442 "Pictures", OPT_IM_BUTTON_XPM, |
348 "Pictures", OPT_IM_BUTTON_XPM, |
| 443 "Text", OPT_IM_BUTTON_TEXT, |
349 "Text", OPT_IM_BUTTON_TEXT, |
| 444 "Pictures and text", OPT_IM_BUTTON_XPM | OPT_IM_BUTTON_TEXT, NULL); |
350 "Pictures and text", OPT_IM_BUTTON_XPM | OPT_IM_BUTTON_TEXT, NULL); |
| 445 gtk_size_group_add_widget(sg, widge); |
351 gtk_size_group_add_widget(sg, widge); |
| 446 gtk_misc_set_alignment(GTK_MISC(widge), 0, 0); |
352 gtk_misc_set_alignment(GTK_MISC(widge), 0, 0); |
| 447 gaim_labeled_spin_button(vbox, _("New window _width:"), &conv_size_new.width, 25, 9999, sg); |
353 gaim_labeled_spin_button(vbox, _("New window _width:"), &conv_size.width, 25, 9999, sg); |
| 448 gaim_labeled_spin_button(vbox, _("New window _height:"), &conv_size_new.height, 25, 9999, sg); |
354 gaim_labeled_spin_button(vbox, _("New window _height:"), &conv_size.height, 25, 9999, sg); |
| 449 gaim_labeled_spin_button(vbox, _("_Entry widget height:"), &conv_size_new.entry_height, 25, 9999, sg); |
355 gaim_labeled_spin_button(vbox, _("_Entry widget height:"), &conv_size.entry_height, 25, 9999, sg); |
| 450 gaim_button(_("_Raise windows on events"), &im_options_new, OPT_IM_POPUP, vbox); |
356 gaim_button(_("_Raise windows on events"), &im_options, OPT_IM_POPUP, vbox); |
| 451 gaim_button(_("Hide window on _send"), &im_options_new, OPT_IM_POPDOWN, vbox); |
357 gaim_button(_("Hide window on _send"), &im_options, OPT_IM_POPDOWN, vbox); |
| 452 gtk_widget_show (vbox); |
358 gtk_widget_show (vbox); |
| 453 |
359 |
| 454 vbox = make_frame (ret, _("Buddy Icons")); |
360 vbox = make_frame (ret, _("Buddy Icons")); |
| 455 gaim_button(_("Hide Buddy _Icons"), &im_options_new, OPT_IM_HIDE_ICONS, vbox); |
361 gaim_button(_("Hide Buddy _Icons"), &im_options, OPT_IM_HIDE_ICONS, vbox); |
| 456 gaim_button(_("Disable Buddy Icon A_nimation"), &im_options_new, OPT_IM_NO_ANIMATION, vbox); |
362 gaim_button(_("Disable Buddy Icon A_nimation"), &im_options, OPT_IM_NO_ANIMATION, vbox); |
| 457 |
363 |
| 458 vbox = make_frame (ret, _("Display")); |
364 vbox = make_frame (ret, _("Display")); |
| 459 gaim_button(_("Show _logins in window"), &im_options_new, OPT_IM_LOGON, vbox); |
365 gaim_button(_("Show _logins in window"), &im_options, OPT_IM_LOGON, vbox); |
| 460 |
366 |
| 461 vbox = make_frame (ret, _("Typing Notification")); |
367 vbox = make_frame (ret, _("Typing Notification")); |
| 462 typingbutton = gaim_button(_("Notify buddies that you are _typing to them"), &misc_options_new, |
368 typingbutton = gaim_button(_("Notify buddies that you are _typing to them"), &misc_options, |
| 463 OPT_MISC_STEALTH_TYPING, vbox); |
369 OPT_MISC_STEALTH_TYPING, vbox); |
| 464 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(typingbutton), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(typingbutton))); |
370 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(typingbutton), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(typingbutton))); |
| 465 misc_options_new ^= OPT_MISC_STEALTH_TYPING; |
371 misc_options ^= OPT_MISC_STEALTH_TYPING; |
| 466 |
372 |
| 467 gtk_widget_show_all(ret); |
373 gtk_widget_show_all(ret); |
| 468 return ret; |
374 return ret; |
| 469 } |
375 } |
| 470 |
376 |
| 478 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
384 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
| 479 |
385 |
| 480 sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); |
386 sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); |
| 481 |
387 |
| 482 vbox = make_frame (ret, _("Window")); |
388 vbox = make_frame (ret, _("Window")); |
| 483 dd = gaim_dropdown(vbox, "Show _buttons as:", &chat_options_new, OPT_CHAT_BUTTON_TEXT | OPT_CHAT_BUTTON_XPM, |
389 dd = gaim_dropdown(vbox, "Show _buttons as:", &chat_options, OPT_CHAT_BUTTON_TEXT | OPT_CHAT_BUTTON_XPM, |
| 484 "Pictures", OPT_CHAT_BUTTON_XPM, |
390 "Pictures", OPT_CHAT_BUTTON_XPM, |
| 485 "Text", OPT_CHAT_BUTTON_TEXT, |
391 "Text", OPT_CHAT_BUTTON_TEXT, |
| 486 "Pictures and Text", OPT_CHAT_BUTTON_XPM | OPT_CHAT_BUTTON_TEXT, NULL); |
392 "Pictures and Text", OPT_CHAT_BUTTON_XPM | OPT_CHAT_BUTTON_TEXT, NULL); |
| 487 gtk_size_group_add_widget(sg, dd); |
393 gtk_size_group_add_widget(sg, dd); |
| 488 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); |
394 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); |
| 489 gaim_labeled_spin_button(vbox, _("New window _width:"), &buddy_chat_size_new.width, 25, 9999, sg); |
395 gaim_labeled_spin_button(vbox, _("New window _width:"), &buddy_chat_size.width, 25, 9999, sg); |
| 490 gaim_labeled_spin_button(vbox, _("New window _height:"), &buddy_chat_size_new.height, 25, 9999, sg); |
396 gaim_labeled_spin_button(vbox, _("New window _height:"), &buddy_chat_size.height, 25, 9999, sg); |
| 491 gaim_labeled_spin_button(vbox, _("_Entry widget height:"), &buddy_chat_size_new.entry_height, 25, 9999, sg); |
397 gaim_labeled_spin_button(vbox, _("_Entry widget height:"), &buddy_chat_size.entry_height, 25, 9999, sg); |
| 492 gaim_button(_("_Raise windows on events"), &chat_options_new, OPT_CHAT_POPUP, vbox); |
398 gaim_button(_("_Raise windows on events"), &chat_options, OPT_CHAT_POPUP, vbox); |
| 493 |
399 |
| 494 vbox = make_frame (ret, _("Tab Completion")); |
400 vbox = make_frame (ret, _("Tab Completion")); |
| 495 gaim_button(_("_Tab-Complete Nicks"), &chat_options_new, OPT_CHAT_TAB_COMPLETE, vbox); |
401 gaim_button(_("_Tab-Complete Nicks"), &chat_options, OPT_CHAT_TAB_COMPLETE, vbox); |
| 496 gaim_button(_("_Old-Style Tab Completion"), &chat_options_new, OPT_CHAT_OLD_STYLE_TAB, vbox); |
402 gaim_button(_("_Old-Style Tab Completion"), &chat_options, OPT_CHAT_OLD_STYLE_TAB, vbox); |
| 497 |
403 |
| 498 vbox = make_frame (ret, _("Display")); |
404 vbox = make_frame (ret, _("Display")); |
| 499 gaim_button(_("_Show people joining/leaving in window"), &chat_options_new, OPT_CHAT_LOGON, vbox); |
405 gaim_button(_("_Show people joining/leaving in window"), &chat_options, OPT_CHAT_LOGON, vbox); |
| 500 gaim_button(_("Co_lorize screennames"), &chat_options_new, OPT_CHAT_COLORIZE, vbox); |
406 gaim_button(_("Co_lorize screennames"), &chat_options, OPT_CHAT_COLORIZE, vbox); |
| 501 |
407 |
| 502 gtk_widget_show_all(ret); |
408 gtk_widget_show_all(ret); |
| 503 return ret; |
409 return ret; |
| 504 } |
410 } |
| 505 |
411 |
| 512 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
418 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
| 513 |
419 |
| 514 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
420 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
| 515 |
421 |
| 516 vbox = make_frame (ret, _("IM Tabs")); |
422 vbox = make_frame (ret, _("IM Tabs")); |
| 517 dd = gaim_dropdown(vbox, "Tab _Placement:", &im_options_new, OPT_IM_SIDE_TAB | OPT_IM_BR_TAB, |
423 dd = gaim_dropdown(vbox, "Tab _Placement:", &im_options, OPT_IM_SIDE_TAB | OPT_IM_BR_TAB, |
| 518 "Top", 0, |
424 "Top", 0, |
| 519 "Bottom", OPT_IM_BR_TAB, |
425 "Bottom", OPT_IM_BR_TAB, |
| 520 "Left", OPT_IM_SIDE_TAB, |
426 "Left", OPT_IM_SIDE_TAB, |
| 521 "Right", OPT_IM_BR_TAB | OPT_IM_SIDE_TAB, NULL); |
427 "Right", OPT_IM_BR_TAB | OPT_IM_SIDE_TAB, NULL); |
| 522 gtk_size_group_add_widget(sg, dd); |
428 gtk_size_group_add_widget(sg, dd); |
| 523 gaim_button(_("Show all _Instant Messages in one tabbed\nwindow"), &im_options_new, OPT_IM_ONE_WINDOW, vbox); |
429 gaim_button(_("Show all _Instant Messages in one tabbed\nwindow"), &im_options, OPT_IM_ONE_WINDOW, vbox); |
| 524 gaim_button(_("Show a_liases in tabs/titles"), &im_options_new, OPT_IM_ALIAS_TAB, vbox); |
430 gaim_button(_("Show a_liases in tabs/titles"), &im_options, OPT_IM_ALIAS_TAB, vbox); |
| 525 |
431 |
| 526 vbox = make_frame (ret, _("Chat Tabs")); |
432 vbox = make_frame (ret, _("Chat Tabs")); |
| 527 dd = gaim_dropdown(vbox, "Tab _Placement:", &chat_options_new, OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, |
433 dd = gaim_dropdown(vbox, "Tab _Placement:", &chat_options, OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, |
| 528 "Top", 0, |
434 "Top", 0, |
| 529 "Bottom", OPT_CHAT_BR_TAB, |
435 "Bottom", OPT_CHAT_BR_TAB, |
| 530 "Left", OPT_CHAT_SIDE_TAB, |
436 "Left", OPT_CHAT_SIDE_TAB, |
| 531 "Right", OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, NULL); |
437 "Right", OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, NULL); |
| 532 gtk_size_group_add_widget(sg, dd); |
438 gtk_size_group_add_widget(sg, dd); |
| 533 gaim_button(_("Show all c_hats in one tabbed window"), &chat_options_new, OPT_CHAT_ONE_WINDOW, |
439 gaim_button(_("Show all c_hats in one tabbed window"), &chat_options, OPT_CHAT_ONE_WINDOW, |
| 534 vbox); |
440 vbox); |
| 535 |
441 |
| 536 vbox = make_frame (ret, _("Combined Tabs")); |
442 vbox = make_frame (ret, _("Combined Tabs")); |
| 537 gaim_button(_("Show IMs and chats in _same tabbed\nwindow."), &convo_options_new, OPT_CONVO_COMBINE, vbox); |
443 gaim_button(_("Show IMs and chats in _same tabbed\nwindow."), &convo_options, OPT_CONVO_COMBINE, vbox); |
| 538 |
444 |
| 539 vbox = make_frame (ret, _("Buddy List Tabs")); |
445 vbox = make_frame (ret, _("Buddy List Tabs")); |
| 540 dd = gaim_dropdown(vbox, "Tab _Placement:", &blist_options_new, OPT_BLIST_BOTTOM_TAB, |
446 dd = gaim_dropdown(vbox, "Tab _Placement:", &blist_options, OPT_BLIST_BOTTOM_TAB, |
| 541 "Top", 0, |
447 "Top", 0, |
| 542 "Bottom", OPT_BLIST_BOTTOM_TAB, NULL); |
448 "Bottom", OPT_BLIST_BOTTOM_TAB, NULL); |
| 543 gtk_size_group_add_widget(sg, dd); |
449 gtk_size_group_add_widget(sg, dd); |
| 544 |
450 |
| 545 gtk_widget_show_all(ret); |
451 gtk_widget_show_all(ret); |
| 677 gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); |
583 gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); |
| 678 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
584 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
| 679 gtk_size_group_add_widget(sg, label); |
585 gtk_size_group_add_widget(sg, label); |
| 680 browser_entry = gtk_entry_new(); |
586 browser_entry = gtk_entry_new(); |
| 681 gtk_label_set_mnemonic_widget(GTK_LABEL(label), browser_entry); |
587 gtk_label_set_mnemonic_widget(GTK_LABEL(label), browser_entry); |
| 682 if (web_browser_new != BROWSER_MANUAL) |
588 if (web_browser != BROWSER_MANUAL) |
| 683 gtk_widget_set_sensitive(browser_entry, FALSE); |
589 gtk_widget_set_sensitive(browser_entry, FALSE); |
| 684 gtk_box_pack_start (GTK_BOX (hbox), browser_entry, FALSE, FALSE, 0); |
590 gtk_box_pack_start (GTK_BOX (hbox), browser_entry, FALSE, FALSE, 0); |
| 685 |
591 |
| 686 gtk_entry_set_text(GTK_ENTRY(browser_entry), web_command_new); |
592 gtk_entry_set_text(GTK_ENTRY(browser_entry), web_command); |
| 687 gtk_signal_connect(GTK_OBJECT(browser_entry), "changed", |
593 gtk_signal_connect(GTK_OBJECT(browser_entry), "changed", |
| 688 GTK_SIGNAL_FUNC(browser_print_option), NULL); |
594 GTK_SIGNAL_FUNC(browser_print_option), NULL); |
| 689 #endif /* end !_WIN32 */ |
595 #endif /* end !_WIN32 */ |
| 690 vbox = make_frame (ret, _("Browser Options")); |
596 vbox = make_frame (ret, _("Browser Options")); |
| 691 label = gaim_button(_("Open new _window by default"), &misc_options_new, OPT_MISC_BROWSER_POPUP, vbox); |
597 label = gaim_button(_("Open new _window by default"), &misc_options, OPT_MISC_BROWSER_POPUP, vbox); |
| 692 #ifdef _WIN32 |
598 #ifdef _WIN32 |
| 693 /* Until I figure out how to implement this on windows */ |
599 /* Until I figure out how to implement this on windows */ |
| 694 gtk_widget_set_sensitive(label, FALSE); |
600 gtk_widget_set_sensitive(label, FALSE); |
| 695 #endif |
601 #endif |
| 696 gtk_widget_show_all(ret); |
602 gtk_widget_show_all(ret); |
| 702 GtkWidget *vbox; |
608 GtkWidget *vbox; |
| 703 ret = gtk_vbox_new(FALSE, 18); |
609 ret = gtk_vbox_new(FALSE, 18); |
| 704 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
610 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
| 705 |
611 |
| 706 vbox = make_frame (ret, _("Message Logs")); |
612 vbox = make_frame (ret, _("Message Logs")); |
| 707 gaim_button(_("_Log all Instant Messages"), &logging_options_new, OPT_LOG_CONVOS, vbox); |
613 gaim_button(_("_Log all Instant Messages"), &logging_options, OPT_LOG_CONVOS, vbox); |
| 708 gaim_button(_("Log all c_hats"), &logging_options_new, OPT_LOG_CHATS, vbox); |
614 gaim_button(_("Log all c_hats"), &logging_options, OPT_LOG_CHATS, vbox); |
| 709 gaim_button(_("Strip _HTML from logs"), &logging_options_new, OPT_LOG_STRIP_HTML, vbox); |
615 gaim_button(_("Strip _HTML from logs"), &logging_options, OPT_LOG_STRIP_HTML, vbox); |
| 710 |
616 |
| 711 vbox = make_frame (ret, _("System Logs")); |
617 vbox = make_frame (ret, _("System Logs")); |
| 712 gaim_button(_("Log when buddies _sign on/sign off"), &logging_options_new, OPT_LOG_BUDDY_SIGNON, |
618 gaim_button(_("Log when buddies _sign on/sign off"), &logging_options, OPT_LOG_BUDDY_SIGNON, |
| 713 vbox); |
619 vbox); |
| 714 gaim_button(_("Log when buddies become _idle/un-idle"), &logging_options_new, OPT_LOG_BUDDY_IDLE, |
620 gaim_button(_("Log when buddies become _idle/un-idle"), &logging_options, OPT_LOG_BUDDY_IDLE, |
| 715 vbox); |
621 vbox); |
| 716 gaim_button(_("Log when buddies go away/come _back"), &logging_options_new, OPT_LOG_BUDDY_AWAY, vbox); |
622 gaim_button(_("Log when buddies go away/come _back"), &logging_options, OPT_LOG_BUDDY_AWAY, vbox); |
| 717 gaim_button(_("Log your _own signons/idleness/awayness"), &logging_options_new, OPT_LOG_MY_SIGNON, |
623 gaim_button(_("Log your _own signons/idleness/awayness"), &logging_options, OPT_LOG_MY_SIGNON, |
| 718 vbox); |
624 vbox); |
| 719 gaim_button(_("I_ndividual log file for each buddy's signons"), &logging_options_new, |
625 gaim_button(_("I_ndividual log file for each buddy's signons"), &logging_options, |
| 720 OPT_LOG_INDIVIDUAL, vbox); |
626 OPT_LOG_INDIVIDUAL, vbox); |
| 721 |
627 |
| 722 gtk_widget_show_all(ret); |
628 gtk_widget_show_all(ret); |
| 723 return ret; |
629 return ret; |
| 724 } |
630 } |
| 725 |
631 |
| 726 static GtkWidget *sndcmd = NULL; |
632 static GtkWidget *sndcmd = NULL; |
| 727 |
633 |
| 728 static gint sound_cmd_yeah(GtkEntry *entry, GdkEvent *event, gpointer d) |
634 static gint sound_cmd_yeah(GtkEntry *entry, GdkEvent *event, gpointer d) |
| 729 { |
635 { |
| 730 g_snprintf(sound_cmd_new, sizeof(sound_cmd_new), "%s", gtk_entry_get_text(GTK_ENTRY(sndcmd))); |
636 g_snprintf(sound_cmd, sizeof(sound_cmd), "%s", gtk_entry_get_text(GTK_ENTRY(sndcmd))); |
| 731 return TRUE; |
637 return TRUE; |
| 732 } |
638 } |
| 733 |
639 |
| 734 GtkWidget *sound_page() { |
640 GtkWidget *sound_page() { |
| 735 GtkWidget *ret; |
641 GtkWidget *ret; |
| 806 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
712 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
| 807 |
713 |
| 808 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
714 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
| 809 |
715 |
| 810 vbox = make_frame (ret, _("Away")); |
716 vbox = make_frame (ret, _("Away")); |
| 811 gaim_button(_("_Sending messages removes away status"), &away_options_new, OPT_AWAY_BACK_ON_IM, vbox); |
717 gaim_button(_("_Sending messages removes away status"), &away_options, OPT_AWAY_BACK_ON_IM, vbox); |
| 812 gaim_button(_("_Queue new messages when away"), &away_options_new, OPT_AWAY_QUEUE, vbox); |
718 gaim_button(_("_Queue new messages when away"), &away_options, OPT_AWAY_QUEUE, vbox); |
| 813 gaim_button(_("_Ignore new conversations when away"), &away_options_new, OPT_AWAY_DISCARD, vbox); |
719 gaim_button(_("_Ignore new conversations when away"), &away_options, OPT_AWAY_DISCARD, vbox); |
| 814 |
720 |
| 815 vbox = make_frame (ret, _("Auto-response")); |
721 vbox = make_frame (ret, _("Auto-response")); |
| 816 hbox = gtk_hbox_new(FALSE, 0); |
722 hbox = gtk_hbox_new(FALSE, 0); |
| 817 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
723 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
| 818 gaim_labeled_spin_button(hbox, _("Seconds before _resending:"), |
724 gaim_labeled_spin_button(hbox, _("Seconds before _resending:"), |
| 819 &away_resend_new, 1, 24 * 60 * 60, sg); |
725 &away_resend, 1, 24 * 60 * 60, sg); |
| 820 gaim_button(_("_Don't send auto-response"), &away_options_new, OPT_AWAY_NO_AUTO_RESP, vbox); |
726 gaim_button(_("_Don't send auto-response"), &away_options, OPT_AWAY_NO_AUTO_RESP, vbox); |
| 821 gaim_button(_("_Only send auto-response when idle"), &away_options_new, OPT_AWAY_IDLE_RESP, vbox); |
727 gaim_button(_("_Only send auto-response when idle"), &away_options, OPT_AWAY_IDLE_RESP, vbox); |
| 822 gaim_button(_("Do_n't send auto-response in active conversations"), &away_options_new, OPT_AWAY_DELAY_IN_USE, vbox); |
728 gaim_button(_("Do_n't send auto-response in active conversations"), &away_options, OPT_AWAY_DELAY_IN_USE, vbox); |
| 823 |
729 |
| 824 if (away_options_new & OPT_AWAY_NO_AUTO_RESP) |
730 if (away_options & OPT_AWAY_NO_AUTO_RESP) |
| 825 gtk_widget_set_sensitive(hbox, FALSE); |
731 gtk_widget_set_sensitive(hbox, FALSE); |
| 826 |
732 |
| 827 vbox = make_frame (ret, _("Idle")); |
733 vbox = make_frame (ret, _("Idle")); |
| 828 dd = gaim_dropdown(vbox, "Idle _Time Reporting:", &report_idle_new, -1, |
734 dd = gaim_dropdown(vbox, "Idle _Time Reporting:", &report_idle, -1, |
| 829 "None", IDLE_NONE, |
735 "None", IDLE_NONE, |
| 830 "Gaim Usage", IDLE_GAIM, |
736 "Gaim Usage", IDLE_GAIM, |
| 831 #ifdef USE_SCREENSAVER |
737 #ifdef USE_SCREENSAVER |
| 832 "X Usage", IDLE_SCREENSAVER, |
738 "X Usage", IDLE_SCREENSAVER, |
| 833 #endif |
739 #endif |
| 834 NULL); |
740 NULL); |
| 835 gtk_size_group_add_widget(sg, dd); |
741 gtk_size_group_add_widget(sg, dd); |
| 836 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); |
742 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); |
| 837 |
743 |
| 838 vbox = make_frame (ret, _("Auto-away")); |
744 vbox = make_frame (ret, _("Auto-away")); |
| 839 button = gaim_button(_("Set away _when idle"), &away_options_new, OPT_AWAY_AUTO, vbox); |
745 button = gaim_button(_("Set away _when idle"), &away_options, OPT_AWAY_AUTO, vbox); |
| 840 select = gaim_labeled_spin_button(vbox, "_Minutes before setting away:", &auto_away_new, 1, 24 * 60, sg); |
746 select = gaim_labeled_spin_button(vbox, "_Minutes before setting away:", &auto_away, 1, 24 * 60, sg); |
| 841 if (!(away_options_new & OPT_AWAY_AUTO)) |
747 if (!(away_options & OPT_AWAY_AUTO)) |
| 842 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
748 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
| 843 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
749 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
| 844 |
750 |
| 845 label = gtk_label_new_with_mnemonic("Away m_essage:"); |
751 label = gtk_label_new_with_mnemonic("Away m_essage:"); |
| 846 gtk_size_group_add_widget(sg, label); |
752 gtk_size_group_add_widget(sg, label); |
| 1101 gint soundnum; |
1007 gint soundnum; |
| 1102 |
1008 |
| 1103 gtk_tree_model_get_iter (model, &iter, path); |
1009 gtk_tree_model_get_iter (model, &iter, path); |
| 1104 gtk_tree_model_get (model, &iter, 2, &soundnum, -1); |
1010 gtk_tree_model_get (model, &iter, 2, &soundnum, -1); |
| 1105 |
1011 |
| 1106 sound_options_new ^= sounds[soundnum].opt; |
1012 sound_options ^= sounds[soundnum].opt; |
| 1107 gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, sound_options_new & sounds[soundnum].opt, -1); |
1013 gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, sound_options & sounds[soundnum].opt, -1); |
| 1108 |
1014 |
| 1109 gtk_tree_path_free(path); |
1015 gtk_tree_path_free(path); |
| 1110 } |
1016 } |
| 1111 |
1017 |
| 1112 static void test_sound(GtkWidget *button, gpointer i_am_NULL) |
1018 static void test_sound(GtkWidget *button, gpointer i_am_NULL) |
| 1113 { |
1019 { |
| 1114 guint32 tmp_sound = sound_options; |
1020 guint32 tmp_sound = sound_options; |
| 1115 char *save_me=NULL; |
|
| 1116 if (!(sound_options & OPT_SOUND_WHEN_AWAY)) |
1021 if (!(sound_options & OPT_SOUND_WHEN_AWAY)) |
| 1117 sound_options ^= OPT_SOUND_WHEN_AWAY; |
1022 sound_options ^= OPT_SOUND_WHEN_AWAY; |
| 1118 if (!(sound_options & sounds[sound_row_sel].opt)) |
1023 if (!(sound_options & sounds[sound_row_sel].opt)) |
| 1119 sound_options ^= sounds[sound_row_sel].opt; |
1024 sound_options ^= sounds[sound_row_sel].opt; |
| 1120 save_me = sound_file[sound_row_sel]; |
|
| 1121 sound_file[sound_row_sel] = sound_file_new[sound_row_sel]; |
|
| 1122 play_sound(sound_row_sel); |
1025 play_sound(sound_row_sel); |
| 1123 |
1026 |
| 1124 sound_file[sound_row_sel] = save_me; |
|
| 1125 sound_options = tmp_sound; |
1027 sound_options = tmp_sound; |
| 1126 } |
1028 } |
| 1127 |
1029 |
| 1128 static void reset_sound(GtkWidget *button, gpointer i_am_also_NULL) |
1030 static void reset_sound(GtkWidget *button, gpointer i_am_also_NULL) |
| 1129 { |
1031 { |
| 1130 /* This just resets a sound file back to default */ |
1032 /* This just resets a sound file back to default */ |
| 1131 if (sound_file_new[sound_row_sel]) { |
1033 if (sound_file[sound_row_sel]) { |
| 1132 g_free(sound_file_new[sound_row_sel]); |
1034 g_free(sound_file[sound_row_sel]); |
| 1133 sound_file_new[sound_row_sel] = NULL; |
1035 sound_file[sound_row_sel] = NULL; |
| 1134 } |
1036 } |
| 1135 |
1037 |
| 1136 gtk_entry_set_text(GTK_ENTRY(sound_entry), "(default)"); |
1038 gtk_entry_set_text(GTK_ENTRY(sound_entry), "(default)"); |
| 1137 } |
1039 } |
| 1138 |
1040 |
| 1510 GtkWidget *notebook; |
1412 GtkWidget *notebook; |
| 1511 GtkWidget *sep; |
1413 GtkWidget *sep; |
| 1512 GtkWidget *button; |
1414 GtkWidget *button; |
| 1513 GtkSizeGroup *sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); |
1415 GtkSizeGroup *sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); |
| 1514 |
1416 |
| 1515 int r; |
|
| 1516 |
|
| 1517 if (prefs) { |
1417 if (prefs) { |
| 1518 gtk_window_present(GTK_WINDOW(prefs)); |
1418 gtk_window_present(GTK_WINDOW(prefs)); |
| 1519 return; |
1419 return; |
| 1520 } |
1420 } |
| 1521 |
1421 |
| 1522 /* copy the preferences to tmp values... |
1422 /* copy the preferences to tmp values... |
| 1523 * I liked "take affect immediately" Oh well :-( */ |
1423 * I liked "take affect immediately" Oh well :-( */ |
| 1524 misc_options_new = misc_options; |
1424 |
| 1525 logging_options_new = logging_options; |
1425 /* Back to instant-apply! I win! BU-HAHAHA! */ |
| 1526 blist_options_new = blist_options; |
|
| 1527 convo_options_new = convo_options; |
|
| 1528 im_options_new = im_options; |
|
| 1529 chat_options_new = chat_options; |
|
| 1530 font_options_new = font_options; |
|
| 1531 sound_options_new = sound_options; |
|
| 1532 for (r = 0; r < NUM_SOUNDS; r++) |
|
| 1533 sound_file_new[r] = g_strdup(sound_file[r]); |
|
| 1534 away_options_new = away_options; |
|
| 1535 away_resend_new = away_resend; |
|
| 1536 report_idle_new = report_idle; |
|
| 1537 auto_away_new = auto_away; |
|
| 1538 default_away_new = default_away; |
|
| 1539 fontsize_new = fontsize; |
|
| 1540 web_browser_new = web_browser; |
|
| 1541 proxytype_new = proxytype; |
|
| 1542 #ifndef _WIN32 |
|
| 1543 g_snprintf(sound_cmd_new, sizeof(sound_cmd_new), "%s", sound_cmd); |
|
| 1544 #endif |
|
| 1545 g_snprintf(web_command_new, sizeof(web_command_new), "%s", |
|
| 1546 web_command ? web_command : "xterm -e lynx %%s"); |
|
| 1547 g_snprintf(fontface_new, sizeof(fontface_new), fontface); |
|
| 1548 memcpy(&conv_size_new, &conv_size, sizeof(struct window_size)); |
|
| 1549 memcpy(&buddy_chat_size_new, &buddy_chat_size, sizeof(struct window_size)); |
|
| 1550 memcpy(&fgcolor_new, &fgcolor, sizeof(GdkColor)); |
|
| 1551 memcpy(&bgcolor_new, &bgcolor, sizeof(GdkColor)); |
|
| 1552 |
1426 |
| 1553 /* Create the window */ |
1427 /* Create the window */ |
| 1554 prefs = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
1428 prefs = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
| 1555 gtk_window_set_wmclass(GTK_WINDOW(prefs), "preferences", "Gaim"); |
1429 gtk_window_set_wmclass(GTK_WINDOW(prefs), "preferences", "Gaim"); |
| 1556 gtk_widget_realize(prefs); |
1430 gtk_widget_realize(prefs); |
| 1627 gtk_widget_show(notebook); |
1501 gtk_widget_show(notebook); |
| 1628 sep = gtk_hseparator_new(); |
1502 sep = gtk_hseparator_new(); |
| 1629 gtk_widget_show(sep); |
1503 gtk_widget_show(sep); |
| 1630 gtk_box_pack_start (GTK_BOX (vbox), sep, FALSE, FALSE, 0); |
1504 gtk_box_pack_start (GTK_BOX (vbox), sep, FALSE, FALSE, 0); |
| 1631 |
1505 |
| 1632 /* The buttons to press! */ |
1506 /* The buttons^H to press! */ |
| 1633 hbox = gtk_hbox_new (FALSE, 6); |
1507 hbox = gtk_hbox_new (FALSE, 6); |
| 1634 gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); |
1508 gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); |
| 1635 gtk_container_add (GTK_CONTAINER(vbox), hbox); |
1509 gtk_container_add (GTK_CONTAINER(vbox), hbox); |
| 1636 gtk_widget_show (hbox); |
1510 gtk_widget_show (hbox); |
| 1637 |
1511 |
| 1638 button = gtk_button_new_from_stock (GTK_STOCK_OK); |
1512 button = gtk_button_new_from_stock (GTK_STOCK_CLOSE); |
| 1639 gtk_size_group_add_widget(sg, button); |
|
| 1640 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(ok_cb), prefs); |
|
| 1641 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
|
| 1642 gtk_widget_show(button); |
|
| 1643 |
|
| 1644 button = gtk_button_new_from_stock (GTK_STOCK_CANCEL); |
|
| 1645 gtk_size_group_add_widget(sg, button); |
1513 gtk_size_group_add_widget(sg, button); |
| 1646 gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), prefs); |
1514 gtk_signal_connect_object(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), prefs); |
| 1647 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
1515 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 1648 gtk_widget_show(button); |
1516 gtk_widget_show(button); |
| 1649 |
1517 |
| 1650 button = gtk_button_new_from_stock (GTK_STOCK_APPLY); |
|
| 1651 gtk_size_group_add_widget(sg, button); |
|
| 1652 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(apply_cb), prefs); |
|
| 1653 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
|
| 1654 gtk_widget_show(button); |
|
| 1655 |
|
| 1656 |
|
| 1657 prefs_notebook_init(); |
1518 prefs_notebook_init(); |
| 1658 |
1519 |
| 1659 gtk_tree_view_expand_all (GTK_TREE_VIEW(tree_v)); |
1520 gtk_tree_view_expand_all (GTK_TREE_VIEW(tree_v)); |
| 1660 gtk_widget_show(prefs); |
1521 gtk_widget_show(prefs); |
| 1661 } |
1522 } |
| 1743 if (opt_debug) |
1604 if (opt_debug) |
| 1744 g_print("%s", s); |
1605 g_print("%s", s); |
| 1745 g_free(s); |
1606 g_free(s); |
| 1746 } |
1607 } |
| 1747 |
1608 |
| 1748 |
|
| 1749 |
|
| 1750 |
|
| 1751 |
|
| 1752 |
|
| 1753 void set_option(GtkWidget *w, int *option) |
1609 void set_option(GtkWidget *w, int *option) |
| 1754 { |
1610 { |
| 1755 *option = !(*option); |
1611 *option = !(*option); |
| 1756 } |
1612 } |
| 1757 |
1613 |
| 1758 static void set_misc_option(GtkWidget *w, int option) |
1614 static void set_misc_option(GtkWidget *w, int option) |
| 1759 { |
1615 { |
| 1760 misc_options_new ^= option; |
1616 misc_options ^= option; |
| 1761 |
1617 |
| 1762 /* gross hack because we don't want to save all prefs just because |
1618 if (option == OPT_MISC_DEBUG) |
| 1763 * we enabled the debug window. then again, what about the debug |
|
| 1764 * window _isn't_ an ugly hack? */ |
|
| 1765 |
|
| 1766 if (option == OPT_MISC_DEBUG) { |
|
| 1767 misc_options ^= option; |
|
| 1768 save_prefs(); |
|
| 1769 show_debug(); |
1619 show_debug(); |
| 1770 } |
1620 |
| 1771 } |
1621 save_prefs(); |
| 1772 |
1622 } |
| 1773 |
1623 |
| 1774 /* Functions for each _options variable that sees what's changed, and makes |
1624 static void set_logging_option(GtkWidget *w, int option) |
| 1775 * effective those changes that take place immediately (UI stuff) */ |
1625 { |
| 1776 static void set_misc_options() |
1626 logging_options ^= option; |
| 1777 { |
1627 |
| 1778 |
1628 if (option == OPT_LOG_CONVOS || option == OPT_LOG_CHATS) |
| 1779 /* int option = misc_options ^ misc_options_new; */ |
|
| 1780 misc_options = misc_options_new; |
|
| 1781 |
|
| 1782 } |
|
| 1783 |
|
| 1784 static void set_logging_options() |
|
| 1785 { |
|
| 1786 int option = logging_options ^ logging_options_new; |
|
| 1787 logging_options = logging_options_new; |
|
| 1788 |
|
| 1789 if (option & OPT_LOG_CONVOS || option & OPT_LOG_CHATS) |
|
| 1790 update_log_convs(); |
1629 update_log_convs(); |
| 1791 |
1630 |
| 1792 } |
1631 save_prefs(); |
| 1793 |
1632 } |
| 1794 static void set_blist_options() |
1633 |
| 1795 { |
1634 static void set_blist_option(GtkWidget *w, int option) |
| 1796 int option = blist_options ^ blist_options_new; |
1635 { |
| 1797 blist_options = blist_options_new; |
1636 blist_options ^= option; |
| |
1637 |
| |
1638 save_prefs(); |
| 1798 |
1639 |
| 1799 if (!blist) |
1640 if (!blist) |
| 1800 return; |
1641 return; |
| 1801 |
1642 |
| 1802 if (option & OPT_BLIST_BOTTOM_TAB) |
1643 if (option == OPT_BLIST_NO_BUTTONS) |
| 1803 set_blist_tab(); |
|
| 1804 |
|
| 1805 if (option & OPT_BLIST_NO_BUTTONS) |
|
| 1806 build_imchat_box(!(blist_options & OPT_BLIST_NO_BUTTONS)); |
1644 build_imchat_box(!(blist_options & OPT_BLIST_NO_BUTTONS)); |
| 1807 |
1645 |
| 1808 if (option & OPT_BLIST_SHOW_GRPNUM) |
1646 if (option == OPT_BLIST_SHOW_GRPNUM) |
| 1809 update_num_groups(); |
1647 update_num_groups(); |
| 1810 |
1648 |
| 1811 if (option & OPT_BLIST_NO_MT_GRP) |
1649 if (option == OPT_BLIST_NO_MT_GRP) |
| 1812 toggle_show_empty_groups(); |
1650 toggle_show_empty_groups(); |
| 1813 |
1651 |
| 1814 if ((option & OPT_BLIST_SHOW_BUTTON_XPM) || (option & OPT_BLIST_NO_BUTTONS)) |
1652 if ((option == OPT_BLIST_SHOW_BUTTON_XPM) || (option == OPT_BLIST_NO_BUTTONS)) |
| 1815 update_button_pix(); |
1653 update_button_pix(); |
| 1816 |
1654 |
| 1817 if (option & OPT_BLIST_SHOW_PIXMAPS) |
1655 if (option == OPT_BLIST_SHOW_PIXMAPS) |
| 1818 toggle_buddy_pixmaps(); |
1656 toggle_buddy_pixmaps(); |
| 1819 |
1657 |
| 1820 if ((option & OPT_BLIST_GREY_IDLERS) || (option & OPT_BLIST_SHOW_IDLETIME)) |
1658 if ((option == OPT_BLIST_GREY_IDLERS) || (option == OPT_BLIST_SHOW_IDLETIME)) |
| 1821 update_idle_times(); |
1659 update_idle_times(); |
| 1822 |
1660 |
| 1823 } |
1661 } |
| 1824 |
1662 |
| 1825 static void set_convo_options() |
1663 static void set_convo_option(GtkWidget *w, int option) |
| 1826 { |
1664 { |
| 1827 int option = convo_options ^ convo_options_new; |
1665 convo_options ^= option; |
| 1828 convo_options = convo_options_new; |
1666 |
| 1829 |
1667 if (option == OPT_CONVO_SHOW_SMILEY) |
| 1830 if (option & OPT_CONVO_SHOW_SMILEY) |
|
| 1831 toggle_smileys(); |
1668 toggle_smileys(); |
| 1832 |
1669 |
| 1833 if (option & OPT_CONVO_SHOW_TIME) |
1670 if (option == OPT_CONVO_SHOW_TIME) |
| 1834 toggle_timestamps(); |
1671 toggle_timestamps(); |
| 1835 |
1672 |
| 1836 if (option & OPT_CONVO_CHECK_SPELLING) |
1673 if (option == OPT_CONVO_CHECK_SPELLING) |
| 1837 toggle_spellchk(); |
1674 toggle_spellchk(); |
| 1838 |
1675 |
| 1839 if (option & OPT_CONVO_COMBINE) { |
1676 save_prefs(); |
| 1840 /* (OPT_IM_SIDE_TAB | OPT_IM_BR_TAB) == (OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB) */ |
1677 } |
| 1841 |
1678 |
| 1842 } |
1679 static void set_im_option(GtkWidget *w, int option) |
| 1843 |
1680 { |
| 1844 } |
1681 im_options ^= option; |
| 1845 |
1682 |
| 1846 static void set_im_options() |
1683 if (option == OPT_IM_ONE_WINDOW) |
| 1847 { |
|
| 1848 int option = im_options ^ im_options_new; |
|
| 1849 im_options = im_options_new; |
|
| 1850 |
|
| 1851 if (option & OPT_IM_ONE_WINDOW) |
|
| 1852 im_tabize(); |
1684 im_tabize(); |
| 1853 |
1685 |
| 1854 if (option & OPT_IM_SIDE_TAB || option & OPT_IM_BR_TAB) |
1686 if (option == OPT_IM_HIDE_ICONS) |
| 1855 update_im_tabs(); |
|
| 1856 |
|
| 1857 if (option & OPT_IM_HIDE_ICONS) |
|
| 1858 set_hide_icons(); |
1687 set_hide_icons(); |
| 1859 |
1688 |
| 1860 if (option & OPT_IM_ALIAS_TAB) |
1689 if (option == OPT_IM_ALIAS_TAB) { |
| 1861 set_convo_titles(); |
1690 set_convo_titles(); |
| 1862 |
1691 } |
| 1863 if (option & OPT_IM_NO_ANIMATION) |
1692 |
| |
1693 if (option == OPT_IM_NO_ANIMATION) |
| 1864 set_anim(); |
1694 set_anim(); |
| 1865 |
1695 |
| 1866 if (option & OPT_IM_BUTTON_TEXT || option & OPT_IM_BUTTON_XPM) |
1696 save_prefs(); |
| 1867 update_im_button_pix(); |
1697 } |
| 1868 } |
1698 |
| 1869 |
1699 static void set_chat_option(GtkWidget *w, int option) |
| 1870 static void set_chat_options() |
1700 { |
| 1871 { |
1701 chat_options ^= option; |
| 1872 int option = chat_options ^ chat_options_new; |
1702 |
| 1873 chat_options = chat_options_new; |
1703 if (option == OPT_CHAT_ONE_WINDOW) |
| 1874 |
|
| 1875 if (option & OPT_CHAT_ONE_WINDOW) |
|
| 1876 chat_tabize(); |
1704 chat_tabize(); |
| 1877 |
1705 |
| 1878 if (option & OPT_CHAT_BUTTON_TEXT || option & OPT_CHAT_BUTTON_XPM) |
1706 save_prefs(); |
| 1879 update_chat_button_pix(); |
1707 } |
| 1880 } |
1708 |
| 1881 |
1709 void set_sound_option(GtkWidget *w, int option) |
| 1882 void set_sound_options() |
1710 { |
| 1883 { |
1711 sound_options ^= option; |
| 1884 /* int option = sound_options ^ sound_options_new; */ |
1712 |
| 1885 sound_options = sound_options_new; |
1713 save_prefs(); |
| 1886 |
1714 } |
| 1887 } |
1715 |
| 1888 |
1716 static void set_font_option(GtkWidget *w, int option) |
| 1889 static void set_font_options() |
1717 { |
| 1890 { |
1718 font_options ^= option; |
| 1891 /* int option = font_options ^ font_options_new; */ |
|
| 1892 font_options = font_options_new; |
|
| 1893 |
1719 |
| 1894 update_font_buttons(); |
1720 update_font_buttons(); |
| 1895 } |
1721 |
| 1896 |
1722 save_prefs(); |
| 1897 static void set_away_options() |
1723 } |
| 1898 { |
1724 |
| 1899 int option = away_options ^ away_options_new; |
1725 static void set_away_option(GtkWidget *w, int option) |
| 1900 away_options = away_options_new; |
1726 { |
| 1901 |
1727 away_options ^= option; |
| 1902 if (option & OPT_AWAY_QUEUE) |
1728 |
| |
1729 if (option == OPT_AWAY_QUEUE) |
| 1903 toggle_away_queue(); |
1730 toggle_away_queue(); |
| 1904 } |
1731 |
| 1905 |
1732 save_prefs(); |
| 1906 static void toggle_option(GtkWidget *w, int option) { |
|
| 1907 int *o = gtk_object_get_user_data(GTK_OBJECT(w)); |
|
| 1908 *o ^= option; |
|
| 1909 } |
1733 } |
| 1910 |
1734 |
| 1911 GtkWidget *gaim_button(const char *text, guint *options, int option, GtkWidget *page) |
1735 GtkWidget *gaim_button(const char *text, guint *options, int option, GtkWidget *page) |
| 1912 { |
1736 { |
| 1913 GtkWidget *button; |
1737 GtkWidget *button; |
| 1914 button = gtk_check_button_new_with_mnemonic(text); |
1738 button = gtk_check_button_new_with_mnemonic(text); |
| 1915 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (*options & option)); |
1739 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (*options & option)); |
| 1916 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); |
1740 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); |
| 1917 gtk_object_set_user_data(GTK_OBJECT(button), options); |
1741 gtk_object_set_user_data(GTK_OBJECT(button), options); |
| 1918 |
1742 |
| 1919 /* So that the debug window happens immediately |
1743 if (options == &misc_options) |
| 1920 * I don't think it should be "preferences," anyway. */ |
|
| 1921 if (options == &misc_options_new && option == OPT_MISC_DEBUG) |
|
| 1922 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_misc_option), |
1744 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_misc_option), |
| 1923 (int *)option); |
1745 (int *)option); |
| 1924 else |
1746 if (options == &logging_options) |
| 1925 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_option), |
1747 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_logging_option), |
| |
1748 (int *)option); |
| |
1749 if (options == &blist_options) |
| |
1750 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_blist_option), |
| |
1751 (int *)option); |
| |
1752 if (options == &convo_options) |
| |
1753 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_convo_option), |
| |
1754 (int *)option); |
| |
1755 if (options == &im_options) |
| |
1756 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_im_option), |
| |
1757 (int *)option); |
| |
1758 if (options == &chat_options) |
| |
1759 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_chat_option), |
| |
1760 (int *)option); |
| |
1761 if (options == &font_options) |
| |
1762 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_font_option), |
| |
1763 (int *)option); |
| |
1764 if (options == &sound_options) |
| |
1765 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_sound_option), |
| |
1766 (int *)option); |
| |
1767 if (options == &away_options) |
| |
1768 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_away_option), |
| 1926 (int *)option); |
1769 (int *)option); |
| 1927 |
1770 |
| 1928 gtk_widget_show(button); |
1771 gtk_widget_show(button); |
| 1929 |
1772 |
| 1930 return button; |
1773 return button; |
| 2085 } else { |
1928 } else { |
| 2086 debug_printf("HELLO %d\n", opt); |
1929 debug_printf("HELLO %d\n", opt); |
| 2087 *option = opt; |
1930 *option = opt; |
| 2088 } |
1931 } |
| 2089 |
1932 |
| 2090 if (option == &proxytype_new) { |
1933 if (option == &proxytype) { |
| 2091 if (opt == PROXY_NONE) |
1934 if (opt == PROXY_NONE) |
| 2092 gtk_widget_set_sensitive(prefs_proxy_frame, FALSE); |
1935 gtk_widget_set_sensitive(prefs_proxy_frame, FALSE); |
| 2093 else |
1936 else |
| 2094 gtk_widget_set_sensitive(prefs_proxy_frame, TRUE); |
1937 gtk_widget_set_sensitive(prefs_proxy_frame, TRUE); |
| 2095 } else if (option == &web_browser_new) { |
1938 } else if (option == &web_browser) { |
| 2096 if (opt == BROWSER_MANUAL) |
1939 if (opt == BROWSER_MANUAL) |
| 2097 gtk_widget_set_sensitive(browser_entry, TRUE); |
1940 gtk_widget_set_sensitive(browser_entry, TRUE); |
| 2098 else |
1941 else |
| 2099 gtk_widget_set_sensitive(browser_entry, FALSE); |
1942 gtk_widget_set_sensitive(browser_entry, FALSE); |
| 2100 } else if (*option == sound_options_new) { |
1943 } else if (option == (int*)&sound_options) { |
| 2101 if (opt == OPT_SOUND_CMD) |
1944 if (opt == OPT_SOUND_CMD) |
| 2102 gtk_widget_set_sensitive(sndcmd, TRUE); |
1945 gtk_widget_set_sensitive(sndcmd, TRUE); |
| 2103 else |
1946 else |
| 2104 gtk_widget_set_sensitive(sndcmd, FALSE); |
1947 gtk_widget_set_sensitive(sndcmd, FALSE); |
| |
1948 } else if (option == (int*)&im_options) { |
| |
1949 if (clear == (OPT_IM_SIDE_TAB | OPT_IM_BR_TAB)) |
| |
1950 update_im_tabs(); |
| |
1951 else if (clear == (OPT_IM_BUTTON_TEXT | OPT_IM_BUTTON_XPM)) |
| |
1952 update_im_button_pix(); |
| |
1953 } else if (option == (int*)&chat_options) { |
| |
1954 if (clear == (OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB)) |
| |
1955 update_im_tabs(); |
| |
1956 else if (clear == (OPT_CHAT_BUTTON_TEXT | OPT_CHAT_BUTTON_XPM)) |
| |
1957 update_im_button_pix(); |
| |
1958 } else if (option == (int*)&blist_options) { |
| |
1959 set_blist_tab(); |
| 2105 } |
1960 } |
| 2106 |
1961 |
| 2107 } |
1962 } |
| 2108 |
1963 |
| 2109 static GtkWidget *gaim_dropdown(GtkWidget *box, const gchar *title, int *option, int clear, ...) |
1964 static GtkWidget *gaim_dropdown(GtkWidget *box, const gchar *title, int *option, int clear, ...) |