[hackers] [surf] adding zoom support. || Enno Boland (Gottox)

From: <hg_AT_suckless.org>
Date: Mon, 8 Jun 2009 15:01:08 +0000 (UTC)

changeset: 31:ecfc2e16de41
tag: tip
user: Enno Boland (Gottox) <gottox_AT_s01.de>
date: Mon Jun 08 17:01:12 2009 +0200
files: surf.c
description:
adding zoom support.

diff -r 9e1239477be1 -r ecfc2e16de41 surf.c
--- a/surf.c Mon Jun 08 16:49:56 2009 +0200
+++ b/surf.c Mon Jun 08 17:01:12 2009 +0200
@@ -220,6 +220,16 @@
                 case GDK_slash:
                         showsearch(c);
                         return TRUE;
+ case GDK_plus:
+ case GDK_equal:
+ webkit_web_view_zoom_in(c->view);
+ return TRUE;
+ case GDK_minus:
+ webkit_web_view_zoom_out(c->view);
+ return TRUE;
+ case GDK_0:
+ webkit_web_view_set_zoom_level(c->view, 1.0);
+ return TRUE;
                 case GDK_n:
                 case GDK_N:
                         webkit_web_view_search_text(c->view,
@@ -331,7 +341,6 @@
         gtk_window_set_default_size(GTK_WINDOW(c->win), 800, 600);
         g_signal_connect(G_OBJECT(c->win), "destroy", G_CALLBACK(destroywin), c);
         g_signal_connect(G_OBJECT(c->win), "key-press-event", G_CALLBACK(keypress), c);
- c->download = NULL;
 
         /* VBox */
         c->vbox = gtk_vbox_new(FALSE, 0);
@@ -381,6 +390,8 @@
         gtk_widget_show(c->win);
         gdk_window_set_events(GTK_WIDGET(c->win)->window, GDK_ALL_EVENTS_MASK);
         gdk_window_add_filter(GTK_WIDGET(c->win)->window, processx, c);
+ c->download = NULL;
+ c->title = NULL;
         c->next = clients;
         clients = c;
         if(showxid)
Received on Mon Jun 08 2009 - 15:01:08 UTC

This archive was generated by hypermail 2.2.0 : Mon Jun 08 2009 - 15:12:05 UTC