From e74cf7f058b91deff2401bf53926b16bd18d682f Mon Sep 17 00:00:00 2001 From: Paul Mangan Date: Sat, 30 Aug 2003 04:52:49 +0000 Subject: [PATCH] reduce GUI clutter by placing hints into tooltips --- ChangeLog.claws | 7 ++++ configure.ac | 2 +- src/prefs_common.c | 77 ++++++++++++++++++++-------------------- src/prefs_spelling.c | 15 +++----- src/prefs_spelling.glade | 66 +++++++++++----------------------- 5 files changed, 72 insertions(+), 95 deletions(-) diff --git a/ChangeLog.claws b/ChangeLog.claws index 992e8b2e6..5dc1d3696 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,10 @@ +2003-08-30 [paul] 0.9.4claws44 + + * src/prefs_common.c + src/prefs_spelling.c + src/prefs_spelling.glade + reduce GUI clutter by placing hints into tooltips + 2003-08-29 [christoph] 0.9.4claws43 * configure.ac diff --git a/configure.ac b/configure.ac index a0d1325a9..4e1abe0b2 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=4 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=43 +EXTRA_VERSION=44 if test $EXTRA_VERSION -eq 0; then VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws else diff --git a/src/prefs_common.c b/src/prefs_common.c index 847c5dec9..d0131d5e3 100644 --- a/src/prefs_common.c +++ b/src/prefs_common.c @@ -1299,10 +1299,10 @@ static void prefs_send_create(void) GtkWidget *optmenu_charset; GtkWidget *optmenu_menu; GtkWidget *menuitem; - GtkWidget *label_charset_desc; + GtkTooltips *charset_tooltip; GtkWidget *optmenu_encoding; GtkWidget *label_encoding; - GtkWidget *label_encoding_desc; + GtkTooltips *encoding_tooltip; GtkWidget *label_senddialog; GtkWidget *menu; GtkWidget *optmenu_senddialog; @@ -1377,9 +1377,15 @@ static void prefs_send_create(void) gtk_widget_show (label_outcharset); gtk_box_pack_start (GTK_BOX (hbox1), label_outcharset, FALSE, FALSE, 0); + charset_tooltip = gtk_tooltips_new(); + optmenu_charset = gtk_option_menu_new (); gtk_widget_show (optmenu_charset); - gtk_box_pack_start (GTK_BOX (hbox1), optmenu_charset, FALSE, FALSE, 0); + gtk_tooltips_set_tip(GTK_TOOLTIPS(charset_tooltip), optmenu_charset, + _("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); optmenu_menu = gtk_menu_new (); @@ -1430,15 +1436,6 @@ static void prefs_send_create(void) gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0); - label_charset_desc = gtk_label_new - (_("If `Automatic' is selected, the optimal encoding\n" - "for the current locale will be used.")); - gtk_widget_show (label_charset_desc); - gtk_box_pack_start (GTK_BOX (hbox1), label_charset_desc, - FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (label_charset_desc), - GTK_JUSTIFY_LEFT); - hbox1 = gtk_hbox_new (FALSE, 8); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0); @@ -1447,9 +1444,15 @@ static void prefs_send_create(void) gtk_widget_show (label_encoding); gtk_box_pack_start (GTK_BOX (hbox1), label_encoding, FALSE, FALSE, 0); + encoding_tooltip = gtk_tooltips_new(); + optmenu_encoding = gtk_option_menu_new (); gtk_widget_show (optmenu_encoding); - gtk_box_pack_start (GTK_BOX (hbox1), optmenu_encoding, FALSE, FALSE, 0); + gtk_tooltips_set_tip(GTK_TOOLTIPS(encoding_tooltip), optmenu_encoding, + _("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); optmenu_menu = gtk_menu_new (); @@ -1465,15 +1468,6 @@ static void prefs_send_create(void) gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0); - label_encoding_desc = gtk_label_new - (_("Specify Content-Transfer-Encoding used when\n" - "message body contains non-ASCII characters.")); - gtk_widget_show (label_encoding_desc); - gtk_box_pack_start (GTK_BOX (hbox1), label_encoding_desc, - FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (label_encoding_desc), - GTK_JUSTIFY_LEFT); - p_send.checkbtn_extsend = checkbtn_extsend; p_send.entry_extsend = entry_extsend; /* p_send.button_extsend = button_extsend; */ @@ -2263,6 +2257,7 @@ static void prefs_privacy_create(void) GtkWidget *checkbtn_store_passphrase; GtkObject *spinbtn_store_passphrase_adj; GtkWidget *spinbtn_store_passphrase; + GtkTooltips *store_tooltip; GtkWidget *checkbtn_passphrase_grab; GtkWidget *checkbtn_gpg_warning; @@ -2301,11 +2296,17 @@ static void prefs_privacy_create(void) gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox1), label, FALSE, FALSE, 0); + store_tooltip = gtk_tooltips_new(); + spinbtn_store_passphrase_adj = gtk_adjustment_new (0, 0, 1440, 1, 5, 5); spinbtn_store_passphrase = gtk_spin_button_new (GTK_ADJUSTMENT (spinbtn_store_passphrase_adj), 1, 0); gtk_widget_show (spinbtn_store_passphrase); - gtk_box_pack_start (GTK_BOX (hbox1), spinbtn_store_passphrase, FALSE, FALSE, 0); + gtk_tooltips_set_tip(GTK_TOOLTIPS(store_tooltip), spinbtn_store_passphrase, + _("Setting to '0' will store the passphrase" + " for the whole session"), + NULL); + gtk_box_pack_start (GTK_BOX (hbox1), spinbtn_store_passphrase, FALSE, FALSE, 0); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_store_passphrase), TRUE); gtk_widget_set_usize (spinbtn_store_passphrase, 64, -1); @@ -2323,12 +2324,6 @@ static void prefs_privacy_create(void) gtk_box_pack_start (GTK_BOX (hbox1), hbox_spc, FALSE, FALSE, 0); gtk_widget_set_usize (hbox_spc, 12, -1); - label = gtk_label_new (_("(Setting to '0' will store the passphrase\n" - " for the whole session)")); - gtk_widget_show (label); - gtk_box_pack_start (GTK_BOX (hbox1), label, FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); - SET_TOGGLE_SENSITIVITY (checkbtn_store_passphrase, vbox3); #ifndef __MINGW32__ @@ -2367,6 +2362,7 @@ static void prefs_interface_create(void) GtkWidget *checkbtn_mark_as_read_on_newwin; GtkWidget *checkbtn_openinbox; GtkWidget *checkbtn_immedexec; + GtkTooltips *immedexec_tooltip; GtkWidget *hbox1; GtkWidget *label; GtkWidget *menu; @@ -2418,21 +2414,20 @@ static void prefs_interface_create(void) gtk_widget_show (vbox3); gtk_box_pack_start (GTK_BOX (vbox2), vbox3, FALSE, FALSE, 0); + immedexec_tooltip = gtk_tooltips_new(); + PACK_CHECK_BUTTON (vbox3, checkbtn_immedexec, _("Execute immediately when moving or deleting messages")); + gtk_tooltips_set_tip(GTK_TOOLTIPS(immedexec_tooltip), checkbtn_immedexec, + _("Messages will be marked until execution" + " if this is turned off"), + NULL); hbox1 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (vbox3), hbox1, FALSE, FALSE, 0); - label = gtk_label_new - (_("(Messages will be marked until execution\n" - " if this is turned off)")); - gtk_widget_show (label); - gtk_box_pack_start (GTK_BOX (hbox1), label, FALSE, FALSE, 8); - gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); - /* Next Unread Message Dialog */ hbox_nextunreadmsgdialog = gtk_hbox_new (FALSE, 8); gtk_widget_show (hbox1); @@ -2522,6 +2517,7 @@ static void prefs_other_create(void) GtkWidget *checkbtn_cliplog; GtkWidget *loglength_label; GtkWidget *loglength_entry; + GtkTooltips *loglength_tooltip; GtkWidget *frame_exit; GtkWidget *vbox_exit; @@ -2642,12 +2638,17 @@ static void prefs_other_create(void) gtk_box_pack_start (GTK_BOX (hbox_cliplog), loglength_label, FALSE, TRUE, 0); gtk_widget_show (GTK_WIDGET (loglength_label)); + + loglength_tooltip = gtk_tooltips_new(); + loglength_entry = gtk_entry_new (); gtk_widget_set_usize (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)); - loglength_label = gtk_label_new (_("(0 to stop logging in the log window)")); + gtk_tooltips_set_tip(GTK_TOOLTIPS(loglength_tooltip), loglength_entry, + _("0 to stop logging in the log window"), + NULL); gtk_box_pack_start (GTK_BOX (hbox_cliplog), loglength_label, FALSE, TRUE, 0); SET_TOGGLE_SENSITIVITY(checkbtn_cliplog, loglength_entry); @@ -2710,7 +2711,7 @@ static void prefs_other_create(void) gtk_widget_set_usize (spinbtn_iotimeout, 64, -1); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_iotimeout), TRUE); - label_iotimeout = gtk_label_new (_("second(s)")); + label_iotimeout = gtk_label_new (_("seconds")); gtk_widget_show (label_iotimeout); gtk_box_pack_start (GTK_BOX (hbox1), label_iotimeout, FALSE, FALSE, 0); diff --git a/src/prefs_spelling.c b/src/prefs_spelling.c index b0ae2455e..6198e1477 100644 --- a/src/prefs_spelling.c +++ b/src/prefs_spelling.c @@ -139,7 +139,6 @@ void prefs_spelling_create_widget(PrefsPage *_page, GtkWindow *window, gpointer GtkWidget *checkbtn_enable_aspell; GtkWidget *checkbtn_check_while_typing; GtkWidget *checkbtn_use_alternate; - GtkWidget *label1; GtkWidget *label2; GtkWidget *entry_aspell_path; GtkWidget *label3; @@ -152,6 +151,9 @@ void prefs_spelling_create_widget(PrefsPage *_page, GtkWindow *window, gpointer GtkWidget *btn_aspell_path; GtkWidget *hbox1; GtkWidget *misspelled_btn; + GtkTooltips *tooltips; + + tooltips = gtk_tooltips_new (); table = gtk_table_new(8, 3, FALSE); gtk_widget_show(table); @@ -180,15 +182,8 @@ void prefs_spelling_create_widget(PrefsPage *_page, GtkWindow *window, gpointer gtk_table_attach(GTK_TABLE(table), checkbtn_use_alternate, 0, 3, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); - - label1 = - gtk_label_new(_ - ("Enabling an alternate dictionary makes switching\nwith the last used dictionary faster")); - gtk_widget_show(label1); - gtk_table_attach(GTK_TABLE(table), label1, 0, 3, 3, 4, - (GtkAttachOptions) (GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - gtk_misc_set_alignment(GTK_MISC(label1), 7.45058e-09, 0.5); + gtk_tooltips_set_tip (tooltips, checkbtn_use_alternate, + _("Faster switching with last used dictionary"), NULL); label2 = gtk_label_new(_("Dictionaries path:")); gtk_widget_show(label2); diff --git a/src/prefs_spelling.glade b/src/prefs_spelling.glade index e018f4c20..4c2fc1d11 100644 --- a/src/prefs_spelling.glade +++ b/src/prefs_spelling.glade @@ -30,7 +30,7 @@ GtkTable table 8 - 8 + 7 3 False 4 @@ -85,6 +85,7 @@ GtkCheckButton checkbtn_use_alternate + Faster switching with last used dictionary True False @@ -105,33 +106,6 @@ - - GtkLabel - label1 - - GTK_JUSTIFY_CENTER - False - 7.45058e-09 - 0.5 - 0 - 0 - - 0 - 3 - 3 - 4 - 0 - 0 - False - False - False - False - True - False - - - GtkLabel label2 @@ -145,8 +119,8 @@ with the last used dictionary faster 0 1 - 4 - 5 + 3 + 4 0 0 False @@ -169,8 +143,8 @@ with the last used dictionary faster 1 2 - 4 - 5 + 3 + 4 0 0 True @@ -195,8 +169,8 @@ with the last used dictionary faster 0 1 - 5 - 6 + 4 + 5 0 0 False @@ -217,8 +191,8 @@ with the last used dictionary faster 1 3 - 5 - 6 + 4 + 5 0 0 False @@ -243,8 +217,8 @@ with the last used dictionary faster 0 1 - 6 - 7 + 5 + 6 0 0 False @@ -265,8 +239,8 @@ with the last used dictionary faster 1 3 - 6 - 7 + 5 + 6 0 0 False @@ -291,8 +265,8 @@ with the last used dictionary faster 0 1 - 7 - 8 + 6 + 7 0 0 False @@ -313,8 +287,8 @@ with the last used dictionary faster 2 3 - 4 - 5 + 3 + 4 0 0 False @@ -334,8 +308,8 @@ with the last used dictionary faster 1 2 - 7 - 8 + 6 + 7 0 0 False -- 2.25.1