2005-09-20 [colin] 1.9.14cvs45
authorColin Leroy <colin@colino.net>
Tue, 20 Sep 2005 17:24:22 +0000 (17:24 +0000)
committerColin Leroy <colin@colino.net>
Tue, 20 Sep 2005 17:24:22 +0000 (17:24 +0000)
* src/mainwindow.c
* src/messageview.c
GUI fixups: add accels, set message
view title to displayed mail's subject
* src/prefs_spelling.c
* src/gtk/gtkaspell.c
GUI fixups: allow underlining misspelled
words instead of coloring them (a11y!)

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/gtk/gtkaspell.c
src/mainwindow.c
src/messageview.c
src/prefs_spelling.c

index ce4080a1e2a8547655a211bc1ffd0462a52c08e7..102325bf2ed1ca45962cabcb384ea8bd94589306 100644 (file)
@@ -1,3 +1,14 @@
+2005-09-20 [colin]     1.9.14cvs45
+
+       * src/mainwindow.c
+       * src/messageview.c
+               GUI fixups: add accels, set message
+               view title to displayed mail's subject
+       * src/prefs_spelling.c
+       * src/gtk/gtkaspell.c
+               GUI fixups: allow underlining misspelled
+               words instead of coloring them (a11y!)
+
 2005-09-19 [colin]
 
        1.9.15rc3 released
index 506b2ff5039e1581a2904a127ccc0ee3d13491be..f8ac7440d5854fa5e04b3c43e671efd7961867b9 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.65.2.36 -r 1.65.2.37 src/codeconv.c;  cvs diff -u -r 1.15.2.10 -r 1.15.2.11 src/codeconv.h;  cvs diff -u -r 1.49.2.61 -r 1.49.2.62 src/procmime.c;  ) > 1.9.14cvs42.patchset
 ( cvs diff -u -r 1.60.2.30 -r 1.60.2.31 src/addressbook.c;  cvs diff -u -r 1.382.2.171 -r 1.382.2.172 src/compose.c;  cvs diff -u -r 1.3.2.10 -r 1.3.2.11 src/exphtmldlg.c;  cvs diff -u -r 1.1.4.12 -r 1.1.4.13 src/expldifdlg.c;  cvs diff -u -r 1.179.2.70 -r 1.179.2.71 src/imap.c;  cvs diff -u -r 1.1.2.19 -r 1.1.2.20 src/imap_gtk.c;  cvs diff -u -r 1.14.2.4 -r 1.14.2.5 src/importldif.c;  cvs diff -u -r 1.4.12.6 -r 1.4.12.7 src/importmutt.c;  cvs diff -u -r 1.1.14.6 -r 1.1.14.7 src/importpine.c;  cvs diff -u -r 1.149.2.32 -r 1.149.2.33 src/inc.c;  cvs diff -u -r 1.29.2.5 -r 1.29.2.6 src/inc.h;  cvs diff -u -r 1.94.2.62 -r 1.94.2.63 src/messageview.c;  cvs diff -u -r 1.101.2.14 -r 1.101.2.15 src/news.c;  cvs diff -u -r 1.2.2.9 -r 1.2.2.10 src/news_gtk.c;  cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/news_gtk.h;  cvs diff -u -r 1.105.2.34 -r 1.105.2.35 src/prefs_account.c;  cvs diff -u -r 1.49.2.14 -r 1.49.2.15 src/prefs_account.h;  cvs diff -u -r 1.17.2.17 -r 1.17.2.18 src/send_message.c;  cvs diff -u -r 1.2 -r 1.3 src/common/ssl.h;  cvs diff -u -r 1.9.2.24 -r 1.9.2.25 src/gtk/gtkaspell.c;  ) > 1.9.14cvs43.patchset
 ( cvs diff -u -r 1.382.2.172 -r 1.382.2.173 src/compose.c;  cvs diff -u -r 1.9.2.25 -r 1.9.2.26 src/gtk/gtkaspell.c;  ) > 1.9.14cvs44.patchset
+( cvs diff -u -r 1.274.2.66 -r 1.274.2.67 src/mainwindow.c;  cvs diff -u -r 1.94.2.63 -r 1.94.2.64 src/messageview.c;  cvs diff -u -r 1.5.2.11 -r 1.5.2.12 src/prefs_spelling.c;  cvs diff -u -r 1.9.2.26 -r 1.9.2.27 src/gtk/gtkaspell.c;  ) > 1.9.14cvs45.patchset
index 33b9715d7bbd89e86366ec022ab0f4e6847e8c7d..ba3640eebc826195935ca1f5194c330bba5116c9 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=14
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=44
+EXTRA_VERSION=45
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index f1c00f368f7489ec158dc4a6bcd146f6a02f2df2..ad834db0cb8e6abd7feaeea78c99c3cea182db46 100644 (file)
@@ -2401,8 +2401,13 @@ static void allocate_color(GtkAspell *gtkaspell, gint rgbvalue)
        color->blue  = (int) (((gdouble) (rgbvalue & 0x0000ff)        / 255.0)
                        * 65535.0);
 
-       gtk_text_buffer_create_tag(buffer, "misspelled",
+       if (rgbvalue != 0)
+               gtk_text_buffer_create_tag(buffer, "misspelled",
                                   "foreground-gdk", color, NULL);
+       else
+               gtk_text_buffer_create_tag(buffer, "misspelled",
+                                  "underline", PANGO_UNDERLINE_ERROR, NULL);
+
 }
 
 static void change_color(GtkAspell * gtkaspell, 
index 745c19a1b3631ebc21a7f821b11a74ef16b48912..4e0ae96e3ecbcc063622ea8582f1542a0442fe32 100644 (file)
@@ -461,7 +461,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_File/Empty all _Trash folders"), "<shift>D", empty_trash_cb, 0, NULL},
        {N_("/_File/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_File/_Save as..."),              "<control>S", save_as_cb, 0, NULL},
-       {N_("/_File/_Print..."),                NULL, print_cb, 0, NULL},
+       {N_("/_File/_Print..."),                "<control>P", print_cb, 0, NULL},
        {N_("/_File/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_File/_Work offline"),            "<control>W", toggle_work_offline_cb, 0, "<ToggleItem>"},
        {N_("/_File/---"),                      NULL, NULL, 0, "<Separator>"},
index caef7454830ddc62c326cb44d3bd710a41543712..721356b217f18969c19663e0051b4f42ac6b576e 100644 (file)
@@ -154,17 +154,17 @@ static GList *msgview_list = NULL;
 static GtkItemFactoryEntry msgview_entries[] =
 {
        {N_("/_File"),                  NULL, NULL, 0, "<Branch>"},
-       {N_("/_File/_Save as..."),      NULL, save_as_cb, 0, NULL},
-       {N_("/_File/_Print..."),        NULL, print_cb, 0, NULL},
+       {N_("/_File/_Save as..."),      "<control>S", save_as_cb, 0, NULL},
+       {N_("/_File/_Print..."),        "<control>P", print_cb, 0, NULL},
        {N_("/_File/---"),              NULL, NULL, 0, "<Separator>"},
-       {N_("/_File/_Close"),           NULL, close_cb, 0, NULL},
+       {N_("/_File/_Close"),           "<control>W", close_cb, 0, NULL},
 
        {N_("/_Edit"),                  NULL, NULL, 0, "<Branch>"},
-       {N_("/_Edit/_Copy"),            NULL, copy_cb, 0, NULL},
-       {N_("/_Edit/Select _all"),      NULL, allsel_cb, 0, NULL},
+       {N_("/_Edit/_Copy"),            "<control>C", copy_cb, 0, NULL},
+       {N_("/_Edit/Select _all"),      "<control>A", allsel_cb, 0, NULL},
        {N_("/_Edit/---"),              NULL, NULL, 0, "<Separator>"},
        {N_("/_Edit/_Find in current message..."),
-                                       NULL, search_cb, 0, NULL},
+                                       "<control>F", search_cb, 0, NULL},
 
        {N_("/_View"),                  NULL, NULL, 0, "<Branch>"},
 
@@ -266,22 +266,22 @@ static GtkItemFactoryEntry msgview_entries[] =
 #undef DEC_ACTION
 
        {N_("/_View/---"),              NULL, NULL, 0, "<Separator>"},
-       {N_("/_View/Mess_age source"),  NULL, view_source_cb, 0, NULL},
-       {N_("/_View/Show all _headers"),NULL, show_all_header_cb, 0, "<ToggleItem>"},
+       {N_("/_View/Mess_age source"),  "<control>U", view_source_cb, 0, NULL},
+       {N_("/_View/Show all _headers"),"<control>H", show_all_header_cb, 0, "<ToggleItem>"},
 
        {N_("/_Message"),               NULL, NULL, 0, "<Branch>"},
        {N_("/_Message/Compose _new message"),
-                                       NULL, compose_cb, 0, NULL},
+                                       "<control>M", compose_cb, 0, NULL},
        {N_("/_Message/---"),           NULL, NULL, 0, "<Separator>"},
-       {N_("/_Message/_Reply"),        NULL, reply_cb, COMPOSE_REPLY, NULL},
+       {N_("/_Message/_Reply"),        "<control>R", reply_cb, COMPOSE_REPLY, NULL},
        {N_("/_Message/Repl_y to/_all"),
-                                       NULL, reply_cb, COMPOSE_REPLY_TO_ALL, NULL},
+                                       "<control><shift>R", reply_cb, COMPOSE_REPLY_TO_ALL, NULL},
        {N_("/_Message/Repl_y to/_sender"),
                                        NULL, reply_cb, COMPOSE_REPLY_TO_SENDER, NULL},
        {N_("/_Message/Repl_y to/mailing _list"),
-                                       NULL, reply_cb, COMPOSE_REPLY_TO_LIST, NULL},
+                                       "<control>L", reply_cb, COMPOSE_REPLY_TO_LIST, NULL},
        {N_("/_Message/---"),           NULL, NULL, 0, "<Separator>"},
-       {N_("/_Message/_Forward"),      NULL, reply_cb, COMPOSE_FORWARD, NULL},
+       {N_("/_Message/_Forward"),      "<control><alt>F", reply_cb, COMPOSE_FORWARD, NULL},
        {N_("/_Message/For_ward as attachment"),
                                        NULL, reply_cb, COMPOSE_FORWARD_AS_ATTACH, NULL},
        {N_("/_Message/Redirec_t"),     NULL, reply_cb, COMPOSE_REDIRECT, NULL},
@@ -289,7 +289,7 @@ static GtkItemFactoryEntry msgview_entries[] =
        {N_("/_Message/Re-_edit"),      NULL, reedit_cb, 0, NULL},
 
        {N_("/_Tools"),                 NULL, NULL, 0, "<Branch>"},
-       {N_("/_Tools/_Address book"),   NULL, addressbook_open_cb, 0, NULL},
+       {N_("/_Tools/_Address book"),   "<control><shift>A", addressbook_open_cb, 0, NULL},
        {N_("/_Tools/Add sender to address boo_k"),
                                        NULL, add_address_cb, 0, NULL},
        {N_("/_Tools/---"),             NULL, NULL, 0, "<Separator>"},
@@ -739,7 +739,7 @@ gint messageview_show(MessageView *messageview, MsgInfo *msginfo,
 {
        gchar *file;
        MimeInfo *mimeinfo, *encinfo;
-
+       gchar *subject = NULL;
        g_return_val_if_fail(msginfo != NULL, -1);
 
        mimeinfo = procmime_scan_message(msginfo);
@@ -774,6 +774,24 @@ gint messageview_show(MessageView *messageview, MsgInfo *msginfo,
                        messageview->all_headers);
 
        mimeview_show_message(messageview->mimeview, mimeinfo, file);
+       
+       if (messageview->window)
+               gtk_window_set_title(GTK_WINDOW(messageview->window), 
+                               _("Sylpheed - Message View"));
+       if (messageview->window && msginfo->subject) {
+               subject = g_strdup(msginfo->subject);
+               if (!g_utf8_validate(subject, -1, NULL)) {
+                       g_free(subject);
+                       subject = g_malloc(strlen(msginfo->subject)*2 +1);
+                       conv_localetodisp(subject, strlen(msginfo->subject)*2 +1, 
+                               msginfo->subject);
+               }
+               if (g_utf8_validate(subject, -1, NULL))
+                       gtk_window_set_title(GTK_WINDOW(messageview->window), 
+                               subject);
+               g_free(subject);
+       }
+
        messageview_set_position(messageview, 0);
 
        if (messageview->msginfo->partial_recv)
index 9fcffc4bfc7238ff99ddfa815a948dd450bc4d5e..914c3ac0a67cdd1aae479f59b8cd236f403c5616 100644 (file)
@@ -152,6 +152,8 @@ void prefs_spelling_create_widget(PrefsPage *_page, GtkWindow *window, gpointer
        GtkWidget *hbox1;
        GtkWidget *misspelled_btn;
        GtkTooltips *tooltips;
+       PangoFontDescription *font_desc;
+       gint size;
 
        tooltips = gtk_tooltips_new ();
 
@@ -258,6 +260,18 @@ void prefs_spelling_create_widget(PrefsPage *_page, GtkWindow *window, gpointer
        gtk_box_pack_start(GTK_BOX(hbox1), misspelled_btn, FALSE, FALSE,
                           0);
        gtk_widget_set_size_request(misspelled_btn, 30, 20);
+       label5 = gtk_label_new(_("(Black to use underline)"));
+       gtk_misc_set_alignment(GTK_MISC(label5), 0, 0.5);
+       gtk_label_set_justify(GTK_LABEL(label4), GTK_JUSTIFY_LEFT);
+       gtk_widget_show(label5);
+       font_desc = pango_font_description_new();
+       size = pango_font_description_get_size
+               (label5->style->font_desc);
+       pango_font_description_set_size(font_desc, size * PANGO_SCALE_SMALL);
+       gtk_widget_modify_font(label5, font_desc);
+       pango_font_description_free(font_desc);
+       gtk_box_pack_start(GTK_BOX(hbox1), label5, FALSE, FALSE,
+                          4);
        /* END GLADE CODE */
 
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_enable_aspell),