aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-11-26 10:31:52 +0800
committerTor Lillqvist <tml@src.gnome.org>2005-11-26 10:31:52 +0800
commite7defa25a587dfaa160211ce0e2941c044560b5a (patch)
tree92e5a8b5ffb7010a28bced8e3eb9726411f27c81 /calendar
parentae89d959aab24359c730375cff664ac3b44cc953 (diff)
downloadgsoc2013-evolution-e7defa25a587dfaa160211ce0e2941c044560b5a.tar.gz
gsoc2013-evolution-e7defa25a587dfaa160211ce0e2941c044560b5a.tar.zst
gsoc2013-evolution-e7defa25a587dfaa160211ce0e2941c044560b5a.zip
gui/calendar-commands.c gui/e-cal-list-view.c gui/e-calendar-table.c
2005-11-26 Tor Lillqvist <tml@novell.com> * gui/calendar-commands.c * gui/e-cal-list-view.c * gui/e-calendar-table.c * gui/e-memo-table.c * gui/e-memos.c * gui/e-tasks.c * gui/gnome-cal.c * gui/goto.c * gui/memos-control.c * gui/tasks-control.c * gui/alarm-notify/alarm-notify-dialog.c * gui/alarm-notify/notify-main.c * gui/dialogs/alarm-dialog.c * gui/dialogs/alarm-list-dialog.c * gui/dialogs/cal-attachment.c * gui/dialogs/cal-prefs-dialog.c * gui/dialogs/comp-editor.c * gui/dialogs/e-delegate-dialog.c * gui/dialogs/event-editor.c * gui/dialogs/meeting-page.c * gui/dialogs/memo-page.c * gui/dialogs/recurrence-page.c * gui/dialogs/schedule-page.c * gui/dialogs/task-details-page.c * gui/dialogs/task-page.c * gui/dialogs/url-editor-dialog.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=30679
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog33
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c9
-rw-r--r--calendar/gui/alarm-notify/notify-main.c12
-rw-r--r--calendar/gui/calendar-commands.c8
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c8
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.c9
-rw-r--r--calendar/gui/dialogs/cal-attachment.c10
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c9
-rw-r--r--calendar/gui/dialogs/comp-editor.c9
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.c10
-rw-r--r--calendar/gui/dialogs/event-editor.c8
-rw-r--r--calendar/gui/dialogs/meeting-page.c12
-rw-r--r--calendar/gui/dialogs/memo-page.c10
-rw-r--r--calendar/gui/dialogs/recurrence-page.c10
-rw-r--r--calendar/gui/dialogs/schedule-page.c10
-rw-r--r--calendar/gui/dialogs/task-details-page.c10
-rw-r--r--calendar/gui/dialogs/task-page.c10
-rw-r--r--calendar/gui/dialogs/url-editor-dialog.c13
-rw-r--r--calendar/gui/e-cal-list-view.c8
-rw-r--r--calendar/gui/e-calendar-table.c9
-rw-r--r--calendar/gui/e-memo-table.c9
-rw-r--r--calendar/gui/e-memos.c24
-rw-r--r--calendar/gui/e-tasks.c24
-rw-r--r--calendar/gui/gnome-cal.c21
-rw-r--r--calendar/gui/goto.c8
-rw-r--r--calendar/gui/memos-control.c8
-rw-r--r--calendar/gui/tasks-control.c8
27 files changed, 262 insertions, 57 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 57e1c3ae13..5379a1d215 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,36 @@
+2005-11-26 Tor Lillqvist <tml@novell.com>
+
+ * gui/calendar-commands.c
+ * gui/e-cal-list-view.c
+ * gui/e-calendar-table.c
+ * gui/e-memo-table.c
+ * gui/e-memos.c
+ * gui/e-tasks.c
+ * gui/gnome-cal.c
+ * gui/goto.c
+ * gui/memos-control.c
+ * gui/tasks-control.c
+ * gui/alarm-notify/alarm-notify-dialog.c
+ * gui/alarm-notify/notify-main.c
+ * gui/dialogs/alarm-dialog.c
+ * gui/dialogs/alarm-list-dialog.c
+ * gui/dialogs/cal-attachment.c
+ * gui/dialogs/cal-prefs-dialog.c
+ * gui/dialogs/comp-editor.c
+ * gui/dialogs/e-delegate-dialog.c
+ * gui/dialogs/event-editor.c
+ * gui/dialogs/meeting-page.c
+ * gui/dialogs/memo-page.c
+ * gui/dialogs/recurrence-page.c
+ * gui/dialogs/schedule-page.c
+ * gui/dialogs/task-details-page.c
+ * gui/dialogs/task-page.c
+ * gui/dialogs/url-editor-dialog.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/calendar-component.c (ensure_sources)
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c
index 0e545721d6..4aa356af3e 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c
@@ -44,6 +44,7 @@
#include "config-data.h"
#include "util.h"
#include <e-util/e-icon-factory.h>
+#include <e-util/e-util-private.h>
@@ -218,8 +219,14 @@ notified_alarms_dialog_new (void)
G_TYPE_POINTER, /* End */
G_TYPE_POINTER /* FuncInfo*/));
+ char *gladefile;
- an->xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-notify.glade", NULL, NULL);
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "alarm-notify.glade",
+ NULL);
+ an->xml = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
+
if (!an->xml) {
g_message ("alarm_notify_dialog(): Could not load the Glade XML file!");
g_free (an);
diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c
index 4dca946d76..348b94a42e 100644
--- a/calendar/gui/alarm-notify/notify-main.c
+++ b/calendar/gui/alarm-notify/notify-main.c
@@ -40,6 +40,7 @@
#include <libedataserver/e-source.h>
#include <libedataserverui/e-passwords.h>
#include "e-util/e-icon-factory.h"
+#include "e-util/e-util-private.h"
#include "alarm.h"
#include "alarm-queue.h"
#include "alarm-notify.h"
@@ -70,10 +71,17 @@ save_session_cb (GnomeClient *client, GnomeSaveStyle save_style, gint shutdown,
{
char *args[2];
- args[0] = EVOLUTION_LIBEXECDIR "/evolution-alarm-notify";
+ args[0] = g_build_filename (EVOLUTION_LIBEXECDIR,
+ "evolution-alarm-notify"
+#ifdef G_OS_WIN32
+ ".exe"
+#endif
+ ,
+ NULL);
args[1] = NULL;
gnome_client_set_restart_command (client, 1, args);
-
+ g_free (args[0]);
+
return TRUE;
}
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 1dcc70d3eb..3d960e9411 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -65,6 +65,7 @@
#include "e-cal-list-view.h"
#include "evolution-shell-component-utils.h"
#include "e-util/e-icon-factory.h"
+#include "e-util/e-util-private.h"
#include "e-cal-menu.h"
/* Focusing information for the calendar view. We have to keep track of this
@@ -639,6 +640,7 @@ calendar_control_activate (BonoboControl *control,
Bonobo_UIContainer remote_uih;
BonoboUIComponent *uic;
FocusData *focus;
+ gchar *xmlfile;
uic = bonobo_control_get_ui_component (control);
g_assert (uic != NULL);
@@ -653,10 +655,14 @@ calendar_control_activate (BonoboControl *control,
bonobo_ui_component_freeze (uic, NULL);
+ xmlfile = g_build_filename (EVOLUTION_UIDIR,
+ "evolution-calendar.xml",
+ NULL);
bonobo_ui_util_set_ui (uic, PREFIX,
- EVOLUTION_UIDIR "/evolution-calendar.xml",
+ xmlfile,
"evolution-calendar",
NULL);
+ g_free (xmlfile);
e_pixmaps_update (uic, pixmaps);
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index 4712d3f7ef..e730b00065 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -51,6 +51,7 @@
#include <libecal/e-cal-time-util.h>
#include "e-util/e-dialog-widgets.h"
#include "e-util/e-icon-factory.h"
+#include "e-util/e-util-private.h"
#include <libebook/e-destination.h>
#include <libedataserverui/e-name-selector.h>
#include "../calendar-config.h"
@@ -910,13 +911,18 @@ alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm)
Dialog dialog;
int response_id;
GList *icon_list;
+ char *gladefile;
g_return_val_if_fail (alarm != NULL, FALSE);
dialog.alarm = alarm;
dialog.ecal = ecal;
- dialog.xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-dialog.glade", NULL, NULL);
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "alarm-dialog.glade",
+ NULL);
+ dialog.xml = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
if (!dialog.xml) {
g_message (G_STRLOC ": Could not load the Glade XML file!");
return FALSE;
diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c
index 32dfa76a4f..01ef06abfe 100644
--- a/calendar/gui/dialogs/alarm-list-dialog.c
+++ b/calendar/gui/dialogs/alarm-list-dialog.c
@@ -44,6 +44,7 @@
#include <libecal/e-cal-time-util.h>
#include "e-util/e-dialog-widgets.h"
#include "e-util/e-icon-factory.h"
+#include "e-util/e-util-private.h"
#include "alarm-dialog.h"
#include "alarm-list-dialog.h"
@@ -218,11 +219,17 @@ alarm_list_dialog_run (GtkWidget *parent, ECal *ecal, EAlarmList *list_store)
Dialog dialog;
int response_id;
GList *icon_list;
+ char *gladefile;
dialog.ecal = ecal;
dialog.list_store = list_store;
- dialog.xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-list-dialog.glade", NULL, NULL);
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "alarm-list-dialog.glade",
+ NULL);
+ dialog.xml = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
+
if (!dialog.xml) {
g_message (G_STRLOC ": Could not load the Glade XML file!");
return FALSE;
diff --git a/calendar/gui/dialogs/cal-attachment.c b/calendar/gui/dialogs/cal-attachment.c
index f9ecb9f329..db97973ad6 100644
--- a/calendar/gui/dialogs/cal-attachment.c
+++ b/calendar/gui/dialogs/cal-attachment.c
@@ -40,6 +40,7 @@
#include <libgnome/gnome-i18n.h>
#include "e-util/e-mktemp.h"
+#include "e-util/e-util-private.h"
#include <camel/camel.h>
#include "comp-editor.h"
@@ -565,6 +566,7 @@ cal_attachment_edit (CalAttachment *attachment, GtkWidget *parent)
DialogData *dialog_data;
GladeXML *editor_gui;
char *type;
+ char *xmlfile;
g_return_if_fail (attachment != NULL);
g_return_if_fail (E_IS_CAL_ATTACHMENT (attachment));
@@ -578,8 +580,12 @@ cal_attachment_edit (CalAttachment *attachment, GtkWidget *parent)
return;
}
- editor_gui = glade_xml_new (EVOLUTION_GLADEDIR "/cal-attachment.glade",
- NULL, NULL);
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "cal-attachment.glade",
+ NULL);
+ editor_gui = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
+
if (editor_gui == NULL) {
g_warning ("Cannot load `cal-attachment.glade'");
return;
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index 94eae52a37..7a2222a9bd 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -47,6 +47,7 @@
#include <libgnomeui/gnome-color-picker.h>
#include <glade/glade.h>
#include <e-util/e-dialog-widgets.h>
+#include <e-util/e-util-private.h>
#include <misc/e-dateedit.h>
@@ -104,12 +105,18 @@ cal_prefs_dialog_new (void)
{
DialogData *dialog_data;
EvolutionConfigControl *config_control;
+ char *gladefile;
dialog_data = g_new0 (DialogData, 1);
/* Load the content widgets */
- dialog_data->xml = glade_xml_new (EVOLUTION_GLADEDIR "/cal-prefs-dialog.glade", NULL, NULL);
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "cal-prefs-dialog.glade",
+ NULL);
+ dialog_data->xml = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
+
if (!dialog_data->xml) {
g_message ("cal_prefs_dialog_construct(): Could not load the Glade XML file!");
return NULL;
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index b1e9f69f84..86c8116bdb 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -42,6 +42,7 @@
#include <libgnomeui/gnome-messagebox.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-icon-factory.h>
+#include <e-util/e-util-private.h>
#include <evolution-shell-component-utils.h>
#include <camel/camel-url.h>
@@ -1400,6 +1401,7 @@ comp_editor_init (CompEditor *editor)
{
CompEditorPrivate *priv;
BonoboUIContainer *container;
+ char *xmlfile;
priv = g_new0 (CompEditorPrivate, 1);
editor->priv = priv;
@@ -1425,9 +1427,14 @@ comp_editor_init (CompEditor *editor)
bonobo_ui_component_freeze (editor->uic, NULL);
+ xmlfile = g_build_filename (EVOLUTION_UIDIR,
+ "evolution-editor.xml",
+ NULL);
bonobo_ui_util_set_ui (editor->uic, PREFIX,
- EVOLUTION_UIDIR "/evolution-editor.xml",
+ xmlfile,
"evolution-editor", NULL);
+ g_free (xmlfile);
+
e_pixmaps_update (editor->uic, pixmaps);
bonobo_ui_component_thaw (editor->uic, NULL);
diff --git a/calendar/gui/dialogs/e-delegate-dialog.c b/calendar/gui/dialogs/e-delegate-dialog.c
index f1fcf790d9..657d0fa6c5 100644
--- a/calendar/gui/dialogs/e-delegate-dialog.c
+++ b/calendar/gui/dialogs/e-delegate-dialog.c
@@ -33,6 +33,7 @@
#include <misc/e-map.h>
#include <libebook/e-destination.h>
#include <libedataserverui/e-name-selector.h>
+#include "e-util/e-util-private.h"
#include "e-delegate-dialog.h"
struct _EDelegateDialogPrivate {
@@ -123,6 +124,7 @@ e_delegate_dialog_construct (EDelegateDialog *edd, const char *name, const char
EDestination *dest;
ENameSelectorModel *name_selector_model;
ENameSelectorDialog *name_selector_dialog;
+ char *gladefile;
g_return_val_if_fail (edd != NULL, NULL);
g_return_val_if_fail (E_IS_DELEGATE_DIALOG (edd), NULL);
@@ -131,8 +133,12 @@ e_delegate_dialog_construct (EDelegateDialog *edd, const char *name, const char
/* Load the content widgets */
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/e-delegate-dialog.glade",
- NULL, NULL);
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "e-delegate-dialog.glade",
+ NULL);
+ priv->xml = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
+
if (!priv->xml) {
g_message ("e_delegate_dialog_construct(): Could not load the Glade XML file!");
goto error;
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index d686ab0b03..91faa0cdd3 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -32,6 +32,7 @@
#include <libgnome/gnome-i18n.h>
#include <misc/e-dateedit.h>
#include <e-util/e-icon-factory.h>
+#include <e-util/e-util-private.h>
#include <evolution-shell-component-utils.h>
#include "event-page.h"
#include "recurrence-page.h"
@@ -395,6 +396,7 @@ event_editor_init (EventEditor *ee)
EventEditorPrivate *priv;
CompEditor *editor = COMP_EDITOR(ee);
gboolean status;
+ char *xmlfile;
priv = g_new0 (EventEditorPrivate, 1);
ee->priv = priv;
@@ -408,9 +410,13 @@ event_editor_init (EventEditor *ee)
bonobo_ui_component_add_verb_list_with_data (editor->uic, verbs, ee);
+ xmlfile = g_build_filename (EVOLUTION_UIDIR,
+ "evolution-event-editor.xml",
+ NULL);
bonobo_ui_util_set_ui (editor->uic, PREFIX,
- EVOLUTION_UIDIR "/evolution-event-editor.xml",
+ xmlfile,
"evolution-event-editor", NULL);
+ g_free (xmlfile);
/* Hide send options */
bonobo_ui_component_set_prop (
diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
index 0b31e474ab..0911bb26ea 100644
--- a/calendar/gui/dialogs/meeting-page.c
+++ b/calendar/gui/dialogs/meeting-page.c
@@ -41,6 +41,7 @@
#include <misc/e-dateedit.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-dialog-widgets.h>
+#include <e-util/e-util-private.h>
#include "../calendar-component.h"
#include "../e-meeting-attendee.h"
@@ -672,7 +673,7 @@ existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
const char *address;
address = itip_strip_mailto (attendee->value);
- if (address && !g_strcasecmp (ia_address, address)) {
+ if (address && !g_ascii_strcasecmp (ia_address, address)) {
e_cal_component_free_attendee_list (attendees);
return TRUE;
}
@@ -1035,11 +1036,16 @@ meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems,
GtkWidget *sw;
EAccount *a;
GtkTreeSelection *selection;
+ char *gladefile;
priv = mpage->priv;
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR
- "/meeting-page.glade", NULL, NULL);
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "meeting-page.glade",
+ NULL);
+ priv->xml = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
+
if (!priv->xml) {
g_message (G_STRLOC ": Could not load the Glade XML file!");
return NULL;
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 0a2644b699..c7682f13f9 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -41,6 +41,7 @@
#include "common/authentication.h"
#include "e-util/e-dialog-widgets.h"
#include "e-util/e-categories-config.h"
+#include "e-util/e-util-private.h"
#include "../calendar-config.h"
#include "comp-editor.h"
#include "comp-editor-util.h"
@@ -550,11 +551,16 @@ MemoPage *
memo_page_construct (MemoPage *tpage)
{
MemoPagePrivate *priv;
+ char *gladefile;
priv = tpage->priv;
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/memo-page.glade",
- NULL, NULL);
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "memo-page.glade",
+ NULL);
+ priv->xml = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
+
if (!priv->xml) {
g_message ("memo_page_construct(): "
"Could not load the Glade XML file!");
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index 5d53e50433..2ec7145dcf 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -43,6 +43,7 @@
#include <glade/glade.h>
#include <libedataserver/e-time-utils.h>
#include <e-util/e-dialog-widgets.h>
+#include <e-util/e-util-private.h>
#include <misc/e-dateedit.h>
#include <libecal/e-cal-recur.h>
#include <libecal/e-cal-time-util.h>
@@ -2355,11 +2356,16 @@ RecurrencePage *
recurrence_page_construct (RecurrencePage *rpage)
{
RecurrencePagePrivate *priv;
+ char *gladefile;
priv = rpage->priv;
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR
- "/recurrence-page.glade", NULL, NULL);
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "recurrence-page.glade",
+ NULL);
+ priv->xml = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
+
if (!priv->xml) {
g_message ("recurrence_page_construct(): "
"Could not load the Glade XML file!");
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index 9b0e0a0ee9..42141f296c 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -34,6 +34,7 @@
#include <libgnomeui/gnome-dialog-util.h>
#include <glade/glade.h>
#include <e-util/e-dialog-widgets.h>
+#include <e-util/e-util-private.h>
#include <misc/e-dateedit.h>
#include "../calendar-config.h"
#include "../e-meeting-time-sel.h"
@@ -408,11 +409,16 @@ SchedulePage *
schedule_page_construct (SchedulePage *spage, EMeetingStore *ems)
{
SchedulePagePrivate *priv;
+ char *gladefile;
priv = spage->priv;
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR
- "/schedule-page.glade", NULL, NULL);
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "schedule-page.glade",
+ NULL);
+ priv->xml = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
+
if (!priv->xml) {
g_message ("schedule_page_construct(): "
"Could not load the Glade XML file!");
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index 01b0c3e0f2..d8449db72d 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -32,6 +32,7 @@
#include <misc/e-dateedit.h>
#include <misc/e-url-entry.h>
#include "e-util/e-dialog-widgets.h"
+#include "e-util/e-util-private.h"
#include "../calendar-config.h"
#include "../e-timezone-entry.h"
#include "comp-editor-util.h"
@@ -768,11 +769,16 @@ TaskDetailsPage *
task_details_page_construct (TaskDetailsPage *tdpage)
{
TaskDetailsPagePrivate *priv;
+ char *gladefile;
priv = tdpage->priv;
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR
- "/task-details-page.glade", NULL, NULL);
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "task-details-page.glade",
+ NULL);
+ priv->xml = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
+
if (!priv->xml) {
g_message ("task_details_page_construct(): "
"Could not load the Glade XML file!");
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 3d4cb500b6..155d391de9 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -42,6 +42,7 @@
#include "e-util/e-popup.h"
#include "e-util/e-dialog-widgets.h"
#include "e-util/e-categories-config.h"
+#include "e-util/e-util-private.h"
#include "../e-timezone-entry.h"
#include "../calendar-config.h"
#include "comp-editor.h"
@@ -1784,14 +1785,19 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client)
EAccount *def_account;
GList *address_strings = NULL, *l;
EAccount *a;
+ char *gladefile;
priv = tpage->priv;
g_object_ref (model);
priv->model = model;
priv->client = client;
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/task-page.glade",
- NULL, NULL);
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "task-page.glade",
+ NULL);
+ priv->xml = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
+
if (!priv->xml) {
g_message ("task_page_construct(): "
"Could not load the Glade XML file!");
diff --git a/calendar/gui/dialogs/url-editor-dialog.c b/calendar/gui/dialogs/url-editor-dialog.c
index 5e29af48de..e7759955fe 100644
--- a/calendar/gui/dialogs/url-editor-dialog.c
+++ b/calendar/gui/dialogs/url-editor-dialog.c
@@ -43,6 +43,7 @@
#include <glade/glade.h>
#include <e-util/e-dialog-widgets.h>
#include <e-util/e-icon-factory.h>
+#include <e-util/e-util-private.h>
#include <misc/e-dateedit.h>
#include <stdlib.h>
#include <string.h>
@@ -66,9 +67,15 @@ gboolean
url_editor_dialog_new (DialogData *dialog_data, EPublishUri *uri)
{
int b;
-
+ char *gladefile;
UrlDialogData *url_dlg_data = g_new0 (UrlDialogData, 1);
- url_dlg_data->xml = glade_xml_new (EVOLUTION_GLADEDIR "/url-editor-dialog.glade", NULL, NULL);
+
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "url-editor-dialog.glade",
+ NULL);
+ url_dlg_data->xml = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
+
if (!url_dlg_data->xml) {
g_message ("url_editor_dialog_construct(): Could not load the Glade XML file!");
return FALSE;
@@ -365,7 +372,7 @@ url_editor_dialog_fb_url_changed (GtkEntry *url_entry, void *data)
URL_LIST_LOCATION_COLUMN, &url_name,
-1);
- if (!strcasecmp (url_name, entry_contents)) {
+ if (!g_ascii_strcasecmp (url_name, entry_contents)) {
gtk_widget_set_sensitive ((GtkWidget *) url_dlg_data->ok, FALSE);
return;
}
diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c
index 978ac6814d..69c1284e0d 100644
--- a/calendar/gui/e-cal-list-view.c
+++ b/calendar/gui/e-cal-list-view.c
@@ -54,6 +54,7 @@
#include <libgnome/gnome-util.h>
#include <e-util/e-categories-config.h>
#include <e-util/e-dialog-utils.h>
+#include <e-util/e-util-private.h>
#include <libecal/e-cal-time-util.h>
#include "e-cal-model-calendar.h"
@@ -203,6 +204,7 @@ setup_e_table (ECalListView *cal_list_view)
ECell *cell, *popup_cell;
GnomeCanvas *canvas;
GtkStyle *style;
+ gchar *etspecfile;
model = E_CAL_MODEL_CALENDAR (e_calendar_view_get_model (E_CALENDAR_VIEW (cal_list_view)));
@@ -264,11 +266,15 @@ setup_e_table (ECalListView *cal_list_view)
/* Create table view */
+ etspecfile = g_build_filename (EVOLUTION_ETSPECDIR,
+ "e-cal-list-view.etspec",
+ NULL);
cal_list_view->table_scrolled = E_TABLE_SCROLLED (
e_table_scrolled_new_from_spec_file (E_TABLE_MODEL (model),
extras,
- EVOLUTION_ETSPECDIR "/e-cal-list-view.etspec",
+ etspecfile,
NULL));
+ g_free (etspecfile);
/* Make sure text is readable on top of our color coding */
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index 62718c8aa0..e970c035cd 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -40,6 +40,7 @@
#include <table/e-cell-text.h>
#include <table/e-cell-combo.h>
#include <e-util/e-dialog-utils.h>
+#include <e-util/e-util-private.h>
#include <misc/e-cell-date-edit.h>
#include <misc/e-cell-percent.h>
@@ -297,6 +298,7 @@ e_calendar_table_init (ECalendarTable *cal_table)
GdkPixbuf *pixbuf;
GList *strings;
AtkObject *a11y;
+ char *etspecfile;
/* Create the model */
@@ -493,10 +495,15 @@ e_calendar_table_init (ECalendarTable *cal_table)
/* Create the table */
+ etspecfile = g_build_filename (EVOLUTION_ETSPECDIR,
+ "e-calendar-table.etspec",
+ NULL);
table = e_table_scrolled_new_from_spec_file (E_TABLE_MODEL (cal_table->model),
extras,
- EVOLUTION_ETSPECDIR "/e-calendar-table.etspec",
+ etspecfile,
NULL);
+ g_free (etspecfile);
+
/* FIXME: this causes a message from GLib about 'extras' having only a floating
reference */
/* g_object_unref (extras); */
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index 906d61bba9..a720ffbe09 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -54,6 +54,7 @@
#include "e-comp-editor-registry.h"
#include "print.h"
#include <e-util/e-icon-factory.h>
+#include <e-util/e-util-private.h>
#include "e-cal-popup.h"
@@ -207,6 +208,7 @@ e_memo_table_init (EMemoTable *memo_table)
ETableExtras *extras;
gint i;
AtkObject *a11y;
+ gchar *etspecfile;
/* Create the model */
@@ -242,10 +244,15 @@ e_memo_table_init (EMemoTable *memo_table)
/* Create the table */
+ etspecfile = g_build_filename (EVOLUTION_ETSPECDIR,
+ "e-memo-table.etspec",
+ NULL);
table = e_table_scrolled_new_from_spec_file (E_TABLE_MODEL (memo_table->model),
extras,
- EVOLUTION_ETSPECDIR "/e-memo-table.etspec",
+ etspecfile,
NULL);
+ g_free (etspecfile);
+
/* FIXME: this causes a message from GLib about 'extras' having only a floating
reference */
/* g_object_unref (extras); */
diff --git a/calendar/gui/e-memos.c b/calendar/gui/e-memos.c
index f4c92b9b03..c4b4041284 100644
--- a/calendar/gui/e-memos.c
+++ b/calendar/gui/e-memos.c
@@ -38,6 +38,7 @@
#include "e-util/e-error.h"
#include "e-util/e-categories-config.h"
#include "e-util/e-config-listener.h"
+#include "e-util/e-util-private.h"
#include "shell/e-user-creatable-items-handler.h"
#include <libecal/e-cal-time-util.h>
#include <libedataserver/e-url.h>
@@ -1068,7 +1069,7 @@ e_memos_setup_view_menus (EMemos *memos, BonoboUIComponent *uic)
EMemosPrivate *priv;
GalViewFactory *factory;
ETableSpecification *spec;
- char *dir;
+ char *dir0, *dir1, *filename;
static GalViewCollection *collection = NULL;
g_return_if_fail (memos != NULL);
@@ -1090,19 +1091,26 @@ e_memos_setup_view_menus (EMemos *memos, BonoboUIComponent *uic)
gal_view_collection_set_title (collection, _("Memos"));
- dir = g_build_filename (memos_component_peek_base_directory (memos_component_peek ()),
- "memos", "views", NULL);
-
+ dir0 = g_build_filename (EVOLUTION_GALVIEWSDIR,
+ "memos",
+ NULL);
+ dir1 = g_build_filename (memos_component_peek_base_directory (memos_component_peek ()),
+ "memos", "views", NULL);
gal_view_collection_set_storage_directories (collection,
- EVOLUTION_GALVIEWSDIR "/memos/",
- dir);
- g_free (dir);
+ dir0,
+ dir1);
+ g_free (dir1);
+ g_free (dir0);
/* Create the views */
spec = e_table_specification_new ();
+ filename = g_build_filename (EVOLUTION_ETSPECDIR,
+ "e-memo-table.etspec",
+ NULL);
e_table_specification_load_from_file (spec,
- EVOLUTION_ETSPECDIR "/e-memo-table.etspec");
+ filename);
+ g_free (filename);
factory = gal_view_factory_etable_new (spec);
g_object_unref (spec);
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index d2fb77912a..864b607a0e 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -37,6 +37,7 @@
#include "e-util/e-error.h"
#include "e-util/e-categories-config.h"
#include "e-util/e-config-listener.h"
+#include "e-util/e-util-private.h"
#include "shell/e-user-creatable-items-handler.h"
#include <libedataserver/e-url.h>
#include <libedataserver/e-categories.h>
@@ -1310,7 +1311,7 @@ e_tasks_setup_view_menus (ETasks *tasks, BonoboUIComponent *uic)
ETasksPrivate *priv;
GalViewFactory *factory;
ETableSpecification *spec;
- char *dir;
+ char *dir0, *dir1, *filename;
static GalViewCollection *collection = NULL;
g_return_if_fail (tasks != NULL);
@@ -1332,18 +1333,25 @@ e_tasks_setup_view_menus (ETasks *tasks, BonoboUIComponent *uic)
gal_view_collection_set_title (collection, _("Tasks"));
- dir = g_build_filename (tasks_component_peek_base_directory (tasks_component_peek ()),
- "tasks", "views", NULL);
+ dir0 = g_build_filename (EVOLUTION_GALVIEWSDIR,
+ "tasks",
+ NULL);
+ dir1 = g_build_filename (tasks_component_peek_base_directory (tasks_component_peek ()),
+ "tasks", "views", NULL);
gal_view_collection_set_storage_directories (collection,
- EVOLUTION_GALVIEWSDIR "/tasks/",
- dir);
- g_free (dir);
+ dir0,
+ dir1);
+ g_free (dir1);
+ g_free (dir0);
/* Create the views */
spec = e_table_specification_new ();
- e_table_specification_load_from_file (spec,
- EVOLUTION_ETSPECDIR "/e-calendar-table.etspec");
+ filename = g_build_filename (EVOLUTION_ETSPECDIR,
+ "e-calendar-table.etspec",
+ NULL);
+ e_table_specification_load_from_file (spec, filename);
+ g_free (filename);
factory = gal_view_factory_etable_new (spec);
g_object_unref (spec);
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 9fa7edf7a4..d3b2ac5014 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -51,6 +51,7 @@
#include <widgets/menus/gal-define-views-dialog.h>
#include "widgets/menus/gal-view-menus.h"
#include "e-util/e-error.h"
+#include "e-util/e-util-private.h"
#include "e-comp-editor-registry.h"
#include "dialogs/delete-error.h"
#include "dialogs/event-editor.h"
@@ -2092,7 +2093,7 @@ void
gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic)
{
GnomeCalendarPrivate *priv;
- char *path;
+ char *path0, *path1, *etspecfile;
CalendarViewFactory *factory;
GalViewFactory *gal_factory;
static GalViewCollection *collection = NULL;
@@ -2115,12 +2116,16 @@ gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic)
gal_view_collection_set_title (collection, _("Calendar"));
- path = g_build_filename (calendar_component_peek_base_directory (calendar_component_peek ()),
+ path0 = g_build_filename (EVOLUTION_GALVIEWSDIR,
+ "calendar",
+ NULL);
+ path1 = g_build_filename (calendar_component_peek_base_directory (calendar_component_peek ()),
"calendar", "views", NULL);
gal_view_collection_set_storage_directories (collection,
- EVOLUTION_GALVIEWSDIR "/calendar/",
- path);
- g_free (path);
+ path0,
+ path1);
+ g_free (path1);
+ g_free (path0);
/* Create the views */
@@ -2141,7 +2146,11 @@ gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic)
g_object_unref (factory);
spec = e_table_specification_new ();
- e_table_specification_load_from_file (spec, EVOLUTION_ETSPECDIR "/e-cal-list-view.etspec");
+ etspecfile = g_build_filename (EVOLUTION_ETSPECDIR,
+ "e-cal-list-view.etspec",
+ NULL);
+ e_table_specification_load_from_file (spec, etspecfile);
+ g_free (etspecfile);
gal_factory = gal_view_factory_etable_new (spec);
g_object_unref (spec);
gal_view_collection_add_factory (collection, GAL_VIEW_FACTORY (gal_factory));
diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c
index 89d37455ca..5d7d4ec659 100644
--- a/calendar/gui/goto.c
+++ b/calendar/gui/goto.c
@@ -18,6 +18,7 @@
#include <gtk/gtkdialog.h>
#include <libgnomeui/gnome-dialog.h>
#include <glade/glade.h>
+#include "e-util/e-util-private.h"
#include "calendar-commands.h"
#include "calendar-config.h"
#include "tag-calendar.h"
@@ -203,6 +204,7 @@ goto_dialog (GnomeCalendar *gcal)
time_t start_time;
struct icaltimetype tt;
int b;
+ char *gladefile;
if (dlg) {
return;
@@ -211,7 +213,11 @@ goto_dialog (GnomeCalendar *gcal)
dlg = g_new0 (GoToDialog, 1);
/* Load the content widgets */
- dlg->xml = glade_xml_new (EVOLUTION_GLADEDIR "/goto-dialog.glade", NULL, NULL);
+ gladefile = g_build_filename (EVOLUTION_GLADEDIR,
+ "goto-dialog.glade",
+ NULL);
+ dlg->xml = glade_xml_new (gladefile, NULL, NULL);
+ g_free (gladefile);
if (!dlg->xml) {
g_message ("goto_dialog(): Could not load the Glade XML file!");
g_free (dlg);
diff --git a/calendar/gui/memos-control.c b/calendar/gui/memos-control.c
index 040865aeaf..213e3affb2 100644
--- a/calendar/gui/memos-control.c
+++ b/calendar/gui/memos-control.c
@@ -46,6 +46,7 @@
#include <bonobo/bonobo-ui-util.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-print.h>
+#include <e-util/e-util-private.h>
#include "calendar-config.h"
#include "e-memos.h"
@@ -197,6 +198,7 @@ memos_control_activate (BonoboControl *control, EMemos *memos)
int n_selected;
EMemoTable *cal_table;
ETable *etable;
+ char *xmlfile;
uic = bonobo_control_get_ui_component (control);
g_assert (uic != NULL);
@@ -211,10 +213,14 @@ memos_control_activate (BonoboControl *control, EMemos *memos)
bonobo_ui_component_freeze (uic, NULL);
+ xmlfile = g_build_filename (EVOLUTION_UIDIR,
+ "evolution-memos.xml",
+ NULL);
bonobo_ui_util_set_ui (uic, PREFIX,
- EVOLUTION_UIDIR "/evolution-memos.xml",
+ xmlfile,
"evolution-memos",
NULL);
+ g_free (xmlfile);
e_memos_setup_view_menus (memos, uic);
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
index 33c55488d4..bca8070eb7 100644
--- a/calendar/gui/tasks-control.c
+++ b/calendar/gui/tasks-control.c
@@ -45,6 +45,7 @@
#include <bonobo/bonobo-ui-util.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-print.h>
+#include <e-util/e-util-private.h>
#include "dialogs/cal-prefs-dialog.h"
#include "calendar-config.h"
#include "calendar-commands.h"
@@ -263,6 +264,7 @@ tasks_control_activate (BonoboControl *control, ETasks *tasks)
ECalendarTable *cal_table;
ETable *etable;
gboolean state;
+ char *xmlfile;
uic = bonobo_control_get_ui_component (control);
g_assert (uic != NULL);
@@ -277,10 +279,14 @@ tasks_control_activate (BonoboControl *control, ETasks *tasks)
bonobo_ui_component_freeze (uic, NULL);
+ xmlfile = g_build_filename (EVOLUTION_UIDIR,
+ "evolution-tasks.xml",
+ NULL);
bonobo_ui_util_set_ui (uic, PREFIX,
- EVOLUTION_UIDIR "/evolution-tasks.xml",
+ xmlfile,
"evolution-tasks",
NULL);
+ g_free (xmlfile);
e_tasks_setup_view_menus (tasks, uic);