sync with sylpheed 0.5.0pre2
authorPaul Mangan <paul@claws-mail.org>
Fri, 22 Jun 2001 11:27:46 +0000 (11:27 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 22 Jun 2001 11:27:46 +0000 (11:27 +0000)
14 files changed:
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/export.c
src/foldersel.c
src/foldersel.h
src/folderview.c
src/imap.c
src/import.c
src/mainwindow.c
src/prefs_filter.c
src/prefs_filtering.c
src/summaryview.c

index b310392..7e38299 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2001-06-22
+
+       * src/imap.c: imap_cmd_status(): check the pointer to "value"
+         before the assignment (thanks to NISHIJIMA).
+
+2001-06-21
+
+       * src/folderview.c: folderview_drag_motion_cb(): don't allow DnD
+         across MH and IMAP4 folder (for now) (thanks to Hiramatu).
+       * src/foldersel.[ch]: don't show folders which can't be targets
+         for current folder.
+
 2001-06-20
 
        * version 0.5.0pre1
index 0d78b02..715ac14 100644 (file)
@@ -1,3 +1,9 @@
+2001-06-22 [paul]
+
+        0.5.0claws2
+
+        * sync with sylpheed 0.5.0pre2
+
 2001-06-21 [christoph]
 
        * src/summaryview.c
index 30d2a1b..622c2f4 100644 (file)
@@ -1,3 +1,15 @@
+2001-06-22
+
+       * src/imap.c: imap_cmd_status(): ÂåÆþ¤ÎÁ°¤Ë "value" ¤Ø¤Î¥Ý¥¤¥ó¥¿¤ò
+         ¥Á¥§¥Ã¥¯¤¹¤ë¤è¤¦¤Ë¤·¤¿(À¾Å礵¤ó thanks)¡£
+
+2001-06-21
+
+       * src/folderview.c: folderview_drag_motion_cb(): MH ¤È IMAP4 ¥Õ¥©¥ë¥À
+         ´Ö¤Î DnD ¤¬(º£¤Î¤È¤³¤í)¤Ç¤­¤Ê¤¤¤è¤¦¤Ë¤·¤¿(Ê¿¾¾¤µ¤ó thanks)¡£
+       * src/foldersel.[ch]: ¸½ºß¤Î¥Õ¥©¥ë¥À¤ÎÂоݤˤʤì¤Ê¤¤¥Õ¥©¥ë¥À¤ò
+         É½¼¨¤·¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£
+
 2001-06-20
 
        * version 0.5.0pre1
index 4789d3b..0126187 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws1
+EXTRA_VERSION=claws2
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index 37586f5..77b6155 100644 (file)
@@ -223,7 +223,7 @@ static void export_srcsel_cb(GtkWidget *widget, gpointer data)
 {
        FolderItem *src;
 
-       src = foldersel_folder_sel(NULL);
+       src = foldersel_folder_sel(NULL, NULL);
        if (src && src->path)
                gtk_entry_set_text(GTK_ENTRY(src_entry), src->path);
 }
index 386cbae..8a40459 100644 (file)
@@ -67,7 +67,7 @@ static gboolean cancelled;
 
 static void foldersel_create(void);
 static void foldersel_init(void);
-static void foldersel_set_tree(void);
+static void foldersel_set_tree(Folder *cur_folder);
 static void foldersel_selected(GtkCList *clist, gint row, gint column,
                               GdkEvent *event, gpointer data);
 
@@ -77,7 +77,8 @@ static void foldersel_activated(void);
 static gint delete_event(GtkWidget *widget, GdkEventAny *event, gpointer data);
 static void key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data);
 
-FolderItem *foldersel_folder_sel(const gchar *default_folder)
+FolderItem *foldersel_folder_sel(Folder *cur_folder,
+                                const gchar *default_folder)
 {
        GtkCTreeNode *node;
 
@@ -88,7 +89,7 @@ FolderItem *foldersel_folder_sel(const gchar *default_folder)
                gtk_widget_show(window);
        manage_window_set_transient(GTK_WINDOW(window));
 
-       foldersel_set_tree();
+       foldersel_set_tree(cur_folder);
 
        if (folder_item) {
                node = gtk_ctree_find_by_row_data
@@ -218,7 +219,7 @@ static void foldersel_expand_func(GtkCTree *ctree, GtkCTreeNode *node,
                gtk_ctree_expand(ctree, node);
 }
 
-static void foldersel_set_tree(void)
+static void foldersel_set_tree(Folder *cur_folder)
 {
        Folder *folder;
        GtkCTreeNode *node;
@@ -233,6 +234,13 @@ static void foldersel_set_tree(void)
                g_return_if_fail(folder != NULL);
 
                if (folder->type == F_NEWS) continue;
+               if (cur_folder) {
+                       if (cur_folder->type != folder->type) continue;
+                       if (cur_folder->type == F_IMAP) {
+                               if (cur_folder->account != folder->account)
+                                       continue;
+                       }
+               }
 
                node = gtk_ctree_insert_gnode(GTK_CTREE(ctree), NULL, NULL,
                                              folder->node,
index c8fc16e..447ad40 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "folder.h"
 
-FolderItem *foldersel_folder_sel(const gchar *default_folder);
+FolderItem *foldersel_folder_sel(Folder                *cur_folder,
+                                const gchar    *default_folder);
 
 #endif /* __FOLDERSEL_H__ */
index e23ac4c..0f2089c 100644 (file)
@@ -1958,30 +1958,42 @@ static gboolean folderview_drag_motion_cb(GtkWidget      *widget,
                                          FolderView     *folderview)
 {
        gint row, column;
-       FolderItem *item;
-       GtkCTreeNode *node;
+       FolderItem *item, *current_item;
+       GtkCTreeNode *node = NULL;
+       gboolean acceptable = FALSE;
 
        if (gtk_clist_get_selection_info(GTK_CLIST(widget),
                                         x - 24, y - 24, &row, &column)) {
                node = gtk_ctree_node_nth(GTK_CTREE(widget), row);
                item = gtk_ctree_node_get_row_data(GTK_CTREE(widget), node);
+               current_item = folderview->summaryview->folder_item;
                if (item != NULL &&
                    item->path != NULL &&
-                   folderview->summaryview->folder_item != item) {
-                       if (item->folder->type != F_NEWS) {
-                               gtk_ctree_select(GTK_CTREE(widget), node);
-                               gdk_drag_status(context,
-                                               context->suggested_action,
-                                               time);
-                               return TRUE;
+                   current_item != NULL &&
+                   current_item != item) {
+                       switch (item->folder->type){
+                       case F_MH:
+                               if (current_item->folder->type == F_MH)
+                                   acceptable = TRUE;
+                               break;
+                       case F_IMAP:
+                               if (current_item->folder->account == item->folder->account)
+                                   acceptable = TRUE;
+                               break;
+                       default:
                        }
                }
        }
 
-       gtk_ctree_select(GTK_CTREE(widget), folderview->opened);
-       gdk_drag_status(context, 0, time);
+       if (acceptable) {
+               gtk_ctree_select(GTK_CTREE(widget), node);
+               gdk_drag_status(context, context->suggested_action, time);
+       } else {
+               gtk_ctree_select(GTK_CTREE(widget), folderview->opened);
+               gdk_drag_status(context, 0, time);
+       }
 
-       return FALSE;
+       return acceptable;
 }
 
 static void folderview_drag_leave_cb(GtkWidget      *widget,
index 161ff21..fd61bb4 100644 (file)
@@ -1530,7 +1530,7 @@ static gint imap_cmd_status(SockInfo *sock, const gchar *folder,
        GPtrArray *argbuf;
        gchar *str;
 
-       *value = 0;
+       if (value) *value = 0;
        argbuf = g_ptr_array_new();
 
        if (strchr(folder, ' ') != NULL)
@@ -1549,7 +1549,7 @@ static gint imap_cmd_status(SockInfo *sock, const gchar *folder,
        str += strlen(status);
        if (*str != ' ') THROW;
        str++;
-       *value = atoi(str);
+       if (value) *value = atoi(str);
 
 catch:
        ptr_array_free_strings(argbuf);
index 38c70c8..bd89968 100644 (file)
@@ -227,7 +227,7 @@ static void import_destsel_cb(GtkWidget *widget, gpointer data)
 {
        FolderItem *dest;
 
-       dest = foldersel_folder_sel(NULL);
+       dest = foldersel_folder_sel(NULL, NULL);
        if (dest && dest->path)
                gtk_entry_set_text(GTK_ENTRY(dest_entry), dest->path);
 }
index ba5fc10..2db4790 100644 (file)
@@ -2303,7 +2303,7 @@ static void goto_folder_cb(MainWindow *mainwin, guint action,
 {
        FolderItem *to_folder;
 
-       to_folder = foldersel_folder_sel(NULL);
+       to_folder = foldersel_folder_sel(NULL, NULL);
 
        if (to_folder)
                folderview_select(mainwin->folderview, to_folder);
index 24438db..e370e4f 100644 (file)
@@ -693,7 +693,7 @@ static void prefs_filter_select_dest_cb(void)
 {
        FolderItem *dest;
 
-       dest = foldersel_folder_sel(NULL);
+       dest = foldersel_folder_sel(NULL, NULL);
        if (!dest) return;
 
        gtk_entry_set_text(GTK_ENTRY(filter.dest_entry), dest->path);
index cf111e9..87e4887 100644 (file)
@@ -903,7 +903,7 @@ static void prefs_filtering_select_dest(void)
        FolderItem *dest;
        gchar * path;
 
-       dest = foldersel_folder_sel(NULL);
+       dest = foldersel_folder_sel(NULL, NULL);
        if (!dest) return;
 
        path = folder_item_get_identifier(dest);
index 004dbbf..5725b8e 100644 (file)
@@ -2378,7 +2378,7 @@ void summary_move_to(SummaryView *summaryview)
        if (!summaryview->folder_item ||
            summaryview->folder_item->folder->type == F_NEWS) return;
 
-       to_folder = foldersel_folder_sel(NULL);
+       to_folder = foldersel_folder_sel(NULL, NULL);
        summary_move_selected_to(summaryview, to_folder);
 }
 
@@ -2441,7 +2441,7 @@ void summary_copy_to(SummaryView *summaryview)
        if (!summaryview->folder_item ||
            summaryview->folder_item->folder->type == F_NEWS) return;
 
-       to_folder = foldersel_folder_sel(NULL);
+       to_folder = foldersel_folder_sel(NULL, NULL);
        summary_copy_selected_to(summaryview, to_folder);
 }
 
@@ -3012,7 +3012,7 @@ static void summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
        case GDK_G:
                BREAK_ON_MODIFIER_KEY();
                KEY_PRESS_EVENT_STOP();
-               to_folder = foldersel_folder_sel(NULL);
+               to_folder = foldersel_folder_sel(NULL, NULL);
                if (to_folder) {
                        debug_print(_("Go to %s\n"), to_folder->path);
                        folderview_select(summaryview->folderview, to_folder);