Mercurial > pidgin
changeset 1813:998a6a032874
[gaim-migrate @ 1823]
decklin's default conversation size patch. we should have a thing to optionally set this based on the conversation window size, but that doesn't seem that important right now.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 06 May 2001 00:18:17 +0000 |
parents | b012f6b9095b |
children | 4681a02d6d3e |
files | src/buddy_chat.c src/conversation.c src/gaim.h src/gaimrc.c src/prefs.c |
diffstat | 5 files changed, 159 insertions(+), 89 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buddy_chat.c Sat May 05 22:27:51 2001 +0000 +++ b/src/buddy_chat.c Sun May 06 00:18:17 2001 +0000 @@ -863,7 +863,7 @@ b->sw = sw; gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); gtk_paned_pack1(GTK_PANED(hpaned), sw, TRUE, TRUE); - gtk_widget_set_usize(sw, 320, 160); + gtk_widget_set_usize(sw, buddy_chat_size.width, buddy_chat_size.height); gtk_widget_show(sw); text = gtk_imhtml_new(NULL, NULL); @@ -935,10 +935,7 @@ if (general_options & OPT_GEN_CHECK_SPELLING) gtkspell_attach(GTK_TEXT(chatentry)); gtk_box_pack_start(GTK_BOX(vbox), chatentry, TRUE, TRUE, 0); - if (display_options & OPT_DISP_CHAT_BIG_ENTRY) - gtk_widget_set_usize(chatentry, 320, 50); - else - gtk_widget_set_usize(chatentry, 320, 25); + gtk_widget_set_usize(chatentry, buddy_chat_size.width, buddy_chat_size.entry_height); gtk_window_set_focus(GTK_WINDOW(win), chatentry); gtk_widget_show(chatentry);
--- a/src/conversation.c Sat May 05 22:27:51 2001 +0000 +++ b/src/conversation.c Sun May 06 00:18:17 2001 +0000 @@ -2048,7 +2048,7 @@ c->sw = sw; gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); - gtk_widget_set_usize(sw, 320, 175); + gtk_widget_set_usize(sw, conv_size.width, conv_size.height); gtk_widget_show(sw); text = gtk_imhtml_new(NULL, NULL); @@ -2090,10 +2090,8 @@ gtk_object_set_user_data(GTK_OBJECT(entry), c); gtk_text_set_editable(GTK_TEXT(entry), TRUE); gtk_text_set_word_wrap(GTK_TEXT(entry), TRUE); - if (display_options & OPT_DISP_CONV_BIG_ENTRY) - gtk_widget_set_usize(entry, 300, 50); - else - gtk_widget_set_usize(entry, 300, 25); + gtk_widget_set_usize(entry, conv_size.width - 20, conv_size.entry_height); + gtk_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(send_callback), c); gtk_signal_connect(GTK_OBJECT(entry), "key_press_event", GTK_SIGNAL_FUNC(keypress_callback), c); gtk_signal_connect(GTK_OBJECT(entry), "key_press_event", GTK_SIGNAL_FUNC(entry_key_pressed),
--- a/src/gaim.h Sat May 05 22:27:51 2001 +0000 +++ b/src/gaim.h Sun May 06 00:18:17 2001 +0000 @@ -151,6 +151,13 @@ }; +struct window_size { + int width; + int height; + int entry_height; +}; + + struct option_set { int *options; int option; @@ -488,8 +495,8 @@ #define OPT_DISP_NO_BUTTONS 0x00002000 #define OPT_DISP_CONV_BUTTON_TEXT 0x00004000 #define OPT_DISP_CHAT_BUTTON_TEXT 0x00008000 -#define OPT_DISP_CONV_BIG_ENTRY 0x00010000 -#define OPT_DISP_CHAT_BIG_ENTRY 0x00020000 +/* #define OPT_DISP_CONV_BIG_ENTRY 0x00010000 -- no longer used */ +/* #define OPT_DISP_CHAT_BIG_ENTRY 0x00020000 -- no longer used */ #define OPT_DISP_NO_MT_GRP 0x00040000 #define OPT_DISP_CONV_BUTTON_XPM 0x00080000 #define OPT_DISP_CHAT_BUTTON_XPM 0x00100000 @@ -552,6 +559,7 @@ extern char sound_cmd[2048]; extern char web_command[2048]; extern struct save_pos blist_pos; +extern struct window_size conv_size, buddy_chat_size; extern char latest_ver[25]; /* Functions in about.c */
--- a/src/gaimrc.c Sat May 05 22:27:51 2001 +0000 +++ b/src/gaimrc.c Sun May 06 00:18:17 2001 +0000 @@ -48,6 +48,7 @@ int report_idle, web_browser; struct save_pos blist_pos; +struct window_size conv_size, buddy_chat_size; char web_command[2048]; char *sound_file[NUM_SOUNDS]; char sound_cmd[2048]; @@ -664,6 +665,14 @@ web_browser = atoi(p->value[0]); } else if (!strcmp(p->option, "web_command")) { strcpy(web_command, p->value[0]); + } else if (!strcmp(p->option, "conv_size")) { + conv_size.width = atoi(p->value[0]); + conv_size.height = atoi(p->value[1]); + conv_size.entry_height = atoi(p->value[2]); + } else if (!strcmp(p->option, "buddy_chat_size")) { + buddy_chat_size.width = atoi(p->value[0]); + buddy_chat_size.height = atoi(p->value[1]); + buddy_chat_size.entry_height = atoi(p->value[2]); } else if (!strcmp(p->option, "blist_pos")) { blist_pos.x = atoi(p->value[0]); blist_pos.y = atoi(p->value[1]); @@ -705,6 +714,10 @@ fprintf(f, "\tblist_pos { %d } { %d } { %d } { %d } { %d } { %d }\n", blist_pos.x, blist_pos.y, blist_pos.width, blist_pos.height, blist_pos.xoff, blist_pos.yoff); + fprintf(f, "\tconv_size { %d } { %d } { %d }\n", + conv_size.width, conv_size.height, conv_size.entry_height); + fprintf(f, "\tbuddy_chat_size { %d } { %d } { %d }\n", + buddy_chat_size.width, buddy_chat_size.height, buddy_chat_size.entry_height); fprintf(f, "}\n"); } @@ -787,7 +800,6 @@ OPT_DISP_SHOW_BUTTON_XPM | OPT_DISP_SHOW_SMILEY | OPT_DISP_COOL_LOOK | - OPT_DISP_CONV_BIG_ENTRY | OPT_DISP_CONV_BUTTON_XPM | OPT_DISP_CHAT_BUTTON_TEXT; @@ -808,10 +820,19 @@ default_away = NULL; g_snprintf(web_command, sizeof(web_command), "xterm -e lynx %%s"); + blist_pos.width = 0; blist_pos.height = 0; blist_pos.x = 0; blist_pos.y = 0; + + conv_size.width = 320; + conv_size.height = 175; + conv_size.entry_height = 25; + + buddy_chat_size.width = 320; + buddy_chat_size.height = 160; + buddy_chat_size.entry_height = 25; } }
--- a/src/prefs.c Sat May 05 22:27:51 2001 +0000 +++ b/src/prefs.c Sun May 06 00:18:17 2001 +0000 @@ -609,20 +609,52 @@ return opt; } +static void update_spin_value(GtkWidget *w, GtkWidget *spin) +{ + int *value = gtk_object_get_user_data(GTK_OBJECT(spin)); + *value = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin)); +} + +static void gaim_labeled_spin_button(GtkWidget *box, const gchar *title, int *val) +{ + GtkWidget *hbox; + GtkWidget *label; + GtkWidget *spin; + GtkObject *adjust; + + hbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); + gtk_widget_show(hbox); + + label = gtk_label_new(title); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); + gtk_widget_show(label); + + adjust = gtk_adjustment_new(*val, 1, 9999, 1, 1, 1); + spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0); + gtk_object_set_user_data(GTK_OBJECT(spin), val); + gtk_widget_set_usize(spin, 50, -1); + gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0); + gtk_signal_connect(GTK_OBJECT(adjust), "value-changed", + GTK_SIGNAL_FUNC(update_spin_value), GTK_WIDGET(spin)); + gtk_widget_show(spin); +} + static void im_page() { GtkWidget *parent; GtkWidget *box; GtkWidget *label; GtkWidget *frame; + GtkWidget *vbox; GtkWidget *hbox; - GtkWidget *vbox; + GtkWidget *vbox2; GtkWidget *opt; GtkWidget *sep; GtkWidget *button; GtkWidget *button2; GtkWidget *hbox2; - GtkWidget *vbox2; + GtkWidget *vbox3; parent = prefdialog->parent; gtk_widget_destroy(prefdialog); @@ -643,67 +675,89 @@ gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5); gtk_widget_show(frame); - hbox = gtk_hbox_new(FALSE, 5); - gtk_container_add(GTK_CONTAINER(frame), hbox); - gtk_widget_show(hbox); - - vbox = gtk_vbox_new(TRUE, 5); - gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 5); + vbox = gtk_vbox_new(FALSE, 5); + gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_widget_show(vbox); - label = gtk_label_new(_("Show buttons as ")); - gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 5); + hbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); + gtk_widget_show(hbox); + + vbox2 = gtk_vbox_new(TRUE, 5); + gtk_box_pack_start(GTK_BOX(hbox), vbox2, FALSE, FALSE, 5); + gtk_widget_show(vbox2); + + label = gtk_label_new(_("Show buttons as: ")); + gtk_box_pack_start(GTK_BOX(vbox2), label, FALSE, FALSE, 5); gtk_widget_show(label); - opt = am_radio(_("Pictures And Text"), OPT_DISP_CONV_BUTTON_TEXT | OPT_DISP_CONV_BUTTON_XPM, vbox, NULL); - opt = am_radio(_("Pictures"), OPT_DISP_CONV_BUTTON_XPM, vbox, opt); - opt = am_radio(_("Text"), OPT_DISP_CONV_BUTTON_TEXT, vbox, opt); + opt = am_radio(_("Pictures And Text"), OPT_DISP_CONV_BUTTON_TEXT | OPT_DISP_CONV_BUTTON_XPM, vbox2, NULL); + opt = am_radio(_("Pictures"), OPT_DISP_CONV_BUTTON_XPM, vbox2, opt); + opt = am_radio(_("Text"), OPT_DISP_CONV_BUTTON_TEXT, vbox2, opt); sep = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 5); gtk_widget_show(sep); - vbox = gtk_vbox_new(TRUE, 5); - gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5); - gtk_widget_show(vbox); - - button = gaim_button(_("Show all conversations in one tabbed window"), &display_options, OPT_DISP_ONE_WINDOW, vbox); - gaim_button(_("Raise windows on events"), &general_options, OPT_GEN_POPUP_WINDOWS, vbox); - gaim_button(_("Show logins in window"), &display_options, OPT_DISP_SHOW_LOGON, vbox); - gaim_button(_("Show larger entry box on new windows"), &display_options, OPT_DISP_CONV_BIG_ENTRY, vbox); + vbox2 = gtk_vbox_new(TRUE, 5); + gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 5); + gtk_widget_show(vbox2); + + button = gaim_button(_("Show all conversations in one tabbed window"), &display_options, OPT_DISP_ONE_WINDOW, vbox2); + gaim_button(_("Raise windows on events"), &general_options, OPT_GEN_POPUP_WINDOWS, vbox2); + gaim_button(_("Show logins in window"), &display_options, OPT_DISP_SHOW_LOGON, vbox2); + + hbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); + gtk_widget_show(hbox); + + gaim_labeled_spin_button(hbox, _("New window width:"), &conv_size.width); + gaim_labeled_spin_button(hbox, _("New window height:"), &conv_size.height); + gaim_labeled_spin_button(hbox, _("Entry widget height:"), &conv_size.entry_height); frame = gtk_frame_new(_("Group Chat Window")); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5); gtk_widget_show(frame); - hbox = gtk_hbox_new(FALSE, 5); - gtk_container_add(GTK_CONTAINER(frame), hbox); - gtk_widget_show(hbox); - - vbox = gtk_vbox_new(TRUE, 5); - gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 5); + vbox = gtk_vbox_new(FALSE, 5); + gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_widget_show(vbox); - label = gtk_label_new(_("Show buttons as ")); - gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 5); + hbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); + gtk_widget_show(hbox); + + vbox2 = gtk_vbox_new(TRUE, 5); + gtk_box_pack_start(GTK_BOX(hbox), vbox2, FALSE, FALSE, 5); + gtk_widget_show(vbox2); + + label = gtk_label_new(_("Show buttons as: ")); + gtk_box_pack_start(GTK_BOX(vbox2), label, FALSE, FALSE, 5); gtk_widget_show(label); - opt = am_radio(_("Pictures And Text"), OPT_DISP_CHAT_BUTTON_TEXT | OPT_DISP_CHAT_BUTTON_XPM | 1, vbox, NULL); - opt = am_radio(_("Pictures"), OPT_DISP_CHAT_BUTTON_XPM | 1, vbox, opt); - opt = am_radio(_("Text"), OPT_DISP_CHAT_BUTTON_TEXT | 1, vbox, opt); + opt = am_radio(_("Pictures And Text"), OPT_DISP_CHAT_BUTTON_TEXT | OPT_DISP_CHAT_BUTTON_XPM | 1, vbox2, NULL); + opt = am_radio(_("Pictures"), OPT_DISP_CHAT_BUTTON_XPM | 1, vbox2, opt); + opt = am_radio(_("Text"), OPT_DISP_CHAT_BUTTON_TEXT | 1, vbox2, opt); sep = gtk_vseparator_new(); gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 5); gtk_widget_show(sep); - vbox = gtk_vbox_new(TRUE, 5); - gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5); - gtk_widget_show(vbox); - - button2 = gaim_button(_("Show all chats in one tabbed window"), &display_options, OPT_DISP_ONE_CHAT_WINDOW, vbox); - gaim_button(_("Raise windows on events"), &general_options, OPT_GEN_POPUP_CHAT, vbox); - gaim_button(_("Show people joining/leaving in window"), &display_options, OPT_DISP_CHAT_LOGON, vbox); - gaim_button(_("Show larger entry box on new windows"), &display_options, OPT_DISP_CHAT_BIG_ENTRY, vbox); + vbox2 = gtk_vbox_new(TRUE, 5); + gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 5); + gtk_widget_show(vbox2); + + button2 = gaim_button(_("Show all chats in one tabbed window"), &display_options, OPT_DISP_ONE_CHAT_WINDOW, vbox2); + gaim_button(_("Raise windows on events"), &general_options, OPT_GEN_POPUP_CHAT, vbox2); + gaim_button(_("Show people joining/leaving in window"), &display_options, OPT_DISP_CHAT_LOGON, vbox2); + + hbox = gtk_hbox_new(FALSE, 5); + gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); + gtk_widget_show(hbox); + + gaim_labeled_spin_button(hbox, _("New window width:"), &buddy_chat_size.width); + gaim_labeled_spin_button(hbox, _("New window height:"), &buddy_chat_size.height); + gaim_labeled_spin_button(hbox, _("Entry widget height:"), &buddy_chat_size.entry_height); frame = gtk_frame_new(_("Tabbed Window Options")); gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5); @@ -725,22 +779,22 @@ gtk_box_pack_start(GTK_BOX(vbox), hbox2, TRUE, TRUE, 5); gtk_widget_show(hbox2); - vbox2 = gtk_vbox_new(TRUE, 5); - gtk_box_pack_start(GTK_BOX(hbox2), vbox2, TRUE, TRUE, 5); - gtk_widget_show(vbox2); - - opt = tab_radio(_("Top"), 0, vbox2, NULL); + vbox3 = gtk_vbox_new(TRUE, 5); + gtk_box_pack_start(GTK_BOX(hbox2), vbox3, TRUE, TRUE, 5); + gtk_widget_show(vbox3); + + opt = tab_radio(_("Top"), 0, vbox3, NULL); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); - opt = tab_radio(_("Bottom"), OPT_DISP_CONV_BR_TAB, vbox2, opt); + opt = tab_radio(_("Bottom"), OPT_DISP_CONV_BR_TAB, vbox3, opt); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); - vbox2 = gtk_vbox_new(TRUE, 5); - gtk_box_pack_start(GTK_BOX(hbox2), vbox2, TRUE, TRUE, 5); - gtk_widget_show(vbox2); - - opt = tab_radio(_("Left"), OPT_DISP_CONV_SIDE_TAB, vbox2, opt); + vbox3 = gtk_vbox_new(TRUE, 5); + gtk_box_pack_start(GTK_BOX(hbox2), vbox3, TRUE, TRUE, 5); + gtk_widget_show(vbox3); + + opt = tab_radio(_("Left"), OPT_DISP_CONV_SIDE_TAB, vbox3, opt); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); - opt = tab_radio(_("Right"), OPT_DISP_CONV_SIDE_TAB | OPT_DISP_CONV_BR_TAB, vbox2, opt); + opt = tab_radio(_("Right"), OPT_DISP_CONV_SIDE_TAB | OPT_DISP_CONV_BR_TAB, vbox3, opt); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); sep = gtk_vseparator_new(); @@ -759,22 +813,22 @@ gtk_box_pack_start(GTK_BOX(vbox), hbox2, TRUE, TRUE, 5); gtk_widget_show(hbox2); - vbox2 = gtk_vbox_new(TRUE, 5); - gtk_box_pack_start(GTK_BOX(hbox2), vbox2, TRUE, TRUE, 5); - gtk_widget_show(vbox2); - - opt = tab_radio(_("Top"), 1, vbox2, NULL); + vbox3 = gtk_vbox_new(TRUE, 5); + gtk_box_pack_start(GTK_BOX(hbox2), vbox3, TRUE, TRUE, 5); + gtk_widget_show(vbox3); + + opt = tab_radio(_("Top"), 1, vbox3, NULL); gtk_signal_connect(GTK_OBJECT(button2), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); - opt = tab_radio(_("Bottom"), OPT_DISP_CHAT_BR_TAB | 1, vbox2, opt); + opt = tab_radio(_("Bottom"), OPT_DISP_CHAT_BR_TAB | 1, vbox3, opt); gtk_signal_connect(GTK_OBJECT(button2), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); - vbox2 = gtk_vbox_new(TRUE, 5); - gtk_box_pack_start(GTK_BOX(hbox2), vbox2, TRUE, TRUE, 5); - gtk_widget_show(vbox2); - - opt = tab_radio(_("Left"), OPT_DISP_CHAT_SIDE_TAB | 1, vbox2, opt); + vbox3 = gtk_vbox_new(TRUE, 5); + gtk_box_pack_start(GTK_BOX(hbox2), vbox3, TRUE, TRUE, 5); + gtk_widget_show(vbox3); + + opt = tab_radio(_("Left"), OPT_DISP_CHAT_SIDE_TAB | 1, vbox3, opt); gtk_signal_connect(GTK_OBJECT(button2), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); - opt = tab_radio(_("Right"), OPT_DISP_CHAT_SIDE_TAB | OPT_DISP_CHAT_BR_TAB | 1, vbox2, opt); + opt = tab_radio(_("Right"), OPT_DISP_CHAT_SIDE_TAB | OPT_DISP_CHAT_BR_TAB | 1, vbox3, opt); gtk_signal_connect(GTK_OBJECT(button2), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt); gtk_widget_show(prefdialog); @@ -1112,11 +1166,6 @@ gtk_style_unref(style); } -static void set_font_size(GtkWidget *w, GtkWidget *spin) -{ - fontsize = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin)); -} - static void font_page() { GtkWidget *parent; @@ -1240,11 +1289,12 @@ adjust = gtk_adjustment_new(fontsize, 1, 7, 1, 1, 1); spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0); gtk_widget_set_usize(spin, 50, -1); + gtk_object_set_user_data(GTK_OBJECT(spin), &fontsize); if (!(font_options & OPT_FONT_SIZE)) gtk_widget_set_sensitive(GTK_WIDGET(spin), FALSE); gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), spin); - gtk_signal_connect(GTK_OBJECT(adjust), "value-changed", GTK_SIGNAL_FUNC(set_font_size), ++ gtk_signal_connect(GTK_OBJECT(adjust), "value-changed", GTK_SIGNAL_FUNC(update_spin_value), GTK_WIDGET(spin)); gtk_widget_show(spin); @@ -1538,11 +1588,6 @@ do_away_message(NULL, gtk_object_get_user_data(GTK_OBJECT(i->data))); } -static void set_auto_away(GtkWidget *w, GtkWidget *spin) -{ - auto_away = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin)); -} - void set_default_away(GtkWidget *w, gpointer i) { int length = g_slist_length(away_messages); @@ -1659,11 +1704,12 @@ adjust = gtk_adjustment_new(auto_away, 1, 1440, 1, 10, 10); spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0); gtk_widget_set_usize(spin, 50, -1); + gtk_object_set_user_data(GTK_OBJECT(spin), &auto_away); if (!(general_options & OPT_GEN_AUTO_AWAY)) gtk_widget_set_sensitive(GTK_WIDGET(spin), FALSE); gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), spin); - gtk_signal_connect(GTK_OBJECT(adjust), "value-changed", GTK_SIGNAL_FUNC(set_auto_away), + gtk_signal_connect(GTK_OBJECT(adjust), "value-changed", GTK_SIGNAL_FUNC(update_spin_value), GTK_WIDGET(spin)); gtk_widget_show(spin);