aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-message-browser.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-12-18 16:24:26 +0800
committerTor Lillqvist <tml@src.gnome.org>2005-12-18 16:24:26 +0800
commit448d624c00f0c4e12917a4d31babd10555b2e8a4 (patch)
treec44c6e6864f1e0cd34455da2e71fc33ca13d61e6 /mail/em-message-browser.c
parent2f1a024be76933ba28ab80e76a52ff46358e33dd (diff)
downloadgsoc2013-evolution-448d624c00f0c4e12917a4d31babd10555b2e8a4.tar.gz
gsoc2013-evolution-448d624c00f0c4e12917a4d31babd10555b2e8a4.tar.zst
gsoc2013-evolution-448d624c00f0c4e12917a4d31babd10555b2e8a4.zip
em-folder-browser.c em-folder-view.c em-format-html.c
2005-12-18 Tor Lillqvist <tml@novell.com> * em-folder-browser.c * em-folder-view.c * em-format-html.c * em-format-html-display.c * em-mailer-prefs.c * em-message-browser.c * em-migrate.c * em-subscribe-editor.c * em-sync-stream.c * em-utils.c * em-vfolder-editor.c * em-vfolder-rule.c * mail-autofilter.c * mail-component.c * mail-config.c * mail-folder-cache.c: Use gstdio wrappers. Construct pathnames of glade, xml, etspec and png files at run-time. Use g_filename_{to,from}_uri(). * em-folder-browser.c (emfb_init) * em-folder-view.c (emfv_finalise) * em-message-browser.c (emmb_init): As EMFolderView::ui_files now always is a list of filenames constructed with g_build_filename(), use g_free() on each list entry before calling g_slist_free() on the list. * em-folder-tree-model.c (em_folder_tree_model_load_state): Use e_xml_parse_file(). * em-migrate.c: Bypass all the code for upgrading from 1.x on Win32. (emm_setup_initial): Use GDir instead of dirent. * em-sync-stream.c * mail-folder-cache.c: Use pthread_equal() to compare pthread_t values. * em-vfs-stream.c: No EINPROGRESS or ELOOP on Win32. svn path=/trunk/; revision=30854
Diffstat (limited to 'mail/em-message-browser.c')
-rw-r--r--mail/em-message-browser.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/mail/em-message-browser.c b/mail/em-message-browser.c
index caf93e7e41..f8e2d5bdd1 100644
--- a/mail/em-message-browser.c
+++ b/mail/em-message-browser.c
@@ -25,6 +25,15 @@
#include <config.h>
#endif
+#include <glib.h>
+#ifdef G_OS_WIN32
+/* Work around 'DATADIR' and 'interface' lossage in <windows.h> */
+#define DATADIR crap_DATADIR
+#include <windows.h>
+#undef DATADIR
+#undef interface
+#endif
+
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtkbutton.h>
@@ -39,6 +48,8 @@
#include <bonobo/bonobo-ui-component.h>
#include <bonobo/bonobo-ui-util.h>
+#include "e-util/e-util-private.h"
+
#include "em-format-html-display.h"
#include "em-message-browser.h"
#include "em-menu.h"
@@ -59,6 +70,13 @@ static void emmb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state)
static EMFolderViewClass *emmb_parent;
static void
+free_one_ui_file (gpointer data,
+ gpointer user_data)
+{
+ g_free (data);
+}
+
+static void
emmb_init(GObject *o)
{
EMMessageBrowser *emmb = (EMMessageBrowser *)o;
@@ -68,9 +86,17 @@ emmb_init(GObject *o)
((EMFolderView *)emmb)->preview_active = TRUE;
+ g_slist_foreach (emmb->view.ui_files, free_one_ui_file, NULL);
g_slist_free(emmb->view.ui_files);
- emmb->view.ui_files = g_slist_append(NULL, EVOLUTION_UIDIR "/evolution-mail-messagedisplay.xml");
- emmb->view.ui_files = g_slist_append(emmb->view.ui_files, EVOLUTION_UIDIR "/evolution-mail-message.xml");
+
+ emmb->view.ui_files = g_slist_append(NULL,
+ g_build_filename (EVOLUTION_UIDIR,
+ "evolution-mail-messagedisplay.xml",
+ NULL));
+ emmb->view.ui_files = g_slist_append(emmb->view.ui_files,
+ g_build_filename (EVOLUTION_UIDIR,
+ "evolution-mail-message.xml",
+ NULL));
/* currently: just use a scrolledwindow for preview widget */
p->preview = gtk_scrolled_window_new(NULL, NULL);