Add newtab binding
This commit is contained in:
parent
055e50c9ef
commit
62b1bd6785
1
build.sh
1
build.sh
|
@ -8,4 +8,5 @@ LIBS=`pkg-config --libs ${DEPS[@]}`
|
|||
# Optional adblocking depends on https://github.com/jun7/wyebadblock
|
||||
WYEBAB='-L/usr/lib/wyebrowser/adblock.so'
|
||||
|
||||
cp -f config.def.h config.h
|
||||
$CC $INCS $LIBS $SRC $WYEBAB -o rose
|
||||
|
|
|
@ -47,7 +47,8 @@ typedef enum {
|
|||
show_searchbar,
|
||||
show_finder,
|
||||
finder_next,
|
||||
finder_prev
|
||||
finder_prev,
|
||||
newtab
|
||||
} func;
|
||||
|
||||
#define SFT 1 << 0
|
||||
|
@ -74,7 +75,8 @@ static struct {
|
|||
{ CTRL, KEY(e), show_searchbar },
|
||||
{ CTRL, KEY(f), show_finder },
|
||||
{ CTRL, KEY(n), finder_next },
|
||||
{ CTRL | SFT, KEY(N), finder_prev }
|
||||
{ CTRL | SFT, KEY(N), finder_prev },
|
||||
{ CTRL, KEY(t), newtab }
|
||||
};
|
||||
/* For controls more akin to normal browsers, use:
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ test "$1" = "--help" || test -z "$1" && {
|
|||
}
|
||||
|
||||
test -z "$2" || {
|
||||
[ -f "/usr/bin/$1" ] && {
|
||||
test -f "/usr/bin/$1" && {
|
||||
echo "/usr/bin/$1 already exists, remove it first"
|
||||
exit 1
|
||||
}
|
||||
|
|
7
rose.c
7
rose.c
|
@ -7,7 +7,7 @@
|
|||
* sublicense copies of this sotware for their own use.
|
||||
* This code does not come with any warranty.
|
||||
*
|
||||
* Author: fenze <contact@fenze.dev>
|
||||
* @author: fenze <contact@fenze.dev>
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -233,8 +233,13 @@ int handle_key(func id, GtkNotebook *notebook)
|
|||
webkit_find_controller_search_previous(
|
||||
webkit_web_view_get_find_controller(notebook_get_webview(notebook)));
|
||||
break;
|
||||
|
||||
case newtab:
|
||||
notebook_append(notebook, NULL);
|
||||
gtk_notebook_set_show_tabs(notebook, true);
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user