commit ce7c6f57c60fd0a36623c426807c3bc9fb3f492a
parent b848e66f911494c9676ce74e145680c39fb5609e
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Thu, 28 Jul 2016 22:57:23 +0200
Only enable "New Book" context menu entry for internal addressbook.
It was confusing to have it active on e.g. LDAP server interface,
when it really only adds a new XML addressbook.
Also, do not enable the "New" button when right-clicking the XML
addressbook interface line, as the button doesn't do anything
useful for interfaces.
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/addressbook.c b/src/addressbook.c
@@ -2538,9 +2538,8 @@ static gboolean addressbook_tree_button_pressed(GtkWidget *ctree,
iface = adapter->interface;
if( !iface )
goto just_set_sens;
- if( !iface->readOnly ) {
+ if( !iface->readOnly && iface->type == ADDR_IF_BOOK) {
cm_menu_set_sensitive_full( addrbook.ui_manager, "Popups/ABTreePopup/NewBook", TRUE );
- gtk_widget_set_sensitive( addrbook.reg_btn, TRUE );
}
if( iface->externalQuery )
canLookup = TRUE;