evolution r36138 - in branches/kill-bonobo: addressbook/gui/component shell ui
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r36138 - in branches/kill-bonobo: addressbook/gui/component shell ui
- Date: Wed, 27 Aug 2008 19:56:31 +0000 (UTC)
Author: mbarnes
Date: Wed Aug 27 19:56:31 2008
New Revision: 36138
URL: http://svn.gnome.org/viewvc/evolution?rev=36138&view=rev
Log:
Miscellaneous tweaks. Nothing major.
Modified:
branches/kill-bonobo/addressbook/gui/component/addressbook-config.c
branches/kill-bonobo/addressbook/gui/component/addressbook-config.h
branches/kill-bonobo/addressbook/gui/component/addressbook-migrate.c
branches/kill-bonobo/addressbook/gui/component/addressbook-migrate.h
branches/kill-bonobo/addressbook/gui/component/addressbook.h
branches/kill-bonobo/shell/e-shell-window-private.c
branches/kill-bonobo/ui/evolution-shell.ui
Modified: branches/kill-bonobo/addressbook/gui/component/addressbook-config.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/addressbook-config.c (original)
+++ branches/kill-bonobo/addressbook/gui/component/addressbook-config.c Wed Aug 27 19:56:31 2008
@@ -18,8 +18,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include <bonobo/bonobo-generic-factory.h>
-
#ifdef G_OS_WIN32
/* Include <windows.h> early and work around DATADIR lossage */
#define DATADIR crap_DATADIR
@@ -30,7 +28,6 @@
#include <glade/glade.h>
#include "addressbook.h"
-#include "addressbook-component.h"
#include "addressbook-config.h"
#include "e-util/e-error.h"
Modified: branches/kill-bonobo/addressbook/gui/component/addressbook-config.h
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/addressbook-config.h (original)
+++ branches/kill-bonobo/addressbook/gui/component/addressbook-config.h Wed Aug 27 19:56:31 2008
@@ -25,7 +25,8 @@
#ifndef __ADDRESSBOOK_CONFIG_H__
#define __ADDRESSBOOK_CONFIG_H__
-#include "evolution-config-control.h"
+#include <gtk/gtk.h>
+#include <libedataserver/e-source.h>
typedef enum {
ADDRESSBOOK_LDAP_AUTH_NONE,
Modified: branches/kill-bonobo/addressbook/gui/component/addressbook-migrate.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/addressbook-migrate.c (original)
+++ branches/kill-bonobo/addressbook/gui/component/addressbook-migrate.c Wed Aug 27 19:56:31 2008
@@ -56,7 +56,7 @@
ESourceList *source_list;
- AddressbookComponent *component;
+ const gchar *data_dir;
GtkWidget *window;
GtkWidget *label;
@@ -449,14 +449,12 @@
GSList *groups;
ESourceGroup *group;
char *base_uri, *base_uri_proto;
- const gchar *base_dir;
*on_this_computer = NULL;
*on_ldap_servers = NULL;
*personal_source = NULL;
- base_dir = addressbook_component_peek_base_directory (context->component);
- base_uri = g_build_filename (base_dir, "local", NULL);
+ base_uri = g_build_filename (context->data_dir, "local", NULL);
base_uri_proto = g_filename_to_uri (base_uri, NULL, NULL);
@@ -743,12 +741,17 @@
static gboolean
migrate_completion_folders (MigrationContext *context)
{
- char *uris_xml = gconf_client_get_string (addressbook_component_peek_gconf_client (context->component),
- "/apps/evolution/addressbook/completion/uris",
- NULL);
+ GConfClient *client;
+ const gchar *key;
+ gchar *uris_xml;
printf ("trying to migrate completion folders\n");
+ client = gconf_client_get_default ();
+ key = "/apps/evolution/addressbook/completion/uris";
+ uris_xml = gconf_client_get_string (client, key, NULL);
+ g_object_unref (client);
+
if (uris_xml) {
xmlDoc *doc = xmlParseMemory (uris_xml, strlen (uris_xml));
xmlNode *root;
@@ -1075,17 +1078,20 @@
g_dir_close (dir);
}
-static MigrationContext*
-migration_context_new (AddressbookComponent *component)
+static MigrationContext *
+migration_context_new (const gchar *data_dir)
{
MigrationContext *context = g_new (MigrationContext, 1);
/* set up the mapping from old uris to new uids */
- context->folder_uid_map = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify)g_free, (GDestroyNotify)g_free);
+ context->folder_uid_map = g_hash_table_new_full (
+ g_str_hash, g_str_equal,
+ (GDestroyNotify) g_free,
+ (GDestroyNotify) g_free);
e_book_get_addressbooks (&context->source_list, NULL);
- context->component = component;
+ context->data_dir = data_dir;
return context;
}
@@ -1102,17 +1108,27 @@
g_free (context);
}
-int
-addressbook_migrate (AddressbookComponent *component, int major, int minor, int revision, GError **err)
+gboolean
+addressbook_migrate (EShellModule *shell_module,
+ gint major,
+ gint minor,
+ gint revision,
+ GError **error)
{
ESourceGroup *on_this_computer;
ESourceGroup *on_ldap_servers;
ESource *personal_source;
- MigrationContext *context = migration_context_new (component);
+ MigrationContext *context;
gboolean need_dialog = FALSE;
+ const gchar *data_dir;
printf ("addressbook_migrate (%d.%d.%d)\n", major, minor, revision);
+ g_return_val_if_fail (E_IS_SHELL_MODULE (shell_module), FALSE);
+
+ data_dir = e_shell_module_get_data_dir (shell_module);
+ context = migration_context_new (data_dir);
+
/* we call this unconditionally now - create_groups either
creates the groups/sources or it finds the necessary
groups/sources. */
@@ -1170,8 +1186,7 @@
"Please be patient while Evolution migrates your Pilot Sync data..."));
old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Contacts", NULL);
- new_path = g_build_filename (addressbook_component_peek_base_directory (component),
- "local", "system", NULL);
+ new_path = g_build_filename (data_dir, "local", "system", NULL);
migrate_pilot_data (old_path, new_path);
g_free (new_path);
g_free (old_path);
Modified: branches/kill-bonobo/addressbook/gui/component/addressbook-migrate.h
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/addressbook-migrate.h (original)
+++ branches/kill-bonobo/addressbook/gui/component/addressbook-migrate.h Wed Aug 27 19:56:31 2008
@@ -22,10 +22,17 @@
#ifndef _ADDRESSBOOK_MIGRATE_H_
#define _ADDRESSBOOK_MIGRATE_H_
-#include "addressbook-component.h"
+#include <glib.h>
+#include <e-shell-module.h>
-struct _GError;
+G_BEGIN_DECLS
-int addressbook_migrate (AddressbookComponent *component, int major, int minor, int revision, struct _GError **err);
+gboolean addressbook_migrate (EShellModule *shell_module,
+ gint major,
+ gint minor,
+ gint revision,
+ GError **error);
+
+G_END_DECLS
#endif /* _ADDRESSBOOK_MIGRATE_H_ */
Modified: branches/kill-bonobo/addressbook/gui/component/addressbook.h
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/addressbook.h (original)
+++ branches/kill-bonobo/addressbook/gui/component/addressbook.h Wed Aug 27 19:56:31 2008
@@ -1,10 +1,6 @@
#ifndef __ADDRESSBOOK_H__
#define __ADDRESSBOOK_H__
-#include <bonobo/bonobo-control.h>
-#include <e-util/e-config-listener.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-moniker-util.h>
#include <libebook/e-book.h>
guint addressbook_load (EBook *book, EBookCallback cb, gpointer closure);
Modified: branches/kill-bonobo/shell/e-shell-window-private.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-window-private.c (original)
+++ branches/kill-bonobo/shell/e-shell-window-private.c Wed Aug 27 19:56:31 2008
@@ -247,6 +247,20 @@
priv->main_toolbar = g_object_ref (widget);
gtk_widget_show (widget);
+ /* XXX Having this separator in the UI definition doesn't work
+ * because GtkUIManager is unaware of the "New" button, so
+ * it makes the separator invisible. One possibility is to
+ * define a GtkAction subclass for which create_tool_item()
+ * returns an EMenuToolButton. Then both this separator
+ * and the "New" button could be added to the UI definition.
+ * Tempting, but the "New" button and its dynamically
+ * generated menu is already a complex beast, and I'm not
+ * convinced having it proxy some new type of GtkAction
+ * is worth the extra effort. */
+ item = gtk_separator_tool_item_new ();
+ gtk_toolbar_insert (GTK_TOOLBAR (widget), item, 0);
+ gtk_widget_show (GTK_WIDGET (item));
+
item = e_menu_tool_button_new (_("New"));
gtk_tool_item_set_is_important (GTK_TOOL_ITEM (item), TRUE);
gtk_toolbar_insert (GTK_TOOLBAR (widget), item, 0);
Modified: branches/kill-bonobo/ui/evolution-shell.ui
==============================================================================
--- branches/kill-bonobo/ui/evolution-shell.ui (original)
+++ branches/kill-bonobo/ui/evolution-shell.ui Wed Aug 27 19:56:31 2008
@@ -53,7 +53,6 @@
</menu>
</menubar>
<toolbar name='main-toolbar'>
- <separator/>
<toolitem action='send-receive'/>
<separator/>
</toolbar>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]