[epiphany/mcatanzaro/cli: 2/8] Remove broken bookmarks command line options



commit fde97cb593dc4a16175619301a73561bd60e9bf1
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Thu Jan 3 08:23:23 2019 -0600

    Remove broken bookmarks command line options
    
    Fixes #338

 data/epiphany.1  |  6 ------
 src/ephy-main.c  |  8 --------
 src/ephy-shell.c | 31 -------------------------------
 src/ephy-shell.h |  7 -------
 4 files changed, 52 deletions(-)
---
diff --git a/data/epiphany.1 b/data/epiphany.1
index 1b835b981..63f89ec84 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 18bb07e37..dee18f9ae 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;
 
@@ -115,12 +113,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,
@@ -426,9 +420,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 716cf4214..3920135b1 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);
 }
 
@@ -458,9 +445,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;
@@ -493,21 +478,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.
@@ -560,15 +535,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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]