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 60f89de22ba588c6d93006db98a8ad1a7c22cca6..048df319759c6a97c23176e248768c1e3b6862a2 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 16203e851ac66217df13f2752fa8c096f49d6691..368223f4d79befe12828ef5debeebc8b6769132b 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 094074a362f0f2092d506b1d9297d50f2037eb22..86a4bb258cfc3cb9755efff9aab590bf4b8ffe91 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 970fccc8c9aee49384e6c27e1f2c568e370b036a..616396a65fd184d910309426103a2c5d1144f148 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 155822ea7c430e85774adb04137e0fe86fd4c661..cc46b57c93161a7166207d7a5c6be85e6347848e 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 99d85d1506ff3eb95e94b8b12bd1ef9030ebf86d..c4e116c355a73e3f24538304cf63e284121b873b 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)
 {