logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: a33ff308ee2e28c8240a54384eb32e3dc1d11690
parent: 6e643c3fe663ed3ee91f6b88f8c8a20d063fb232
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 11 May 2019 04:12:46 +0200

Merge branch 'features/about-dialog' into develop

Diffstat:

Mbadwolf.c26++++++++++++++++++++++++++
1 file changed, 26 insertions(+), 0 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -10,6 +10,9 @@ #include <locale.h> /* LC_* */ #include <webkit2/webkit2.h> +const gchar *homepage = "https://hacktivis.me/projects/badwolf"; +const gchar *version = "0.1.1"; + struct Window { GtkWidget *main_window; @@ -77,6 +80,23 @@ static void notebookCb_switch__page(GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user_data); gint get_tab_position(GtkContainer *notebook, GtkWidget *child); +static void +badwolf_about_dialog(GtkWindow *main_window) +{ + // clang-format off + gtk_show_about_dialog( + main_window, + "license", "SPDX-License-Identifier: BSD-3-Clause", + "copyright", "2019 Haelwenn (lanodan) Monnier <contact+badwolf@hacktivis.me>", + "website", homepage, + "comments", "Minimalist and privacy-oriented WebKitGTK+ browser", + "version", version, + //FIXME: "logo-icon-name", g_get_application_name(), + NULL + ); + // clang-format on +} + static gboolean WebViewCb_close(WebKitWebView *webView, gpointer user_data) { @@ -128,6 +148,10 @@ commonCb_key_press_event(struct Window *window, GdkEvent *event, struct Client * } } } + else if(((GdkEventKey *)event)->keyval == GDK_KEY_F1) + { + badwolf_about_dialog(GTK_WINDOW(window->main_window)); + } return FALSE; } @@ -610,6 +634,7 @@ main(int argc, char *argv[]) bind_textdomain_codeset(PACKAGE, "UTF-8"); textdomain(PACKAGE); + g_fprintf(stderr, _("Running Badwolf version: %s\n"), version); g_fprintf(stderr, _("Buildtime WebKit version: %d.%d.%d\n"), WEBKIT_MAJOR_VERSION, @@ -653,6 +678,7 @@ main(int argc, char *argv[]) gtk_widget_show(window->new_tab); gtk_widget_show_all(window->main_window); + gtk_main(); return 0; }