]> git.armaanb.net Git - chorizo.git/commitdiff
Go back to Gtk2 for flash support
authorPeter Hofmann <scm@uninformativ.de>
Sat, 14 Jun 2014 10:59:11 +0000 (12:59 +0200)
committerPeter Hofmann <scm@uninformativ.de>
Sat, 14 Jun 2014 11:00:04 +0000 (13:00 +0200)
Makefile
README
sn.c

index 48cec6013d9300d75ac2ab621482b09de7bc8c66..7c1f2db23e2cb6d95d13f92e33b35085513bd7f9 100644 (file)
--- 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 d8a4cb9d99b7b2c4f3ea4ea1ab35b7da856348a5..7702fcc9c6303ced7775fe6d6c39927def082fcc 100644 (file)
--- 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 c6d6e2b6ff8ea314a22734f0effd2dce9e761e63..86288c62e544e4ed9b9fd126615a87bada60e4b5 100644 (file)
--- a/sn.c
+++ b/sn.c
@@ -2,7 +2,7 @@
 #include <stdlib.h>
 
 #include <gtk/gtk.h>
-#include <gtk/gtkx.h>
+#include <gdk/gdkx.h>
 #include <webkit/webkit.h>
 
 
@@ -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();