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
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.
- A WebKit viewport
- Global content zoom
- Pluggability into suckless' tabbed
+ - Support for Flash and Java
Planned features:
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
#include <stdlib.h>
#include <gtk/gtk.h>
-#include <gtk/gtkx.h>
+#include <gdk/gdkx.h>
#include <webkit/webkit.h>
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();