Skip to content
Snippets Groups Projects
Commit 1aed04cb authored by Alexandre Savard's avatar Alexandre Savard
Browse files

#6027: Fix addressbook enabled test from configuration

parent 2e07dba2
Branches
Tags
No related merge requests found
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include "statusicon.h" #include "statusicon.h"
#include "contacts/addrbookfactory.h" #include "contacts/addrbookfactory.h"
#include "config/addressbook-config.h"
#include "accountlist.h" #include "accountlist.h"
#include "config/accountlistconfigdialog.h" #include "config/accountlistconfigdialog.h"
...@@ -186,8 +187,10 @@ update_actions() ...@@ -186,8 +187,10 @@ update_actions()
if(abookfactory_is_addressbook_loaded()) { if(abookfactory_is_addressbook_loaded()) {
AddrBookFactory *bookFactory = abookfactory_get_factory(); AddrBookFactory *bookFactory = abookfactory_get_factory();
AddressBook_Config *addressbook_config;
addressbook_config_load_parameters(&addressbook_config);
if (bookFactory->addrbook->is_enabled() && bookFactory->addrbook->is_ready()) { if (addressbook_config->enable && bookFactory->addrbook->is_ready()) {
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (contactButton), -1); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (contactButton), -1);
// Make the icon clickable only if at least one address book is active // Make the icon clickable only if at least one address book is active
......
...@@ -72,7 +72,7 @@ addressbook_is_enabled() ...@@ -72,7 +72,7 @@ addressbook_is_enabled()
// Load the address book parameters // Load the address book parameters
// addressbook_config_load_parameters (&addressbook_config); // addressbook_config_load_parameters (&addressbook_config);
return (guint) addressbook_config->enable; return (gboolean) addressbook_config->enable;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment