From 3c094d65a71666e40b14cb8edc8bbb255b09b8cf Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 23 Jan 2006 21:35:18 +0000 Subject: Add a GError** to ephy_file_helpers_init and ephy_ensure_dir_exists, so we 2006-01-23 Christian Persch * embed/mozilla/MozDownload.cpp: * lib/ephy-file-helpers.c: (ephy_file_helpers_init), (ephy_ensure_dir_exists): * lib/ephy-file-helpers.h: Add a GError** to ephy_file_helpers_init and ephy_ensure_dir_exists, so we can show the error to the user in main(). * src/ephy-dbus.c: (ephy_dbus_connect_to_session_bus_cb), (ephy_dbus_connect_to_system_bus_cb), (session_filter_func), (system_filter_func), (ephy_dbus_connect_to_system_bus), (ephy_dbus_connect_to_session_bus), (ephy_dbus_shutdown), (ephy_dbus_finalize), (ephy_dbus_get_type), (ephy_dbus_get_default), (ephy_dbus_get_bus), (ephy_dbus_get_proxy), (_ephy_dbus_startup), (_ephy_dbus_release), (_ephy_dbus_is_name_owner): * src/ephy-dbus.h: Refactored. Propagate errors to callers via GError**, and change lifecycle to the app lifetime. * src/ephy-lockdown.c: (ephy_lockdown_init), (ephy_lockdown_finalize): Move gconf notification add/remove for the lockdown key dirs here from main(). * src/ephy-shell.c: (ephy_shell_dispose), (_ephy_shell_create_instance): * src/ephy-shell.h: * src/epiphany.defs: Remove ephy_shell_startup and related stuff. * src/ephy-main.c: (handle_url), (handle_email), (shell_weak_notify), (dbus_g_proxy_finalized_cb), (save_yourself_cb), (die_cb), (gnome_session_init), (path_from_command_line_arg), (open_urls), (call_dbus_proxy), (show_error_message), (main): Move all startup code to main(), so we can show errors to the user instead of crashing when things go wrong. Part of bug #326807. --- src/ephy-shell.h | 39 ++++----------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) (limited to 'src/ephy-shell.h') diff --git a/src/ephy-shell.h b/src/ephy-shell.h index 17319d79f..2581e48bb 100644 --- a/src/ephy-shell.h +++ b/src/ephy-shell.h @@ -45,26 +45,6 @@ typedef struct _EphyShellPrivate EphyShellPrivate; extern EphyShell *ephy_shell; -#define EPHY_SHELL_ERROR ephy_shell_error_quark () - -typedef enum -{ - EPHY_SHELL_ERROR_MISSING_SERVER, - EPHY_SHELL_ERROR_OBJECT_REG_FAILED, - EPHY_SHELL_ERROR_FACTORY_REG_FAILED -} EphyShellError; - -typedef enum -{ - EPHY_SHELL_STARTUP_TABS = 1 << 0, - EPHY_SHELL_STARTUP_EXISTING_WINDOW = 1 << 2, - EPHY_SHELL_STARTUP_FULLSCREEN = 1 << 3, - EPHY_SHELL_STARTUP_BOOKMARKS_EDITOR = 1 << 4, - EPHY_SHELL_STARTUP_SESSION = 1 << 5, - EPHY_SHELL_STARTUP_IMPORT_BOOKMARKS = 1 << 6, - EPHY_SHELL_STARTUP_ADD_BOOKMARK = 1 << 7 -} EphyShellStartupFlags; - typedef enum { /* Page types */ @@ -97,27 +77,12 @@ struct _EphyShellClass EphyEmbedShellClass parent_class; }; -GType ephy_shell_error_get_type (void) G_GNUC_CONST; - -GType ephy_shell_startup_flags_get_type (void) G_GNUC_CONST; - GType ephy_new_tab_flags_get_type (void) G_GNUC_CONST; GType ephy_shell_get_type (void); -GQuark ephy_shell_error_quark (void); - EphyShell *ephy_shell_get_default (void); -EphyShell *ephy_shell_new (void); - -gboolean ephy_shell_startup (EphyShell *shell, - EphyShellStartupFlags flags, - guint32 user_time, - const char **args, - const char *string_arg, - GError **error); - EphyTab *ephy_shell_new_tab (EphyShell *shell, EphyWindow *parent_window, EphyTab *previous_tab, @@ -154,6 +119,10 @@ GObject *ephy_shell_get_print_setup_dialog (EphyShell *shell); GObject *ephy_shell_get_dbus_service (EphyShell *shell); +/* private API */ + +void _ephy_shell_create_instance (void); + G_END_DECLS #endif -- cgit v1.2.3