diff options
author | Tor Lillqvist <tml@novell.com> | 2005-11-26 09:51:39 +0800 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2005-11-26 09:51:39 +0800 |
commit | ae89d959aab24359c730375cff664ac3b44cc953 (patch) | |
tree | 0586e91beff095bc1106af81a2473f2649782d93 /addressbook | |
parent | 562c2c4c630683d1ec5b9b5958525e6509a56eb2 (diff) | |
download | gsoc2013-evolution-ae89d959aab24359c730375cff664ac3b44cc953.tar.gz 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')
-rw-r--r-- | addressbook/ChangeLog | 17 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor-address.c | 9 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor-fullname.c | 10 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor-im.c | 8 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 9 | ||||
-rw-r--r-- | addressbook/gui/contact-list-editor/e-contact-list-editor.c | 16 | ||||
-rw-r--r-- | addressbook/gui/merging/eab-contact-merging.c | 20 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 27 | ||||
-rw-r--r-- | addressbook/printing/e-contact-print-style-editor.c | 9 | ||||
-rw-r--r-- | addressbook/printing/e-contact-print.c | 1 |
10 files changed, 110 insertions, 16 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 8f35be4765..58f7a0b3b5 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,20 @@ +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. + 2005-11-25 Tor Lillqvist <tml@novell.com> * gui/component/openldap-extract.h: New file. Contains various diff --git a/addressbook/gui/contact-editor/e-contact-editor-address.c b/addressbook/gui/contact-editor/e-contact-editor-address.c index 1200511c30..79c578ef17 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-address.c +++ b/addressbook/gui/contact-editor/e-contact-editor-address.c @@ -23,6 +23,7 @@ #include <e-contact-editor-address.h> #include <e-util/e-icon-factory.h> +#include <e-util/e-util-private.h> #include <glib.h> #include <libgnome/gnome-i18n.h> @@ -421,6 +422,7 @@ e_contact_editor_address_init (EContactEditorAddress *e_contact_editor_address) GladeXML *gui; GtkWidget *widget; GList *icon_list; + char *gladefile; gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_address), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, @@ -431,7 +433,12 @@ e_contact_editor_address_init (EContactEditorAddress *e_contact_editor_address) e_contact_editor_address->address = NULL; - gui = glade_xml_new (EVOLUTION_GLADEDIR "/fulladdr.glade", NULL, NULL); + gladefile = g_build_filename (EVOLUTION_GLADEDIR, + "fulladdr.glade", + NULL); + gui = glade_xml_new (gladefile, NULL, NULL); + g_free (gladefile); + e_contact_editor_address->gui = gui; setup_tab_order (gui); diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c index 1847a463f1..249ffb38fc 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c @@ -22,6 +22,7 @@ #include <config.h> #include "e-contact-editor-fullname.h" #include <e-util/e-icon-factory.h> +#include <e-util/e-util-private.h> #include <libgnome/gnome-util.h> #include <libgnome/gnome-i18n.h> #include <gtk/gtkcombo.h> @@ -104,6 +105,7 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam GladeXML *gui; GtkWidget *widget; GList *icon_list; + char *gladefile; gtk_widget_realize (GTK_WIDGET (e_contact_editor_fullname)); gtk_dialog_set_has_separator (GTK_DIALOG (e_contact_editor_fullname), @@ -119,7 +121,13 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam gtk_window_set_resizable(GTK_WINDOW(e_contact_editor_fullname), TRUE); e_contact_editor_fullname->name = NULL; - gui = glade_xml_new (EVOLUTION_GLADEDIR "/fullname.glade", NULL, NULL); + + gladefile = g_build_filename (EVOLUTION_GLADEDIR, + "fullname.glade", + NULL); + gui = glade_xml_new (gladefile, NULL, NULL); + g_free (gladefile); + e_contact_editor_fullname->gui = gui; widget = glade_xml_get_widget(gui, "dialog-checkfullname"); diff --git a/addressbook/gui/contact-editor/e-contact-editor-im.c b/addressbook/gui/contact-editor/e-contact-editor-im.c index 2c1c89af9a..08925aeb78 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-im.c +++ b/addressbook/gui/contact-editor/e-contact-editor-im.c @@ -34,6 +34,7 @@ #include <gtk/gtkstock.h> #include <string.h> #include <e-util/e-icon-factory.h> +#include <e-util/e-util-private.h> static void e_contact_editor_im_init (EContactEditorIm *card); static void e_contact_editor_im_class_init (EContactEditorImClass *klass); @@ -247,6 +248,7 @@ e_contact_editor_im_init (EContactEditorIm *e_contact_editor_im) GladeXML *gui; GtkWidget *widget; GList *icon_list; + char *gladefile; gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_im), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, @@ -262,7 +264,11 @@ e_contact_editor_im_init (EContactEditorIm *e_contact_editor_im) e_contact_editor_im->service = FIRST_IM_TYPE; e_contact_editor_im->location = g_strdup("HOME"); e_contact_editor_im->username = NULL; - gui = glade_xml_new (EVOLUTION_GLADEDIR "/im.glade", NULL, NULL); + + gladefile = g_build_filename (EVOLUTION_GLADEDIR, "im.glade", NULL); + gui = glade_xml_new (gladefile, NULL, NULL); + g_free (gladefile); + e_contact_editor_im->gui = gui; widget = glade_xml_get_widget(gui, "dialog-im"); diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 535285ba6c..b9757bbdfd 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -60,6 +60,7 @@ #include "misc/e-url-entry.h" #include "shell/evolution-shell-component-utils.h" #include "e-util/e-icon-factory.h" +#include "e-util/e-util-private.h" #include "eab-contact-merging.h" #include <libgnomevfs/gnome-vfs-ops.h> @@ -3149,6 +3150,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor) GladeXML *gui; GtkWidget *widget, *label; char *icon_path; + char *gladefile; e_contact_editor->name = e_contact_name_new(); @@ -3161,7 +3163,12 @@ e_contact_editor_init (EContactEditor *e_contact_editor) e_contact_editor->load_source_id = 0; e_contact_editor->load_book = NULL; - gui = glade_xml_new (EVOLUTION_GLADEDIR "/contact-editor.glade", NULL, NULL); + gladefile = g_build_filename (EVOLUTION_GLADEDIR, + "contact-editor.glade", + NULL); + gui = glade_xml_new (gladefile, NULL, NULL); + g_free (gladefile); + e_contact_editor->gui = gui; setup_tab_order(gui); diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index f141f005d9..87a3946314 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -22,6 +22,7 @@ #include "e-contact-list-editor.h" #include <e-util/e-icon-factory.h> +#include <e-util/e-util-private.h> #include <string.h> @@ -191,6 +192,7 @@ e_contact_list_editor_init (EContactListEditor *editor) { GladeXML *gui; GList *icon_list; + char *gladefile; editor->contact = NULL; editor->changed = FALSE; @@ -203,7 +205,12 @@ e_contact_list_editor_init (EContactListEditor *editor) editor->load_source_id = 0; editor->load_book = NULL; - gui = glade_xml_new (EVOLUTION_GLADEDIR "/contact-list-editor.glade", NULL, NULL); + gladefile = g_build_filename (EVOLUTION_GLADEDIR, + "contact-list-editor.glade", + NULL); + gui = glade_xml_new (gladefile, NULL, NULL); + g_free (gladefile); + editor->gui = gui; editor->app = glade_xml_get_widget (gui, "contact list editor"); @@ -642,13 +649,18 @@ e_contact_list_editor_create_table(gchar *name, ETableModel *model; GtkWidget *table; + char *etspecfile; model = e_contact_list_model_new (); + etspecfile = g_build_filename (EVOLUTION_ETSPECDIR, + "e-contact-list-editor.etspec", + NULL); table = e_table_scrolled_new_from_spec_file (model, NULL, - EVOLUTION_ETSPECDIR "/e-contact-list-editor.etspec", + etspecfile, NULL); + g_free (etspecfile); g_object_set_data(G_OBJECT(table), "model", model); diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c index 37f147eaa4..ecb70b84d9 100644 --- a/addressbook/gui/merging/eab-contact-merging.c +++ b/addressbook/gui/merging/eab-contact-merging.c @@ -18,6 +18,7 @@ #include <gtk/gtkdialog.h> #include <gtk/gtkcontainer.h> #include "addressbook/gui/widgets/eab-contact-display.h" +#include "e-util/e-util-private.h" typedef enum { E_CONTACT_MERGING_ADD, @@ -153,6 +154,7 @@ static void match_query_callback (EContact *contact, EContact *match, EABContactMatchType type, gpointer closure) { EContactMergingLookup *lookup = closure; + char *gladefile; if ((gint) type <= (gint) EAB_CONTACT_MATCH_VAGUE) { doit (lookup); @@ -161,11 +163,19 @@ match_query_callback (EContact *contact, EContact *match, EABContactMatchType ty GtkWidget *widget; - if (lookup->op == E_CONTACT_MERGING_ADD) - ui = glade_xml_new (EVOLUTION_GLADEDIR "/eab-contact-duplicate-detected.glade", NULL, NULL); - else if (lookup->op == E_CONTACT_MERGING_COMMIT) - ui = glade_xml_new (EVOLUTION_GLADEDIR "/eab-contact-commit-duplicate-detected.glade", NULL, NULL); - else { + if (lookup->op == E_CONTACT_MERGING_ADD) { + gladefile = g_build_filename (EVOLUTION_GLADEDIR, + "eab-contact-duplicate-detected.glade", + NULL); + ui = glade_xml_new (gladefile, NULL, NULL); + g_free (gladefile); + } else if (lookup->op == E_CONTACT_MERGING_COMMIT) { + gladefile = g_build_filename (EVOLUTION_GLADEDIR, + "eab-contact-commit-duplicate-detected.glade", + NULL); + ui = glade_xml_new (gladefile, NULL, NULL); + g_free (gladefile); + } else { doit (lookup); return; } 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; diff --git a/addressbook/printing/e-contact-print-style-editor.c b/addressbook/printing/e-contact-print-style-editor.c index 436aaddff0..8c41f9491b 100644 --- a/addressbook/printing/e-contact-print-style-editor.c +++ b/addressbook/printing/e-contact-print-style-editor.c @@ -20,6 +20,7 @@ */ #include "e-contact-print-style-editor.h" +#include "e-util/e-util-private.h" static void e_contact_print_style_editor_init (EContactPrintStyleEditor *card); static void e_contact_print_style_editor_class_init (EContactPrintStyleEditorClass *klass); @@ -99,9 +100,15 @@ static void e_contact_print_style_editor_init (EContactPrintStyleEditor *e_contact_print_style_editor) { GladeXML *gui; + char *gladefile; /* e_contact_print_style_editor->card = NULL;*/ - gui = glade_xml_new (EVOLUTION_GLADEDIR "/e-contact-print.glade", NULL, NULL); + gladefile = g_build_filename (EVOLUTION_GLADEDIR, + "e-contact-print.glade", + NULL); + gui = glade_xml_new (gladefile, NULL, NULL); + g_free (gladefile); + e_contact_print_style_editor->gui = gui; gtk_widget_reparent(glade_xml_get_widget(gui, "vbox-contact-print-style-editor"), GTK_WIDGET(e_contact_print_style_editor)); diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index 4546d9b2a4..a662185838 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -43,6 +43,7 @@ #include <libebook/e-book.h> #include <libebook/e-contact.h> #include <e-util/e-util.h> +#include <e-util/e-util-private.h> #include <e-util/e-print.h> #define SCALE 5 |