sync with sylpheed 0.7.0cvs15
authorPaul Mangan <paul@claws-mail.org>
Wed, 23 Jan 2002 11:05:35 +0000 (11:05 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 23 Jan 2002 11:05:35 +0000 (11:05 +0000)
AUTHORS
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/compose.c
src/folderview.c
src/gtkstext.c
src/summaryview.c

diff --git a/AUTHORS b/AUTHORS
index 91c34c7..78aa1d5 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -109,3 +109,4 @@ contributors (beside the above; based on Changelog)
        Watanabe
        Masaaki Noro
        Motonobu Ichimura
+       Luca Rosellini
index 5fee723..8642ac1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+2002-01-23
+
+       * src/compose.c
+         src/gtkstext.[ch]: removed the hardcoded shortcuts in GtkSText,
+         and made them customizable.
+
+2002-01-22
+
+       * src/compose.c: enabled 'Ctrl-Enter' or
+         'Ctrl-(other modifier keys)-Enter' shortcut that didn't work
+         before.
+       * src/gtkstext.c: disabled some Emacs key bindings.
+         gtk_stext_key_press(): don't extend selection when Shift-Enter
+         is pressed to prevent the disapperance of cursor.
+       * src/summaryview.c: summary_select_next_unread(): added the button
+         to search unread message again from the beginning to the dialog.
+       * src/folderview.c: folderview_key_pressed(): go to next unread
+         folder if space key is pressed on the empty folder.
+         Move CTree focus before selecting row.
+
+2002-01-21
+
+       * src/defs.h: modified the XLFD of default fonts.
+       * src/textview.c: textview_create(): fixed a bug that caused
+         segfault if font couldn't be loaded.
+       * src/folderview.c
+         src/grouplistdialog.c: compare subscribed groups with path.
+       * src/prefs_filter.c: changed 'Operator' to 'Condition'.
+
+2002-01-20
+
+       * src/compose.c: compose_wrap_line_all(): fixed wrapping crash
+         when URL is wider than wrapping margin.
+       * src/mainwindow.c
+         src/prefs_filter.[ch]
+         src/summaryview.[ch]: added "Create filter rule" function based
+         on the patch from Luca Rosellini.
+       * src/summaryview.c: summary_filter_open(): added X-List and
+         X-Mailing-list to the automatically detected headers.
+
 2002-01-18
 
        * configure.in: support Mac OS X (Darwin).
index 513c895..08b21e5 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-23 [paul]      0.7.0claws22
+
+       * sync with sylpheed 0.7.0cvs15
+               see ChangeLog entries 2002-01-22 and 2002-01-23
+
 2002-01-21 [melvin]    0.7.0claws21
 
        * src/prefs_scoring.c
index 36c39e8..2bf02fe 100644 (file)
@@ -1,3 +1,42 @@
+2002-01-23
+
+       * src/compose.c
+         src/gtkstext.[ch]: GtkSText Ãæ¤Î¥Ï¡¼¥É¥³¡¼¥É¤µ¤ì¤Æ¤¤¤ë¥·¥ç¡¼¥È
+         ¥«¥Ã¥È¤òºï½ü¤·¡¢¥«¥¹¥¿¥Þ¥¤¥º²Äǽ¤Ë¤·¤¿¡£
+
+2002-01-22
+
+       * src/compose.c: °ÊÁ°Æ°ºî¤·¤Æ¤¤¤Ê¤«¤Ã¤¿ 'Ctrl-Enter' ¤È
+         'Ctrl-(½¤¾þ¥­¡¼)-Enter' ¥·¥ç¡¼¥È¥«¥Ã¥È¤òÍ­¸ú¤Ë¤·¤¿¡£
+       * src/gtkstext.c: ¤¤¤¯¤Ä¤«¤Î Emacs ¥­¡¼¥Ð¥¤¥ó¥É¤ò̵¸ú¤Ë¤·¤¿¡£
+         gtk_stext_key_press(): ¥«¡¼¥½¥ë¤Î¾ÃÌǤòËɤ°¤¿¤á¤Ë Shift-Enter
+         ¤¬²¡¤µ¤ì¤¿¤È¤­¤ÏÁªÂòÉô¤ò¿­Ä¹¤·¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£
+       * src/summaryview.c: summary_select_next_unread(): »Ï¤á¤«¤é̤ÆÉ
+         ¥á¥Ã¥»¡¼¥¸¤òºÆ¸¡º÷¤¹¤ë¥Ü¥¿¥ó¤ò¥À¥¤¥¢¥í¥°¤ËÄɲá£
+       * src/folderview.c: folderview_key_pressed(): ¶õ¥Õ¥©¥ë¥À¾å¤Ç
+         ¥¹¥Ú¡¼¥¹¥­¡¼¤¬²¡¤µ¤ì¤¿¤é¼¡¤Î̤ÆÉ¥Õ¥©¥ë¥À¤Ø°ÜÆ°¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+         ¹Ô¤òÁªÂò¤¹¤ëÁ°¤Ë CTree ¤Î¥Õ¥©¡¼¥«¥¹¤ò°ÜÆ°¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
+2002-01-21
+
+       * src/defs.h: modified the XLFD of default fonts.
+       * src/textview.c: textview_create(): ¥Õ¥©¥ó¥È¤òÆɤ߹þ¤á¤Ê¤¤¾ì¹ç
+         segfault ¤òµ¯¤³¤¹¥Ð¥°¤ò½¤Àµ¡£
+       * src/folderview.c
+         src/grouplistdialog.c: ¹ØÆÉ¥°¥ë¡¼¥×¤ò path ¤ÇÈæ³Ó¡£
+       * src/prefs_filter.c: ¡Ö±é»»»Ò¡×¤ò¡Ö¾ò·ï¡×¤ËÊѹ¹¡£
+
+2002-01-20
+
+       * src/compose.c: compose_wrap_line_all(): URL ¤¬²þ¹Ô¥Þ¡¼¥¸¥ó¤è¤ê
+         Ä¹¤¤¤È¤­¤Î¥¯¥é¥Ã¥·¥å¤ò½¤Àµ¡£
+       * src/mainwindow.c
+         src/prefs_filter.[ch]
+         src/summaryview.[ch]: Luca Rosellini ¤µ¤ó¤Î¥Ñ¥Ã¥Á¤Ë´ð¤Å¤¤¤Æ
+         ¡Ö¿¶¤êʬ¤±¥ë¡¼¥ë¤òºîÀ®¡×µ¡Ç½¤òÄɲá£
+       * src/summaryview.c: summary_filter_open(): X-List ¤È X-Mailing-list
+         ¤ò¼«Æ°¸¡½Ð¤¹¤ë¥Ø¥Ã¥À¤ËÄɲá£
+
 2002-01-18
 
        * configure.in: Mac OS X (Darwin) ¤ËÂбþ¡£
index 106fc28..4af778e 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws21
+EXTRA_VERSION=claws22
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 6cb88f9..0a8fc29 100644 (file)
@@ -118,6 +118,25 @@ typedef enum
 
 #define N_ATTACH_COLS          3
 
+typedef enum
+{
+       COMPOSE_CALL_GTK_STEXT_MOVE_BEGINNING_OF_LINE,
+       COMPOSE_CALL_GTK_STEXT_MOVE_FORWARD_CHARACTER,
+       COMPOSE_CALL_GTK_STEXT_MOVE_BACKWARD_CHARACTER,
+       COMPOSE_CALL_GTK_STEXT_MOVE_FORWARD_WORD,
+       COMPOSE_CALL_GTK_STEXT_MOVE_BACKWARD_WORD,
+       COMPOSE_CALL_GTK_STEXT_MOVE_END_OF_LINE,
+       COMPOSE_CALL_GTK_STEXT_MOVE_NEXT_LINE,
+       COMPOSE_CALL_GTK_STEXT_MOVE_PREVIOUS_LINE,
+       COMPOSE_CALL_GTK_STEXT_DELETE_FORWARD_CHARACTER,
+       COMPOSE_CALL_GTK_STEXT_DELETE_BACKWARD_CHARACTER,
+       COMPOSE_CALL_GTK_STEXT_DELETE_FORWARD_WORD,
+       COMPOSE_CALL_GTK_STEXT_DELETE_BACKWARD_WORD,
+       COMPOSE_CALL_GTK_STEXT_DELETE_LINE,
+       COMPOSE_CALL_GTK_STEXT_DELETE_LINE_N,
+       COMPOSE_CALL_GTK_STEXT_DELETE_TO_LINE_END
+} ComposeCallGtkSTextAction;
+
 #define B64_LINE_SIZE          57
 #define B64_BUFFSIZE           77
 
@@ -330,25 +349,8 @@ static void compose_copy_cb                (Compose        *compose);
 static void compose_paste_cb           (Compose        *compose);
 static void compose_allsel_cb          (Compose        *compose);
 
-typedef enum {
-       COMPOSE_CALL_GTK_STEXT_MOVE_BEGINNING_OF_LINE,
-       COMPOSE_CALL_GTK_STEXT_MOVE_FORWARD_CHARACTER,
-       COMPOSE_CALL_GTK_STEXT_MOVE_BACKWARD_CHARACTER,
-       COMPOSE_CALL_GTK_STEXT_MOVE_FORWARD_WORD,
-       COMPOSE_CALL_GTK_STEXT_MOVE_BACKWARD_WORD,
-       COMPOSE_CALL_GTK_STEXT_MOVE_END_OF_LINE,
-       COMPOSE_CALL_GTK_STEXT_MOVE_NEXT_LINE,
-       COMPOSE_CALL_GTK_STEXT_MOVE_PREVIOUS_LINE,
-       COMPOSE_CALL_GTK_STEXT_DELETE_FORWARD_CHARACTER,
-       COMPOSE_CALL_GTK_STEXT_DELETE_BACKWARD_CHARACTER,
-       COMPOSE_CALL_GTK_STEXT_DELETE_FORWARD_WORD,
-       COMPOSE_CALL_GTK_STEXT_DELETE_BACKWARD_WORD,
-       COMPOSE_CALL_GTK_STEXT_DELETE_LINE,
-       COMPOSE_CALL_GTK_STEXT_DELETE_LINE_N,
-       COMPOSE_CALL_GTK_STEXT_DELETE_TO_LINE_END
-} ComposeCallGtkStextAction;
-
-static void compose_gtk_stext_action_cb        (Compose *compose, ComposeCallGtkStextAction action);
+static void compose_gtk_stext_action_cb        (Compose                   *compose,
+                                        ComposeCallGtkSTextAction  action);
 
 static void compose_grab_focus_cb      (GtkWidget      *widget,
                                         Compose        *compose);
@@ -448,12 +450,13 @@ void compose_headerentry_key_press_event_cb(GtkWidget            *entry,
 
 static void compose_show_first_last_header (Compose *compose, gboolean show_first);
 
-static void compose_ctl_enter_send_shortcut_cb(GtkWidget *w, Compose *compose);
 
 static void compose_check_backwards(Compose *compose);
 
 static void compose_check_forwards_go(Compose *compose);
 
+static void text_activated             (GtkWidget      *widget,
+                                        Compose        *compose);
 
 
 static GtkItemFactoryEntry compose_popup_entries[] =
@@ -471,7 +474,7 @@ static GtkItemFactoryEntry compose_entries[] =
        {N_("/_File/_Insert file"),             "<control>I", compose_insert_file_cb, 0, NULL},
        {N_("/_File/Insert si_gnature"),        "<control>G", compose_insert_sig,     0, NULL},
        {N_("/_File/---"),                      NULL, NULL, 0, "<Separator>"},
-       {N_("/_File/_Close"),                   "<control>Q", compose_close_cb, 0, NULL},
+       {N_("/_File/_Close"),                   "<control>W", compose_close_cb, 0, NULL},
 
        {N_("/_Edit"),                  NULL, NULL, 0, "<Branch>"},
        {N_("/_Edit/_Undo"),            "<control>Z", compose_undo_cb, 0, NULL},
@@ -481,23 +484,77 @@ static GtkItemFactoryEntry compose_entries[] =
        {N_("/_Edit/_Copy"),            "<control>C", compose_copy_cb,   0, NULL},
        {N_("/_Edit/_Paste"),           "<control>V", compose_paste_cb,  0, NULL},
        {N_("/_Edit/Select _all"),      "<control>A", compose_allsel_cb, 0, NULL},
-       {N_("/_Edit/A_dvanced"),        NULL, NULL, 0,
-               "<Branch>"},
-       {N_("/_Edit/A_dvanced/Move a character backward"),      "<control>B", compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_MOVE_BACKWARD_CHARACTER, NULL},
-       {N_("/_Edit/A_dvanced/Move a character forward"),       "<control>F", compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_MOVE_FORWARD_CHARACTER, NULL},
-       {N_("/_Edit/A_dvanced/Move a word backward"),   "<alt>B", compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_MOVE_BACKWARD_WORD, NULL},
-       {N_("/_Edit/A_dvanced/Move a word forward"),    "<alt>F", compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_MOVE_FORWARD_WORD, NULL},
-       {N_("/_Edit/A_dvanced/Move to beginning of line"),      NULL, compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_MOVE_BEGINNING_OF_LINE, NULL},
-       {N_("/_Edit/A_dvanced/Move to end of line"),    "<control>E", compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_MOVE_END_OF_LINE, NULL},
-       {N_("/_Edit/A_dvanced/Move to next line"),      "<control>N", compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_MOVE_NEXT_LINE, NULL},
-       {N_("/_Edit/A_dvanced/Move to previous line"),  "<control>P", compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_MOVE_PREVIOUS_LINE, NULL},
-       {N_("/_Edit/A_dvanced/Delete a character backward"),    "<control>H", compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_DELETE_BACKWARD_CHARACTER, NULL},
-       {N_("/_Edit/A_dvanced/Delete a character forward"),     "<control>D", compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_DELETE_FORWARD_CHARACTER, NULL},
-       {N_("/_Edit/A_dvanced/Delete a word backward"), "<control>w", compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_DELETE_BACKWARD_WORD, NULL},
-       {N_("/_Edit/A_dvanced/Delete a word forward"),  "<alt>D", compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_DELETE_FORWARD_WORD, NULL},
-       {N_("/_Edit/A_dvanced/Delete line"),    "<control>U", compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_DELETE_LINE, NULL},
-       {N_("/_Edit/A_dvanced/Delete line+"),   NULL, compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_DELETE_LINE_N, NULL},
-       {N_("/_Edit/A_dvanced/Delete to end of line"),  "<control>K", compose_gtk_stext_action_cb, COMPOSE_CALL_GTK_STEXT_DELETE_TO_LINE_END, NULL},
+       {N_("/_Edit/A_dvanced"),        NULL, NULL, 0, "<Branch>"},
+       {N_("/_Edit/A_dvanced/Move a character backward"),
+                                       "<control>B",
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_MOVE_BACKWARD_CHARACTER,
+                                       NULL},
+       {N_("/_Edit/A_dvanced/Move a character forward"),
+                                       "<control>F",
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_MOVE_FORWARD_CHARACTER,
+                                       NULL},
+       {N_("/_Edit/A_dvanced/Move a word backward"),
+                                       NULL, /* "<alt>B" */
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_MOVE_BACKWARD_WORD,
+                                       NULL},
+       {N_("/_Edit/A_dvanced/Move a word forward"),
+                                       NULL, /* "<alt>F" */
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_MOVE_FORWARD_WORD,
+                                       NULL},
+       {N_("/_Edit/A_dvanced/Move to beginning of line"),
+                                       NULL, /* "<control>A" */
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_MOVE_BEGINNING_OF_LINE,
+                                       NULL},
+       {N_("/_Edit/A_dvanced/Move to end of line"),
+                                       "<control>E",
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_MOVE_END_OF_LINE,
+                                       NULL},
+       {N_("/_Edit/A_dvanced/Move to previous line"),
+                                       "<control>P",
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_MOVE_PREVIOUS_LINE,
+                                       NULL},
+       {N_("/_Edit/A_dvanced/Move to next line"),
+                                       "<control>N",
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_MOVE_NEXT_LINE,
+                                       NULL},
+       {N_("/_Edit/A_dvanced/Delete a character backward"),
+                                       "<control>H",
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_DELETE_BACKWARD_CHARACTER,
+                                       NULL},
+       {N_("/_Edit/A_dvanced/Delete a character forward"),
+                                       "<control>D",
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_DELETE_FORWARD_CHARACTER,
+                                       NULL},
+       {N_("/_Edit/A_dvanced/Delete a word backward"),
+                                       NULL, /* "<control>W" */
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_DELETE_BACKWARD_WORD,
+                                       NULL},
+       {N_("/_Edit/A_dvanced/Delete a word forward"),
+                                       "<alt>D",
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_DELETE_FORWARD_WORD,
+                                       NULL},
+       {N_("/_Edit/A_dvanced/Delete line"),
+                                       "<control>U",
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_DELETE_LINE,
+                                       NULL},
+       {N_("/_Edit/A_dvanced/Delete to end of line"),
+                                       "<control>K",
+                                       compose_gtk_stext_action_cb,
+                                       COMPOSE_CALL_GTK_STEXT_DELETE_TO_LINE_END,
+                                       NULL},
        {N_("/_Edit/---"),              NULL, NULL, 0, "<Separator>"},
 #if USE_PSPELL
        {N_("/_Edit/Check backwards misspelled word"),  "<control>;", compose_check_backwards , 0, NULL},
@@ -3947,7 +4004,7 @@ static void compose_create_header_entry(Compose *compose)
 
         gtk_signal_connect(GTK_OBJECT(entry), "key-press-event", GTK_SIGNAL_FUNC(compose_headerentry_key_press_event_cb), headerentry);
        gtk_signal_connect(GTK_OBJECT(entry), "changed", GTK_SIGNAL_FUNC(compose_headerentry_changed_cb), headerentry);
-       gtk_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(compose_ctl_enter_send_shortcut_cb), compose);
+       gtk_signal_connect(GTK_OBJECT(entry), "activate", GTK_SIGNAL_FUNC(text_activated), compose);
 
        address_completion_register_entry(GTK_ENTRY(entry));
 
@@ -4347,7 +4404,7 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
 
        subject_entry = gtk_entry_new();
        gtk_box_pack_start(GTK_BOX(subject), subject_entry, TRUE, TRUE, 2);
-       gtk_signal_connect(GTK_OBJECT(subject_entry), "activate", GTK_SIGNAL_FUNC(compose_ctl_enter_send_shortcut_cb), compose);
+       gtk_signal_connect(GTK_OBJECT(subject_entry), "activate", GTK_SIGNAL_FUNC(text_activated), compose);
        gtk_widget_show(subject_entry);
        compose->subject_entry = subject_entry;
        gtk_container_add(GTK_CONTAINER(subject_frame), subject);
@@ -4399,7 +4456,7 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
        gtk_signal_connect(GTK_OBJECT(text), "grab_focus",
                           GTK_SIGNAL_FUNC(compose_grab_focus_cb), compose);
        gtk_signal_connect(GTK_OBJECT(text), "activate",
-                          GTK_SIGNAL_FUNC(compose_ctl_enter_send_shortcut_cb), compose);
+                          GTK_SIGNAL_FUNC(text_activated), compose);
        gtk_signal_connect_after(GTK_OBJECT(text), "button_press_event",
                                 GTK_SIGNAL_FUNC(compose_button_press_cb),
                                 edit_vbox);
@@ -6101,7 +6158,7 @@ static void compose_move_beginning_of_line_cb(Compose *compose)
                gtk_stext_move_beginning_of_line(GTK_STEXT(compose->focused_editable));
 }
 
-static void compose_gtk_stext_action_cb        (Compose *compose, ComposeCallGtkStextAction action)
+static void compose_gtk_stext_action_cb(Compose *compose, ComposeCallGtkSTextAction action)
 {
        if (!(compose->focused_editable && GTK_WIDGET_HAS_FOCUS(compose->focused_editable))) return;
                
@@ -6543,25 +6600,38 @@ static void compose_show_first_last_header(Compose *compose, gboolean show_first
        gtk_adjustment_set_value(vadj, (show_first ? vadj->lower : vadj->upper));
 }
 
-static void compose_ctl_enter_send_shortcut_cb(GtkWidget *w, Compose *compose)
+static void text_activated(GtkWidget *widget, Compose *compose)
+{
+       compose_send_control_enter(compose);
+}
+
+static gboolean compose_send_control_enter(Compose *compose)
 {
+       GdkEvent *ev;
+       GdkEventKey *kev;
        GtkItemFactory *ifactory;
-       GtkAccelEntry  *accel;
-       GtkWidget      *send_button;
+       GtkAccelEntry *accel;
+       GtkWidget *send_menu;
        GSList *list;
-       GdkEventKey *e= (GdkEventKey *) gtk_get_current_event();
-       
-       if (e->type != GDK_KEY_PRESS || 
-           !( e->keyval == GDK_Return && e->state & GDK_CONTROL_MASK) )
-               return;
+
+       ev = gtk_get_current_event();
+       if (ev->type != GDK_KEY_PRESS) return FALSE;
+
+       kev = (GdkEventKey *)ev;
+       if (!(kev->keyval == GDK_Return && (kev->state & GDK_CONTROL_MASK)))
+               return FALSE;
 
        ifactory = gtk_item_factory_from_widget(compose->menubar);
-       send_button = gtk_item_factory_get_widget(ifactory, "/Message/Send");
-       list = gtk_accel_group_entries_from_object(GTK_OBJECT(send_button));
-       accel = (GtkAccelEntry *) list->data;
-       if (accel->accelerator_key == GDK_Return && 
-           accel->accelerator_mods == GDK_CONTROL_MASK)
+       send_menu = gtk_item_factory_get_widget(ifactory, "/Message/Send");
+       list = gtk_accel_group_entries_from_object(GTK_OBJECT(send_menu));
+       accel = (GtkAccelEntry *)list->data;
+       if (accel->accelerator_key == kev->keyval &&
+           accel->accelerator_mods == kev->state) {
                compose_send_cb(compose, 0, NULL);
+               return TRUE;
+       }
+
+       return FALSE;
 }
 
 #if USE_PSPELL
index 6784a05..efa3857 100644 (file)
@@ -544,8 +544,8 @@ static void folderview_select_node(FolderView *folderview, GtkCTreeNode *node)
        g_return_if_fail(node != NULL);
 
        folderview->open_folder = TRUE;
-       gtk_ctree_select(ctree, node);
        gtkut_ctree_set_focus_row(ctree, node);
+       gtk_ctree_select(ctree, node);
        if (folderview->summaryview->messages > 0)
                gtk_widget_grab_focus(folderview->summaryview->ctree);
        else
@@ -1411,9 +1411,9 @@ static void folderview_button_released(GtkWidget *ctree, GdkEventButton *event,
 
        if (event->button == 1 && folderview->open_folder == FALSE &&
            folderview->opened != NULL) {
-               gtk_ctree_select(GTK_CTREE(ctree), folderview->opened);
                gtkut_ctree_set_focus_row(GTK_CTREE(ctree),
                                          folderview->opened);
+               gtk_ctree_select(GTK_CTREE(ctree), folderview->opened);
        }
 }
 
@@ -1427,12 +1427,21 @@ static void folderview_key_pressed(GtkWidget *widget, GdkEventKey *event,
 
        switch (event->keyval) {
        case GDK_Return:
-       case GDK_space:
                if (folderview->selected) {
                        folderview_select_node(folderview,
                                               folderview->selected);
                }
                break;
+       case GDK_space:
+               if (folderview->selected) {
+                       if (folderview->opened == folderview->selected &&
+                           folderview->summaryview->messages == 0)
+                               folderview_select_next_unread(folderview);
+                       else
+                               folderview_select_node(folderview,
+                                                      folderview->selected);
+               }
+               break;
        case GDK_v:
        case GDK_V:
        case GDK_g:
@@ -1463,8 +1472,8 @@ static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
        }
 
        if (!can_select) {
-               gtk_ctree_select(ctree, folderview->opened);
                gtkut_ctree_set_focus_row(ctree, folderview->opened);
+               gtk_ctree_select(ctree, folderview->opened);
                return;
        }
 
@@ -1502,8 +1511,8 @@ static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
        opened = summary_show(folderview->summaryview, item, FALSE);
 
        if (!opened) {
-               gtk_ctree_select(ctree, folderview->opened);
                gtkut_ctree_set_focus_row(ctree, folderview->opened);
+               gtk_ctree_select(ctree, folderview->opened);
        } else
                folderview->opened = row;
 
@@ -1538,9 +1547,9 @@ static void folderview_popup_close(GtkMenuShell *menu_shell,
 {
        if (!folderview->opened) return;
 
-       gtk_ctree_select(GTK_CTREE(folderview->ctree), folderview->opened);
        gtkut_ctree_set_focus_row(GTK_CTREE(folderview->ctree),
                                  folderview->opened);
+       gtk_ctree_select(GTK_CTREE(folderview->ctree), folderview->opened);
 }
 
 static void folderview_col_resized(GtkCList *clist, gint column, gint width,
index d1ae69e..66153f1 100644 (file)
  * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
  * file for a list of people on the GTK+ Team.  See the ChangeLog
  * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  */
 
 /*
- * Modified by the Sylpheed Team and others 2001. Interesting
+ * Modified by the Sylpheed Team and others 2001-2002. Interesting
  * parts are marked using comment block following this one.
  * This modification is based on the GtkText of GTK 1.2.10
  */
@@ -35,7 +35,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-#      include "config.h"
+#  include "config.h"
 #endif
 
 #include <ctype.h>
 #include <gtk/gtkmain.h>
 #include <gtk/gtkselection.h>
 #include <gtk/gtksignal.h>
-#include <gtkstext.h>
 
 #include "compose.h"
+#include "gtkstext.h"
+
+
+/* line_arrow.xbm */
+#define line_arrow_width 6
+#define line_arrow_height 9
+static unsigned char line_arrow_bits[] = {
+   0x00, 0x00, 0x04, 0x0c, 0x18, 0x3f, 0x18, 0x0c, 0x04};
+
+/* line-wrap.xbm */
+#define line_wrap_width 6
+#define line_wrap_height 9
+static unsigned char line_wrap_bits[] = {
+  0x1e, 0x3e, 0x30, 0x30, 0x39, 0x1f, 0x0f, 0x0f, 0x1f, };
 
 /* SYLPHEED:
  * compile time settings 
@@ -70,8 +83,6 @@
 #define KEY_SCROLL_PIXELS        10
 #define SCROLL_TIME              100
 #define FREEZE_LENGTH            1024        
-
-
 /* Freeze text when inserting or deleting more than this many characters */
 
 /* SYLPHEED:
@@ -128,7 +139,7 @@ enum {
   ARG_WORD_WRAP
 };
 
-typedef struct _TextProperty             TextProperty;
+typedef struct _TextProperty          TextProperty;
 typedef struct _TabStopMark           TabStopMark;
 typedef struct _PrevTabCont           PrevTabCont;
 typedef struct _FetchLinesData        FetchLinesData;
@@ -223,67 +234,67 @@ struct _LineParams
 };
 
 
-static void  gtk_stext_class_init     (GtkSTextClass   *klass);
-static void  gtk_stext_set_arg        (GtkObject      *object,
+static void  gtk_stext_class_init    (GtkSTextClass   *klass);
+static void  gtk_stext_set_arg       (GtkObject      *object,
                                      GtkArg         *arg,
                                      guint           arg_id);
-static void  gtk_stext_get_arg        (GtkObject      *object,
+static void  gtk_stext_get_arg       (GtkObject      *object,
                                      GtkArg         *arg,
                                      guint           arg_id);
-static void  gtk_stext_init           (GtkSText        *text);
-static void  gtk_stext_destroy        (GtkObject      *object);
-static void  gtk_stext_finalize       (GtkObject      *object);
-static void  gtk_stext_realize        (GtkWidget      *widget);
-static void  gtk_stext_unrealize      (GtkWidget      *widget);
-static void  gtk_stext_style_set            (GtkWidget      *widget,
+static void  gtk_stext_init          (GtkSText        *text);
+static void  gtk_stext_destroy       (GtkObject      *object);
+static void  gtk_stext_finalize      (GtkObject      *object);
+static void  gtk_stext_realize       (GtkWidget      *widget);
+static void  gtk_stext_unrealize     (GtkWidget      *widget);
+static void  gtk_stext_style_set     (GtkWidget      *widget,
                                      GtkStyle       *previous_style);
-static void  gtk_stext_state_changed  (GtkWidget      *widget,
+static void  gtk_stext_state_changed (GtkWidget      *widget,
                                      GtkStateType    previous_state);
-static void  gtk_stext_draw_focus     (GtkWidget      *widget);
-static void  gtk_stext_size_request   (GtkWidget      *widget,
+static void  gtk_stext_draw_focus    (GtkWidget      *widget);
+static void  gtk_stext_size_request  (GtkWidget      *widget,
                                      GtkRequisition *requisition);
-static void  gtk_stext_size_allocate  (GtkWidget      *widget,
+static void  gtk_stext_size_allocate (GtkWidget      *widget,
                                      GtkAllocation  *allocation);
-static void  gtk_stext_adjustment     (GtkAdjustment  *adjustment,
+static void  gtk_stext_adjustment    (GtkAdjustment  *adjustment,
                                      GtkSText        *text);
-static void  gtk_stext_disconnect     (GtkAdjustment  *adjustment,
+static void  gtk_stext_disconnect    (GtkAdjustment  *adjustment,
                                      GtkSText        *text);
 
-static void gtk_stext_insert_text       (GtkEditable       *editable,
+static void gtk_stext_insert_text      (GtkEditable       *editable,
                                        const gchar       *new_text,
                                        gint               new_text_length,
                                        gint               *position);
-static void gtk_stext_delete_text       (GtkEditable        *editable,
+static void gtk_stext_delete_text      (GtkEditable        *editable,
                                        gint               start_pos,
                                        gint               end_pos);
-static void gtk_stext_update_text       (GtkEditable       *editable,
+static void gtk_stext_update_text      (GtkEditable       *editable,
                                        gint               start_pos,
                                        gint               end_pos);
-static gchar *gtk_stext_get_chars       (GtkEditable       *editable,
+static gchar *gtk_stext_get_chars      (GtkEditable       *editable,
                                        gint               start,
                                        gint               end);
-static void gtk_stext_set_selection     (GtkEditable       *editable,
+static void gtk_stext_set_selection    (GtkEditable       *editable,
                                        gint               start,
                                        gint               end);
-static void gtk_stext_real_set_editable (GtkEditable       *editable,
+static void gtk_stext_real_set_editable(GtkEditable       *editable,
                                        gboolean           is_editable);
 
 /* Event handlers */
-static void  gtk_stext_draw              (GtkWidget         *widget,
+static void  gtk_stext_draw             (GtkWidget         *widget,
                                         GdkRectangle      *area);
-static gint  gtk_stext_expose            (GtkWidget         *widget,
+static gint  gtk_stext_expose           (GtkWidget         *widget,
                                         GdkEventExpose    *event);
-static gint  gtk_stext_button_press      (GtkWidget         *widget,
+static gint  gtk_stext_button_press     (GtkWidget         *widget,
                                         GdkEventButton    *event);
-static gint  gtk_stext_button_release    (GtkWidget         *widget,
+static gint  gtk_stext_button_release   (GtkWidget         *widget,
                                         GdkEventButton    *event);
-static gint  gtk_stext_motion_notify     (GtkWidget         *widget,
+static gint  gtk_stext_motion_notify    (GtkWidget         *widget,
                                         GdkEventMotion    *event);
-static gint  gtk_stext_key_press         (GtkWidget         *widget,
+static gint  gtk_stext_key_press        (GtkWidget         *widget,
                                         GdkEventKey       *event);
-static gint  gtk_stext_focus_in          (GtkWidget         *widget,
+static gint  gtk_stext_focus_in         (GtkWidget         *widget,
                                         GdkEventFocus     *event);
-static gint  gtk_stext_focus_out         (GtkWidget         *widget,
+static gint  gtk_stext_focus_out        (GtkWidget         *widget,
                                         GdkEventFocus     *event);
 
 static void move_gap (GtkSText* text, guint index);
@@ -404,7 +415,8 @@ static void gtk_stext_kill_line           (GtkEditable *editable,
                                          gint         direction);
 
 /* To be removed */
-/*static void gtk_stext_move_forward_character    (GtkSText          *text);
+#if 0
+static void gtk_stext_move_forward_character    (GtkSText          *text);
 static void gtk_stext_move_backward_character   (GtkSText          *text);
 static void gtk_stext_move_forward_word         (GtkSText          *text);
 static void gtk_stext_move_backward_word        (GtkSText          *text);
@@ -418,15 +430,15 @@ static void gtk_stext_delete_backward_character (GtkSText          *text);
 static void gtk_stext_delete_forward_word       (GtkSText          *text);
 static void gtk_stext_delete_backward_word      (GtkSText          *text);
 static void gtk_stext_delete_line               (GtkSText          *text);
-static void gtk_stext_delete_to_line_end        (GtkSText          *text);*/
+static void gtk_stext_delete_to_line_end        (GtkSText          *text);
+#endif
 static void gtk_stext_select_word               (GtkSText          *text,
                                                guint32           time);
 static void gtk_stext_select_line               (GtkSText          *text,
                                                guint32           time);
 
 static void gtk_stext_set_position  (GtkEditable       *editable,
-                                   gint               position);
-
+                                    gint               position);
 
 /* SYLPHEED:
  * cursor timer
@@ -493,47 +505,45 @@ static GMemChunk  *text_property_chunk = NULL;
 static GtkWidgetClass *parent_class = NULL;
 
 
+#if 0
 static const GtkTextFunction control_keys[26] =
 {
-  NULL,/*(GtkTextFunction)gtk_stext_move_beginning_of_line,    /* a */
-  NULL,/*(GtkTextFunction)gtk_stext_move_backward_character,   /* b */
-  NULL,                                                      /* c */
-/*  (GtkTextFunction)gtk_editable_copy_clipboard,        /* c */
-  NULL,/*(GtkTextFunction)gtk_stext_delete_forward_character,  /* d */
-  NULL,/*(GtkTextFunction)gtk_stext_move_end_of_line,          /* e */
-  NULL,/*(GtkTextFunction)gtk_stext_move_forward_character,    /* f */
+  (GtkTextFunction)gtk_stext_move_beginning_of_line,   /* a */
+  (GtkTextFunction)gtk_stext_move_backward_character,  /* b */
+  (GtkTextFunction)gtk_editable_copy_clipboard,        /* c */
+  (GtkTextFunction)gtk_stext_delete_forward_character, /* d */
+  (GtkTextFunction)gtk_stext_move_end_of_line,         /* e */
+  (GtkTextFunction)gtk_stext_move_forward_character,   /* f */
   NULL,                                                /* g */
-  NULL,/*(GtkTextFunction)gtk_stext_delete_backward_character, /* h */
+  (GtkTextFunction)gtk_stext_delete_backward_character,/* h */
   NULL,                                                /* i */
   NULL,                                                /* j */
-  NULL,/*(GtkTextFunction)gtk_stext_delete_to_line_end,        /* k */
+  (GtkTextFunction)gtk_stext_delete_to_line_end,       /* k */
   NULL,                                                /* l */
   NULL,                                                /* m */
-  NULL,/*(GtkTextFunction)gtk_stext_move_next_line,            /* n */
+  (GtkTextFunction)gtk_stext_move_next_line,           /* n */
   NULL,                                                /* o */
-  NULL,/*(GtkTextFunction)gtk_stext_move_previous_line,        /* p */
+  (GtkTextFunction)gtk_stext_move_previous_line,       /* p */
   NULL,                                                /* q */
   NULL,                                                /* r */
   NULL,                                                /* s */
   NULL,                                                /* t */
-  NULL,/*(GtkTextFunction)gtk_stext_delete_line,               /* u */
-  NULL,                                                      /* v */
-/*  (GtkTextFunction)gtk_editable_paste_clipboard,       /* v */
-  NULL,/*(GtkTextFunction)gtk_stext_delete_backward_word,      /* w */
-  NULL,                                                     /* x */
-/*  (GtkTextFunction)gtk_editable_cut_clipboard,         /* x */
+  (GtkTextFunction)gtk_stext_delete_line,              /* u */
+  (GtkTextFunction)gtk_editable_paste_clipboard,       /* v */
+  (GtkTextFunction)gtk_stext_delete_backward_word,     /* w */
+  (GtkTextFunction)gtk_editable_cut_clipboard,         /* x */
   NULL,                                                /* y */
   NULL,                                                /* z */
 };
 
 static const GtkTextFunction alt_keys[26] =
 {
-  NULL,                                                /* a */
-  NULL,/*(GtkTextFunction)gtk_stext_move_backward_word,        /* b */
-  NULL,                                                /* c */
-  NULL,/*(GtkTextFunction)gtk_stext_delete_forward_word,       /* d */
+  NULL,                                           /* a */
+  (GtkTextFunction)gtk_stext_move_backward_word,  /* b */
+  NULL,                                           /* c */
+  (GtkTextFunction)gtk_stext_delete_forward_word, /* d */
   NULL,                                           /* e */
-  NULL,/*(GtkTextFunction)gtk_stext_move_forward_word,         /* f */
+  (GtkTextFunction)gtk_stext_move_forward_word,   /* f */
   NULL,                                           /* g */
   NULL,                                           /* h */
   NULL,                                           /* i */
@@ -555,20 +565,9 @@ static const GtkTextFunction alt_keys[26] =
   NULL,                                           /* y */
   NULL,                                           /* z */
 };
+#endif
 
 
-/* line_arrow.xbm */
-#define line_arrow_width 6
-#define line_arrow_height 9
-static unsigned char line_arrow_bits[] = {
-   0x00, 0x00, 0x04, 0x0c, 0x18, 0x3f, 0x18, 0x0c, 0x04};
-
-/* line-wrap.xbm */  
-#define line_wrap_width 6
-#define line_wrap_height 9
-static unsigned char line_wrap_bits[] = {
-  0x1e, 0x3e, 0x30, 0x30, 0x39, 0x1f, 0x0f, 0x0f, 0x1f, };
-
 /**********************************************************************/
 /*                             Widget Crap                           */
 /**********************************************************************/
@@ -783,7 +782,7 @@ gtk_stext_init (GtkSText *text)
   text->button = 0;
   
   text->current_font = NULL;
-
+  
   /* SYLPHEED:
    * timer for blinking cursor
    */
@@ -822,10 +821,12 @@ gtk_stext_new (GtkAdjustment *hadj,
 
   /* SYLPHEED:
    * force widget name to be GtkText so it silently adapts
-   * the GtkText widget's style... 
+   * the GtkText widget's style...
    */
-  gtk_widget_set_name(text, "GtkText");                        
-  gtk_widget_ensure_style(text);
+#if 0
+  gtk_widget_set_name (text, "GtkText");
+  gtk_widget_ensure_style (text);
+#endif
 
   return text;
 }
@@ -1423,10 +1424,10 @@ gtk_stext_realize (GtkWidget *widget)
   attributes.y = (widget->style->klass->ythickness + TEXT_BORDER_ROOM);
   attributes.width = MAX (1, (gint)widget->allocation.width - (gint)attributes.x * 2);
   attributes.height = MAX (1, (gint)widget->allocation.height - (gint)attributes.y * 2);
-  
+
   attributes.cursor = gdk_cursor_new (GDK_XTERM);
   attributes_mask |= GDK_WA_CURSOR;
-
+  
   text->text_area = gdk_window_new (widget->window, &attributes, attributes_mask);
   gdk_window_set_user_data (text->text_area, text);
 
@@ -1628,25 +1629,25 @@ clear_focus_area (GtkSText *text, gint area_x, gint area_y, gint area_width, gin
   gint xthick = TEXT_BORDER_ROOM + widget->style->klass->xthickness;
   
   gint width, height;
+
   if (area_width == 0 || area_height == 0)
     return;
   
-   if (widget->style->bg_pixmap[GTK_STATE_NORMAL])
-     {
-       gdk_window_get_size (widget->style->bg_pixmap[GTK_STATE_NORMAL], &width, &height);
-       gdk_gc_set_ts_origin (text->bg_gc,
-                           (- (gint)text->first_onscreen_hor_pixel + xthick) % width,
-                           (- (gint)text->first_onscreen_ver_pixel + ythick) % height);
-       gc = text->bg_gc;
-     }
-   else
-     gc = widget->style->bg_gc[widget->state];
-  
-  
-   gdk_draw_rectangle (GTK_WIDGET (text)->window, gc, TRUE,
+  if (widget->style->bg_pixmap[GTK_STATE_NORMAL])
+    {
+      gdk_window_get_size (widget->style->bg_pixmap[GTK_STATE_NORMAL], &width, &height);
+      
+      gdk_gc_set_ts_origin (text->bg_gc,
+                           (- (gint)text->first_onscreen_hor_pixel + xthick) % width,
+                           (- (gint)text->first_onscreen_ver_pixel + ythick) % height);
+
+      gc = text->bg_gc;
+    }
+  else
+    gc = widget->style->bg_gc[widget->state];
+
+
+  gdk_draw_rectangle (GTK_WIDGET (text)->window, gc, TRUE,
                      area_x, area_y, area_width, area_height);
 }
 
@@ -1705,11 +1706,11 @@ gtk_stext_draw_focus (GtkWidget *widget)
       /* top rect */
       clear_focus_area (text, x, y, width, yextra);
       /* left rect */
-      clear_focus_area (text, x, y + yextra,
-                       xextra, y + height - 2 * yextra);
+      clear_focus_area (text, x, y + yextra, 
+                       xextra, y + height - 2 * yextra);
       /* right rect */
-      clear_focus_area (text, x + width - xextra, y + yextra,
-                       xextra, height - 2 * ythick);
+      clear_focus_area (text, x + width - xextra, y + yextra, 
+                       xextra, height - 2 * ythick);
       /* bottom rect */
       clear_focus_area (text, x, x + height - yextra, width, yextra);
     }
@@ -2178,7 +2179,8 @@ gtk_stext_key_press (GtkWidget   *widget,
       
       text->point = find_mark (text, text->cursor_mark.index);
       
-      extend_selection = event->state & GDK_SHIFT_MASK;
+      extend_selection = (event->state & GDK_SHIFT_MASK) &&
+                        (event->keyval != GDK_Return);
       extend_start = FALSE;
       
       if (extend_selection)
@@ -2340,7 +2342,8 @@ gtk_stext_key_press (GtkWidget   *widget,
          
        default:
          return_val = FALSE;
-         
+
+#if 0
          if (event->state & GDK_CONTROL_MASK)
            {
              if ((key >= 'A') && (key <= 'Z'))
@@ -2368,6 +2371,10 @@ gtk_stext_key_press (GtkWidget   *widget,
              break;
            }
          else if (event->length > 0)
+#endif
+         if (!(event->state & GDK_CONTROL_MASK) &&
+             !(event->state & GDK_MOD1_MASK)    &&
+              (event->length > 0))
            {
              extend_selection = FALSE;
              
@@ -2451,12 +2458,12 @@ gtk_stext_focus_out (GtkWidget     *widget,
   
   GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
   gtk_widget_draw_focus (widget);
+  
   /* SYLPHEED:
    * should disable blink before undrawing the cursor - disabling blink
    * redraws the cursor.
    */
-  gtk_stext_disable_blink(GTK_STEXT(widget));
+  gtk_stext_disable_blink (GTK_STEXT(widget));
   undraw_cursor (GTK_STEXT(widget), TRUE);
   GTK_STEXT(widget)->cursor_visible = FALSE;
   
@@ -4453,25 +4460,25 @@ gtk_stext_move_cursor (GtkEditable *editable,
     }
 }
 
-/*static*/ void
+void
 gtk_stext_move_forward_character (GtkSText *text)
 {
   move_cursor_hor (text, 1);
 }
 
-/*static*/ void
+void
 gtk_stext_move_backward_character (GtkSText *text)
 {
   move_cursor_hor (text, -1);
 }
 
-/*static*/ void
+void
 gtk_stext_move_next_line (GtkSText *text)
 {
   move_cursor_ver (text, 1);
 }
 
-/*static*/ void
+void
 gtk_stext_move_previous_line (GtkSText *text)
 {
   move_cursor_ver (text, -1);
@@ -4493,7 +4500,7 @@ gtk_stext_move_word (GtkEditable *editable,
     }
 }
 
-/*static*/ void
+void
 gtk_stext_move_forward_word (GtkSText *text)
 {
   text->cursor_virtual_x = 0;
@@ -4525,7 +4532,7 @@ gtk_stext_move_forward_word (GtkSText *text)
   draw_cursor (text, FALSE);
 }
 
-/*static*/ void
+void
 gtk_stext_move_backward_word (GtkSText *text)
 {
   text->cursor_virtual_x = 0;
@@ -4605,14 +4612,14 @@ gtk_stext_move_to_column (GtkEditable *editable,
   draw_cursor (text, FALSE);
 }
 
-/*static*/ void
+void
 gtk_stext_move_beginning_of_line (GtkSText *text)
 {
   gtk_stext_move_to_column (GTK_EDITABLE (text), 0);
   
 }
 
-/*static*/ void
+void
 gtk_stext_move_end_of_line (GtkSText *text)
 {
   gtk_stext_move_to_column (GTK_EDITABLE (text), -1);
@@ -4643,13 +4650,13 @@ gtk_stext_kill_char (GtkEditable *editable,
     }
 }
 
-/*static*/ void
+void
 gtk_stext_delete_forward_character (GtkSText *text)
 {
   gtk_stext_kill_char (GTK_EDITABLE (text), 1);
 }
 
-/*static*/ void
+void
 gtk_stext_delete_backward_character (GtkSText *text)
 {
   gtk_stext_kill_char (GTK_EDITABLE (text), -1);
@@ -4677,13 +4684,13 @@ gtk_stext_kill_word (GtkEditable *editable,
     }
 }
 
-/*static*/ void
+void
 gtk_stext_delete_forward_word (GtkSText *text)
 {
   gtk_stext_kill_word (GTK_EDITABLE (text), 1);
 }
 
-/*static*/ void
+void
 gtk_stext_delete_backward_word (GtkSText *text)
 {
   gtk_stext_kill_word (GTK_EDITABLE (text), -1);
@@ -4706,14 +4713,14 @@ gtk_stext_kill_line (GtkEditable *editable,
     }
 }
 
-/*static*/ void
+void
 gtk_stext_delete_line (GtkSText *text)
 {
   gtk_stext_move_to_column (GTK_EDITABLE (text), 0);
   gtk_stext_kill_line (GTK_EDITABLE (text), 1);
 }
 
-/*static*/ void
+void
 gtk_stext_delete_to_line_end (GtkSText *text)
 {
   gtk_stext_kill_line (GTK_EDITABLE (text), 1);
index cd75c7b..2b07f57 100644 (file)
@@ -1128,19 +1128,10 @@ void summary_select_prev_unread(SummaryView *summaryview)
 
 void summary_select_next_unread(SummaryView *summaryview)
 {
-       GtkCTreeNode *node;
+       GtkCTreeNode *node = summaryview->selected;
        GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
 
-       node = summary_find_next_unread_msg(summaryview, summaryview->selected);
-
-       if (node) {
-               gtkut_ctree_expand_parent_all(ctree, node);
-               gtk_sctree_unselect_all(GTK_SCTREE(ctree));
-               gtk_sctree_select(GTK_SCTREE(ctree), node);
-               if (summaryview->displayed == node)
-                       summaryview->displayed = NULL;
-               summary_display_msg(summaryview, node, FALSE);
-       } else {
+       while ((node = summary_find_next_unread_msg(summaryview, node)) == NULL) {
                AlertValue val;
 
                switch (prefs_common.next_unread_msg_dialog) {
@@ -1148,7 +1139,7 @@ void summary_select_next_unread(SummaryView *summaryview)
                                val = alertpanel(_("No more unread messages"),
                                                 _("No unread message found. "
                                                   "Go to next folder?"),
-                                                _("Yes"), _("No"), NULL);
+                                                _("Yes"), _("Search again"), _("No"));
                                break;
                        case NEXTUNREADMSGDIALOG_ASSUME_YES:
                                val = G_ALERTDEFAULT;
@@ -1168,7 +1159,20 @@ void summary_select_next_unread(SummaryView *summaryview)
                                                (GTK_OBJECT(ctree),
                                                 "key_press_event");
                        folderview_select_next_unread(summaryview->folderview);
-               }
+                       return;
+               } else if (val == G_ALERTALTERNATE)
+                       node = NULL;
+               else
+                       return;
+       }
+
+       if (node) {
+               gtkut_ctree_expand_parent_all(ctree, node);
+               gtk_sctree_unselect_all(GTK_SCTREE(ctree));
+               gtk_sctree_select(GTK_SCTREE(ctree), node);
+               if (summaryview->displayed == node)
+                       summaryview->displayed = NULL;
+               summary_display_msg(summaryview, node, FALSE);
        }
 }