[evolution-kolab/ek-wip-porting] eplugin: build fixes
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting] eplugin: build fixes
- Date: Tue, 13 Dec 2011 10:36:15 +0000 (UTC)
commit 3424803bbd0b8b9cae15a251acaa482bb0ec14f4
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Tue Dec 13 11:31:29 2011 +0100
eplugin: build fixes
* fix for GTK+ API change (GtkComboBox vs. GtkComboBoxText)
* replaced CamelException with GError
* added init values to function-local vars
* added some function arg assertions
* reformatted
src/eplugin/kolab-account-setup.c | 303 +++++++++++++++++++++++--------------
src/eplugin/kolab-account-setup.h | 19 ++-
2 files changed, 204 insertions(+), 118 deletions(-)
---
diff --git a/src/eplugin/kolab-account-setup.c b/src/eplugin/kolab-account-setup.c
index ffeac01..989d2e8 100644
--- a/src/eplugin/kolab-account-setup.c
+++ b/src/eplugin/kolab-account-setup.c
@@ -13,36 +13,35 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
*/
-
+
/*----------------------------------------------------------------------------*/
#include <config.h>
-#include "kolab-account-setup.h"
-
-#include <libekolab/kolab-types.h>
-#include <libekolab/kolab-util-backend.h>
-#include <libekolabutil/kolab-util-camel.h>
-#include <libekolabutil/kolab-util-folder.h>
-#include <libekolabutil/kolab-util-types.h>
#include <addressbook/gui/widgets/eab-config.h>
-#include <camel/camel-url.h>
-#include <camel/camel-exception.h>
#include <e-util/e-plugin-util.h>
#include <libecal/e-cal.h>
#include <libedataserver/e-source.h>
#include <libedataserver/e-source-list.h>
+#include <libekolab/kolab-types.h>
+#include <libekolab/kolab-util-backend.h>
+#include <libekolabutil/camel-system-headers.h>
+#include <libekolabutil/kolab-util-camel.h>
+#include <libekolabutil/kolab-util-folder.h>
+#include <libekolabutil/kolab-util-types.h>
+
+#include "kolab-account-setup.h"
/*----------------------------------------------------------------------------*/
@@ -69,22 +68,35 @@ typedef struct {
GtkEntry *kolab_servername;
GtkEntry *kolab_foldername;
GtkEntry *kolab_username;
- GtkComboBox *kolab_conflict_strategy;
- GtkComboBox *encryption_method;
+ GtkComboBoxText *kolab_conflict_strategy;
+ GtkComboBoxText *encryption_method;
GtkCheckButton *require_pkcs11_infrastructure;
GtkEntry *pkcs11_pin;
} kolab_ui_data;
-GtkWidget *kolab_account_setup_create_backend (EPlugin *epl, EConfigHookItemFactoryData *data, KolabWidgetType widget_type);
-GtkWidget *kolab_account_setup_create_calendar (EPlugin *epl, EConfigHookItemFactoryData *data);
-GtkWidget *kolab_account_setup_create_addressbook (EPlugin *epl, EConfigHookItemFactoryData *data);
+/*----------------------------------------------------------------------------*/
+
+GtkWidget*
+kolab_account_setup_create_backend (EPlugin *epl,
+ EConfigHookItemFactoryData *data,
+ KolabWidgetType widget_type);
+
+GtkWidget*
+kolab_account_setup_create_calendar (EPlugin *epl,
+ EConfigHookItemFactoryData *data);
+
+GtkWidget*
+kolab_account_setup_create_addressbook (EPlugin *epl,
+ EConfigHookItemFactoryData *data);
+
+
+/*----------------------------------------------------------------------------*/
+/* internal statics */
static void
ensure_kolab_sourcetype_source_group (ECalSourceType type)
{
- /* find the original code in google-source.c
- * and don't blame me for errors.
- */
+ /* find the original code in google-source.c */
ESourceList *slist;
if (!e_cal_get_sources (&slist, type, NULL)) {
@@ -92,13 +104,15 @@ ensure_kolab_sourcetype_source_group (ECalSourceType type)
return;
}
- e_source_list_ensure_group (slist, KOLAB_CAMEL_PROVIDER_NAME, KOLAB_URI_PREFIX, FALSE);
+ e_source_list_ensure_group (slist,
+ KOLAB_CAMEL_PROVIDER_NAME,
+ KOLAB_URI_PREFIX, FALSE);
g_object_unref (slist);
}
/**
* ensure_kolab_contacts_source_group:
- *
+ *
* Ensures the existence of the kolab contacts source entry in Evolutions
* source definitions.
*/
@@ -114,8 +128,8 @@ static void
ensure_kolab_contacts_source_group (void)
{
/* Find the original code in google-contacts-source.c. */
- ESourceList *source_list;
- const gchar *key;
+ ESourceList *source_list = NULL;
+ const gchar *key = NULL;
key = "/apps/evolution/addressbook/sources";
source_list = e_source_list_new_for_gconf_default (key);
@@ -123,43 +137,16 @@ ensure_kolab_contacts_source_group (void)
if (source_list == NULL)
return;
- e_source_list_ensure_group (source_list, KOLAB_CAMEL_PROVIDER_NAME, KOLAB_URI_PREFIX, FALSE);
+ e_source_list_ensure_group (source_list,
+ KOLAB_CAMEL_PROVIDER_NAME,
+ KOLAB_URI_PREFIX, FALSE);
g_object_unref (source_list);
}
-
-gint
-e_plugin_lib_enable (EPlugin *epl, gint enable)
-{
- /* api demo */
- (void) epl;
- if (enable) {
- /* init stuff, call some libekolab/ init function here */
- /*
- bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
- bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
- */
- ensure_kolab_calendar_source_groups ();
- ensure_kolab_contacts_source_group ();
- g_debug ("%s(): Kolab plugin enabled", __func__);
- } else {
- g_debug ("Kolab plugin disabled");
- }
- return 0;
-}
-
-gboolean org_gnome_kolab_check_options(EPlugin *epl, EConfigHookPageCheckData *data)
-{
- /* TODO: Implement correct handling of options checking. */
- (void) epl;
- (void) data;
- return TRUE;
-}
-
static void
destroy_ui_data (gpointer data)
{
- kolab_ui_data *ui = data;
+ kolab_ui_data *ui = (kolab_ui_data*) data;
if (ui && ui->kolab_box)
gtk_widget_destroy (ui->kolab_box);
@@ -167,7 +154,7 @@ destroy_ui_data (gpointer data)
g_free (ui);
}
-static void
+static void
set_ui_from_source (kolab_ui_data *uidata)
{
ESource *source = NULL;
@@ -176,14 +163,14 @@ set_ui_from_source (kolab_ui_data *uidata)
const gchar *sync_prop = NULL;
const gchar *enc_prop = NULL;
const gchar *req_pkcs11_prop = NULL;
- const gchar *pin_prop;
- KolabSyncStrategyID sync_value;
- KolabTLSVariantID enc_value;
+ const gchar *pin_prop = NULL;
+ KolabSyncStrategyID sync_value = KOLAB_SYNC_STRATEGY_DEFAULT;
+ KolabTLSVariantID enc_value = KOLAB_TLS_VARIANT_DEFAULT;
KolabReqPkcs11 req_pkcs11_value;
CamelURL *c_url = NULL;
- CamelException *cex = NULL;
+ GError *tmp_error = NULL;
-g_debug ("%s()[%u] called.", __func__, __LINE__);
+ g_debug ("%s()[%u] called.", __func__, __LINE__);
g_return_if_fail ((uidata != NULL) && (uidata->source != NULL));
source = uidata->source;
@@ -197,18 +184,17 @@ g_debug ("%s()[%u] called.", __func__, __LINE__);
req_pkcs11_value = kolab_util_misc_req_pkcs11_from_property (req_pkcs11_prop);
pin_prop = e_source_get_property (source, KOLAB_PKCS11_PIN_PROP);
- cex = camel_exception_new ();
- c_url = camel_url_new (kolab_uri, cex);
+ c_url = camel_url_new (kolab_uri, &tmp_error);
if (c_url == NULL) {
- g_warning ("%s()[%u] error: %s", __func__, __LINE__, camel_exception_get_description (cex));
- camel_exception_free (cex);
+ g_warning ("%s()[%u] error: %s",
+ __func__, __LINE__, tmp_error->message);
+ g_error_free (tmp_error);
return;
}
- camel_exception_free (cex);
if (c_url == NULL)
goto cleanup;
-
+
if ((c_url->path != NULL) && (c_url->path[0] == '/'))
path = c_url->path+1;
else
@@ -220,7 +206,7 @@ g_debug ("%s()[%u] called.", __func__, __LINE__);
gtk_entry_set_text (uidata->kolab_foldername, path);
if (c_url->user != NULL)
gtk_entry_set_text (uidata->kolab_username, c_url->user);
- gtk_combo_box_set_active (uidata->encryption_method, enc_value);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (uidata->encryption_method), enc_value);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (uidata->require_pkcs11_infrastructure), req_pkcs11_value);
if (pin_prop != NULL)
gtk_entry_set_text (uidata->pkcs11_pin, pin_prop);
@@ -246,18 +232,19 @@ g_debug ("%s()[%u] called.", __func__, __LINE__);
else {
gtk_widget_set_sensitive (GTK_WIDGET (uidata->pkcs11_pin), FALSE);
}
-
+
/* Options */
- gtk_combo_box_set_active (uidata->kolab_conflict_strategy, sync_value);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (uidata->kolab_conflict_strategy), sync_value);
-cleanup:
+ cleanup:
g_free (kolab_uri);
camel_url_free (c_url);
return;
} /* set_ui_from_source () */
static void
-set_source_from_ui (kolab_ui_data *uidata, const gchar *authvalue)
+set_source_from_ui (kolab_ui_data *uidata,
+ const gchar *authvalue)
{
const gchar *servername = NULL;
const gchar *foldername = NULL;
@@ -276,7 +263,7 @@ set_source_from_ui (kolab_ui_data *uidata, const gchar *authvalue)
servername = gtk_entry_get_text (uidata->kolab_servername);
foldername = gtk_entry_get_text (uidata->kolab_foldername);
username = gtk_entry_get_text (uidata->kolab_username);
- sync_value = gtk_combo_box_get_active (uidata->kolab_conflict_strategy);
+ sync_value = gtk_combo_box_get_active (GTK_COMBO_BOX (uidata->kolab_conflict_strategy));
if (sync_value < 0) {
/* No value set, defaulting to KOLAB_SYNC_STRATEGY_DEFAULT */
sync_value = KOLAB_SYNC_STRATEGY_DEFAULT;
@@ -284,7 +271,7 @@ set_source_from_ui (kolab_ui_data *uidata, const gchar *authvalue)
/* Treat sync_value as unsigned. */
sync_prop = g_strdup_printf ("%u", sync_value);
- enc_value = gtk_combo_box_get_active (uidata->encryption_method);
+ enc_value = gtk_combo_box_get_active (GTK_COMBO_BOX (uidata->encryption_method));
if (enc_value < 0) {
enc_value = KOLAB_TLS_VARIANT_DEFAULT;
}
@@ -304,8 +291,8 @@ set_source_from_ui (kolab_ui_data *uidata, const gchar *authvalue)
/* Userinfo: Kolab acounts usually resemble the users complete email
* address. The URI part of an ESource requires the Userinfo, because
- * someone might want to setup access to addressbooks/calendars of
- * different accounts, which share the same name. E.g. the default
+ * someone might want to setup access to addressbooks/calendars of
+ * different accounts, which share the same name. E.g. the default
* calendar folder INBOX/calendar of account A and Account B.
* In the Userinfo we have to escape reserved characters.
*/
@@ -352,8 +339,44 @@ set_calendar_source_from_ui_cb (kolab_ui_data *uidata)
set_source_from_ui (uidata, "true");
}
-GtkWidget *
-kolab_account_setup_create_backend (EPlugin *epl, EConfigHookItemFactoryData *data, KolabWidgetType widget_type)
+/*----------------------------------------------------------------------------*/
+/* public API */
+
+gint
+e_plugin_lib_enable (EPlugin *epl,
+ gint enable)
+{
+ /* api demo */
+ g_assert (E_IS_PLUGIN (epl));
+ if (enable) {
+ /* init stuff, call some libekolab/ init function here */
+ /*
+ bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+ */
+ ensure_kolab_calendar_source_groups ();
+ ensure_kolab_contacts_source_group ();
+ g_debug ("%s(): Kolab plugin enabled", __func__);
+ } else {
+ g_debug ("%s(): Kolab plugin disabled", __func__);
+ }
+ return 0;
+}
+
+gboolean
+org_gnome_kolab_check_options(EPlugin *epl,
+ EConfigHookPageCheckData *data)
+{
+ /* TODO: Implement correct handling of options checking. */
+ g_assert (E_IS_PLUGIN (epl));
+ (void) data;
+ return TRUE;
+}
+
+GtkWidget*
+kolab_account_setup_create_backend (EPlugin *epl,
+ EConfigHookItemFactoryData *data,
+ KolabWidgetType widget_type)
{
EABConfigTargetSource *t = (EABConfigTargetSource *) data->target;
GtkWidget *parent = data->parent;
@@ -366,14 +389,16 @@ kolab_account_setup_create_backend (EPlugin *epl, EConfigHookItemFactoryData *da
GtkWidget *label = NULL;
ESource *source = t->source;
ESourceGroup *group = NULL;
- const gchar *base_uri = NULL;
+ /* const gchar *base_uri = NULL; */
kolab_ui_data *uidata = NULL;
gint i;
- /* Have to check, wether this is to be done for the appropriate backend... */
+ g_assert (E_IS_PLUGIN (epl));
+
+ /* Have to check wether this is to be done for the appropriate backend... */
group = e_source_peek_group (source);
- base_uri = e_source_group_peek_base_uri (group);
+ /* base_uri = e_source_group_peek_base_uri (group); */
g_object_set_data (G_OBJECT (epl), KOLAB_EPLUGIN_WIDGET_NAME, NULL);
@@ -413,7 +438,7 @@ kolab_account_setup_create_backend (EPlugin *epl, EConfigHookItemFactoryData *da
gtk_box_pack_start (GTK_BOX (kolab_vbox), GTK_WIDGET (hbox), TRUE, TRUE, 0);
spacer = gtk_label_new(" ");
gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
- if (widget_type==KOLAB_CONTACT_WIDGET)
+ if (widget_type==KOLAB_CONTACT_WIDGET)
label = gtk_label_new_with_mnemonic("Contact Folder:");
else
label = gtk_label_new_with_mnemonic("Calendar Folder:");
@@ -438,12 +463,12 @@ kolab_account_setup_create_backend (EPlugin *epl, EConfigHookItemFactoryData *da
gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic("Encryption method:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- uidata->encryption_method = GTK_COMBO_BOX(gtk_combo_box_new_text ());
+ uidata->encryption_method = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new ());
gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (uidata->encryption_method), TRUE, TRUE, 0);
for (i = KOLAB_TLS_FIRST_VARIANT; i < KOLAB_TLS_LAST_VARIANT; i++) {
- gtk_combo_box_append_text (uidata->encryption_method, kolab_tls_variant_desc[i]);
+ gtk_combo_box_text_append (uidata->encryption_method, NULL, kolab_tls_variant_desc[i]);
}
- gtk_combo_box_set_active (uidata->encryption_method, KOLAB_TLS_VARIANT_DEFAULT);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (uidata->encryption_method), KOLAB_TLS_VARIANT_DEFAULT);
/* PKCS #11 infrastructure initiation */
hbox = gtk_hbox_new (FALSE, 10);
@@ -470,12 +495,12 @@ kolab_account_setup_create_backend (EPlugin *epl, EConfigHookItemFactoryData *da
gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic ("Conflict solving strategy:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- uidata->kolab_conflict_strategy = GTK_COMBO_BOX (gtk_combo_box_new_text ());
+ uidata->kolab_conflict_strategy = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new ());
gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (uidata->kolab_conflict_strategy), TRUE, TRUE, 0);
for (i = KOLAB_SYNC_FIRST_STRATEGY; i < KOLAB_SYNC_LAST_STRATEGY; i++) {
- gtk_combo_box_append_text (uidata->kolab_conflict_strategy, kolab_sync_strategy_desc[i]);
+ gtk_combo_box_text_append (uidata->kolab_conflict_strategy, NULL, kolab_sync_strategy_desc[i]);
}
- gtk_combo_box_set_active (uidata->kolab_conflict_strategy, KOLAB_SYNC_STRATEGY_DEFAULT);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (uidata->kolab_conflict_strategy), KOLAB_SYNC_STRATEGY_DEFAULT);
if (e_source_get_property (source, KOLAB_SYNC_STRATEGY_PROP) != NULL) {
uidata->is_new = FALSE;
@@ -493,44 +518,98 @@ kolab_account_setup_create_backend (EPlugin *epl, EConfigHookItemFactoryData *da
g_signal_connect (uidata->kolab_box, "destroy", G_CALLBACK (gtk_widget_destroyed), &uidata->kolab_box);
if (widget_type == KOLAB_CONTACT_WIDGET) {
- g_signal_connect_swapped (G_OBJECT (uidata->kolab_username), "changed", G_CALLBACK (set_contact_source_from_ui_cb), uidata);
- g_signal_connect_swapped (G_OBJECT (uidata->kolab_foldername), "changed", G_CALLBACK (set_contact_source_from_ui_cb), uidata);
- g_signal_connect_swapped (G_OBJECT (uidata->kolab_servername), "changed", G_CALLBACK (set_contact_source_from_ui_cb), uidata);
- g_signal_connect_swapped (G_OBJECT (uidata->kolab_conflict_strategy), "changed", G_CALLBACK (set_contact_source_from_ui_cb), uidata);
- g_signal_connect_swapped (G_OBJECT (uidata->encryption_method), "changed", G_CALLBACK (set_contact_source_from_ui_cb), uidata);
- g_signal_connect_swapped (G_OBJECT (uidata->require_pkcs11_infrastructure), "toggled", G_CALLBACK (set_contact_source_from_ui_cb), uidata);
- g_signal_connect_swapped (G_OBJECT (uidata->pkcs11_pin), "changed", G_CALLBACK (set_contact_source_from_ui_cb), uidata);
- }
- else {
- g_signal_connect_swapped (G_OBJECT (uidata->kolab_username), "changed", G_CALLBACK (set_calendar_source_from_ui_cb), uidata);
- g_signal_connect_swapped (G_OBJECT (uidata->kolab_foldername), "changed", G_CALLBACK (set_calendar_source_from_ui_cb), uidata);
- g_signal_connect_swapped (G_OBJECT (uidata->kolab_servername), "changed", G_CALLBACK (set_calendar_source_from_ui_cb), uidata);
- g_signal_connect_swapped (G_OBJECT (uidata->kolab_conflict_strategy), "changed", G_CALLBACK (set_calendar_source_from_ui_cb), uidata);
- g_signal_connect_swapped (G_OBJECT (uidata->encryption_method), "changed", G_CALLBACK (set_calendar_source_from_ui_cb), uidata);
- g_signal_connect_swapped (G_OBJECT (uidata->require_pkcs11_infrastructure), "toggled", G_CALLBACK (set_calendar_source_from_ui_cb), uidata);
- g_signal_connect_swapped (G_OBJECT (uidata->pkcs11_pin), "changed", G_CALLBACK (set_calendar_source_from_ui_cb), uidata);
+ g_signal_connect_swapped (G_OBJECT (uidata->kolab_username),
+ "changed",
+ G_CALLBACK (set_contact_source_from_ui_cb),
+ uidata);
+ g_signal_connect_swapped (G_OBJECT (uidata->kolab_foldername),
+ "changed",
+ G_CALLBACK (set_contact_source_from_ui_cb),
+ uidata);
+ g_signal_connect_swapped (G_OBJECT (uidata->kolab_servername),
+ "changed",
+ G_CALLBACK (set_contact_source_from_ui_cb),
+ uidata);
+ g_signal_connect_swapped (G_OBJECT (uidata->kolab_conflict_strategy),
+ "changed",
+ G_CALLBACK (set_contact_source_from_ui_cb),
+ uidata);
+ g_signal_connect_swapped (G_OBJECT (uidata->encryption_method),
+ "changed",
+ G_CALLBACK (set_contact_source_from_ui_cb),
+ uidata);
+ g_signal_connect_swapped (G_OBJECT (uidata->require_pkcs11_infrastructure),
+ "toggled",
+ G_CALLBACK (set_contact_source_from_ui_cb),
+ uidata);
+ g_signal_connect_swapped (G_OBJECT (uidata->pkcs11_pin),
+ "changed",
+ G_CALLBACK (set_contact_source_from_ui_cb),
+ uidata);
+ } else {
+ g_signal_connect_swapped (G_OBJECT (uidata->kolab_username),
+ "changed",
+ G_CALLBACK (set_calendar_source_from_ui_cb),
+ uidata);
+ g_signal_connect_swapped (G_OBJECT (uidata->kolab_foldername),
+ "changed",
+ G_CALLBACK (set_calendar_source_from_ui_cb),
+ uidata);
+ g_signal_connect_swapped (G_OBJECT (uidata->kolab_servername),
+ "changed",
+ G_CALLBACK (set_calendar_source_from_ui_cb),
+ uidata);
+ g_signal_connect_swapped (G_OBJECT (uidata->kolab_conflict_strategy),
+ "changed",
+ G_CALLBACK (set_calendar_source_from_ui_cb),
+ uidata);
+ g_signal_connect_swapped (G_OBJECT (uidata->encryption_method),
+ "changed",
+ G_CALLBACK (set_calendar_source_from_ui_cb),
+ uidata);
+ g_signal_connect_swapped (G_OBJECT (uidata->require_pkcs11_infrastructure),
+ "toggled",
+ G_CALLBACK (set_calendar_source_from_ui_cb),
+ uidata);
+ g_signal_connect_swapped (G_OBJECT (uidata->pkcs11_pin),
+ "changed",
+ G_CALLBACK (set_calendar_source_from_ui_cb),
+ uidata);
}
return NULL;
}
-GtkWidget *
-kolab_account_setup_create_calendar (EPlugin *epl, EConfigHookItemFactoryData *data)
+GtkWidget*
+kolab_account_setup_create_calendar (EPlugin *epl,
+ EConfigHookItemFactoryData *data)
{
- kolab_account_setup_create_backend (epl, data, KOLAB_CALENDAR_WIDGET);
+ g_assert (E_IS_PLUGIN (epl));
+
+ kolab_account_setup_create_backend (epl,
+ data,
+ KOLAB_CALENDAR_WIDGET);
return NULL;
}
-GtkWidget *
-kolab_account_setup_create_addressbook (EPlugin *epl, EConfigHookItemFactoryData *data)
+GtkWidget*
+kolab_account_setup_create_addressbook (EPlugin *epl,
+ EConfigHookItemFactoryData *data)
{
- kolab_account_setup_create_backend (epl, data, KOLAB_CONTACT_WIDGET);
+ g_assert (E_IS_PLUGIN (epl));
+
+ kolab_account_setup_create_backend (epl,
+ data,
+ KOLAB_CONTACT_WIDGET);
return NULL;
}
-GtkWidget *
-org_gnome_kolab_account_setup (EPlugin *epl, EConfigHookItemFactoryData *data)
+GtkWidget*
+org_gnome_kolab_account_setup (EPlugin *epl,
+ EConfigHookItemFactoryData *data)
{
+ g_assert (E_IS_PLUGIN (epl));
+
g_debug ("%s() called.\n", __func__);
g_debug (" + epl: %p", (void*)epl);
g_debug (" + data: %p", (void*)data);
diff --git a/src/eplugin/kolab-account-setup.h b/src/eplugin/kolab-account-setup.h
index 0cce427..de33bea 100644
--- a/src/eplugin/kolab-account-setup.h
+++ b/src/eplugin/kolab-account-setup.h
@@ -12,17 +12,17 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
*/
-
+
/*----------------------------------------------------------------------------*/
#ifndef _KOLAB_ACCOUNT_SETUP_H_
@@ -40,9 +40,16 @@
/* prototypes */
-gint e_plugin_lib_enable (EPlugin*, gint);
-GtkWidget *org_gnome_kolab_account_setup (EPlugin *epl, EConfigHookItemFactoryData *data);
-gboolean org_gnome_kolab_check_options(EPlugin *epl, EConfigHookPageCheckData *data);
+gint
+e_plugin_lib_enable (EPlugin*, gint);
+
+GtkWidget*
+org_gnome_kolab_account_setup (EPlugin *epl,
+ EConfigHookItemFactoryData *data);
+
+gboolean
+org_gnome_kolab_check_options(EPlugin *epl,
+ EConfigHookPageCheckData *data);
/*----------------------------------------------------------------------------*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]