summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrafa_99 <raroma09@gmail.com>2021-09-25 02:22:07 +0100
committerrafa_99 <raroma09@gmail.com>2021-09-25 19:59:34 +0100
commit23427f3348ab6fd50661669637d7e3761e9af095 (patch)
treefab51170c626f3bd5f27159865da72c359f8b0f8
parent361f329fa700c34021ceed88f34d57cc7ab5c7be (diff)
Removed and set incognito mode on by default with cookies
-rw-r--r--doc/neovimb.19
-rw-r--r--src/ex.c2
-rw-r--r--src/main.c31
-rw-r--r--src/main.h1
4 files changed, 13 insertions, 30 deletions
diff --git a/doc/neovimb.1 b/doc/neovimb.1
index f62f102..bba06e3 100644
--- a/doc/neovimb.1
+++ b/doc/neovimb.1
@@ -43,9 +43,6 @@ This will also be applied on new spawned instances.
.I WINID
of an XEmbed-aware application, that neovimb will use as its parent.
.TP
-.B "\-i, \-\-incognito"
-Start an instance with user data read-only (see \fIFILES\fP section).
-.TP
.B "\-h, \-\-help"
Show help options.
.TP
@@ -1564,11 +1561,9 @@ this subdirectory.
.PD 0
.I cookies.db
Sqlite cookie storage.
-This file will not be touched if option \-\-incognito is set.
.TP
.I closed
Holds the URIs of last closed browser windows.
-This file will not be touched if option \-\-incognito is set.
.TP
.TP
.I bookmark
@@ -1576,13 +1571,9 @@ This file holds the list of bookmarked URIs with tags.
.TP
.I command
box.
-This file will not be touched if option \-\-incognito is set.
.TP
.I queue
Holds the read it later queue filled by `qpush'.
-.TP
-.I search
-This file will not be touched if option \-\-incognito is set.
.PD
.RE
.
diff --git a/src/ex.c b/src/ex.c
index 191c90b..9f5d59b 100644
--- a/src/ex.c
+++ b/src/ex.c
@@ -467,7 +467,7 @@ VbCmdResult ex_run_file(Client *c, const char *filename)
}
if ((ex_run_string(c, line) & ~CMD_KEEPINPUT) == CMD_ERROR) {
res = CMD_ERROR | CMD_KEEPINPUT;
- g_warning("Invalid command in %s: '%s'", filename, line);
+ g_warning("Invalid command in %s line #%u : '%s'", filename, i+1, line);
}
}
g_strfreev(lines);
diff --git a/src/main.c b/src/main.c
index fdbe969..7eedee9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -631,6 +631,15 @@ void vb_statusbar_update(Client *c)
statusbar_update_downloads(c, status);
+ /**
+ * These architectures have different kinds of issues with scroll
+ * percentage, this is a somewhat clean fix that doesn't affect others.
+ */
+#if defined(_ARCH_PPC64) || defined(_ARCH_PPC) | defined(_ARCH_ARM)
+ /* force the scroll percent to be 16-bit */
+ c->state.scroll_percent = * (guint16*) ( &c->state.scroll_percent );
+#endif
+
/* show the scroll status */
if (c->state.scroll_max == 0) {
g_string_append(status, " All");
@@ -1033,7 +1042,6 @@ static void spawn_new_instance(const char *uri)
#ifndef FEATURE_NO_XEMBED
+ (vb.embed ? 2 : 0)
#endif
- + (vb.incognito ? 1 : 0)
+ (vb.profile ? 2 : 0)
+ (vb.no_maximize ? 1 : 0)
+ g_slist_length(vb.cmdargs) * 2,
@@ -1054,9 +1062,6 @@ static void spawn_new_instance(const char *uri)
cmd[i++] = xid;
}
#endif
- if (vb.incognito) {
- cmd[i++] = "-i";
- }
if (vb.profile) {
cmd[i++] = "-p";
cmd[i++] = vb.profile;
@@ -1834,25 +1839,14 @@ static void neovimb_setup(void)
/* Prepare files in XDG_DATA_HOME */
dataPath = util_get_data_dir();
- if (!vb.incognito) {
- vb.files[FILES_COOKIE] = g_build_filename(dataPath, "cookies.db", NULL);
- }
+ vb.files[FILES_COOKIE] = g_build_filename(dataPath, "cookies.db", NULL);
vb.files[FILES_BOOKMARK] = g_build_filename(dataPath, "bookmark", NULL);
vb.files[FILES_QUEUE] = g_build_filename(dataPath, "queue", NULL);
- vb.storage[STORAGE_COMMAND] = file_storage_new(dataPath, "command", vb.incognito);
- vb.storage[STORAGE_SEARCH] = file_storage_new(dataPath, "search", vb.incognito);
g_free(dataPath);
- WebKitWebsiteDataManager *manager = NULL;
- if (vb.incognito) {
- manager = webkit_website_data_manager_new_ephemeral();
- } else {
- manager = webkit_website_data_manager_new(
- "base-data-directory", util_get_data_dir(),
- "base-cache-directory", util_get_cache_dir(),
- NULL);
- }
+ // ToDo, Never cookies -- manager = webkit_website_data_manager_new_ephemeral();
+ WebKitWebsiteDataManager *manager = webkit_website_data_manager_new("base-data-directory", util_get_data_dir(), "base-cache-directory", util_get_cache_dir(), NULL);
vb.webcontext = webkit_web_context_new_with_website_data_manager(manager);
manager = webkit_web_context_get_website_data_manager(vb.webcontext);
/* Use seperate rendering processed for the webview of the clients in the
@@ -2161,7 +2155,6 @@ int main(int argc, char* argv[])
#ifndef FEATURE_NO_XEMBED
{"embed", 'e', 0, G_OPTION_ARG_STRING, &winid, "Reparents to window specified by xid", NULL},
#endif
- {"incognito", 'i', 0, G_OPTION_ARG_NONE, &vb.incognito, "Run with user data read-only", NULL},
{"profile", 'p', 0, G_OPTION_ARG_CALLBACK, (GOptionArgFunc*)profileOptionArgFunc, "Profile name", NULL},
{"version", 'v', 0, G_OPTION_ARG_NONE, &ver, "Print version", NULL},
{"no-maximize", 0, 0, G_OPTION_ARG_NONE, &vb.no_maximize, "Do no attempt to maximize window", NULL},
diff --git a/src/main.h b/src/main.h
index 37305b9..fde3a55 100644
--- a/src/main.h
+++ b/src/main.h
@@ -281,7 +281,6 @@ struct neovimb {
GSList *cmdargs; /* ex commands given asl --command, -C option */
GtkCssProvider *style_provider;
gboolean no_maximize;
- gboolean incognito;
WebKitWebContext *webcontext;
};