aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-main.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-11-15 01:11:16 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-11-15 01:11:16 +0800
commitfa2e94db1e8ec3bd0cb8be19b29ece77c66452bf (patch)
tree3ddbeeaf56fa62e472d4e619b736a2e926cfab89 /src/ephy-main.c
parentb086814a1ff6d94b29ae2185aebb22321da7e1a4 (diff)
downloadgsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.tar
gsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.tar.gz
gsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.tar.bz2
gsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.tar.lz
gsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.tar.xz
gsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.tar.zst
gsoc2013-epiphany-fa2e94db1e8ec3bd0cb8be19b29ece77c66452bf.zip
Use an unique factory for both interfaces.
2003-11-14 Marco Pesenti Gritti <marco@gnome.org> * data/GNOME_Epiphany_Automation.server.in: * data/GNOME_Epiphany_NautilusView.server.in: Use an unique factory for both interfaces. * data/ui/Makefile.am: Do not try to merge translations in nautilus xml. * src/ephy-nautilus-view.c: (disconnected_idle), (control_disconnected_cb), (ephy_nautilus_view_instance_init), (ephy_nautilus_view_finalize): Unref the view on control disconnected, not on finalize. * src/ephy-main.c: (main): Add a server mode argument, used internally by bonobo interface. Free popt context only when no more necessary. * src/ephy-automation.c: * src/ephy-automation.h: * src/ephy-shell.c: (ephy_nautilus_view_new), (ephy_automation_factory_cb), (ephy_automation_factory_new), (ephy_shell_init), (path_from_command_line_arg), (open_urls), (server_timeout), (ephy_shell_startup), (ephy_shell_finalize), (ephy_shell_new_tab): * src/ephy-shell.h: When running in server mode unref (and so exit) on a timeout. Expand args passed to the command line.
Diffstat (limited to 'src/ephy-main.c')
-rw-r--r--src/ephy-main.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c
index d94e301a1..b7d29b4af 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -41,7 +41,7 @@ static gboolean open_in_existing = FALSE;
static gboolean open_in_new_tab = FALSE;
static gboolean open_fullscreen = FALSE;
static gboolean open_as_bookmarks_editor = FALSE;
-static gboolean open_as_nautilus_view = FALSE;
+static gboolean server_mode = FALSE;
static const char *session_filename = NULL;
static const char *bookmark_url = NULL;
@@ -64,12 +64,12 @@ static struct poptOption popt_options[] =
{ "import-bookmarks", '\0', POPT_ARG_STRING, &bookmarks_file,
0, N_("Import bookmarks from the given file"),
N_("FILE") },
- { "nautilus-view", 'v', POPT_ARG_NONE, &open_as_nautilus_view, 0,
- N_("Used internally by the nautilus view"),
- NULL },
{ "bookmarks-editor", 'b', POPT_ARG_NONE, &open_as_bookmarks_editor, 0,
N_("Launch the bookmarks editor"),
NULL },
+ { "server", 's', POPT_ARG_NONE, &server_mode, 0,
+ N_("Used internally by the bonobo interface"),
+ NULL },
{ NULL, 0, 0, NULL, 0, NULL, NULL }
};
@@ -111,7 +111,6 @@ main (int argc, char *argv[])
g_value_init (&context_as_value, G_TYPE_POINTER));
context = g_value_get_pointer (&context_as_value);
args = poptGetArgs (context);
- poptFreeContext (context);
startup_flags = 0;
string_arg = NULL;
@@ -131,10 +130,6 @@ main (int argc, char *argv[])
{
startup_flags |= EPHY_SHELL_STARTUP_BOOKMARKS_EDITOR;
}
- else if (open_as_nautilus_view)
- {
- startup_flags |= EPHY_SHELL_STARTUP_NAUTILUS_VIEW;
- }
else if (session_filename != NULL)
{
startup_flags |= EPHY_SHELL_STARTUP_SESSION;
@@ -150,6 +145,10 @@ main (int argc, char *argv[])
startup_flags |= EPHY_SHELL_STARTUP_ADD_BOOKMARK;
string_arg = bookmark_url;
}
+ else if (server_mode)
+ {
+ startup_flags |= EPHY_SHELL_STARTUP_SERVER;
+ }
gnome_vfs_init ();
glade_gnome_init ();
@@ -186,6 +185,7 @@ main (int argc, char *argv[])
ephy_state_save ();
ephy_file_helpers_shutdown ();
gnome_vfs_shutdown ();
+ poptFreeContext (context);
return 0;
}