diff options
author | Tor Lillqvist <tml@novell.com> | 2005-12-18 12:33:29 +0800 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2005-12-18 12:33:29 +0800 |
commit | e89c27826741334b35d8952c769f66d11eaedce8 (patch) | |
tree | e64b437a818686edcb8457691ea369f4f7719e0b /shell/main.c | |
parent | f3e001990b61a336c1f30c5bae8065c15e320aec (diff) | |
download | gsoc2013-evolution-e89c27826741334b35d8952c769f66d11eaedce8.tar.gz gsoc2013-evolution-e89c27826741334b35d8952c769f66d11eaedce8.tar.zst gsoc2013-evolution-e89c27826741334b35d8952c769f66d11eaedce8.zip |
Use libedataserver's e_xml_parse_file() instead of xmlParseFile()
2005-12-17 Tor Lillqvist <tml@novell.com>
* e-config-upgrade.c: Use libedataserver's e_xml_parse_file()
instead of xmlParseFile() directly.
* e-shell.c
* e-shell-importer.c: Use GLib API when applicable.
* e-shell-importer.c
* e-shell-window.c: Construct pathname of glade file at run-time.
* e-shell-window-commands.c: Include e-util-private.h for Win32
redefinition of EVOLUTION_DATADIR.
* main.c: No SIGSEGV handling on Win32.
(main): Drop unused evolution_directory variable.
svn path=/trunk/; revision=30849
Diffstat (limited to 'shell/main.c')
-rw-r--r-- | shell/main.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/shell/main.c b/shell/main.c index 0117a626f5..5b3968237d 100644 --- a/shell/main.c +++ b/shell/main.c @@ -20,9 +20,10 @@ * Author: Ettore Perazzoli */ -#ifdef HAVE_CONFIG_H #include <config.h> -#endif + +#include <glib.h> +#include <glib/gstdio.h> #include "e-util/e-dialog-utils.h" #include "e-util/e-gtk-utils.h" @@ -36,6 +37,8 @@ #include "es-menu.h" #include "es-event.h" +#include "e-util/e-util-private.h" + #include <libxml/xmlmemory.h> #include <libxml/parser.h> #include <libxml/tree.h> @@ -52,9 +55,6 @@ #include <gtk/gtkdialog.h> #include <gtk/gtkstock.h> -#include <gdk/gdkx.h> -#include <X11/Xlib.h> - #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> #include <libgnome/gnome-sound.h> @@ -406,6 +406,7 @@ idle_cb (void *data) return FALSE; } +#ifndef G_OS_WIN32 /* SIGSEGV handling. @@ -458,6 +459,10 @@ setup_segv_redirect (void) g_static_mutex_lock (&segv_mutex); } +#else +#define setup_segv_redirect() 0 +#endif + int main (int argc, char **argv) { @@ -493,8 +498,8 @@ main (int argc, char **argv) GnomeProgram *program; poptContext popt_context; const char **args; - char *evolution_directory; GList *icon_list; + char *filename; /* Make ElectricFence work. */ free (malloc (10)); @@ -516,7 +521,10 @@ main (int argc, char **argv) } if (killev) { - execl (EVOLUTION_TOOLSDIR "/killev", "killev", NULL); + filename = g_build_filename (EVOLUTION_TOOLSDIR, + "killev", + NULL); + execl (filename, "killev", NULL); /* Not reached */ exit (0); } @@ -532,7 +540,7 @@ main (int argc, char **argv) if (evolution_debug_log) { int fd; - fd = open (evolution_debug_log, O_WRONLY | O_CREAT | O_TRUNC, 0600); + fd = g_open (evolution_debug_log, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (fd) { dup2 (fd, STDOUT_FILENO); dup2 (fd, STDERR_FILENO); @@ -553,13 +561,9 @@ main (int argc, char **argv) g_list_free (icon_list); } - /* FIXME We shouldn't be using the old directory at all I think */ - evolution_directory = g_build_filename (g_get_home_dir (), "evolution", NULL); if (setup_only) exit (0); - g_free (evolution_directory); - uri_list = NULL; g_value_init (&popt_context_value, G_TYPE_POINTER); |