From: Andrej Kacian Date: Thu, 28 Jul 2016 20:57:23 +0000 (+0200) Subject: Only enable "New Book" context menu entry for internal addressbook. X-Git-Tag: 3.14.0~14 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=ce7c6f57c60fd0a36623c426807c3bc9fb3f492a 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. --- diff --git a/src/addressbook.c b/src/addressbook.c index 59cbce457..94579bd55 100644 --- 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;