sync with sylpheed 0.7.1cvs8
authorPaul Mangan <paul@claws-mail.org>
Thu, 14 Feb 2002 15:28:02 +0000 (15:28 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 14 Feb 2002 15:28:02 +0000 (15:28 +0000)
16 files changed:
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/Makefile.am
src/gtkutils.c
src/imap.c
src/inc.c
src/mainwindow.c
src/mainwindow.h
src/prefs_common.c
src/socket.c
src/socket.h
src/summaryview.c
src/summaryview.h
src/utils.c

index 21347b2227d904bc01188a046b03818ab3403512..621f043f42bfef710072d85fb8fbea52fd60f14c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2002-02-14
+
+       * src/utils.c: strsplit_with_quote(): remove quotation characters
+         in the function (fix composer's external editor problem) (thanks
+         to Stefaan A Eeckels).
+       * src/mainwindow.[ch]: made 'Show all header' toggle switch.
+         main_window_menu_callback_block()
+         main_window_menu_callback_unblock(): new.
+         main_window_set_menu_sensitive(): set the toggle status of
+         menu items.
+         show_all_header_cb(): read the status of toggle menu item.
+       * src/mainwindow.[ch]: made 'Thread view' toggle switch.
+       * src/prefs_common.c: prefs_keybind_apply_clicked(): removed
+         'Unthread view'.
+
+2002-02-13
+
+       * src/imap.c: imap_add_msg(): fixed a bug that didn't replace
+         the path separator (thanks to Sergey Vlasov).
+       * src/gtkutils.c: gtkut_editable_get_selection(): return NULL
+         if the length of selection is zero.
+         Fixed the assertion.
+       * src/utils.c: str_open_as_stream(): return immediately if
+         the length of str is zero.
+       * src/headerwindow.[ch]: removed.
+       * src/socket.[ch]
+         src/inc.c: removed stale thread support codes.
+
 2002-02-12
 
        * src/procmsg.c: procmsg_open_message(): modified so that it
index e3c8903fc7661210bb2d54c3867968a3063fe4e7..fa48b2bb894a13a163507adef57e88a04c620d37 100644 (file)
@@ -1,3 +1,11 @@
+2002-02-14 [paul]      0.7.1claws1
+
+       * sync with sylpheed 0.7.1cvs8
+               see ChangeLog entries 2002-02-13 and 2002-02-14
+
+       * README.claws
+               add some description of Actions and Pixmap Themes
+
 2002-02-13 [paul]      
 
        * version 0.7.1claws release
index 031b059a39509489485b534de1d5d4eaabbbe296..3c5b757cc7ef2b2e51fb8613158e481c23a7a0b5 100644 (file)
@@ -1,3 +1,31 @@
+2002-02-14
+
+       * src/utils.c: strsplit_with_quote(): ¤³¤Î´Ø¿ôÃæ¤Ç°úÍÑʸ»ú¤òºï½ü
+         ¤¹¤ë¤è¤¦¤Ë¤·¤¿(¥á¥Ã¥»¡¼¥¸ºîÀ®¤Î³°Éô¥¨¥Ç¥£¥¿¤ÎÌäÂê¤ò½¤Àµ)
+         (Stefaan A Eeckels ¤µ¤ó thanks)¡£
+       * src/mainwindow.[ch]: ¡ÖÁ´¤Æ¤Î¥Ø¥Ã¥À¤òɽ¼¨¡×¤ò¥È¥°¥ë¥¹¥¤¥Ã¥Á¤Ë¤·¤¿¡£
+         main_window_menu_callback_block()
+         main_window_menu_callback_unblock(): ¿·µ¬¡£
+         main_window_set_menu_sensitive(): ¥á¥Ë¥å¡¼¥¢¥¤¥Æ¥à¤Î¥È¥°¥ë¾õÂÖ¤ò
+         ¥»¥Ã¥È¡£
+         show_all_header_cb(): ¥È¥°¥ë¥á¥Ë¥å¡¼¥¢¥¤¥Æ¥à¤Î¾õÂÖ¤òÆɤà¤è¤¦¤Ë¤·¤¿¡£
+       * src/mainwindow.[ch]: ¡Ö¥¹¥ì¥Ã¥Éɽ¼¨¡×¤ò¥È¥°¥ë¥¹¥¤¥Ã¥Á¤Ë¤·¤¿¡£
+       * src/prefs_common.c: prefs_keybind_apply_clicked(): ¡Ö¥¹¥ì¥Ã¥É²ò½ü¡×
+         ¤òºï½ü¡£
+
+2002-02-13
+
+       * src/imap.c: imap_add_msg(): ¥Ñ¥¹¶èÀÚ¤ê¤òÊÑ´¹¤·¤Æ¤¤¤Ê¤«¤Ã¤¿¥Ð¥°¤ò
+         ½¤Àµ(Sergey Vlasov ¤µ¤ó thanks)¡£
+       * src/gtkutils.c: gtkut_editable_get_selection(): ÁªÂòÉô¤ÎŤµ¤¬
+         0 ¤Î¤È¤­¤Ï NULL ¤òÊÖ¤¹¤è¤¦¤Ë¤·¤¿¡£
+         ¥¢¥µ¡¼¥·¥ç¥ó¤ò½¤Àµ¡£
+       * src/utils.c: str_open_as_stream(): str ¤ÎŤµ¤¬ 0 ¤Î¤È¤­¤Ï¤¹¤°¤Ë
+         Ìá¤ë¤è¤¦¤Ë¤·¤¿¡£
+       * src/headerwindow.[ch]: ºï½ü¡£
+       * src/socket.[ch]
+         src/inc.c: ¸Å¤¤¥¹¥ì¥Ã¥ÉÂбþ¥³¡¼¥É¤òºï½ü¡£
+
 2002-02-12
 
        * src/procmsg.c: procmsg_open_message(): ¥Ç¥³¡¼¥É¤µ¤ì¤¿¥á¥Ã¥»¡¼¥¸
index f49b643d29c8a4c0dc95a10d36a71a82f17e0ed2..40a1e42dacfc8a8ec6e58a3b3eaac46a21065ef9 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws
+EXTRA_VERSION=claws1
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 13e2f986359742b759bb48dc0d5009d1aff13441..b0ed63e8c7a71bdea0d8b1d9b36efc13148e519e 100644 (file)
@@ -23,6 +23,7 @@ sylpheed_SOURCES = \
        compose.c compose.h \
        gtkshruler.c gtkshruler.h \
        gtksctree.c gtksctree.h \
+       gtkstext.c gtkstext.h \
        menu.c menu.h \
        stock_pixmap.c stock_pixmap.h \
        prefs.c prefs.h \
@@ -66,7 +67,6 @@ sylpheed_SOURCES = \
        filesel.c filesel.h \
        foldersel.c foldersel.h \
        statusbar.c statusbar.h \
-       headerwindow.c headerwindow.h \
        logwindow.c logwindow.h \
        sourcewindow.c sourcewindow.h \
        manage_window.c manage_window.h \
@@ -114,7 +114,6 @@ sylpheed_SOURCES = \
        simple-gettext.c \
        manual.c manual.h \
        stringtable.c stringtable.h \
-       gtkstext.c gtkstext.h \
        scoring.c scoring.h \
        prefs_folder_item.c prefs_folder_item.h \
        matcher.c matcher.h \
index c3fe890dda7eaa066f05d57c54dd2f0908ca257f..7230a6fe06d19ca1909c24f2f0aa33380e64cca3 100644 (file)
@@ -254,13 +254,13 @@ gchar *gtkut_editable_get_selection(GtkEditable *editable)
 {
        guint start_pos, end_pos;
 
-       g_return_if_fail(editable != NULL);
+       g_return_val_if_fail(editable != NULL, NULL);
 
        if (!editable->has_selection) return NULL;
 
        if (editable->selection_start_pos == editable->selection_end_pos)
                return NULL;
-       
+
        if (editable->selection_start_pos < editable->selection_end_pos) {
                start_pos = editable->selection_start_pos;
                end_pos = editable->selection_end_pos;
index 1170185c3fcfb3a029405dbee91d0ba4af314b2e..3d4d910e7b2c68b2e40362df8e05a1b17ebc72fa 100644 (file)
@@ -597,12 +597,11 @@ gint imap_add_msg(Folder *folder, FolderItem *dest, const gchar *file,
        g_return_val_if_fail(file != NULL, -1);
 
        session = imap_session_get(folder);
-       if (!session)
-               return -1;
+       if (!session) return -1;
 
        destdir = imap_get_real_path(IMAP_FOLDER(folder), dest->path);
        ok = imap_cmd_append(SESSION(session)->sock, destdir, file);
-       g_free (destdir);
+       g_free(destdir);
 
        if (ok != IMAP_SUCCESS) {
                g_warning(_("can't append message %s\n"), file);
index 8136646fad2671413a602358a4338b2fc05cf767..3449aa5d3924b7e57d863c8daaaee75cb50646b8 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -96,10 +96,6 @@ static gint pop3_automaton_terminate (SockInfo               *source,
 static GHashTable *inc_get_uidl_table  (PrefsAccount           *ac_prefs);
 static void inc_write_uidl_list                (Pop3State              *state);
 
-#if USE_THREADS
-static gint connection_check_cb                (Automaton      *atm);
-#endif
-
 static void inc_pop3_recv_func         (SockInfo       *sock,
                                         gint            count,
                                         gint            read_bytes,
@@ -600,11 +596,7 @@ static IncState inc_pop3_session_do(IncSession *session)
        GTK_EVENTS_FLUSH();
        statusbar_pop_all();
 
-#if USE_THREADS
-       if ((sockinfo = sock_connect_with_thread(server, port)) == NULL) {
-#else
        if ((sockinfo = sock_connect(server, port)) == NULL) {
-#endif
                log_warning(_("Can't connect to POP3 server: %s:%d\n"),
                            server, port);
                if(!prefs_common.noerrorpanel) {
@@ -637,14 +629,9 @@ static IncState inc_pop3_session_do(IncSession *session)
        log_verbosity_set(TRUE);
        recv_set_ui_func(inc_pop3_recv_func, session);
 
-#if USE_THREADS
-       atm->timeout_tag = gtk_timeout_add
-               (TIMEOUT_ITV, (GtkFunction)connection_check_cb, atm);
-#else
        atm->tag = sock_gdk_input_add(sockinfo,
                                      atm->state[atm->num].condition,
                                      automaton_input_cb, atm);
-#endif
 
        while (!atm->terminated)
                gtk_main_iteration();
@@ -652,9 +639,6 @@ static IncState inc_pop3_session_do(IncSession *session)
        log_verbosity_set(FALSE);
        recv_set_ui_func(NULL, NULL);
 
-#if USE_THREADS
-       /* pthread_join(sockinfo->connect_thr, NULL); */
-#endif
        automaton_destroy(atm);
 
        return pop3_state->inc_state;
@@ -741,44 +725,6 @@ static void inc_write_uidl_list(Pop3State *state)
        g_free(path);
 }
 
-#if USE_THREADS
-static gint connection_check_cb(Automaton *atm)
-{
-       Pop3State *state = atm->data;
-       IncProgressDialog *inc_dialog = state->session->data;
-       SockInfo *sockinfo = state->sockinfo;
-
-       /* g_print("connection check\n"); */
-
-       if (sockinfo->state == CONN_LOOKUPFAILED ||
-           sockinfo->state == CONN_FAILED) {
-               atm->timeout_tag = 0;
-               log_warning(_("Can't connect to POP3 server: %s:%d\n"),
-                           sockinfo->hostname, sockinfo->port);
-               if(!prefs_common.noerrorpanel) {
-                       if((prefs_common.recv_dialog_mode == RECV_DIALOG_ALWAYS) ||
-                           ((prefs_common.recv_dialog_mode == RECV_DIALOG_ACTIVE) && focus_window)) {
-                               manage_window_focus_in(inc_dialog->dialog->window, NULL, NULL);
-                       }
-                       alertpanel_error(_("Can't connect to POP3 server: %s:%d"),
-                                        sockinfo->hostname, sockinfo->port);
-                       manage_window_focus_out(inc_dialog->dialog->window, NULL, NULL);
-               }
-               pop3_automaton_terminate(sockinfo, atm);
-               state->sockinfo = NULL;
-               return FALSE;
-       } else if (sockinfo->state == CONN_ESTABLISHED) {
-               atm->timeout_tag = 0;
-               atm->tag = sock_gdk_input_add(sockinfo,
-                                             atm->state[atm->num].condition,
-                                             automaton_input_cb, atm);
-               return FALSE;
-       } else {
-               return TRUE;
-       }
-}
-#endif
-
 static void inc_pop3_recv_func(SockInfo *sock, gint count, gint read_bytes,
                               gpointer data)
 {
@@ -962,15 +908,6 @@ static void inc_cancel(GtkWidget *widget, gpointer data)
 
        if (!sockinfo || session->atm->terminated == TRUE) return;
 
-#if USE_THREADS
-       if (sockinfo->state == CONN_READY ||
-           sockinfo->state == CONN_LOOKUPSUCCESS) {
-               pthread_cancel(sockinfo->connect_thr);
-               /* pthread_kill(sockinfo->connect_thr, SIGINT); */
-               g_print("connection was cancelled.\n");
-       }
-#endif
-
        session->pop3_state->inc_state = INC_CANCEL;
        pop3_automaton_terminate(sockinfo, session->atm);
        session->pop3_state->sockinfo = NULL;
index 8bdf5621e0085aff636c2a9ec74f0acf426e83c3..095efdb7e139bdc643d7d2543b2178d241ebd65a 100644 (file)
@@ -70,7 +70,6 @@
 #include "prefs_template.h"
 #include "account.h"
 #include "addressbook.h"
-#include "headerwindow.h"
 #include "logwindow.h"
 #include "manage_window.h"
 #include "alertpanel.h"
@@ -103,6 +102,9 @@ static GList *mainwin_list = NULL;
 
 static GdkCursor *watch_cursor;
 
+static void main_window_menu_callback_block    (MainWindow     *mainwin);
+static void main_window_menu_callback_unblock  (MainWindow     *mainwin);
+
 static void main_window_show_cur_account       (MainWindow     *mainwin);
 
 static void main_window_set_widgets            (MainWindow     *mainwin,
@@ -502,8 +504,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_View/_Sort/---"),                NULL, NULL, 0, "<Separator>"},
        {N_("/_View/_Sort/_Attract by subject"),
                                                NULL, attract_by_subject_cb, 0, NULL},
-       {N_("/_View/Th_read view"),             "<control>T",        thread_cb, 0, NULL},
-       {N_("/_View/U_nthread view"),           "<shift><control>T", thread_cb, 1, NULL},
+       {N_("/_View/Th_read view"),             "<control>T",        thread_cb, 0, "<ToggleItem>"},
        {N_("/_View/_Hide read messages"),      NULL, hide_read_messages, 0, "<ToggleItem>"},
        {N_("/_View/Set display _item..."),     NULL, set_display_item_cb, 0, NULL},
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
@@ -610,7 +611,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_View/Open in new _window"),      "<control><alt>N", open_msg_cb, 0, NULL},
        {N_("/_View/_View source"),             "<control>U", view_source_cb, 0, NULL},
-       {N_("/_View/Show all _header"),         "<control>H", show_all_header_cb, 0, NULL},
+       {N_("/_View/Show all _header"),         "<control>H", show_all_header_cb, 0, "<ToggleItem>"},
        {N_("/_View/---"),                      NULL, NULL, 0, "<Separator>"},
        {N_("/_View/_Update"),                  "<control><alt>U", update_summary_cb,  0, NULL},
 
@@ -853,7 +854,6 @@ MainWindow *main_window_create(SeparateType type)
        mainwin->folderview  = folderview  = folderview_create();
        mainwin->summaryview = summaryview = summary_create();
        mainwin->messageview = messageview = messageview_create();
-       mainwin->headerwin   = header_window_create();
        mainwin->logwin      = log_window_create();
 
        folderview->mainwin      = mainwin;
@@ -862,7 +862,6 @@ MainWindow *main_window_create(SeparateType type)
        summaryview->mainwin     = mainwin;
        summaryview->folderview  = folderview;
        summaryview->messageview = messageview;
-       summaryview->headerwin   = mainwin->headerwin;
        summaryview->window      = window;
 
        messageview->mainwin     = mainwin;
@@ -980,11 +979,6 @@ MainWindow *main_window_create(SeparateType type)
        menuitem = gtk_item_factory_get_item(ifactory, "/View/Expand Summary View");
        gtk_signal_connect(GTK_OBJECT(menuitem), "state-changed", GTK_SIGNAL_FUNC(menuitem_expandsummaryview_statechanged),
                                                mainwin);
-               
-       menu_set_sensitive(ifactory, "/View/Thread view",
-                          prefs_common.enable_thread ? FALSE : TRUE);
-       menu_set_sensitive(ifactory, "/View/Unthread view",
-                          prefs_common.enable_thread ? TRUE : FALSE);
 
        /* set account selection menu */
        ac_menu = gtk_item_factory_get_widget
@@ -1010,10 +1004,10 @@ MainWindow *main_window_create(SeparateType type)
        folderview_init(folderview);
        summary_init(summaryview);
        messageview_init(messageview);
-       header_window_init(mainwin->headerwin);
        log_window_init(mainwin->logwin);
 
        mainwin->lock_count = 0;
+       mainwin->menu_lock_count = 0;
        mainwin->cursor_count = 0;
 
        if (!watch_cursor)
@@ -1070,6 +1064,17 @@ void main_window_unlock(MainWindow *mainwin)
                gtk_widget_set_sensitive(mainwin->ac_button, TRUE);
 }
 
+static void main_window_menu_callback_block(MainWindow *mainwin)
+{
+       mainwin->menu_lock_count++;
+}
+
+static void main_window_menu_callback_unblock(MainWindow *mainwin)
+{
+       if (mainwin->menu_lock_count)
+               mainwin->menu_lock_count--;
+}
+
 void main_window_reflect_prefs_all(void)
 {
        GList *cur;
@@ -1497,6 +1502,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
        GtkItemFactory *ifactory;
        SensitiveCond state;
        gboolean sensitive;
+       GtkWidget *menuitem;
        gint i;
 
        static const struct {
@@ -1517,8 +1523,7 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
 
                {"/Edit/Actions"                   , M_MSG_EXIST},
                {"/View/Sort"                      , M_MSG_EXIST},
-               {"/View/Thread view"               , M_UNTHREADED},
-               {"/View/Unthread view"             , M_THREADED},
+               {"/View/Thread view"               , M_EXEC},
                {"/View/Hide read messages"        , M_HIDE_READ_MSG},
                {"/View/Go to/Prev message"        , M_MSG_EXIST},
                {"/View/Go to/Next message"        , M_MSG_EXIST},
@@ -1565,6 +1570,14 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                sensitive = ((entry[i].cond & state) == entry[i].cond);
                menu_set_sensitive(ifactory, entry[i].entry, sensitive);
        }
+
+       main_window_menu_callback_block(mainwin);
+       menuitem = gtk_item_factory_get_widget(ifactory, "/View/Show all header");
+       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), FALSE);
+       menuitem = gtk_item_factory_get_widget(ifactory, "/View/Thread view");
+       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
+                                      (state & M_THREADED) != 0);
+       main_window_menu_callback_unblock(mainwin);
 }
 
 void main_window_popup(MainWindow *mainwin)
@@ -2626,7 +2639,9 @@ static void view_source_cb(MainWindow *mainwin, guint action,
 static void show_all_header_cb(MainWindow *mainwin, guint action,
                               GtkWidget *widget)
 {
-       summary_display_msg_selected(mainwin->summaryview, TRUE);
+       if (mainwin->menu_lock_count) return;
+       summary_display_msg_selected(mainwin->summaryview,
+                                    GTK_CHECK_MENU_ITEM(widget)->active);
 }
 
 static void reedit_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
@@ -2695,20 +2710,17 @@ static void thread_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
 {
        GtkItemFactory *ifactory;
 
+       if (mainwin->menu_lock_count) return;
        if (!mainwin->summaryview->folder_item) return;
 
        ifactory = gtk_item_factory_from_widget(widget);
 
-       if (0 == action) {
+       if (GTK_CHECK_MENU_ITEM(widget)->active) {
                summary_thread_build(mainwin->summaryview);
                mainwin->summaryview->folder_item->threaded = TRUE;
-               menu_set_sensitive(ifactory, "/View/Thread view",   FALSE);
-               menu_set_sensitive(ifactory, "/View/Unthread view", TRUE);
        } else {
                summary_unthread(mainwin->summaryview);
                mainwin->summaryview->folder_item->threaded = FALSE;
-               menu_set_sensitive(ifactory, "/View/Thread view",   TRUE);
-               menu_set_sensitive(ifactory, "/View/Unthread view", FALSE);
        }
 }
 
index 94ade66615cd8fd2052b709299a4fc50e00fa2de..a058647112cb4c48dccf6a89304c91a00898b0f5 100644 (file)
@@ -28,7 +28,6 @@ typedef struct _MainWindow    MainWindow;
 #include "summaryview.h"
 #include "headerview.h"
 #include "messageview.h"
-#include "headerwindow.h"
 #include "logwindow.h"
 
 typedef enum
@@ -131,12 +130,12 @@ struct _MainWindow
        ToolbarStyle toolbar_style;
 
        guint lock_count;
+       guint menu_lock_count;
        guint cursor_count;
 
        FolderView      *folderview;
        SummaryView     *summaryview;
        MessageView     *messageview;
-       HeaderWindow    *headerwin;
        LogWindow       *logwin;
 };
 
index 017f47f51050666db06e89bdb84d4bd04e43004e..032b4ca3f5e3d968f9f4c657d10225b22354dfa9 100644 (file)
@@ -3619,7 +3619,6 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/View/Expand Summary View\" \"V\")\n"
                "(menu-path \"<Main>/View/Expand Message View\" \"<shift>V\")\n"
                "(menu-path \"<Main>/View/Thread view\" \"<control>T\")\n"
-               "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
                "(menu-path \"<Main>/View/Go to/Prev message\" \"P\")\n"
                "(menu-path \"<Main>/View/Go to/Next message\" \"N\")\n"
                "(menu-path \"<Main>/View/Go to/Prev unread message\" \"<shift>P\")\n"
@@ -3672,7 +3671,6 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/View/Expand Summary View\" \"\")\n"
                "(menu-path \"<Main>/View/Expand Message View\" \"\")\n"
                "(menu-path \"<Main>/View/Thread view\" \"<shift>T\")\n"
-               "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
                "(menu-path \"<Main>/View/Go to/Prev message\" \"P\")\n"
                "(menu-path \"<Main>/View/Go to/Next message\" \"N\")\n"
                "(menu-path \"<Main>/View/Go to/Prev unread message\" \"<shift>P\")\n"
@@ -3724,7 +3722,6 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
 
                "(menu-path \"<Main>/View/Toggle summary view\" \"V\")\n"
                "(menu-path \"<Main>/View/Thread view\" \"<control>T\")\n"
-               "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
                "(menu-path \"<Main>/View/Go to/Prev message\" \"\")\n"
                "(menu-path \"<Main>/View/Go to/Next message\" \"\")\n"
                "(menu-path \"<Main>/View/Go to/Prev unread message\" \"\")\n"
@@ -3777,7 +3774,6 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/View/Expand Summary View\" \"\")\n"
                "(menu-path \"<Main>/View/Expand Message View\" \"\")\n"
                "(menu-path \"<Main>/View/Thread view\" \"<control>T\")\n"
-               "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
                "(menu-path \"<Main>/View/Go to/Prev message\" \"P\")\n"
                "(menu-path \"<Main>/View/Go to/Next message\" \"N\")\n"
                "(menu-path \"<Main>/View/Go to/Prev unread message\" \"<shift>P\")\n"
@@ -3830,7 +3826,6 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/View/Expand Summary View\" \"\")\n"
                "(menu-path \"<Main>/View/Expand Message View\" \"\")\n"
                "(menu-path \"<Main>/View/Thread view\" \"\")\n"
-               "(menu-path \"<Main>/View/Unthread view\" \"\")\n"
                "(menu-path \"<Main>/View/Go to/Prev message\" \"\")\n"
                "(menu-path \"<Main>/View/Go to/Next message\" \"\")\n"
                "(menu-path \"<Main>/View/Go to/Prev unread message\" \"\")\n"
index 3395369e217f1b22a82c74737ba27a92fad9a0bd..fa2d026a02971e4aa08e4d8d436f8ecd67b4b944 100644 (file)
 #include <fcntl.h>
 #include <errno.h>
 
-#if USE_THREADS
-#  include <pthread.h>
-#endif
-
 #include "socket.h"
 #include "utils.h"
 #if USE_SSL
@@ -336,55 +332,6 @@ static SockInfo *sockinfo_from_fd(const gchar *hostname,
        return sockinfo;
 }
 
-#if USE_THREADS
-static void sock_connect_thread(SockInfo *sockinfo)
-{
-#ifdef INET6
-       if ((sockinfo->sock = sock_connect_by_getaddrinfo
-               (sockinfo->hostname, sockinfo->port)) < 0)
-               pthread_exit((void *)1);
-#else
-       if (sock_connect_by_hostname(sockinfo->sock, sockinfo->hostname,
-                                    sockinfo->port) < 0) {
-               if (errno != 0) perror("connect");
-               sockinfo->state = CONN_FAILED;
-               pthread_exit((void *)1);
-       }
-#endif /* INET6 */
-       sockinfo->state = CONN_ESTABLISHED;
-
-       pthread_exit(0);
-}
-
-SockInfo *sock_connect_with_thread(const gchar *hostname, gushort port)
-{
-       gint sock = 0;
-       SockInfo *sockinfo;
-
-#ifndef INET6
-       if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
-               perror("socket");
-               return NULL;
-       }
-#endif /* !INET6 */
-
-       sockinfo = g_new0(SockInfo, 1);
-       sockinfo->sock = sock;
-       sockinfo->hostname = g_strdup(hostname);
-       sockinfo->port = port;
-       sockinfo->state = CONN_READY;
-
-       pthread_create(&sockinfo->connect_thr, NULL,
-                      (void *)sock_connect_thread,
-                      sockinfo);
-       pthread_mutex_init(&sockinfo->mutex, NULL);
-       pthread_detach(sockinfo->connect_thr);
-
-       return sockinfo;
-}
-#endif
-
-
 gint sock_printf(SockInfo *sock, const gchar *format, ...)
 {
        va_list args;
index 4b1bb02c9ccb30cc8d7242915bb408f79c926bb1..1b23d0f90744f7f524df87e6e4f457a85d5cd3a1 100644 (file)
 #include <glib.h>
 #include <gdk/gdk.h> /* ugly, just needed for the GdkInputCondition et al. */
 
-#if USE_THREADS
-#  include <pthread.h>
-#endif
-
 typedef struct _SockInfo       SockInfo;
 
 #if USE_SSL
@@ -59,10 +55,6 @@ struct _SockInfo
        gushort port;
        ConnectionState state;
        gpointer data;
-#if USE_THREADS
-       pthread_t connect_thr;
-       pthread_mutex_t mutex;
-#endif
 #if USE_SSL
        SSL *ssl;
 #endif
@@ -75,10 +67,6 @@ SockInfo *sock_connect_nb            (const gchar *hostname, gushort port);
 SockInfo *sock_connect                 (const gchar *hostname, gushort port);
 SockInfo *sock_connect_cmd             (const gchar *hostname, const gchar *tunnelcmd);
 
-#if USE_THREADS
-SockInfo *sock_connect_with_thread     (const gchar *hostname, gushort port);
-#endif
-
 gint sock_printf       (SockInfo *sock, const gchar *format, ...)
                         G_GNUC_PRINTF(2, 3);
 gint sock_read         (SockInfo *sock, gchar *buf, gint len);
index 9221c0698df19831df4c0667d13d53b36fa3062e..53b243bba4274cfd7d4ea6022a73ab7066bb7597 100644 (file)
@@ -58,7 +58,6 @@
 #include "foldersel.h"
 #include "procmsg.h"
 #include "procheader.h"
-#include "headerwindow.h"
 #include "sourcewindow.h"
 #include "prefs_common.h"
 #include "prefs_summary_column.h"
@@ -2371,11 +2370,6 @@ static void summary_display_msg_full(SummaryView *summaryview,
                summary_status_show(summaryview);
        }
 
-#if 0
-       if (GTK_WIDGET_VISIBLE(summaryview->headerwin->window))
-               header_window_show(summaryview->headerwin, msginfo);
-#endif
-
        summary_unlock(summaryview);
 }
 
index 0a678c9985260a152d3ea8c2550e429f20ed76e4..61be2228d71c21bc8dbfd79c14174965d2fe196d 100644 (file)
@@ -34,7 +34,6 @@ typedef struct _SummaryColumnState    SummaryColumnState;
 #include "folderview.h"
 #include "headerview.h"
 #include "messageview.h"
-#include "headerwindow.h"
 #include "compose.h"
 #include "prefs_filter.h"
 #include "folder.h"
@@ -132,7 +131,6 @@ struct _SummaryView
        FolderView   *folderview;
        HeaderView   *headerview;
        MessageView  *messageview;
-       HeaderWindow *headerwin;
 
        FolderItem *folder_item;
 
index 24fa9fbd087ab8e0a69a6ac3f1663f5887f8458c..75419c65b4723ce7e8d677730cb9a7d0ce68653c 100644 (file)
@@ -1067,8 +1067,8 @@ gchar **strsplit_with_quote(const gchar *str, const gchar *delim,
                            gint max_tokens)
 {
        GSList *string_list = NULL, *slist;
-       gchar **str_array, *s;
-       guint i, n = 1;
+       gchar **str_array, *s, *new_str;
+       guint i, n = 1, len;
 
        g_return_val_if_fail(str != NULL, NULL);
        g_return_val_if_fail(delim != NULL, NULL);
@@ -1081,13 +1081,15 @@ gchar **strsplit_with_quote(const gchar *str, const gchar *delim,
                guint delimiter_len = strlen(delim);
 
                do {
-                       guint len;
-                       gchar *new_str;
-
                        len = s - str;
-                       new_str = g_new(gchar, len + 1);
-                       strncpy(new_str, str, len);
-                       new_str[len] = 0;
+                       new_str = g_strndup(str, len);
+
+                       if (new_str[0] == '\'' || new_str[0] == '\"') {
+                               if (new_str[len - 1] == new_str[0]) {
+                                       new_str[len - 1] = '\0';
+                                       memmove(new_str, new_str + 1, len - 1);
+                               }
+                       }
                        string_list = g_slist_prepend(string_list, new_str);
                        n++;
                        str = s + delimiter_len;
@@ -1096,8 +1098,16 @@ gchar **strsplit_with_quote(const gchar *str, const gchar *delim,
        }
 
        if (*str) {
+               new_str = g_strdup(str);
+               if (new_str[0] == '\'' || new_str[0] == '\"') {
+                       len = strlen(str);
+                       if (new_str[len - 1] == new_str[0]) {
+                               new_str[len - 1] = '\0';
+                               memmove(new_str, new_str + 1, len - 1);
+                       }
+               }
+               string_list = g_slist_prepend(string_list, new_str);
                n++;
-               string_list = g_slist_prepend(string_list, g_strdup(str));
        }
 
        str_array = g_new(gchar*, n);
@@ -1856,6 +1866,8 @@ FILE *str_open_as_stream(const gchar *str)
        }
 
        len = strlen(str);
+       if (len == 0) return fp;
+
        if (fwrite(str, len, 1, fp) != 1) {
                FILE_OP_ERROR("str_open_as_stream", "fwrite");
                fclose(fp);
@@ -1922,25 +1934,10 @@ gint execute_sync(gchar *const argv[])
 gint execute_command_line(const gchar *cmdline, gboolean async)
 {
        gchar **argv;
-       gint i;
        gint ret;
 
        argv = strsplit_with_quote(cmdline, " ", 0);
 
-       for (i = 0; argv[i] != NULL; i++) {
-               gchar *str = argv[i];
-
-               if (str[0] == '\'' || str[0] == '\"') {
-                       gint len;
-
-                       len = strlen(str);
-                       if (str[len - 1] == str[0]) {
-                               str[len - 1] = '\0';
-                               memmove(str, str + 1, len - 1);
-                       }
-               }
-       }
-
        if (async)
                ret = execute_async(argv);
        else