logo

badwolf

minimalist and privacy-oriented web browser based on WebKitGTK git clone https://hacktivis.me/git/badwolf.git
commit: c52e8e485de7b79ccec10f615d417a9193c7cff4
parent d918809562b2a16bfe246a6a1a8780ede37a5cd8
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri,  3 May 2019 04:06:24 +0200

badwolf.c: Add about dialog

Diffstat:

Mbadwolf.c23+++++++++++++++++++++++
1 file changed, 23 insertions(+), 0 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -10,6 +10,7 @@ #include <locale.h> /* LC_* */ #include <webkit2/webkit2.h> +const gchar *homepage = "https://hacktivis.me/projects/badwolf"; const gchar *version = "0.1.1"; struct Window @@ -79,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) { @@ -130,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; } @@ -651,6 +673,7 @@ main(int argc, char *argv[]) gtk_widget_show(window->new_tab); gtk_widget_show_all(window->main_window); + gtk_main(); return 0; }