2005-01-04 [christoph] 0.9.13cvs27
authorChristoph Hohmann <reboot@gmx.ch>
Tue, 4 Jan 2005 13:57:23 +0000 (13:57 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Tue, 4 Jan 2005 13:57:23 +0000 (13:57 +0000)
* src/folderview.c
* src/imap_gtk.c
* src/news_gtk.c
Create extra popup menu entries for account settings

(Closes Bug 663 segfault choosing "Properties" for root MH mailbox)

ChangeLog.claws
PATCHSETS
configure.ac
src/folderview.c
src/imap_gtk.c
src/news_gtk.c

index 60f89de..048df31 100644 (file)
@@ -1,3 +1,12 @@
+2005-01-04 [christoph] 0.9.13cvs27
+
+       * src/folderview.c
+       * src/imap_gtk.c
+       * src/news_gtk.c
+               Create extra popup menu entries for account settings
+
+       (Closes Bug 663 segfault choosing "Properties" for root MH mailbox)
+
 2005-01-03 [colin]     0.9.13cvs26
 
        * src/main.c
index 16203e8..368223f 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.101 -r 1.102 src/procmime.c; ) > 0.9.13cvs24.patchset
 ( cvs diff -u -r 1.72 -r 1.73 src/pop.c; cvs diff -u -r 1.22 -r 1.23 src/pop.h; ) > 0.9.13cvs25.patchset
 ( cvs diff -u -r 1.150 -r 1.151 src/main.c; ) > 0.9.13cvs26.patchset
+( cvs diff -u -r 1.253 -r 1.254 src/folderview.c; cvs diff -u -r 1.3 -r 1.4 src/imap_gtk.c; cvs diff -u -r 1.3 -r 1.4 src/news_gtk.c; ) > 0.9.13cvs27.patchset
index 094074a..86a4bb2 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=13
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=26
+EXTRA_VERSION=27
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index 970fccc..616396a 100644 (file)
@@ -1422,7 +1422,7 @@ static void folderview_button_pressed(GtkWidget *ctree, GdkEventButton *event,
        SET_SENS("/Mark all read", item->unread_msgs >= 1);
        SET_SENS("/Search folder...", item->total_msgs >= 1 && 
                 folderview->selected == folderview->opened);
-       SET_SENS("/Properties...", TRUE);
+       SET_SENS("/Properties...", item->node->parent != NULL);
        SET_SENS("/Processing...", item->node->parent != NULL);
        if (item == folder->trash)
                SET_SENS("/Empty trash...", folder_item_get_msg_list(item) != NULL);
@@ -1732,11 +1732,10 @@ static void folderview_property_cb(FolderView *folderview, guint action,
        g_return_if_fail(item != NULL);
        g_return_if_fail(item->folder != NULL);
 
-       if (folder_item_parent(item) == NULL && item->folder->account)
-               account_open(item->folder->account);
-       else {
-               prefs_folder_item_open(item);
-       }
+       if (folder_item_parent(item) == NULL)
+               return;
+
+       prefs_folder_item_open(item);
 }
 
 static void folderview_recollapse_nodes(FolderView *folderview, GtkCTreeNode *node)
index 155822e..cc46b57 100644 (file)
@@ -42,6 +42,7 @@
 static void new_folder_cb(FolderView *folderview, guint action, GtkWidget *widget);
 static void rename_folder_cb(FolderView *folderview, guint action, GtkWidget *widget);
 static void move_folder_cb(FolderView *folderview, guint action, GtkWidget *widget);
+static void imap_settings_cb(FolderView *folderview, guint action, GtkWidget *widget);
 static void remove_server_cb(FolderView *folderview, guint action, GtkWidget *widget);
 static void delete_folder_cb(FolderView *folderview, guint action, GtkWidget *widget);
 static void update_tree_cb(FolderView *folderview, guint action, GtkWidget *widget);
@@ -59,6 +60,7 @@ static GtkItemFactoryEntry imap_popup_entries[] =
        {N_("/_Check for new messages"), NULL, update_tree_cb,   0, NULL},
        {N_("/R_ebuild folder tree"),    NULL, update_tree_cb,   1, NULL},
        {N_("/---"),                     NULL, NULL,             0, "<Separator>"},
+       {N_("/IMAP4 _account settings"), NULL, imap_settings_cb, 0, NULL},
        {N_("/Remove _IMAP4 account"),   NULL, remove_server_cb, 0, NULL},
        {N_("/---"),                     NULL, NULL,             0, "<Separator>"},
 };
@@ -231,6 +233,17 @@ static void move_folder_cb(FolderView *folderview, guint action, GtkWidget *widg
        folderview_move_folder(folderview, from_folder, to_folder);
 }
 
+static void imap_settings_cb(FolderView *folderview, guint action, GtkWidget *widget)
+{
+       FolderItem *item;
+
+       item = folderview_get_selected_item(folderview);
+       if (item == NULL)
+               return;
+
+       account_open(item->folder->account);
+}
+
 static void remove_server_cb(FolderView *folderview, guint action, GtkWidget *widget)
 {
        GtkCTree *ctree = GTK_CTREE(folderview->ctree);
index 99d85d1..c4e116c 100644 (file)
@@ -40,6 +40,7 @@
 
 static void subscribe_newsgroup_cb(FolderView *folderview, guint action, GtkWidget *widget);
 static void unsubscribe_newsgroup_cb(FolderView *folderview, guint action, GtkWidget *widget);
+static void news_settings_cb(FolderView *folderview, guint action, GtkWidget *widget);
 static void remove_news_server_cb(FolderView *folderview, guint action, GtkWidget *widget);
 static void update_tree_cb(FolderView *folderview, guint action, GtkWidget *widget);
 static void download_cb(FolderView *folderview, guint action, GtkWidget *widget);
@@ -53,6 +54,7 @@ static GtkItemFactoryEntry news_popup_entries[] =
        {N_("/---"),                            NULL, NULL,                      0, "<Separator>"},
        {N_("/_Check for new messages"),        NULL, update_tree_cb,            0, NULL},
        {N_("/---"),                            NULL, NULL,                      0, "<Separator>"},
+       {N_("/News _account settings"),         NULL, news_settings_cb,          0, NULL},
        {N_("/Remove _news account"),           NULL, remove_news_server_cb,     0, NULL},
        {N_("/---"),                            NULL, NULL,                      0, "<Separator>"},
 };
@@ -218,6 +220,17 @@ static void unsubscribe_newsgroup_cb(FolderView *folderview, guint action,
        g_free(old_id);
 }
 
+static void news_settings_cb(FolderView *folderview, guint action, GtkWidget *widget)
+{
+       FolderItem *item;
+
+       item = folderview_get_selected_item(folderview);
+       if (item == NULL)
+               return;
+
+       account_open(item->folder->account);
+}
+
 static void remove_news_server_cb(FolderView *folderview, guint action,
                                  GtkWidget *widget)
 {