diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2006-02-14 07:01:21 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2006-02-14 07:01:21 +0800 |
commit | 44d332d8c7b555b37292ba70ca9be327c1aacfe8 (patch) | |
tree | e36487e9effcce688fcf5aa9a1ec20fbbcf3012f /src | |
parent | 6a26e601c499f07ef80c69e72dd902490a019a59 (diff) | |
download | gsoc2013-epiphany-44d332d8c7b555b37292ba70ca9be327c1aacfe8.tar gsoc2013-epiphany-44d332d8c7b555b37292ba70ca9be327c1aacfe8.tar.gz gsoc2013-epiphany-44d332d8c7b555b37292ba70ca9be327c1aacfe8.tar.bz2 gsoc2013-epiphany-44d332d8c7b555b37292ba70ca9be327c1aacfe8.tar.lz gsoc2013-epiphany-44d332d8c7b555b37292ba70ca9be327c1aacfe8.tar.xz gsoc2013-epiphany-44d332d8c7b555b37292ba70ca9be327c1aacfe8.tar.zst gsoc2013-epiphany-44d332d8c7b555b37292ba70ca9be327c1aacfe8.zip |
Move --private-instance out of debug #ifdef.
2006-02-14 Christian Persch <chpe@cvs.gnome.org>
* lib/ephy-file-helpers.c: (ephy_file_helpers_init),
(ephy_file_helpers_shutdown), (ephy_file_delete_on_exit),
(ephy_file_monitor_cancel), (ephy_file_delete_directory):
* lib/ephy-file-helpers.h:
* src/ephy-main.c: (main):
Move --private-instance out of debug #ifdef.
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-main.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c index 1708b6272..9b97e1416 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -69,7 +69,7 @@ static char **arguments = NULL; /* Only set from options in debug builds */ static gboolean private_instance = FALSE; -static gboolean keep_profile_directory = FALSE; +static gboolean keep_temp_directory = FALSE; static char *profile_directory = NULL; static const GOptionEntry option_entries[] = @@ -86,6 +86,10 @@ static const GOptionEntry option_entries[] = N_("Load the given session file"), N_("FILE") }, { "add-bookmark", 't', 0, G_OPTION_ARG_STRING, &bookmark_url, N_("Add a bookmark"), N_("URL") }, + { "private-instance", 0, 0, G_OPTION_ARG_NONE, &private_instance, + N_("Start a private instance"), NULL }, + { "profile", 0, 0, G_OPTION_ARG_STRING, &profile_directory, + N_("Profile directory to use in the private instance"), N_("DIR") }, { G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &arguments, "", "" }, { NULL } @@ -115,12 +119,8 @@ static const GOptionEntry libgnome_option_entries[] = #ifdef GNOME_ENABLE_DEBUG static GOptionEntry debug_option_entries[] = { - { "private-instance", 0, 0, G_OPTION_ARG_NONE, &private_instance, - "Start a private instance", NULL }, - { "profile", 0, 0, G_OPTION_ARG_STRING, &profile_directory, - "Profile directory to use in the private instance (default: a newly created directory in tmpdir)", "DIR" }, - { "keep-profile", 0, 0, G_OPTION_ARG_NONE, &keep_profile_directory, - "Don't delete the profile directory on exit (default: delete the temp profile on exit)", NULL }, + { "keep-tempdir", 0, 0, G_OPTION_ARG_NONE, &keep_temp_directory, + "Don't delete the temporary directory on exit", NULL }, { NULL } }; #endif /* GNOME_ENABLE_DEBUG */ @@ -542,9 +542,23 @@ main (int argc, #endif /* GNOME_PARAM_GOPTION_CONTEXT */ + /* Some argument sanity checks*/ + if (arguments != NULL && (session_filename != NULL || open_as_bookmarks_editor)) + { + g_print ("Cannot use --bookmarks-editor or --load-session with URL arguments\n"); + exit (1); + } + + if (profile_directory != NULL && private_instance == FALSE) + { + g_print ("--profile can only be used in combination with --private-instance\n"); + exit (1); + } + if (arguments != NULL && eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_ARBITRARY_URL)) { + g_print ("URL loading is locked down\n"); exit (1); } @@ -580,6 +594,7 @@ main (int argc, if (path != NULL) { arguments[i] = gnome_vfs_make_uri_from_shell_arg (uri); + g_free (uri); } else { @@ -662,7 +677,7 @@ main (int argc, if (!ephy_file_helpers_init (profile_directory, private_instance, - !keep_profile_directory, + keep_temp_directory, &error)) { _ephy_dbus_release (); |