[Commits] [SCM] claws branch, master, updated. 3.13.2-212-gb848e66

ticho at claws-mail.org ticho at claws-mail.org
Thu Jul 28 22:55:52 CEST 2016


The branch, master has been updated
       via  b848e66f911494c9676ce74e145680c39fb5609e (commit)
      from  5164fae34b6e2e11c1e94959ed4e66c5e66004da (commit)

Summary of changes:
 src/addressbook.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit b848e66f911494c9676ce74e145680c39fb5609e
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Thu Jul 28 22:54:31 2016 +0200

    Fix sensitivity of "Delete book" menu entries in addressbook.
    
    Now it's possible to delete a read-only address datasource
    via popup menu.

diff --git a/src/addressbook.c b/src/addressbook.c
index 2761ff2..59cbce4 100644
--- a/src/addressbook.c
+++ b/src/addressbook.c
@@ -2555,11 +2555,11 @@ static gboolean addressbook_tree_button_pressed(GtkWidget *ctree,
 		if( !iface )
 			goto just_set_sens;
 		if( !iface->readOnly ) {
-			canDelete = TRUE;
 			cm_menu_set_sensitive_full( addrbook.ui_manager, "Popups/ABTreePopup/NewFolder", TRUE );
 			cm_menu_set_sensitive_full( addrbook.ui_manager, "Popups/ABTreePopup/NewGroup", TRUE );
 			gtk_widget_set_sensitive( addrbook.reg_btn, TRUE );
 		}
+		canDelete = TRUE;
 		canEdit = TRUE;
 		canTreeCopy = TRUE;
 	}
@@ -2614,7 +2614,6 @@ static gboolean addressbook_tree_button_pressed(GtkWidget *ctree,
 		canTreeCut = FALSE;
 		canTreePaste = FALSE;
 		canCut = FALSE;
-		canDelete = FALSE;
 		canPaste = FALSE;
 	}
 
@@ -2627,7 +2626,7 @@ just_set_sens:
 	cm_menu_set_sensitive_full( addrbook.ui_manager, "Popups/ABTreePopup/Paste",  canTreePaste );
 
 	cm_menu_set_sensitive_full( addrbook.ui_manager, "Menu/Book/EditBook",          canEdit );
-	cm_menu_set_sensitive_full( addrbook.ui_manager, "Menu/Book/DeleteBook",        canEdit );
+	cm_menu_set_sensitive_full( addrbook.ui_manager, "Menu/Book/DeleteBook",        canDelete );
 	cm_menu_set_sensitive_full( addrbook.ui_manager, "Menu/Address/Cut",           canCut );
 	cm_menu_set_sensitive_full( addrbook.ui_manager, "Menu/Address/Copy",          canCopy );
 	cm_menu_set_sensitive_full( addrbook.ui_manager, "Menu/Address/Paste",         canPaste );

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list