From: Paul Mangan Date: Fri, 2 Dec 2005 10:51:43 +0000 (+0000) Subject: 2005-12-02 [paul] 1.9.100cvs49 X-Git-Tag: rel_2_0_0~171 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=17e16f893cf433a0ae6874f2001bf7465e4165b8 2005-12-02 [paul] 1.9.100cvs49 * src/prefs_account.c * src/prefs_compose_writing.c * src/prefs_fonts.c * src/prefs_gtk.h * src/prefs_image_viewer.c * src/prefs_message.c * src/prefs_other.c * src/prefs_receive.c * src/prefs_send.c * src/prefs_spelling.c * src/prefs_summaries.c * src/prefs_wrapping.c * src/plugins/dillo_viewer/dillo_prefs.c * src/plugins/pgpcore/prefs_gpg.c several cleanups to the prefs dialogs (slightly modified) patch by Fabien Vantard --- diff --git a/ChangeLog b/ChangeLog index 79e4ee49a..4293ed2ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2005-12-02 [paul] 1.9.100cvs49 + + * src/prefs_account.c + * src/prefs_compose_writing.c + * src/prefs_fonts.c + * src/prefs_gtk.h + * src/prefs_image_viewer.c + * src/prefs_message.c + * src/prefs_other.c + * src/prefs_receive.c + * src/prefs_send.c + * src/prefs_spelling.c + * src/prefs_summaries.c + * src/prefs_wrapping.c + * src/plugins/dillo_viewer/dillo_prefs.c + * src/plugins/pgpcore/prefs_gpg.c + several cleanups to the prefs dialogs + (slightly modified) patch by Fabien Vantard + 2005-12-02 [paul] 1.9.100cvs48 * src/main.c diff --git a/PATCHSETS b/PATCHSETS index d0acdd3c7..2afe64c84 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -1032,3 +1032,4 @@ ( cvs diff -u -r 1.75.2.13 -r 1.75.2.14 src/matcher.c; cvs diff -u -r 1.39.2.5 -r 1.39.2.6 src/matcher.h; ) > 1.9.100cvs46.patchset ( cvs diff -u -r 1.12.2.10 -r 1.12.2.11 src/html.c; ) > 1.9.100cvs47.patchset ( cvs diff -u -r 1.115.2.68 -r 1.115.2.69 src/main.c; cvs diff -u -r 1.17.2.22 -r 1.17.2.23 src/send_message.c; ) > 1.9.100cvs48.patchset +( cvs diff -u -r 1.105.2.42 -r 1.105.2.43 src/prefs_account.c; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/prefs_compose_writing.c; cvs diff -u -r 1.4.2.13 -r 1.4.2.14 src/prefs_fonts.c; cvs diff -u -r 1.5.2.4 -r 1.5.2.5 src/prefs_gtk.h; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/prefs_image_viewer.c; cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/prefs_message.c; cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/prefs_other.c; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/prefs_receive.c; cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/prefs_send.c; cvs diff -u -r 1.5.2.14 -r 1.5.2.15 src/prefs_spelling.c; cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/prefs_summaries.c; cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/prefs_wrapping.c; cvs diff -u -r 1.5.2.7 -r 1.5.2.8 src/plugins/dillo_viewer/dillo_prefs.c; cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/plugins/pgpcore/prefs_gpg.c; ) > 1.9.100cvs49.patchset diff --git a/configure.ac b/configure.ac index 1b0a49ce9..ce8a95028 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=100 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=48 +EXTRA_VERSION=49 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/plugins/dillo_viewer/dillo_prefs.c b/src/plugins/dillo_viewer/dillo_prefs.c index a32015b1c..cb049bf5e 100644 --- a/src/plugins/dillo_viewer/dillo_prefs.c +++ b/src/plugins/dillo_viewer/dillo_prefs.c @@ -107,7 +107,7 @@ static void create_dillo_prefs_page(PrefsPage *page, GtkTooltips *full_tooltip; vbox = gtk_vbox_new(FALSE, 3); - gtk_container_set_border_width(GTK_CONTAINER(vbox), 3); + gtk_container_set_border_width(GTK_CONTAINER(vbox), VBOX_BORDER); gtk_widget_show(vbox); local_tooltip = gtk_tooltips_new(); diff --git a/src/plugins/pgpcore/prefs_gpg.c b/src/plugins/pgpcore/prefs_gpg.c index 212e51bfe..e6d151fd1 100644 --- a/src/plugins/pgpcore/prefs_gpg.c +++ b/src/plugins/pgpcore/prefs_gpg.c @@ -58,14 +58,6 @@ struct GPGPage GtkWidget *checkbtn_gpg_warning; }; -static void store_passphrase_toggled(GtkWidget *widget, gpointer data) -{ - struct GPGPage *page = (struct GPGPage *)data; - gtk_widget_set_sensitive(page->spinbtn_store_passphrase, - gtk_toggle_button_get_active( - GTK_TOGGLE_BUTTON(page->checkbtn_store_passphrase))); -} - static void prefs_gpg_create_widget_func(PrefsPage *_page, GtkWindow *window, gpointer data) @@ -73,69 +65,49 @@ static void prefs_gpg_create_widget_func(PrefsPage *_page, struct GPGPage *page = (struct GPGPage *) _page; struct GPGConfig *config; - /* - * BEGIN GLADE CODE - * DO NOT EDIT - */ - GtkWidget *table; GtkWidget *checkbtn_passphrase_grab; GtkWidget *checkbtn_store_passphrase; GtkWidget *checkbtn_auto_check_signatures; GtkWidget *checkbtn_gpg_warning; GtkWidget *hbox1; - GtkWidget *label11; + GtkWidget *vbox1, *vbox2; + GtkWidget *label_expire1; GtkObject *spinbtn_store_passphrase_adj; GtkWidget *spinbtn_store_passphrase; - GtkWidget *label12; + GtkWidget *label_expire2; + GtkWidget *frame_passphrase; GtkTooltips *tooltips; - gchar *tmp; tooltips = gtk_tooltips_new(); - table = gtk_table_new(5, 2, FALSE); - gtk_widget_show(table); - gtk_container_set_border_width(GTK_CONTAINER(table), 8); - gtk_table_set_row_spacings(GTK_TABLE(table), 4); - gtk_table_set_col_spacings(GTK_TABLE(table), 8); - - checkbtn_passphrase_grab = gtk_check_button_new_with_label(_("Grab input while entering a passphrase")); - gtk_widget_show(checkbtn_passphrase_grab); - gtk_table_attach(GTK_TABLE(table), checkbtn_passphrase_grab, 0, 1, - 3, 4, (GtkAttachOptions) (GTK_SHRINK | GTK_FILL), - (GtkAttachOptions) (GTK_SHRINK), 0, 0); - - checkbtn_store_passphrase = gtk_check_button_new_with_label(_("Store passphrase in memory")); - gtk_widget_show(checkbtn_store_passphrase); - gtk_table_attach(GTK_TABLE(table), checkbtn_store_passphrase, 0, 1, - 1, 2, (GtkAttachOptions) (GTK_SHRINK | GTK_FILL), - (GtkAttachOptions) (GTK_SHRINK), 0, 0); - - checkbtn_auto_check_signatures = - gtk_check_button_new_with_label(_("Automatically check signatures")); - gtk_widget_show(checkbtn_auto_check_signatures); - gtk_table_attach(GTK_TABLE(table), checkbtn_auto_check_signatures, - 0, 1, 0, 1, - (GtkAttachOptions) (GTK_SHRINK | GTK_FILL), - (GtkAttachOptions) (GTK_SHRINK), 0, 0); - - checkbtn_gpg_warning = gtk_check_button_new_with_label(_ - ("Display warning on startup if GnuPG doesn't work")); - gtk_widget_show(checkbtn_gpg_warning); - gtk_table_attach(GTK_TABLE(table), checkbtn_gpg_warning, 0, 1, 4, - 5, (GtkAttachOptions) (GTK_SHRINK | GTK_FILL), - (GtkAttachOptions) (GTK_SHRINK), 0, 0); - - hbox1 = gtk_hbox_new(FALSE, 8); - gtk_widget_show(hbox1); - gtk_table_attach(GTK_TABLE(table), hbox1, 0, 1, 2, 3, - (GtkAttachOptions) (GTK_SHRINK | GTK_FILL), - (GtkAttachOptions) (GTK_SHRINK), 0, 0); - - tmp = g_strdup_printf(" %s", _("Expire after")); - label11 = gtk_label_new(tmp); - g_free(tmp); - gtk_widget_show(label11); - gtk_box_pack_start(GTK_BOX(hbox1), label11, FALSE, FALSE, 0); + vbox1 = gtk_vbox_new (FALSE, VSPACING); + gtk_widget_show (vbox1); + gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER); + + vbox2 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox2); + gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0); + + PACK_CHECK_BUTTON (vbox2, checkbtn_auto_check_signatures, + _("Automatically check signatures")); + + PACK_FRAME(vbox1, frame_passphrase, _("Passphrase")); + + vbox2 = gtk_vbox_new (FALSE, VSPACING_NARROW); + gtk_widget_show (vbox2); + gtk_container_add (GTK_CONTAINER (frame_passphrase), vbox2); + gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8); + + PACK_CHECK_BUTTON (vbox2, checkbtn_store_passphrase, + _("Store passphrase in memory")); + + hbox1 = gtk_hbox_new (FALSE, 8); + gtk_widget_show (hbox1); + gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 0); + + label_expire1 = gtk_label_new(_("Expire after")); + gtk_widget_show (label_expire1); + gtk_box_pack_start (GTK_BOX (hbox1), label_expire1, FALSE, FALSE, 0); spinbtn_store_passphrase_adj = gtk_adjustment_new(1, 0, 1440, 1, 10, 10); @@ -153,13 +125,24 @@ static void prefs_gpg_create_widget_func(PrefsPage *_page, gtk_spin_button_set_numeric(GTK_SPIN_BUTTON (spinbtn_store_passphrase), TRUE); - label12 = gtk_label_new(_("minute(s)")); - gtk_widget_show(label12); - gtk_box_pack_start(GTK_BOX(hbox1), label12, TRUE, TRUE, 0); - gtk_misc_set_alignment(GTK_MISC(label12), 0.0, 0.5); - /* - * END GLADE CODE - */ + label_expire2 = gtk_label_new(_("minute(s)")); + gtk_widget_show(label_expire2); + gtk_box_pack_start(GTK_BOX(hbox1), label_expire2, FALSE, FALSE, 0); + gtk_misc_set_alignment(GTK_MISC(label_expire2), 0.0, 0.5); + + SET_TOGGLE_SENSITIVITY (checkbtn_store_passphrase, label_expire1); + SET_TOGGLE_SENSITIVITY (checkbtn_store_passphrase, spinbtn_store_passphrase); + SET_TOGGLE_SENSITIVITY (checkbtn_store_passphrase, label_expire2); + + PACK_CHECK_BUTTON (vbox2, checkbtn_passphrase_grab, + _("Grab input while entering a passphrase")); + + vbox2 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox2); + gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0); + + PACK_CHECK_BUTTON (vbox2, checkbtn_gpg_warning, + _("Display warning on startup if GnuPG doesn't work")); config = prefs_gpg_get_config(); @@ -169,19 +152,13 @@ static void prefs_gpg_create_widget_func(PrefsPage *_page, gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_passphrase_grab), config->passphrase_grab); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_gpg_warning), config->gpg_warning); - gtk_widget_set_sensitive(spinbtn_store_passphrase, - gtk_toggle_button_get_active( - GTK_TOGGLE_BUTTON(checkbtn_store_passphrase))); - g_signal_connect(G_OBJECT(checkbtn_store_passphrase), "toggled", - G_CALLBACK(store_passphrase_toggled), page); - page->checkbtn_auto_check_signatures = checkbtn_auto_check_signatures; page->checkbtn_store_passphrase = checkbtn_store_passphrase; page->spinbtn_store_passphrase = spinbtn_store_passphrase; page->checkbtn_passphrase_grab = checkbtn_passphrase_grab; page->checkbtn_gpg_warning = checkbtn_gpg_warning; - page->page.widget = table; + page->page.widget = vbox1; } static void prefs_gpg_destroy_widget_func(PrefsPage *_page) diff --git a/src/prefs_account.c b/src/prefs_account.c index 484803da8..1013a4ae3 100644 --- a/src/prefs_account.c +++ b/src/prefs_account.c @@ -1959,7 +1959,7 @@ static void prefs_account_privacy_create(void) default_privacy_system = gtk_option_menu_new(); gtk_widget_show (default_privacy_system); - gtk_box_pack_start (GTK_BOX(hbox1), default_privacy_system, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX(hbox1), default_privacy_system, FALSE, TRUE, 0); PACK_CHECK_BUTTON (vbox2, default_encrypt_chkbtn, _("Encrypt message by default")); diff --git a/src/prefs_compose_writing.c b/src/prefs_compose_writing.c index fe8897178..07157a1ae 100644 --- a/src/prefs_compose_writing.c +++ b/src/prefs_compose_writing.c @@ -79,8 +79,6 @@ void prefs_compose_writing_create_widget(PrefsPage *_page, GtkWindow *window, GtkObject *spinbtn_undolevel_adj; GtkWidget *spinbtn_undolevel; - GtkWidget *hbox5; - GtkWidget *checkbtn_default_reply_list; GtkWidget *checkbtn_forward_as_attachment; @@ -121,23 +119,18 @@ void prefs_compose_writing_create_widget(PrefsPage *_page, GtkWindow *window, PACK_CHECK_BUTTON (vbox2, checkbtn_autoextedit, _("Automatically launch the external editor")); - hbox5 = gtk_hbox_new (FALSE, 8); - gtk_widget_show (hbox5); - gtk_box_pack_start (GTK_BOX (vbox2), hbox5, FALSE, FALSE, 0); - - PACK_CHECK_BUTTON (hbox5, checkbtn_forward_as_attachment, + PACK_CHECK_BUTTON (vbox2, checkbtn_forward_as_attachment, _("Forward as attachment")); PACK_CHECK_BUTTON (vbox2, checkbtn_redirect_keep_from, _("Keep the original 'From' header when redirecting")); - hbox_autosave = gtk_hbox_new (FALSE, 8); gtk_widget_show (hbox_autosave); - gtk_box_pack_start (GTK_BOX (vbox1), hbox_autosave, FALSE, FALSE, 0); - + gtk_box_pack_start (GTK_BOX (vbox2), hbox_autosave, FALSE, FALSE, 0); + PACK_CHECK_BUTTON (hbox_autosave, checkbtn_autosave, - _("Autosave to Drafts folder every ")); + _("Autosave to Drafts folder every")); spinbtn_autosave_adj = gtk_adjustment_new (50, 0, 1000, 1, 10, 10); spinbtn_autosave_length = gtk_spin_button_new @@ -153,7 +146,7 @@ void prefs_compose_writing_create_widget(PrefsPage *_page, GtkWindow *window, hbox_undolevel = gtk_hbox_new (FALSE, 8); gtk_widget_show (hbox_undolevel); - gtk_box_pack_start (GTK_BOX (vbox1), hbox_undolevel, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox2), hbox_undolevel, FALSE, FALSE, 0); label_undolevel = gtk_label_new (_("Undo level")); gtk_widget_show (label_undolevel); @@ -167,6 +160,9 @@ void prefs_compose_writing_create_widget(PrefsPage *_page, GtkWindow *window, gtk_widget_set_size_request (spinbtn_undolevel, 64, -1); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_undolevel), TRUE); + SET_TOGGLE_SENSITIVITY (checkbtn_autosave, spinbtn_autosave_length); + SET_TOGGLE_SENSITIVITY (checkbtn_autosave, label_autosave_length); + prefs_writing->checkbtn_autoextedit = checkbtn_autoextedit; prefs_writing->checkbtn_reply_account_autosel = checkbtn_reply_account_autosel; diff --git a/src/prefs_fonts.c b/src/prefs_fonts.c index e75fb4dd4..b8cdca5a0 100644 --- a/src/prefs_fonts.c +++ b/src/prefs_fonts.c @@ -59,7 +59,7 @@ void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window, table = gtk_table_new(7, 2, FALSE); gtk_widget_show(table); - gtk_container_set_border_width(GTK_CONTAINER(table), 8); + gtk_container_set_border_width(GTK_CONTAINER(table), VBOX_BORDER); gtk_table_set_row_spacings(GTK_TABLE(table), 4); gtk_table_set_col_spacings(GTK_TABLE(table), 8); diff --git a/src/prefs_gtk.h b/src/prefs_gtk.h index 4d1405bf6..967713327 100644 --- a/src/prefs_gtk.h +++ b/src/prefs_gtk.h @@ -39,7 +39,7 @@ typedef struct _PrefsDialog PrefsDialog; #define VSPACING 10 #define VSPACING_NARROW 4 #define VSPACING_NARROW_2 2 -#define VBOX_BORDER 16 +#define VBOX_BORDER 8 #define DEFAULT_ENTRY_WIDTH 80 #define PREFSBUFSIZE 1024 diff --git a/src/prefs_image_viewer.c b/src/prefs_image_viewer.c index f8f44c8f7..5c9e39301 100644 --- a/src/prefs_image_viewer.c +++ b/src/prefs_image_viewer.c @@ -56,10 +56,11 @@ static void imageviewer_create_widget_func(PrefsPage * _page, GtkWidget *autoload_img; GtkWidget *resize_img; GtkWidget *inline_img; + GtkTooltips *resize_tooltip; table = gtk_table_new(3, 1, FALSE); gtk_widget_show(table); - gtk_container_set_border_width(GTK_CONTAINER(table), 8); + gtk_container_set_border_width(GTK_CONTAINER(table), VBOX_BORDER); gtk_table_set_row_spacings(GTK_TABLE(table), 4); gtk_table_set_col_spacings(GTK_TABLE(table), 8); @@ -69,8 +70,13 @@ static void imageviewer_create_widget_func(PrefsPage * _page, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); - resize_img = gtk_check_button_new_with_label(_("Resize attached images by default\n(Clicking image toggles scaling)")); + resize_tooltip = gtk_tooltips_new(); + + resize_img = gtk_check_button_new_with_label(_("Resize attached images by default")); gtk_widget_show(resize_img); + gtk_tooltips_set_tip(GTK_TOOLTIPS(resize_tooltip), resize_img, + _("Clicking image toggles scaling"), + NULL); gtk_table_attach(GTK_TABLE(table), resize_img, 0, 1, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); diff --git a/src/prefs_message.c b/src/prefs_message.c index 91d5138fa..5234c1768 100644 --- a/src/prefs_message.c +++ b/src/prefs_message.c @@ -80,7 +80,6 @@ void prefs_message_create_widget(PrefsPage *_page, GtkWindow *window, GtkWidget *vbox1; GtkWidget *vbox2; - GtkWidget *vbox3; GtkWidget *hbox1; GtkWidget *chkbtn_mbalnum; GtkWidget *chkbtn_disphdrpane; @@ -144,7 +143,7 @@ void prefs_message_create_widget(PrefsPage *_page, GtkWindow *window, button_edit_disphdr = gtk_button_new_with_label (_(" Edit... ")); gtk_widget_show (button_edit_disphdr); - gtk_box_pack_end (GTK_BOX (hbox1), button_edit_disphdr, + gtk_box_pack_start (GTK_BOX (hbox1), button_edit_disphdr, FALSE, TRUE, 0); g_signal_connect (G_OBJECT (button_edit_disphdr), "clicked", G_CALLBACK (prefs_display_header_open), @@ -155,7 +154,8 @@ void prefs_message_create_widget(PrefsPage *_page, GtkWindow *window, PACK_CHECK_BUTTON(vbox2, chkbtn_html, _("Render HTML messages as text")); - PACK_VSPACER(vbox2, vbox3, VSPACING_NARROW_2); + PACK_CHECK_BUTTON(vbox2, chkbtn_attach_desc, + _("Show attachment descriptions (rather than names)")); hbox1 = gtk_hbox_new (FALSE, 32); gtk_widget_show (hbox1); @@ -223,13 +223,6 @@ void prefs_message_create_widget(PrefsPage *_page, GtkWindow *window, SET_TOGGLE_SENSITIVITY (chkbtn_smoothscroll, hbox_scr) - vbox3 = gtk_vbox_new (FALSE, 0); - gtk_widget_show (vbox3); - gtk_box_pack_start (GTK_BOX (vbox1), vbox3, FALSE, FALSE, 0); - - PACK_CHECK_BUTTON(vbox3, chkbtn_attach_desc, - _("Show attachment descriptions (rather than names)")); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(chkbtn_mbalnum), prefs_common.conv_mb_alnum); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(chkbtn_disphdrpane), diff --git a/src/prefs_other.c b/src/prefs_other.c index 2629ddcf1..2dac88c22 100644 --- a/src/prefs_other.c +++ b/src/prefs_other.c @@ -54,7 +54,7 @@ typedef struct _OtherPage GtkWidget *checkbtn_askonclean; GtkWidget *checkbtn_warnqueued; GtkWidget *checkbtn_cliplog; - GtkWidget *loglength_entry; + GtkWidget *spinbtn_loglength; GtkWidget *spinbtn_iotimeout; } OtherPage; @@ -75,7 +75,8 @@ void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window, GtkWidget *hbox_cliplog; GtkWidget *checkbtn_cliplog; GtkWidget *loglength_label; - GtkWidget *loglength_entry; + GtkWidget *spinbtn_loglength; + GtkObject *spinbtn_loglength_adj; GtkTooltips *loglength_tooltip; GtkWidget *frame_exit; @@ -88,7 +89,6 @@ void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window, GtkWidget *label_iotimeout; GtkWidget *spinbtn_iotimeout; GtkObject *spinbtn_iotimeout_adj; - gchar *tmp; vbox1 = gtk_vbox_new (FALSE, VSPACING); gtk_widget_show (vbox1); @@ -124,16 +124,21 @@ void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window, gtk_widget_show (GTK_WIDGET (loglength_label)); loglength_tooltip = gtk_tooltips_new(); - - loglength_entry = gtk_entry_new (); - gtk_widget_set_size_request (GTK_WIDGET (loglength_entry), 64, -1); - gtk_box_pack_start (GTK_BOX (hbox_cliplog), loglength_entry, - FALSE, TRUE, 0); - gtk_widget_show (GTK_WIDGET (loglength_entry)); - gtk_tooltips_set_tip(GTK_TOOLTIPS(loglength_tooltip), loglength_entry, + + spinbtn_loglength_adj = gtk_adjustment_new (500, 0, G_MAXINT, 1, 10, 10); + spinbtn_loglength = gtk_spin_button_new + (GTK_ADJUSTMENT (spinbtn_loglength_adj), 1, 0); + gtk_widget_show (spinbtn_loglength); + gtk_box_pack_start (GTK_BOX (hbox_cliplog), spinbtn_loglength, + FALSE, FALSE, 0); + gtk_widget_set_size_request (GTK_WIDGET (spinbtn_loglength), 64, -1); + gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_loglength), TRUE); + + gtk_tooltips_set_tip(GTK_TOOLTIPS(loglength_tooltip), spinbtn_loglength, _("0 to stop logging in the log window"), NULL); - SET_TOGGLE_SENSITIVITY(checkbtn_cliplog, loglength_entry); + SET_TOGGLE_SENSITIVITY(checkbtn_cliplog, loglength_label); + SET_TOGGLE_SENSITIVITY(checkbtn_cliplog, spinbtn_loglength); /* On Exit */ PACK_FRAME (vbox1, frame_exit, _("On exit")); @@ -193,10 +198,8 @@ void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window, gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_cliplog), prefs_common.cliplog); - tmp = g_strdup_printf("%d", prefs_common.loglength); - gtk_entry_set_text(GTK_ENTRY(loglength_entry), tmp); - g_free(tmp); - + gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbtn_loglength), + prefs_common.loglength); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbtn_iotimeout), prefs_common.io_timeout_secs); @@ -206,7 +209,7 @@ void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window, prefs_other->checkbtn_askonclean = checkbtn_askonclean; prefs_other->checkbtn_warnqueued = checkbtn_warnqueued; prefs_other->checkbtn_cliplog = checkbtn_cliplog; - prefs_other->loglength_entry = loglength_entry; + prefs_other->spinbtn_loglength = spinbtn_loglength; prefs_other->spinbtn_iotimeout = spinbtn_iotimeout; prefs_other->page.widget = vbox1; @@ -216,13 +219,7 @@ void prefs_other_save(PrefsPage *_page) { OtherPage *page = (OtherPage *) _page; MainWindow *mainwindow; - - gchar *tmp = gtk_editable_get_chars(GTK_EDITABLE(page->loglength_entry), 0, -1); - - if (tmp && atoi(tmp)) { - prefs_common.loglength = atoi(tmp); - } - + prefs_common.add_address_by_click = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(page->checkbtn_addaddrbyclick)); prefs_common.confirm_on_exit = gtk_toggle_button_get_active( @@ -235,6 +232,8 @@ void prefs_other_save(PrefsPage *_page) GTK_TOGGLE_BUTTON(page->checkbtn_warnqueued)); prefs_common.cliplog = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(page->checkbtn_cliplog)); + prefs_common.loglength = gtk_spin_button_get_value_as_int( + GTK_SPIN_BUTTON(page->spinbtn_loglength)); prefs_common.io_timeout_secs = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON(page->spinbtn_iotimeout)); sock_set_io_timeout(prefs_common.io_timeout_secs); diff --git a/src/prefs_receive.c b/src/prefs_receive.c index b7058773e..2b9483036 100644 --- a/src/prefs_receive.c +++ b/src/prefs_receive.c @@ -107,7 +107,7 @@ void prefs_receive_create_widget(PrefsPage *_page, GtkWindow *window, GtkWidget *entry_newmail_notify_cmd; GtkWidget *label_newmail_notify_cmd; - GtkWidget *hbox_recvdialog; + GtkWidget *table; GtkWidget *label_recvdialog; GtkWidget *menu; GtkWidget *menuitem; @@ -183,18 +183,24 @@ void prefs_receive_create_widget(PrefsPage *_page, GtkWindow *window, _("Update all local folders after incorporation")); /* receive dialog */ - hbox_recvdialog = gtk_hbox_new (FALSE, 8); - gtk_widget_show (hbox_recvdialog); - gtk_box_pack_start (GTK_BOX (vbox2), hbox_recvdialog, FALSE, FALSE, 0); + table = gtk_table_new(1, 2, FALSE); + gtk_widget_show(table); + gtk_container_add (GTK_CONTAINER (vbox2), table); + gtk_table_set_row_spacings(GTK_TABLE(table), 4); + gtk_table_set_col_spacings(GTK_TABLE(table), 8); label_recvdialog = gtk_label_new (_("Show receive dialog")); gtk_misc_set_alignment(GTK_MISC(label_recvdialog), 0, 0.5); gtk_widget_show (label_recvdialog); - gtk_box_pack_start (GTK_BOX (hbox_recvdialog), label_recvdialog, FALSE, FALSE, 0); + gtk_table_attach(GTK_TABLE(table), label_recvdialog, 0, 1, 0, 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); optmenu_recvdialog = gtk_option_menu_new (); gtk_widget_show (optmenu_recvdialog); - gtk_box_pack_start (GTK_BOX (hbox_recvdialog), optmenu_recvdialog, FALSE, FALSE, 0); + gtk_table_attach(GTK_TABLE(table), optmenu_recvdialog, 1, 2, 0, 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); menu = gtk_menu_new (); MENUITEM_ADD (menu, menuitem, _("Always"), RECV_DIALOG_ALWAYS); diff --git a/src/prefs_send.c b/src/prefs_send.c index 663103a79..500c0c26b 100644 --- a/src/prefs_send.c +++ b/src/prefs_send.c @@ -115,7 +115,6 @@ void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window, GtkWidget *vbox1; GtkWidget *vbox2; - GtkWidget *hbox1; GtkWidget *checkbtn_savemsg; GtkWidget *label_outcharset; GtkWidget *optmenu_charset; @@ -128,8 +127,8 @@ void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window, GtkWidget *label_senddialog; GtkWidget *menu; GtkWidget *optmenu_senddialog; - GtkWidget *hbox_senddialog; GtkWidget *checkbtn_confirm_send_queued_messages; + GtkWidget *table; vbox1 = gtk_vbox_new (FALSE, VSPACING); gtk_widget_show (vbox1); @@ -140,37 +139,45 @@ void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window, gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0); PACK_CHECK_BUTTON (vbox2, checkbtn_savemsg, - _("Save sent messages to Sent folder")); + _("Save sent messages to Sent folder")); - PACK_CHECK_BUTTON - (vbox2, checkbtn_confirm_send_queued_messages, - _("Confirm before sending queued messages")); + PACK_CHECK_BUTTON (vbox2, checkbtn_confirm_send_queued_messages, + _("Confirm before sending queued messages")); - hbox_senddialog = gtk_hbox_new (FALSE, 8); - gtk_widget_show(hbox_senddialog); - gtk_box_pack_start (GTK_BOX (vbox1), hbox_senddialog, FALSE, FALSE, 0); + table = gtk_table_new(3, 2, FALSE); + gtk_widget_show(table); + gtk_container_add (GTK_CONTAINER (vbox1), table); + gtk_table_set_row_spacings(GTK_TABLE(table), 4); + gtk_table_set_col_spacings(GTK_TABLE(table), 8); label_senddialog = gtk_label_new (_("Show send dialog")); gtk_widget_show (label_senddialog); - gtk_box_pack_start (GTK_BOX (hbox_senddialog), label_senddialog, FALSE, FALSE, 0); + gtk_table_attach(GTK_TABLE(table), label_senddialog, 0, 1, 0, 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_label_set_justify(GTK_LABEL(label_senddialog), GTK_JUSTIFY_RIGHT); + gtk_misc_set_alignment(GTK_MISC(label_senddialog), 1, 0.5); + /* FIXME : Is it good to change this menu into a checkbtn ? */ optmenu_senddialog = gtk_option_menu_new (); gtk_widget_show (optmenu_senddialog); - gtk_box_pack_start (GTK_BOX (hbox_senddialog), optmenu_senddialog, FALSE, FALSE, 0); - + gtk_table_attach(GTK_TABLE(table), optmenu_senddialog, 1, 2, 0, 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + menu = gtk_menu_new (); MENUITEM_ADD (menu, menuitem, _("Always"), SEND_DIALOG_ALWAYS); MENUITEM_ADD (menu, menuitem, _("Never"), SEND_DIALOG_NEVER); gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu_senddialog), menu); - hbox1 = gtk_hbox_new (FALSE, 8); - gtk_widget_show (hbox1); - gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0); - label_outcharset = gtk_label_new (_("Outgoing encoding")); gtk_widget_show (label_outcharset); - gtk_box_pack_start (GTK_BOX (hbox1), label_outcharset, FALSE, FALSE, 0); + gtk_table_attach(GTK_TABLE(table), label_outcharset, 0, 1, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_label_set_justify(GTK_LABEL(label_outcharset), GTK_JUSTIFY_RIGHT); + gtk_misc_set_alignment(GTK_MISC(label_outcharset), 1, 0.5); charset_tooltip = gtk_tooltips_new(); @@ -180,7 +187,9 @@ void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window, _("If 'Automatic' is selected, the optimal encoding" " for the current locale will be used"), NULL); - gtk_box_pack_start (GTK_BOX (hbox1), optmenu_charset, FALSE, FALSE, 0); + gtk_table_attach(GTK_TABLE(table), optmenu_charset, 1, 2, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); optmenu_menu = gtk_menu_new (); @@ -237,17 +246,13 @@ void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window, gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu_charset), optmenu_menu); - hbox1 = gtk_hbox_new (FALSE, 8); - gtk_widget_show (hbox1); - gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0); - - hbox1 = gtk_hbox_new (FALSE, 8); - gtk_widget_show (hbox1); - gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0); - label_encoding = gtk_label_new (_("Transfer encoding")); gtk_widget_show (label_encoding); - gtk_box_pack_start (GTK_BOX (hbox1), label_encoding, FALSE, FALSE, 0); + gtk_table_attach(GTK_TABLE(table), label_encoding, 0, 1, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_label_set_justify(GTK_LABEL(label_encoding), GTK_JUSTIFY_RIGHT); + gtk_misc_set_alignment(GTK_MISC(label_encoding), 1, 0.5); encoding_tooltip = gtk_tooltips_new(); @@ -257,7 +262,9 @@ void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window, _("Specify Content-Transfer-Encoding used when" " message body contains non-ASCII characters"), NULL); - gtk_box_pack_start (GTK_BOX (hbox1), optmenu_encoding, FALSE, FALSE, 0); + gtk_table_attach(GTK_TABLE(table), optmenu_encoding, 1, 2, 2, 3, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); optmenu_menu = gtk_menu_new (); @@ -269,10 +276,6 @@ void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window, gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu_encoding), optmenu_menu); - hbox1 = gtk_hbox_new (FALSE, 8); - gtk_widget_show (hbox1); - gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_savemsg), prefs_common.savemsg); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_confirm_send_queued_messages), diff --git a/src/prefs_spelling.c b/src/prefs_spelling.c index ecabc3cd1..20fe778dc 100644 --- a/src/prefs_spelling.c +++ b/src/prefs_spelling.c @@ -159,7 +159,7 @@ void prefs_spelling_create_widget(PrefsPage *_page, GtkWindow *window, gpointer table = gtk_table_new(8, 3, FALSE); gtk_widget_show(table); - gtk_container_set_border_width(GTK_CONTAINER(table), 8); + gtk_container_set_border_width(GTK_CONTAINER(table), VBOX_BORDER); gtk_table_set_row_spacings(GTK_TABLE(table), 4); gtk_table_set_col_spacings(GTK_TABLE(table), 8); diff --git a/src/prefs_summaries.c b/src/prefs_summaries.c index 2989b2b72..e82fed1c5 100644 --- a/src/prefs_summaries.c +++ b/src/prefs_summaries.c @@ -717,10 +717,10 @@ void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window, GtkWidget *menu; GtkWidget *menuitem; GtkWidget *button_keybind; - GtkWidget *hbox_select_on_entry; GtkWidget *optmenu_select_on_entry; - GtkWidget *hbox_nextunreadmsgdialog; GtkWidget *optmenu_nextunreadmsgdialog; + GtkWidget *table; + GtkWidget *vbox5; vbox1 = gtk_vbox_new (FALSE, VSPACING); gtk_widget_show (vbox1); @@ -737,8 +737,6 @@ void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window, PACK_CHECK_BUTTON (vbox2, chkbtn_folder_unread, _("Display unread number next to folder name")); - PACK_VSPACER(vbox1, vbox2, VSPACING_NARROW_2); - hbox1 = gtk_hbox_new (FALSE, 8); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, TRUE, 0); @@ -776,8 +774,6 @@ void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window, (vbox3, chkbtn_threadsubj, _("Thread using subject in addition to standard headers")); - PACK_VSPACER(vbox2, vbox3, VSPACING_NARROW_2); - hbox1 = gtk_hbox_new (FALSE, 8); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (vbox3), hbox1, FALSE, TRUE, 0); @@ -854,23 +850,32 @@ void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window, (vbox4, checkbtn_mark_as_read_on_newwin, _("Only mark message as read when opened in a new window")); - hbox1 = gtk_hbox_new (FALSE, 0); - gtk_widget_show (hbox1); - gtk_box_pack_start (GTK_BOX (vbox4), hbox1, FALSE, FALSE, 0); - hbox_select_on_entry = gtk_hbox_new (FALSE, 8); - gtk_widget_show (hbox_select_on_entry); - gtk_box_pack_start (GTK_BOX (vbox1), hbox_select_on_entry, FALSE, FALSE, 0); + vbox5 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox5); + gtk_box_pack_start (GTK_BOX (vbox1), vbox5, FALSE, FALSE, 0); + + table = gtk_table_new(1, 1, FALSE); + gtk_widget_show(table); + gtk_container_add (GTK_CONTAINER (vbox5), table); + gtk_table_set_row_spacings(GTK_TABLE(table), 4); + gtk_table_set_col_spacings(GTK_TABLE(table), 8); label = gtk_label_new (_("When entering a folder")); gtk_widget_show (label); - gtk_box_pack_start (GTK_BOX (hbox_select_on_entry), label, FALSE, FALSE, 8); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_RIGHT); + gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); optmenu_select_on_entry = gtk_option_menu_new (); gtk_widget_show (optmenu_select_on_entry); - gtk_box_pack_start (GTK_BOX (hbox_select_on_entry), - optmenu_select_on_entry, FALSE, FALSE, 8); - + + gtk_table_attach(GTK_TABLE(table), optmenu_select_on_entry, 1, 2, 0, 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + menu = gtk_menu_new (); MENUITEM_ADD (menu, menuitem, _("Do nothing"), 0); MENUITEM_ADD (menu, menuitem, _("Select first unread (or new) message"), @@ -879,20 +884,29 @@ void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window, SELECTONENTRY_NEW); gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu_select_on_entry), menu); - + /* Next Unread Message Dialog */ - hbox_nextunreadmsgdialog = gtk_hbox_new (FALSE, 8); - gtk_widget_show (hbox_nextunreadmsgdialog); - gtk_box_pack_start (GTK_BOX (vbox1), hbox_nextunreadmsgdialog, FALSE, FALSE, 0); + table = gtk_table_new(1, 1, FALSE); + gtk_widget_show(table); + gtk_container_add (GTK_CONTAINER (vbox5), table); + gtk_table_set_row_spacings(GTK_TABLE(table), 4); + gtk_table_set_col_spacings(GTK_TABLE(table), 8); label = gtk_label_new (_("Show \"no unread (or new) message\" dialog")); gtk_widget_show (label); - gtk_box_pack_start (GTK_BOX (hbox_nextunreadmsgdialog), label, FALSE, FALSE, 8); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_RIGHT); + gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); optmenu_nextunreadmsgdialog = gtk_option_menu_new (); gtk_widget_show (optmenu_nextunreadmsgdialog); - gtk_box_pack_start (GTK_BOX (hbox_nextunreadmsgdialog), optmenu_nextunreadmsgdialog, FALSE, FALSE, 8); - + + gtk_table_attach(GTK_TABLE(table), optmenu_nextunreadmsgdialog, 1, 2, 1, 2, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + menu = gtk_menu_new (); MENUITEM_ADD (menu, menuitem, _("Always"), NEXTUNREADMSGDIALOG_ALWAYS); MENUITEM_ADD (menu, menuitem, _("Assume 'Yes'"), diff --git a/src/prefs_wrapping.c b/src/prefs_wrapping.c index 23c18d69d..fd9cb3091 100644 --- a/src/prefs_wrapping.c +++ b/src/prefs_wrapping.c @@ -57,7 +57,8 @@ void prefs_wrapping_create_widget(PrefsPage *_page, GtkWindow *window, { WrappingPage *prefs_wrapping = (WrappingPage *) _page; - GtkWidget *table; + GtkWidget *vbox1; + GtkWidget *vbox2; GtkWidget *label_linewrap; GtkObject *spinbtn_linewrap_adj; GtkWidget *spinbtn_linewrap; @@ -67,41 +68,22 @@ void prefs_wrapping_create_widget(PrefsPage *_page, GtkWindow *window, GtkWidget *checkbtn_wrapatsend; GtkWidget *hbox1; - table = gtk_table_new(10, 3, FALSE); - gtk_widget_show(table); - gtk_container_set_border_width(GTK_CONTAINER(table), 8); - gtk_table_set_row_spacings(GTK_TABLE(table), 4); - gtk_table_set_col_spacings(GTK_TABLE(table), 8); - - checkbtn_autowrap = gtk_check_button_new_with_label(_("Wrap on input")); - gtk_widget_show (checkbtn_autowrap); - gtk_table_attach (GTK_TABLE (table), checkbtn_autowrap, 0, 1, 1, 2, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - checkbtn_wrapatsend = gtk_check_button_new_with_label(_("Wrap before sending")); - gtk_widget_show (checkbtn_wrapatsend); - gtk_table_attach (GTK_TABLE (table), checkbtn_wrapatsend, 0, 1, 2, 3, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - checkbtn_wrapquote = gtk_check_button_new_with_label(_("Wrap quotation")); - gtk_widget_show (checkbtn_wrapquote); - gtk_table_attach (GTK_TABLE (table), checkbtn_wrapquote, 0, 1, 3, 4, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - checkbtn_wrappastes = gtk_check_button_new_with_label(_("Wrap pasted text")); - gtk_widget_show (checkbtn_wrappastes); - gtk_table_attach (GTK_TABLE (table), checkbtn_wrappastes, 0, 1, 5, 6, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - - hbox1 = gtk_hbox_new (FALSE, 0); + vbox1 = gtk_vbox_new (FALSE, VSPACING); + gtk_widget_show (vbox1); + gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER); + + vbox2 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox2); + gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0); + + PACK_CHECK_BUTTON (vbox2, checkbtn_autowrap, _("Wrap on input")); + PACK_CHECK_BUTTON (vbox2, checkbtn_wrapatsend, _("Wrap before sending")); + PACK_CHECK_BUTTON (vbox2, checkbtn_wrapquote, _("Wrap quotation")); + PACK_CHECK_BUTTON (vbox2, checkbtn_wrappastes, _("Wrap pasted text")); + + hbox1 = gtk_hbox_new (FALSE, 8); gtk_widget_show (hbox1); - gtk_table_attach (GTK_TABLE (table), hbox1, 0, 1, 7, 8, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (GTK_FILL), 0, 0); + gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 0); label_linewrap = gtk_label_new (_("Wrap messages at")); gtk_widget_show (label_linewrap); @@ -110,13 +92,15 @@ void prefs_wrapping_create_widget(PrefsPage *_page, GtkWindow *window, spinbtn_linewrap_adj = gtk_adjustment_new (72, 20, 1024, 1, 10, 10); spinbtn_linewrap = gtk_spin_button_new (GTK_ADJUSTMENT (spinbtn_linewrap_adj), 1, 0); + gtk_widget_set_size_request (spinbtn_linewrap, 64, -1); gtk_widget_show (spinbtn_linewrap); gtk_box_pack_start (GTK_BOX (hbox1), spinbtn_linewrap, FALSE, FALSE, 0); + gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_linewrap), TRUE); label_linewrap = gtk_label_new (_("characters")); gtk_widget_show (label_linewrap); gtk_box_pack_start (GTK_BOX (hbox1), label_linewrap, FALSE, FALSE, 0); - + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_autowrap), prefs_common.autowrap); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_wrapatsend), @@ -135,7 +119,7 @@ void prefs_wrapping_create_widget(PrefsPage *_page, GtkWindow *window, prefs_wrapping->checkbtn_autowrap = checkbtn_autowrap; prefs_wrapping->checkbtn_wrapatsend = checkbtn_wrapatsend; - prefs_wrapping->page.widget = table; + prefs_wrapping->page.widget = vbox1; } void prefs_wrapping_save(PrefsPage *_page)