logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: 1026413b3f2ca3ebb0f2604ef34b0b6094d14c8d
parent: 2ad6f1fb221ad94b4bf2f3cdf4c1795f6b5466a4
Author: Jean-Yves Monnier <jeymon@gmail.com>
Date:   Tue,  9 Jul 2019 05:17:37 +0200

open multiple URLs

Tested and validated on FreeBSD

Diffstat:

Mbadwolf.12+-
Mbadwolf.c9+++++----
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/badwolf.1 b/badwolf.1 @@ -9,7 +9,7 @@ .Sh SYNOPSIS .Nm .Op Ar webkit/gtk options -.Op Ar url or path +.Op Ar URLs or paths .Sh DESCRIPTION .Nm is a minimalist browser that care about privacy, it is based on WebKitGTK and thus also accepts WebKitGTK (and depdendencies) flags and environment variables, unfortunately there doesn't seems to be manpages for theses. diff --git a/badwolf.c b/badwolf.c @@ -701,7 +701,6 @@ main(int argc, char *argv[]) { // getting an abort if this one fails to alloc struct Window *window = g_malloc(sizeof(struct Window)); - gchar *target_url = NULL; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, DATADIR "/locale"); @@ -722,8 +721,6 @@ main(int argc, char *argv[]) gtk_init(&argc, &argv); - if(argv[1]) target_url = argv[1]; - window->main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); window->notebook = gtk_notebook_new(); window->new_tab = gtk_button_new_from_icon_name("tab-new-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR); @@ -741,7 +738,11 @@ main(int argc, char *argv[]) gtk_container_add(GTK_CONTAINER(window->main_window), window->notebook); - badwolf_new_tab(GTK_NOTEBOOK(window->notebook), new_browser(window, target_url, NULL)); + if(argc == 1) + badwolf_new_tab(GTK_NOTEBOOK(window->notebook), new_browser(window, NULL, NULL)); + else + for(int i = 1; i < argc; ++i) + badwolf_new_tab(GTK_NOTEBOOK(window->notebook), new_browser(window, argv[i], NULL)); g_signal_connect( window->main_window, "key-press-event", G_CALLBACK(main_windowCb_key_press_event), window);