aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-addressbook-view.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-11-26 09:51:39 +0800
committerTor Lillqvist <tml@src.gnome.org>2005-11-26 09:51:39 +0800
commitae89d959aab24359c730375cff664ac3b44cc953 (patch)
tree0586e91beff095bc1106af81a2473f2649782d93 /addressbook/gui/widgets/e-addressbook-view.c
parent562c2c4c630683d1ec5b9b5958525e6509a56eb2 (diff)
downloadgsoc2013-evolution-ae89d959aab24359c730375cff664ac3b44cc953.tar
gsoc2013-evolution-ae89d959aab24359c730375cff664ac3b44cc953.tar.gz
gsoc2013-evolution-ae89d959aab24359c730375cff664ac3b44cc953.tar.bz2
gsoc2013-evolution-ae89d959aab24359c730375cff664ac3b44cc953.tar.lz
gsoc2013-evolution-ae89d959aab24359c730375cff664ac3b44cc953.tar.xz
gsoc2013-evolution-ae89d959aab24359c730375cff664ac3b44cc953.tar.zst
gsoc2013-evolution-ae89d959aab24359c730375cff664ac3b44cc953.zip
gui/contact-editor/e-contact-editor.c
2005-11-26 Tor Lillqvist <tml@novell.com> * gui/contact-editor/e-contact-editor.c * gui/contact-editor/e-contact-editor-address.c * gui/contact-editor/e-contact-editor-fullname.c * gui/contact-editor/e-contact-editor-im.c * gui/contact-list-editor/e-contact-list-editor.c * gui/merging/eab-contact-merging.c * gui/widgets/e-addressbook-view.c * printing/e-contact-print.c * printing/e-contact-print-style-editor.c: Include e-util-private.h to get redefinition of compile-time pathnames as calls to functions on Windows. Construct the pathnames of files and directories under the installation prefix at run-time to enable install-anywhere on Windows. No effect on functionality on Unix. svn path=/trunk/; revision=30678
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-view.c')
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 6cf47e2db1..2274d27d54 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -71,6 +71,7 @@
#include "eab-contact-merging.h"
#include "e-util/e-error.h"
+#include "e-util/e-util-private.h"
#include "e-contact-editor.h"
#include <gdk/gdkkeysyms.h>
@@ -422,6 +423,7 @@ eab_view_new (void)
GtkWidget *widget = GTK_WIDGET (g_object_new (E_TYPE_AB_VIEW, NULL));
EABView *eav = EAB_VIEW (widget);
FilterPart *part;
+ char *xmlfile;
/* create our model */
eav->model = eab_model_new ();
@@ -464,7 +466,9 @@ eab_view_new (void)
eav->search_context = rule_context_new ();
rule_context_add_part_set (eav->search_context, "partset", filter_part_get_type (),
rule_context_add_part, rule_context_next_part);
- rule_context_load (eav->search_context, SEARCH_RULE_DIR "/addresstypes.xml", "");
+ xmlfile = g_build_filename (SEARCH_RULE_DIR, "addresstypes.xml", NULL);
+ rule_context_load (eav->search_context, xmlfile, "");
+ g_free (xmlfile);
eav->search_rule = filter_rule_new ();
part = rule_context_next_part (eav->search_context, NULL);
@@ -537,6 +541,8 @@ init_collection (void)
GalViewFactory *factory;
ETableSpecification *spec;
char *galview;
+ char *addressbookdir;
+ char *etspecfile;
if (collection == NULL) {
collection = gal_view_collection_new();
@@ -544,14 +550,22 @@ init_collection (void)
gal_view_collection_set_title (collection, _("Address Book"));
galview = gnome_util_prepend_user_home("/.evolution/addressbook/views");
+ addressbookdir = g_build_filename (EVOLUTION_GALVIEWSDIR,
+ "addressbook",
+ NULL);
gal_view_collection_set_storage_directories
(collection,
- EVOLUTION_GALVIEWSDIR "/addressbook/",
+ addressbookdir,
galview);
+ g_free(addressbookdir);
g_free(galview);
spec = e_table_specification_new();
- e_table_specification_load_from_file (spec, EVOLUTION_ETSPECDIR "/e-addressbook-view.etspec");
+ etspecfile = g_build_filename (EVOLUTION_ETSPECDIR,
+ "e-addressbook-view.etspec",
+ NULL);
+ e_table_specification_load_from_file (spec, etspecfile);
+ g_free (etspecfile);
factory = gal_view_factory_etable_new (spec);
g_object_unref (spec);
@@ -1280,13 +1294,18 @@ create_table_view (EABView *view)
{
ETableModel *adapter;
GtkWidget *table;
+ char *etspecfile;
adapter = eab_table_adapter_new(view->model);
/* Here we create the table. We give it the three pieces of
the table we've created, the header, the model, and the
initial layout. It does the rest. */
- table = e_table_scrolled_new_from_spec_file (adapter, NULL, EVOLUTION_ETSPECDIR "/e-addressbook-view.etspec", NULL);
+ etspecfile = g_build_filename (EVOLUTION_ETSPECDIR,
+ "e-addressbook-view.etspec",
+ NULL);
+ table = e_table_scrolled_new_from_spec_file (adapter, NULL, etspecfile, NULL);
+ g_free (etspecfile);
view->object = G_OBJECT(adapter);
view->widget = table;