logo

badwolf

Unnamed repository; edit this file 'description' to name the repository.
commit: 577063a6b416b35e4ef5f10242118d2eed67e7fe
parent: 518da08f99c6653d6c56fad96f715313252f28e1
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon,  7 Jan 2019 03:57:58 +0100

badwolf.c: Add statusbar

Diffstat:

Mbadwolf.c15++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -13,18 +13,23 @@ static gboolean closeWebViewCb(WebKitWebView *_webView, GtkWidget *window) int main(int argc, char *argv[]) { - gtk_init(0, 0); - char *target_url = "about:blank"; + GtkWidget *main_window, *box, *statusbar; + WebKitWebView *webView; if(argv[1]) target_url = argv[1]; - GtkWidget *main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_init(0, 0); - WebKitWebView *webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); + main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + statusbar = gtk_statusbar_new(); + box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); + webView = WEBKIT_WEB_VIEW(webkit_web_view_new()); - gtk_container_add(GTK_CONTAINER(main_window), GTK_WIDGET(webView)); + gtk_container_add(GTK_CONTAINER(main_window), box); + gtk_box_pack_start(box, webView, TRUE, TRUE, 0); + gtk_box_pack_end(box, statusbar, FALSE, FALSE, 0); g_signal_connect(main_window, "destroy", G_CALLBACK(gtk_main_quit), NULL); g_signal_connect(webView, "close", G_CALLBACK(closeWebViewCb), main_window);