From: Peter Hofmann Date: Sat, 14 Jun 2014 10:59:11 +0000 (+0200) Subject: Go back to Gtk2 for flash support X-Git-Tag: v1.0.0~336 X-Git-Url: https://git.armaanb.net/?p=chorizo.git;a=commitdiff_plain;h=61013e58b980b940e0434250318faa6ed084892b Go back to Gtk2 for flash support --- diff --git a/Makefile b/Makefile index 48cec60..7c1f2db 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ CFLAGS += -Wall -Wextra -O3 sn: sn.c $(CC) $(CFLAGS) $(LDFLAGS) \ -o $@ $< \ - `pkg-config --cflags --libs gtk+-3.0 webkitgtk-3.0` + `pkg-config --cflags --libs gtk+-2.0 webkit-1.0` clean: rm -f sn diff --git a/README b/README index d8a4cb9..7702fcc 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ sn - sonst nix ============== -This is a minimalistic web browser using Gtk3 and WebKit. "Sonst nix" is +This is a minimalistic web browser using Gtk2 and WebKit. "Sonst nix" is german and translates roughly to "nothing else". sn is simple and meant to stay simple. @@ -10,6 +10,7 @@ Features: - A WebKit viewport - Global content zoom - Pluggability into suckless' tabbed + - Support for Flash and Java Planned features: @@ -36,4 +37,4 @@ Literature API references: - http://webkitgtk.org/reference/webkitgtk/stable/index.html - - https://developer.gnome.org/gtk3/stable/index.html + - https://developer.gnome.org/gtk2/stable/index.html diff --git a/sn.c b/sn.c index c6d6e2b..86288c6 100644 --- a/sn.c +++ b/sn.c @@ -2,7 +2,7 @@ #include #include -#include +#include #include @@ -113,9 +113,13 @@ sn_new_client(const gchar *uri) c->win = gtk_plug_new(embed); } + /* When using Gtk2, sn only shows a white area when run in suckless' + * tabbed. It appears we need to set a default window size for this + * to work. This is not needed when using Gtk3. */ + gtk_window_set_default_size(GTK_WINDOW(c->win), 1024, 768); + g_signal_connect(G_OBJECT(c->win), "destroy", G_CALLBACK(sn_destroy_client), c); - gtk_window_set_has_resize_grip(GTK_WINDOW(c->win), FALSE); gtk_window_set_title(GTK_WINDOW(c->win), "sn"); c->web_view = webkit_web_view_new();