[evolution-kolab/ek-wip-gui: 6/13] EPlugin: added files for plugin UI extensions
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-gui: 6/13] EPlugin: added files for plugin UI extensions
- Date: Thu, 16 Feb 2012 14:38:37 +0000 (UTC)
commit 456cc01378fe3351df348d1ad140d2daf653532e
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Fri Feb 10 18:08:45 2012 +0100
EPlugin: added files for plugin UI extensions
* initialization and UI logic for the Kolab UI extensions
(context menus, XFB tooltip, F/B warnings etc.) should
go to e-kolab-plugin-ui.[hc]
* non-UI-logic should go to the respective (mostly)
UI-less files
* this is to separate out UI-logic from non-UI-logic
in anticipation of the advent of EExtension
src/eplugin/Makefile.am | 2 +
src/eplugin/e-kolab-plugin-ui.c | 95 +++++++++++++++++++++++++++++++++++++++
src/eplugin/e-kolab-plugin-ui.h | 67 +++++++++++++++++++++++++++
src/eplugin/e-kolab-plugin.c | 41 +++++++++++------
4 files changed, 190 insertions(+), 15 deletions(-)
---
diff --git a/src/eplugin/Makefile.am b/src/eplugin/Makefile.am
index befaf56..c52011f 100644
--- a/src/eplugin/Makefile.am
+++ b/src/eplugin/Makefile.am
@@ -14,6 +14,7 @@ noinst_HEADERS = \
e-kolab-folder-metadata.h \
e-kolab-folder-permissions.h \
e-kolab-freebusy.h \
+ e-kolab-plugin-ui.h \
e-kolab-plugin.h
@EVO_PLUGIN_RULE@
@@ -27,6 +28,7 @@ liborg_gnome_kolab_la_SOURCES = \
e-kolab-folder-metadata.c \
e-kolab-folder-permissions.c \
e-kolab-freebusy.c \
+ e-kolab-plugin-ui.c \
e-kolab-plugin.c
liborg_gnome_kolab_la_LDFLAGS = -module -avoid-version
diff --git a/src/eplugin/e-kolab-plugin-ui.c b/src/eplugin/e-kolab-plugin-ui.c
new file mode 100644
index 0000000..c6ffab3
--- /dev/null
+++ b/src/eplugin/e-kolab-plugin-ui.c
@@ -0,0 +1,95 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/***************************************************************************
+ * e-kolab-plugin-ui.c
+ *
+ * Fri Feb 10 17:21:05 2012
+ * Copyright 2012 Christian Hilberg
+ * <hilberg kernelconcepts de>
+ *
+ ****************************************************************************/
+
+/*
+ * This program is free software; you can redistribute it and/or
+ * 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 "e-kolab-plugin-ui.h"
+
+/*----------------------------------------------------------------------------*/
+
+gboolean
+e_kolab_plugin_ui_init_mail (GtkUIManager *ui_manager,
+ EShellView *shell_view)
+{
+ g_assert (GTK_IS_UI_MANAGER (ui_manager));
+ g_assert (E_IS_SHELL_VIEW (shell_view));
+
+ g_debug ("%s: called.", __func__);
+
+ return TRUE;
+}
+
+gboolean
+e_kolab_plugin_ui_init_calendar (GtkUIManager *ui_manager,
+ EShellView *shell_view)
+{
+ g_assert (GTK_IS_UI_MANAGER (ui_manager));
+ g_assert (E_IS_SHELL_VIEW (shell_view));
+
+ g_debug ("%s: called.", __func__);
+
+ return TRUE;
+}
+
+gboolean
+e_kolab_plugin_ui_init_tasks (GtkUIManager *ui_manager,
+ EShellView *shell_view)
+{
+ g_assert (GTK_IS_UI_MANAGER (ui_manager));
+ g_assert (E_IS_SHELL_VIEW (shell_view));
+
+ g_debug ("%s: called.", __func__);
+
+ return TRUE;
+}
+
+gboolean
+e_kolab_plugin_ui_init_memos (GtkUIManager *ui_manager,
+ EShellView *shell_view)
+{
+ g_assert (GTK_IS_UI_MANAGER (ui_manager));
+ g_assert (E_IS_SHELL_VIEW (shell_view));
+
+ g_debug ("%s: called.", __func__);
+
+ return TRUE;
+}
+
+gboolean
+e_kolab_plugin_ui_init_contacts (GtkUIManager *ui_manager,
+ EShellView *shell_view)
+{
+ g_assert (GTK_IS_UI_MANAGER (ui_manager));
+ g_assert (E_IS_SHELL_VIEW (shell_view));
+
+ g_debug ("%s: called.", __func__);
+
+ return TRUE;
+}
+
+/*----------------------------------------------------------------------------*/
diff --git a/src/eplugin/e-kolab-plugin-ui.h b/src/eplugin/e-kolab-plugin-ui.h
new file mode 100644
index 0000000..c2f2cd5
--- /dev/null
+++ b/src/eplugin/e-kolab-plugin-ui.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/***************************************************************************
+ * e-kolab-plugin-ui.h
+ *
+ * Fri Feb 10 17:20:05 2012
+ * Copyright 2012 Christian Hilberg
+ * <hilberg kernelconcepts de>
+ *
+ ****************************************************************************/
+
+/*
+ * This program is free software; you can redistribute it and/or
+ * 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 _E_KOLAB_PLUGIN_UI_H_
+#define _E_KOLAB_PLUGIN_UI_H_
+
+/*----------------------------------------------------------------------------*/
+
+#include <glib.h>
+#include <gtk/gtk.h>
+
+#include <e-util/e-config.h>
+#include <e-util/e-plugin.h>
+#include <shell/e-shell-view.h>
+
+/*----------------------------------------------------------------------------*/
+
+gboolean
+e_kolab_plugin_ui_init_mail (GtkUIManager *ui_manager,
+ EShellView *shell_view);
+
+gboolean
+e_kolab_plugin_ui_init_calendar (GtkUIManager *ui_manager,
+ EShellView *shell_view);
+
+gboolean
+e_kolab_plugin_ui_init_tasks (GtkUIManager *ui_manager,
+ EShellView *shell_view);
+
+gboolean
+e_kolab_plugin_ui_init_memos (GtkUIManager *ui_manager,
+ EShellView *shell_view);
+
+gboolean
+e_kolab_plugin_ui_init_contacts (GtkUIManager *ui_manager,
+ EShellView *shell_view);
+
+/*----------------------------------------------------------------------------*/
+
+#endif /* _E_KOLAB_PLUGIN_UI_H_ */
+
+/*----------------------------------------------------------------------------*/
diff --git a/src/eplugin/e-kolab-plugin.c b/src/eplugin/e-kolab-plugin.c
index 4ea52e4..4311d38 100644
--- a/src/eplugin/e-kolab-plugin.c
+++ b/src/eplugin/e-kolab-plugin.c
@@ -29,6 +29,7 @@
#include <config.h>
#include "e-kolab-account-setup.h"
+#include "e-kolab-plugin-ui.h"
#include "e-kolab-plugin.h"
/*----------------------------------------------------------------------------*/
@@ -187,60 +188,70 @@ gboolean
e_kolab_plugin_init_mail (GtkUIManager *ui_manager,
EShellView *shell_view)
{
+ gboolean ok = FALSE;
+
g_return_val_if_fail (GTK_IS_UI_MANAGER (ui_manager), FALSE);
g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE);
- g_debug ("%s: called.", __func__);
-
- return TRUE;
+ ok = e_kolab_plugin_ui_init_mail (ui_manager,
+ shell_view);
+ return ok;
}
gboolean
e_kolab_plugin_init_calendar (GtkUIManager *ui_manager,
EShellView *shell_view)
{
+ gboolean ok = FALSE;
+
g_return_val_if_fail (GTK_IS_UI_MANAGER (ui_manager), FALSE);
g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE);
- g_debug ("%s: called.", __func__);
-
- return TRUE;
+ ok = e_kolab_plugin_ui_init_calendar (ui_manager,
+ shell_view);
+ return ok;
}
gboolean
e_kolab_plugin_init_tasks (GtkUIManager *ui_manager,
EShellView *shell_view)
{
+ gboolean ok = FALSE;
+
g_return_val_if_fail (GTK_IS_UI_MANAGER (ui_manager), FALSE);
g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE);
- g_debug ("%s: called.", __func__);
-
- return TRUE;
+ ok = e_kolab_plugin_ui_init_tasks (ui_manager,
+ shell_view);
+ return ok;
}
gboolean
e_kolab_plugin_init_memos (GtkUIManager *ui_manager,
EShellView *shell_view)
{
+ gboolean ok = FALSE;
+
g_return_val_if_fail (GTK_IS_UI_MANAGER (ui_manager), FALSE);
g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE);
- g_debug ("%s: called.", __func__);
-
- return TRUE;
+ ok = e_kolab_plugin_ui_init_memos (ui_manager,
+ shell_view);
+ return ok;
}
gboolean
e_kolab_plugin_init_contacts (GtkUIManager *ui_manager,
EShellView *shell_view)
{
+ gboolean ok = FALSE;
+
g_return_val_if_fail (GTK_IS_UI_MANAGER (ui_manager), FALSE);
g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE);
- g_debug ("%s: called.", __func__);
-
- return TRUE;
+ ok = e_kolab_plugin_ui_init_contacts (ui_manager,
+ shell_view);
+ return ok;
}
/*----------------------------------------------------------------------------*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]