summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--README5
-rw-r--r--sn.c8
3 files changed, 10 insertions, 5 deletions
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 <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();