diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2019-01-03 08:23:23 -0600 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@igalia.com> | 2019-01-04 09:01:58 -0600 |
commit | 1dbf87ed9f7f2651121273430d41a5b953bc6304 (patch) | |
tree | f125610813089e164683707102796cc09c3c4a72 | |
parent | 28a84367b866dd277d7f3a0f063d20ccef240a4e (diff) | |
download | epiphany-1dbf87ed9f7f2651121273430d41a5b953bc6304.tar.gz |
Remove broken bookmarks command line options
Fixes #338
-rw-r--r-- | data/epiphany.1 | 6 | ||||
-rw-r--r-- | src/ephy-main.c | 8 | ||||
-rw-r--r-- | src/ephy-shell.c | 31 | ||||
-rw-r--r-- | src/ephy-shell.h | 7 |
4 files changed, 0 insertions, 52 deletions
diff --git a/data/epiphany.1 b/data/epiphany.1 index 8cfb374d9..a873aab26 100644 --- a/data/epiphany.1 +++ b/data/epiphany.1 @@ -22,15 +22,9 @@ browser window \fB\-\-new\-window\fR Open a new browser window .TP -\fB\-\-import\-bookmarks\fR=\fIFILE\fR -Import bookmarks from the given file -.TP \fB\-l\fR, \fB\-\-load\-session\fR=\fIFILE\fR Load the given session file .TP -\fB\-t\fR, \fB\-\-add\-bookmark\fR=\fIURL\fR -Add a bookmark -.TP \fB\-p\fR, \fB\-\-private\-instance\fR Start a private instance (temporary profile directory, not private browsing mode) .TP diff --git a/src/ephy-main.c b/src/ephy-main.c index 1090d266f..72c7de3a4 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -49,8 +49,6 @@ static gboolean open_in_new_tab = FALSE; static gboolean open_in_new_window = FALSE; static char *session_filename = NULL; -static char *bookmark_url = NULL; -static char *bookmarks_file = NULL; static char **arguments = NULL; static char *application_to_delete = NULL; @@ -116,12 +114,8 @@ static const GOptionEntry option_entries[] = N_("Open a new tab in an existing browser window"), NULL }, { "new-window", 0, 0, G_OPTION_ARG_NONE, &open_in_new_window, N_("Open a new browser window"), NULL }, - { "import-bookmarks", '\0', 0, G_OPTION_ARG_FILENAME, &bookmarks_file, - N_("Import bookmarks from the given file"), N_("FILE") }, { "load-session", 'l', 0, G_OPTION_ARG_FILENAME, &session_filename, 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", 'p', 0, G_OPTION_ARG_NONE, &private_instance, N_("Start a private instance"), NULL }, { "incognito-mode", 'i', 0, G_OPTION_ARG_NONE, &incognito_mode, @@ -440,9 +434,7 @@ main (int argc, _ephy_shell_create_instance (mode); ctx = ephy_shell_startup_context_new (startup_flags, - bookmarks_file, session_filename, - bookmark_url, arguments, user_time); g_strfreev (arguments); diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 1c8e20716..2c34c19c7 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -74,9 +74,7 @@ G_DEFINE_TYPE (EphyShell, ephy_shell, EPHY_TYPE_EMBED_SHELL) /** * ephy_shell_startup_context_new: - * @bookmarks_filename: A bookmarks file to import. * @session_filename: A session to restore. - * @bookmark_url: A URL to be added to the bookmarks. * @arguments: A %NULL-terminated array of URLs and file URIs to be opened. * @user_time: The user time when the EphyShell startup was invoked. * @@ -87,22 +85,15 @@ G_DEFINE_TYPE (EphyShell, ephy_shell, EPHY_TYPE_EMBED_SHELL) **/ EphyShellStartupContext * ephy_shell_startup_context_new (EphyStartupFlags startup_flags, - char *bookmarks_filename, char *session_filename, - char *bookmark_url, char **arguments, guint32 user_time) { EphyShellStartupContext *ctx = g_new0 (EphyShellStartupContext, 1); ctx->startup_flags = startup_flags; - - ctx->bookmarks_filename = g_strdup (bookmarks_filename); ctx->session_filename = g_strdup (session_filename); - ctx->bookmark_url = g_strdup (bookmark_url); - ctx->arguments = g_strdupv (arguments); - ctx->user_time = user_time; return ctx; @@ -113,12 +104,8 @@ ephy_shell_startup_context_free (EphyShellStartupContext *ctx) { g_assert (ctx != NULL); - g_free (ctx->bookmarks_filename); g_free (ctx->session_filename); - g_free (ctx->bookmark_url); - g_strfreev (ctx->arguments); - g_free (ctx); } @@ -500,9 +487,7 @@ ephy_shell_activate (GApplication *application) */ typedef enum { CTX_STARTUP_FLAGS, - CTX_BOOKMARKS_FILENAME, CTX_SESSION_FILENAME, - CTX_BOOKMARK_URL, CTX_ARGUMENTS, CTX_USER_TIME } CtxEnum; @@ -535,21 +520,11 @@ ephy_shell_add_platform_data (GApplication *application, CTX_STARTUP_FLAGS, g_variant_new_byte (ctx->startup_flags)); - if (ctx->bookmarks_filename) - g_variant_builder_add (ctx_builder, "{iv}", - CTX_BOOKMARKS_FILENAME, - g_variant_new_string (ctx->bookmarks_filename)); - if (ctx->session_filename) g_variant_builder_add (ctx_builder, "{iv}", CTX_SESSION_FILENAME, g_variant_new_string (ctx->session_filename)); - if (ctx->bookmark_url) - g_variant_builder_add (ctx_builder, "{iv}", - CTX_BOOKMARK_URL, - g_variant_new_string (ctx->bookmark_url)); - /* * If there are no URIs specified, pass an empty string, so that * the primary instance opens a new window. @@ -602,15 +577,9 @@ ephy_shell_before_emit (GApplication *application, case CTX_STARTUP_FLAGS: ctx->startup_flags = g_variant_get_byte (ctx_value); break; - case CTX_BOOKMARKS_FILENAME: - ctx->bookmarks_filename = g_variant_dup_string (ctx_value, NULL); - break; case CTX_SESSION_FILENAME: ctx->session_filename = g_variant_dup_string (ctx_value, NULL); break; - case CTX_BOOKMARK_URL: - ctx->bookmark_url = g_variant_dup_string (ctx_value, NULL); - break; case CTX_ARGUMENTS: ctx->arguments = g_variant_dup_strv (ctx_value, NULL); break; diff --git a/src/ephy-shell.h b/src/ephy-shell.h index cf8564b54..1feb3ad9f 100644 --- a/src/ephy-shell.h +++ b/src/ephy-shell.h @@ -74,13 +74,8 @@ typedef enum { typedef struct { EphyStartupFlags startup_flags; - - char *bookmarks_filename; char *session_filename; - char *bookmark_url; - char **arguments; - guint32 user_time; } EphyShellStartupContext; @@ -130,9 +125,7 @@ void ephy_shell_set_startup_context (EphyShell EphyShellStartupContext *ctx); EphyShellStartupContext *ephy_shell_startup_context_new (EphyStartupFlags startup_flags, - char *bookmarks_filename, char *session_filename, - char *bookmark_url, char **arguments, guint32 user_time); |