Compare commits
2 Commits
da8a0d7624
...
2896ff4e52
Author | SHA1 | Date | |
---|---|---|---|
2896ff4e52 | |||
c33fc76b02 |
4
config.h
4
config.h
|
@ -37,6 +37,7 @@ typedef enum {
|
||||||
zoomin,
|
zoomin,
|
||||||
zoomout,
|
zoomout,
|
||||||
zoom_reset,
|
zoom_reset,
|
||||||
|
new_tab,
|
||||||
next_tab,
|
next_tab,
|
||||||
prev_tab,
|
prev_tab,
|
||||||
close_tab,
|
close_tab,
|
||||||
|
@ -44,7 +45,6 @@ typedef enum {
|
||||||
show_finder,
|
show_finder,
|
||||||
finder_next,
|
finder_next,
|
||||||
finder_prev,
|
finder_prev,
|
||||||
new_tab,
|
|
||||||
prettify,
|
prettify,
|
||||||
hide_bar
|
hide_bar
|
||||||
} func;
|
} func;
|
||||||
|
@ -68,7 +68,7 @@ static struct {
|
||||||
{ CTRL, KEY(0), zoom_reset },
|
{ CTRL, KEY(0), zoom_reset },
|
||||||
{ CTRL, KEY(Page_Up), prev_tab },
|
{ CTRL, KEY(Page_Up), prev_tab },
|
||||||
{ CTRL, KEY(Page_Down), next_tab },
|
{ CTRL, KEY(Page_Down), next_tab },
|
||||||
{ CTRL, KEY(t), next_tab },
|
{ CTRL, KEY(t), new_tab },
|
||||||
{ CTRL, KEY(w), close_tab },
|
{ CTRL, KEY(w), close_tab },
|
||||||
{ 0x0, KEY(F11), toggle_fullscreen },
|
{ 0x0, KEY(F11), toggle_fullscreen },
|
||||||
{ CTRL, KEY(l), show_searchbar },
|
{ CTRL, KEY(l), show_searchbar },
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#define STYLE_N 7127 + 1000
|
#define STYLE_N 7265 + 1000
|
||||||
|
|
||||||
void read_style_js(char* string)
|
void read_style_js(char* string)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef STYLE
|
#ifndef STYLE
|
||||||
#define STYLE
|
#define STYLE
|
||||||
|
|
||||||
#define STYLE_N 7127 + 1000
|
#define STYLE_N 7265 + 1000
|
||||||
|
|
||||||
void read_style_js(char* string);
|
void read_style_js(char* string);
|
||||||
|
|
||||||
|
|
|
@ -123,10 +123,16 @@ if (document.domain == "twitter.com") {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No change of colors in hover */
|
/* No change of colors in hover */
|
||||||
|
*:hover {
|
||||||
|
/* background-color: white !important; */
|
||||||
|
background-color: !important;
|
||||||
|
transition: none !important;
|
||||||
|
}*/
|
||||||
|
/*
|
||||||
*:hover {
|
*:hover {
|
||||||
background-color: inherit !important;
|
background-color: inherit !important;
|
||||||
transition: none !important;
|
transition: none !important;
|
||||||
}
|
}*/
|
||||||
/* Hide go to top button */
|
/* Hide go to top button */
|
||||||
[aria-label^="New posts are available. Push the period key to go to the them."]{
|
[aria-label^="New posts are available. Push the period key to go to the them."]{
|
||||||
display: none;
|
display: none;
|
||||||
|
|
27
rose.c
27
rose.c
|
@ -316,24 +316,19 @@ int handle_key(func id, GtkNotebook* notebook)
|
||||||
(zoom = ZOOM));
|
(zoom = ZOOM));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case prev_tab:
|
case prev_tab:; // declarations aren't statements
|
||||||
if (gtk_notebook_get_current_page(notebook) == 0) {
|
// <https://stackoverflow.com/questions/92396/why-cant-variables-be-declared-in-a-switch-statement>
|
||||||
gtk_notebook_set_current_page(notebook,
|
int n = gtk_notebook_get_n_pages(notebook);
|
||||||
gtk_notebook_get_n_pages(notebook) - 1);
|
int k = gtk_notebook_get_current_page(notebook);
|
||||||
} else {
|
int l = (n + k - 1) % n;
|
||||||
gtk_notebook_prev_page(notebook);
|
gtk_notebook_set_current_page(notebook, l);
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case next_tab:
|
case next_tab:;
|
||||||
if (gtk_notebook_get_current_page(notebook) == gtk_notebook_get_n_pages(notebook) - 1) {
|
int m = gtk_notebook_get_n_pages(notebook);
|
||||||
notebook_append(notebook, NULL);
|
int i = gtk_notebook_get_current_page(notebook);
|
||||||
gtk_notebook_set_show_tabs(notebook, true);
|
int j = (i + 1) % m;
|
||||||
webkit_web_view_set_zoom_level(notebook_get_webview(notebook), zoom);
|
gtk_notebook_set_current_page(notebook, j);
|
||||||
} else {
|
|
||||||
gtk_notebook_next_page(notebook);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case close_tab:
|
case close_tab:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user