aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-12-10 21:09:59 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-12-13 03:33:43 +0800
commitd09d8de870b6697c8a8b262e7e077b871a69b315 (patch)
tree3b718882e7a0bb0a996daf2967a033d91714c9b5 /shell
parentb61331ed03ac1c7a9b8614e25510040b9c60ae02 (diff)
downloadgsoc2013-evolution-d09d8de870b6697c8a8b262e7e077b871a69b315.tar.gz
gsoc2013-evolution-d09d8de870b6697c8a8b262e7e077b871a69b315.tar.zst
gsoc2013-evolution-d09d8de870b6697c8a8b262e7e077b871a69b315.zip
Consolidate base utility libraries into libeutil.
Evolution consists of entirely too many small utility libraries, which increases linking and loading time, places a burden on higher layers of the application (e.g. modules) which has to remember to link to all the small in-tree utility libraries, and makes it difficult to generate API documentation for these utility libraries in one Gtk-Doc module. Merge the following utility libraries under the umbrella of libeutil, and enforce a single-include policy on libeutil so we can reorganize the files as desired without disrupting its pseudo-public API. libemail-utils/libemail-utils.la libevolution-utils/libevolution-utils.la filter/libfilter.la widgets/e-timezone-dialog/libetimezonedialog.la widgets/menus/libmenus.la widgets/misc/libemiscwidgets.la widgets/table/libetable.la widgets/text/libetext.la This also merges libedataserverui from the Evolution-Data-Server module, since Evolution is its only consumer nowadays, and I'd like to make some improvements to those APIs without concern for backward-compatibility. And finally, start a Gtk-Doc module for libeutil. It's going to be a project just getting all the symbols _listed_ much less _documented_. But the skeletal structure is in place and I'm off to a good start.
Diffstat (limited to 'shell')
-rw-r--r--shell/Makefile.am25
-rw-r--r--shell/e-convert-local-mail.c1
-rw-r--r--shell/e-shell-backend.c36
-rw-r--r--shell/e-shell-backend.h2
-rw-r--r--shell/e-shell-content.c7
-rw-r--r--shell/e-shell-migrate.c4
-rw-r--r--shell/e-shell-searchbar.c3
-rw-r--r--shell/e-shell-searchbar.h1
-rw-r--r--shell/e-shell-sidebar.c2
-rw-r--r--shell/e-shell-taskbar.c1
-rw-r--r--shell/e-shell-utils.c2
-rw-r--r--shell/e-shell-utils.h2
-rw-r--r--shell/e-shell-view.c8
-rw-r--r--shell/e-shell-view.h7
-rw-r--r--shell/e-shell-window-actions.c7
-rw-r--r--shell/e-shell-window-private.h11
-rw-r--r--shell/e-shell-window.c44
-rw-r--r--shell/e-shell-window.h5
-rw-r--r--shell/e-shell.c3
-rw-r--r--shell/e-shell.h3
-rw-r--r--shell/es-event.h2
-rw-r--r--shell/main.c8
22 files changed, 51 insertions, 133 deletions
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 8e21c7eca2..16f3626733 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -36,9 +36,6 @@ eshellinclude_HEADERS = \
libeshell_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(NM_CPPFLAGS) \
- -I$(top_srcdir)/widgets \
- -I$(top_srcdir)/widgets/menus \
- -I$(top_srcdir)/widgets/misc \
-I$(top_srcdir) \
-I$(top_srcdir)/shell \
-I$(top_builddir) \
@@ -60,8 +57,8 @@ libeshell_la_CPPFLAGS = \
-DG_LOG_DOMAIN=\"evolution-shell\" \
$(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
- $(EGG_SMCLIENT_CFLAGS) \
$(GTKHTML_CFLAGS) \
+ $(CHAMPLAIN_CFLAGS) \
$(CLUTTER_GTK_CFLAGS)
libeshell_la_SOURCES = \
@@ -92,14 +89,9 @@ libeshell_la_LDFLAGS = -avoid-version $(NO_UNDEFINED)
libeshell_la_LIBADD = \
$(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/filter/libfilter.la \
- $(top_builddir)/widgets/misc/libemiscwidgets.la \
- $(top_builddir)/widgets/menus/libmenus.la \
- $(top_builddir)/libemail-utils/libemail-utils.la \
- $(top_builddir)/libevolution-utils/libevolution-utils.la \
$(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS) \
- $(EGG_SMCLIENT_LIBS) \
+ $(CHAMPLAIN_LIBS) \
$(CLUTTER_GTK_LIBS)
# Evolution executable
@@ -111,9 +103,6 @@ endif
evolution_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(NM_CPPFLAGS) \
- -I$(top_srcdir)/widgets \
- -I$(top_srcdir)/widgets/menus \
- -I$(top_srcdir)/widgets/misc \
-I$(top_srcdir) \
-I$(top_srcdir)/shell \
-DEVOLUTION_BINDIR=\""$(bindir)"\" \
@@ -134,7 +123,7 @@ evolution_CPPFLAGS = \
$(EVOLUTION_DATA_SERVER_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
$(GTKHTML_CFLAGS) \
- $(DBUS_GLIB_CFLAGS) \
+ $(CHAMPLAIN_CFLAGS) \
$(CLUTTER_GTK_CFLAGS)
evolution_SOURCES = \
@@ -143,16 +132,10 @@ evolution_SOURCES = \
evolution_LDADD = \
libeshell.la \
- $(top_builddir)/widgets/e-timezone-dialog/libetimezonedialog.la \
- $(top_builddir)/widgets/menus/libmenus.la \
- $(top_builddir)/widgets/misc/libemiscwidgets.la \
- $(top_builddir)/libemail-utils/libemail-utils.la \
$(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/filter/libfilter.la \
- $(top_builddir)/libevolution-utils/libevolution-utils.la \
$(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS) \
- $(DBUS_GLIB_LIBS) \
+ $(CHAMPLAIN_LIBS) \
$(CLUTTER_GTK_LIBS) \
$(EVOLUTIONICON)
diff --git a/shell/e-convert-local-mail.c b/shell/e-convert-local-mail.c
index 7e94ee7175..f7e9ac3eea 100644
--- a/shell/e-convert-local-mail.c
+++ b/shell/e-convert-local-mail.c
@@ -22,7 +22,6 @@
#include <camel/camel.h>
#include <shell/e-shell.h>
-#include <libevolution-utils/e-alert-dialog.h>
/* Forward Declarations */
void e_convert_local_mail (EShell *shell);
diff --git a/shell/e-shell-backend.c b/shell/e-shell-backend.c
index 3310122cb5..d546bc7c1b 100644
--- a/shell/e-shell-backend.c
+++ b/shell/e-shell-backend.c
@@ -502,6 +502,24 @@ e_shell_backend_is_busy (EShellBackend *shell_backend)
}
/**
+ * e_shell_backend_get_prefer_new_item:
+ * @shell_backend: an #EShellBackend
+ *
+ * Returns: Name of a preferred item in New toolbar button, %NULL or
+ * an empty string for no preference.
+ *
+ * Since: 3.4
+ **/
+const gchar *
+e_shell_backend_get_prefer_new_item (EShellBackend *shell_backend)
+{
+ g_return_val_if_fail (shell_backend != NULL, NULL);
+ g_return_val_if_fail (E_IS_SHELL_BACKEND (shell_backend), NULL);
+
+ return shell_backend->priv->prefer_new_item;
+}
+
+/**
* e_shell_backend_set_prefer_new_item:
* @shell_backend: an #EShellBackend
* @prefer_new_item: name of an item
@@ -528,24 +546,6 @@ e_shell_backend_set_prefer_new_item (EShellBackend *shell_backend,
}
/**
- * e_shell_backend_get_prefer_new_item:
- * @shell_backend: an #EShellBackend
- *
- * Returns: Name of a preferred item in New toolbar button, %NULL or
- * an empty string for no preference.
- *
- * Since: 3.4
- **/
-const gchar *
-e_shell_backend_get_prefer_new_item (EShellBackend *shell_backend)
-{
- g_return_val_if_fail (shell_backend != NULL, NULL);
- g_return_val_if_fail (E_IS_SHELL_BACKEND (shell_backend), NULL);
-
- return shell_backend->priv->prefer_new_item;
-}
-
-/**
* e_shell_backend_cancel_all:
* @shell_backend: an #EShellBackend
*
diff --git a/shell/e-shell-backend.h b/shell/e-shell-backend.h
index cd8cf1416e..0a68d428ca 100644
--- a/shell/e-shell-backend.h
+++ b/shell/e-shell-backend.h
@@ -25,7 +25,7 @@
#include <libebackend/libebackend.h>
#include <shell/e-shell-common.h>
-#include <e-util/e-activity.h>
+#include <e-util/e-util.h>
/* Standard GObject macros */
#define E_TYPE_SHELL_BACKEND \
diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c
index fe35f66676..942e10bba6 100644
--- a/shell/e-shell-content.c
+++ b/shell/e-shell-content.c
@@ -34,13 +34,6 @@
#include <glib/gi18n.h>
#include <libebackend/libebackend.h>
-#include "e-util/e-util.h"
-#include "libevolution-utils/e-alert-dialog.h"
-#include "libevolution-utils/e-alert-sink.h"
-#include "filter/e-rule-editor.h"
-#include "widgets/misc/e-action-combo-box.h"
-#include "widgets/misc/e-alert-bar.h"
-
#include "e-shell-backend.h"
#include "e-shell-searchbar.h"
#include "e-shell-view.h"
diff --git a/shell/e-shell-migrate.c b/shell/e-shell-migrate.c
index 6ebc58562f..22552daeba 100644
--- a/shell/e-shell-migrate.c
+++ b/shell/e-shell-migrate.c
@@ -33,10 +33,6 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
-#include "libevolution-utils/e-alert-dialog.h"
-#include "e-util/e-file-utils.h"
-#include "e-util/e-util.h"
-
#include "es-event.h"
#include "evo-version.h"
diff --git a/shell/e-shell-searchbar.c b/shell/e-shell-searchbar.c
index 46fbdf2963..b5d490df25 100644
--- a/shell/e-shell-searchbar.c
+++ b/shell/e-shell-searchbar.c
@@ -34,9 +34,6 @@
#include <glib/gi18n-lib.h>
#include <libebackend/libebackend.h>
-#include "e-util/e-util.h"
-#include "widgets/misc/e-action-combo-box.h"
-
#include "e-shell-window-actions.h"
#define E_SHELL_SEARCHBAR_GET_PRIVATE(obj) \
diff --git a/shell/e-shell-searchbar.h b/shell/e-shell-searchbar.h
index 6c68e72d80..965cc972e2 100644
--- a/shell/e-shell-searchbar.h
+++ b/shell/e-shell-searchbar.h
@@ -24,7 +24,6 @@
#include <shell/e-shell-common.h>
#include <shell/e-shell-view.h>
-#include <misc/e-action-combo-box.h>
/* Standard GObject macros */
#define E_TYPE_SHELL_SEARCHBAR \
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c
index 95afe576b4..b75cd8d602 100644
--- a/shell/e-shell-sidebar.c
+++ b/shell/e-shell-sidebar.c
@@ -33,8 +33,6 @@
#include <libebackend/libebackend.h>
-#include <libevolution-utils/e-alert-sink.h>
-#include <e-util/e-unicode.h>
#include <shell/e-shell-view.h>
#define E_SHELL_SIDEBAR_GET_PRIVATE(obj) \
diff --git a/shell/e-shell-taskbar.c b/shell/e-shell-taskbar.c
index 3a3d311f7d..9a0624ffc8 100644
--- a/shell/e-shell-taskbar.c
+++ b/shell/e-shell-taskbar.c
@@ -34,7 +34,6 @@
#include <libebackend/libebackend.h>
#include <e-shell-view.h>
-#include <misc/e-activity-proxy.h>
#define E_SHELL_TASKBAR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c
index 1fd63a91e3..e790d5811a 100644
--- a/shell/e-shell-utils.c
+++ b/shell/e-shell-utils.c
@@ -35,8 +35,6 @@
#include <libedataserver/libedataserver.h>
-#include "widgets/misc/e-import-assistant.h"
-
/**
* e_shell_configure_ui_manager:
* @shell: an #EShell
diff --git a/shell/e-shell-utils.h b/shell/e-shell-utils.h
index 897981e0d0..fb33c3c33b 100644
--- a/shell/e-shell-utils.h
+++ b/shell/e-shell-utils.h
@@ -23,8 +23,6 @@
#define E_SHELL_UTILS_H
#include <shell/e-shell.h>
-#include <misc/e-web-view.h>
-#include <e-util/e-ui-manager.h>
G_BEGIN_DECLS
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 16d09fcb2d..e6626666b3 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -35,14 +35,6 @@
#include <glib/gi18n.h>
#include <libebackend/libebackend.h>
-#include "e-util/e-file-utils.h"
-#include "e-util/e-plugin-ui.h"
-#include "e-util/e-source-util.h"
-#include "e-util/e-ui-manager.h"
-#include "e-util/e-util-private.h"
-#include "e-util/e-util.h"
-#include "filter/e-rule-context.h"
-
#include "e-shell-searchbar.h"
#include "e-shell-window-actions.h"
diff --git a/shell/e-shell-view.h b/shell/e-shell-view.h
index fe2b63c5b2..6aea66f536 100644
--- a/shell/e-shell-view.h
+++ b/shell/e-shell-view.h
@@ -24,6 +24,8 @@
#include <libedataserver/libedataserver.h>
+#include <e-util/e-util.h>
+
#include <shell/e-shell-common.h>
#include <shell/e-shell-backend.h>
#include <shell/e-shell-content.h>
@@ -31,11 +33,6 @@
#include <shell/e-shell-taskbar.h>
#include <shell/e-shell-window.h>
-#include <filter/e-filter-rule.h>
-#include <filter/e-rule-context.h>
-#include <menus/gal-view-collection.h>
-#include <menus/gal-view-instance.h>
-
/* Standard GObject macros */
#define E_TYPE_SHELL_VIEW \
(e_shell_view_get_type ())
diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c
index cecc168345..a1d6649be3 100644
--- a/shell/e-shell-window-actions.c
+++ b/shell/e-shell-window-actions.c
@@ -24,13 +24,6 @@
#endif
#include "e-shell-window-private.h"
-#include "e-preferences-window.h"
-
-#include <e-util/e-dialog-utils.h>
-#include <e-util/e-print.h>
-#include <gal-define-views-dialog.h>
-
-#include <libedataserverui/libedataserverui.h>
#define EVOLUTION_COPYRIGHT \
"Copyright \xC2\xA9 1999 - 2008 Novell, Inc. and Others\n" \
diff --git a/shell/e-shell-window-private.h b/shell/e-shell-window-private.h
index 7a2a40cc3f..d69546c440 100644
--- a/shell/e-shell-window-private.h
+++ b/shell/e-shell-window-private.h
@@ -29,17 +29,6 @@
#include <libebackend/libebackend.h>
-#include <e-util/e-util.h>
-#include <e-util/e-util-private.h>
-#include <libevolution-utils/e-alert-dialog.h>
-#include <libevolution-utils/e-alert-sink.h>
-#include <e-util/e-plugin-ui.h>
-#include <widgets/misc/e-alert-bar.h>
-#include <widgets/misc/e-import-assistant.h>
-#include <widgets/misc/e-menu-tool-button.h>
-#include <widgets/misc/e-online-button.h>
-#include <widgets/misc/e-popup-action.h>
-
#include <e-shell.h>
#include <e-shell-content.h>
#include <e-shell-view.h>
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 2202757bb1..3e9be0f845 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -1576,59 +1576,59 @@ e_shell_window_set_toolbar_visible (EShellWindow *shell_window,
}
/**
- * e_shell_window_set_toolbar_new_prefer_item:
+ * e_shell_window_get_toolbar_new_prefer_item:
* @shell_window: an #EShellWindow
- * @prefer_item: prefer-item name to be set
*
- * Sets prefer item on the New button for current view.
+ * Returns: name of preferred item on the New button for current view.
*
* Since: 3.4
**/
-void
-e_shell_window_set_toolbar_new_prefer_item (EShellWindow *shell_window,
- const gchar *prefer_item)
+const gchar *
+e_shell_window_get_toolbar_new_prefer_item (EShellWindow *shell_window)
{
GtkWidget *toolbar;
GtkToolItem *item;
- g_return_if_fail (shell_window != NULL);
- g_return_if_fail (E_IS_SHELL_WINDOW (shell_window));
+ g_return_val_if_fail (shell_window != NULL, NULL);
+ g_return_val_if_fail (E_IS_SHELL_WINDOW (shell_window), NULL);
toolbar = e_shell_window_get_managed_widget (shell_window, "/main-toolbar");
- g_return_if_fail (toolbar != NULL);
+ g_return_val_if_fail (toolbar != NULL, NULL);
item = gtk_toolbar_get_nth_item (GTK_TOOLBAR (toolbar), 0);
- g_return_if_fail (item != NULL);
- g_return_if_fail (E_IS_MENU_TOOL_BUTTON (item));
+ g_return_val_if_fail (item != NULL, NULL);
+ g_return_val_if_fail (E_IS_MENU_TOOL_BUTTON (item), NULL);
- e_menu_tool_button_set_prefer_item (E_MENU_TOOL_BUTTON (item), prefer_item);
+ return e_menu_tool_button_get_prefer_item (E_MENU_TOOL_BUTTON (item));
}
/**
- * e_shell_window_get_toolbar_new_prefer_item:
+ * e_shell_window_set_toolbar_new_prefer_item:
* @shell_window: an #EShellWindow
+ * @prefer_item: prefer-item name to be set
*
- * Returns: name of preferred item on the New button for current view.
+ * Sets prefer item on the New button for current view.
*
* Since: 3.4
**/
-const gchar *
-e_shell_window_get_toolbar_new_prefer_item (EShellWindow *shell_window)
+void
+e_shell_window_set_toolbar_new_prefer_item (EShellWindow *shell_window,
+ const gchar *prefer_item)
{
GtkWidget *toolbar;
GtkToolItem *item;
- g_return_val_if_fail (shell_window != NULL, NULL);
- g_return_val_if_fail (E_IS_SHELL_WINDOW (shell_window), NULL);
+ g_return_if_fail (shell_window != NULL);
+ g_return_if_fail (E_IS_SHELL_WINDOW (shell_window));
toolbar = e_shell_window_get_managed_widget (shell_window, "/main-toolbar");
- g_return_val_if_fail (toolbar != NULL, NULL);
+ g_return_if_fail (toolbar != NULL);
item = gtk_toolbar_get_nth_item (GTK_TOOLBAR (toolbar), 0);
- g_return_val_if_fail (item != NULL, NULL);
- g_return_val_if_fail (E_IS_MENU_TOOL_BUTTON (item), NULL);
+ g_return_if_fail (item != NULL);
+ g_return_if_fail (E_IS_MENU_TOOL_BUTTON (item));
- return e_menu_tool_button_get_prefer_item (E_MENU_TOOL_BUTTON (item));
+ e_menu_tool_button_set_prefer_item (E_MENU_TOOL_BUTTON (item), prefer_item);
}
/**
diff --git a/shell/e-shell-window.h b/shell/e-shell-window.h
index 366a2186c1..abd940feb0 100644
--- a/shell/e-shell-window.h
+++ b/shell/e-shell-window.h
@@ -23,7 +23,6 @@
#define E_SHELL_WINDOW_H
#include <shell/e-shell.h>
-#include <misc/e-focus-tracker.h>
/* Standard GObject macros */
#define E_TYPE_SHELL_WINDOW \
@@ -135,11 +134,11 @@ gboolean e_shell_window_get_toolbar_visible
void e_shell_window_set_toolbar_visible
(EShellWindow *shell_window,
gboolean toolbar_visible);
+const gchar * e_shell_window_get_toolbar_new_prefer_item
+ (EShellWindow *shell_window);
void e_shell_window_set_toolbar_new_prefer_item
(EShellWindow *shell_window,
const gchar *prefer_item);
-const gchar * e_shell_window_get_toolbar_new_prefer_item
- (EShellWindow *shell_window);
/* These should be called from the shell backend's window_created() handler. */
diff --git a/shell/e-shell.c b/shell/e-shell.c
index b96cbb9a29..f938f45e73 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -33,11 +33,8 @@
#include <glib/gi18n.h>
#include <libebackend/libebackend.h>
-#include <libedataserverui/libedataserverui.h>
-#include "e-util/e-util.h"
#include "e-util/e-util-private.h"
-#include "widgets/misc/e-preferences-window.h"
#include "e-shell-backend.h"
#include "e-shell-enumtypes.h"
diff --git a/shell/e-shell.h b/shell/e-shell.h
index 4dcd7e7921..84bb9f2d5c 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -24,8 +24,7 @@
#include <libedataserver/libedataserver.h>
-#include <e-util/e-activity.h>
-#include <libevolution-utils/e-alert.h>
+#include <e-util/e-util.h>
#include <shell/e-shell-common.h>
#include <shell/e-shell-backend.h>
diff --git a/shell/es-event.h b/shell/es-event.h
index eba3f3d6b6..67ff1b4b87 100644
--- a/shell/es-event.h
+++ b/shell/es-event.h
@@ -24,7 +24,7 @@
#ifndef __ES_EVENT_H__
#define __ES_EVENT_H__
-#include "e-util/e-event.h"
+#include <e-util/e-util.h>
G_BEGIN_DECLS
diff --git a/shell/main.c b/shell/main.c
index 0869ef6f05..d4e65b1a9c 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -55,8 +55,6 @@
#include <libxml/parser.h>
#include <libxml/tree.h>
-#include <libedataserverui/libedataserverui.h>
-
#include <webkit/webkit.h>
#include "e-shell.h"
@@ -64,12 +62,6 @@
#include "e-shell-meego.h"
#include "es-event.h"
-#include "e-util/e-dialog-utils.h"
-#include "e-util/e-import.h"
-#include "e-util/e-plugin.h"
-#include "e-util/e-plugin-ui.h"
-#include "e-util/e-util-private.h"
-#include "e-util/e-util.h"
#ifdef G_OS_WIN32
#include "e-util/e-win32-defaults.h"
#endif