summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadoon AlBader <sadoon@soulserv.xyz>2021-09-20 10:37:52 +0300
committerrafa_99 <raroma09@gmail.com>2021-10-15 23:02:15 +0100
commit0243f6a4986298b40cc078022b595a002c7d155b (patch)
tree1c4cba7a60ff5ed5c10b1db5a4efb0f67337c3c5
parent55f0fd5f8c34488f5a0b240d24d84c1bedd56e79 (diff)
a better fix for scroll percentage
-rw-r--r--src/main.c14
-rw-r--r--src/main.h2
2 files changed, 2 insertions, 14 deletions
diff --git a/src/main.c b/src/main.c
index 89aae82..cdb6dd6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -640,18 +640,6 @@ void vb_statusbar_update(Client *c)
c->state.scroll_percent = * (guint16*) ( &c->state.scroll_percent );
#endif
- if ( c->config.statusbar_show_settings ) {
- /* show js, cookies, and local storage status */
-
- Setting *js = g_hash_table_lookup(c->config.settings, "scripts");
- Setting *cookies = g_hash_table_lookup(c->config.settings, "cookie-accept");
- Setting *local_storage = g_hash_table_lookup(c->config.settings, "html5-local-storage");
-
- g_string_append_printf(status, " js: %s |", js->value.b ? "on" : "off");
- g_string_append_printf(status, " cookies: %s |", cookies->value.s);
- g_string_append_printf(status, " storage: %s", local_storage->value.b ? "on" : "off");
- }
-
/* show the scroll status */
if (c->state.scroll_max == 0) {
g_string_append(status, " All");
@@ -660,7 +648,7 @@ void vb_statusbar_update(Client *c)
} else if (c->state.scroll_percent == 100) {
g_string_append(status, " Bot");
} else {
- g_string_append_printf(status, " %hu%%", c->state.scroll_percent);
+ g_string_append_printf(status, " %d%%", c->state.scroll_percent);
}
gtk_label_set_text(GTK_LABEL(c->statusbar.right), status->str);
diff --git a/src/main.h b/src/main.h
index 7ee5343..cc1e50f 100644
--- a/src/main.h
+++ b/src/main.h
@@ -170,7 +170,7 @@ struct State {
MessageType input_type;
StatusType status_type;
guint64 scroll_max; /* Maxmimum scrollable height of the document. */
- guint16 scroll_percent; /* Current position of the viewport in document (percent). */
+ guint scroll_percent; /* Current position of the viewport in document (percent). */
guint64 scroll_top; /* Current position of the viewport in document (pixel). */
char *title; /* Window title of the client. */