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

#5994: Installation of addressbook plugin

parent fa567d31
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,9 @@ src = $(top_srcdir)
ASTYLERC="$(top_srcdir)/../astylerc"
indent="/usr/bin/astyle"
sfllibdir=$(DESTDIR)$(libdir)/sflphone
sflplugindir=$(sfllibdir)/plugins
# Preprocessor flags
AM_CPPFLAGS = $(DEPS_CFLAGS) \
$(LIBSEXY_CFLAGS) \
......@@ -22,8 +25,8 @@ AM_CPPFLAGS = $(DEPS_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DLOCALEDIR=\""$(localedir)"\" \
-DSFLPHONE_UIDIR=\""$(datadir)/sflphone/ui"\"
-DSFLPHONE_UIDIR=\""$(datadir)/sflphone/ui"\" \
-DPLUGINS_DIR=\""$(sflplugindir)"\"
indent:
@echo "Indenting code:"
if [ -f $(ASTYLERC) ] ; then \
......
......@@ -52,23 +52,27 @@ void abookfactory_init_factory() {
}
void abookfactory_scan_directory(AddrBookFactory *factory) {
}
void abookfactory_load_module(AddrBookFactory *factory) {
AddrBookHandle *ab;
void *handle;
void *handle;
gchar *plugindir = PLUGINS_DIR;
gchar *pluginpath = g_strdup_printf("%s/libevladdrbook.so", plugindir);
DEBUG("AddressbookFactory: Loading addressbook");
DEBUG("AddressbookFactory: Loading addressbook: %s", pluginpath);
ab = g_malloc(sizeof(AddrBookHandle));
handle = dlopen("./src/contacts/addressbook/libevladdrbook.so", RTLD_LAZY);
handle = dlopen(pluginpath, RTLD_LAZY);
if(handle == NULL) {
ERROR("AddressbookFactory: Error: Could not load addressbook");
return;
}
g_free(pluginpath);
ab->init = dlsym(handle, "addressbook_init");
if(ab->init == NULL) {
......
......@@ -17,3 +17,8 @@ libevladdrbook_so_CFLAGS = -fPIC -g -Wall $(SFLGLIB_CFLAGS) $(SFLGTK_CFLAGS) $(L
# @SFLGTK_CFLAGS@ @SFLGLIB_CFLAGS@ @WEBKIT_CFLAGS@ @LIBEBOOK_CFLAGS@ \
# @LIBEDATASERVER_CFLAGS@ @LIBEDATASERVERUI_CFLAGS@ @LIBGNOMEUI_CFLAGS@ \
# @GNOMEDOCUTILS_CFLAGS@
install-exec-local: install-libplugin_libevladdrbook_so
install-libplugin_libevladdrbook_so: libevladdrbook.so
$(INSTALL_PROGRAM) libevladdrbook.so $(sflplugindir)
......@@ -115,8 +115,6 @@ update_actions()
g_object_ref (voicemailToolbar);
g_object_ref (imToolbar);
DEBUG("OK1");
if (is_inserted (GTK_WIDGET (hangUpWidget), GTK_WIDGET (toolbar))) {
gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (hangUpWidget));
}
......@@ -150,8 +148,6 @@ update_actions()
GTK_WIDGET (imToolbar));
}
DEBUG("OK2");
gtk_widget_set_sensitive (GTK_WIDGET (holdMenu), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (holdToolbar), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (offHoldToolbar), FALSE);
......@@ -186,8 +182,6 @@ update_actions()
gtk_widget_set_sensitive (GTK_WIDGET (historyButton), TRUE);
}
DEBUG("OK3");
// If addressbook support has been enabled and all addressbooks are loaded, display the icon
if(abookfactory_is_addressbook_loaded()) {
......@@ -204,7 +198,6 @@ update_actions()
}
}
DEBUG("OK4");
// g_signal_handler_block (GTK_OBJECT (recordWidget), recordButtonConnId);
// gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (recordWidget), FALSE);
// g_signal_handler_unblock (GTK_OBJECT (recordWidget), recordButtonConnId);
......@@ -214,8 +207,6 @@ update_actions()
gboolean instant_messaging_enabled = TRUE;
DEBUG("OK4");
if (eel_gconf_key_exists (INSTANT_MESSAGING_ENABLED))
instant_messaging_enabled = eel_gconf_get_integer (INSTANT_MESSAGING_ENABLED);
......@@ -408,7 +399,6 @@ update_actions()
update_voicemail_status();
}
}
DEBUG("OK5");
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment