aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormutantturkey <crazycal00@gmail.com>2011-05-01 12:52:27 -0400
committermutantturkey <crazycal00@gmail.com>2011-05-01 12:52:27 -0400
commit1cf075347711bc28b94e82c1bc7db206c21cc5ab (patch)
tree6cf32872f474cf5ae7e81af05469a3ca289f9d0d
parent59aa5adb34cb04279ac0187fddb66cb25ae14b10 (diff)
added DEFAULT_ZOOM_SIZE for the zoom size
-rw-r--r--sb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sb.c b/sb.c
index 76cafd4..6e810b5 100644
--- a/sb.c
+++ b/sb.c
@@ -43,8 +43,7 @@ static struct {
#define DEFAULT_FONT "san-serif"
#define DEFAULT_TAB_LENGTH 25
#define DEFAULT_HISTORY_FILE "/.sb_history"
-
-
+#define DEFAULT_ZOOM_SIZE .05
static GQuark term_data_id = 0;
@@ -157,6 +156,7 @@ gtk_label_set_label(GTK_LABEL(t->label), tabtitle);
/* when the page load is commited, call this function */
static void load_commit_cb (WebKitWebView* page, WebKitWebFrame* frame, tab *t) {
+
const gchar* uri = webkit_web_frame_get_uri(frame);
if (gtk_notebook_get_current_page(GTK_NOTEBOOK(w.notebook)) == gtk_notebook_page_num(GTK_NOTEBOOK(w.notebook), t->scroll)) {
@@ -194,8 +194,8 @@ g_free(u);
/*increase or decrease the zoom of the page */
static void tab_zoom (gboolean b) {
struct tab *t = get_tab(NULL, gtk_notebook_get_current_page(GTK_NOTEBOOK(w.notebook)));
- if (b) { webkit_web_view_set_zoom_level(t->view, (webkit_web_view_get_zoom_level(t->view) + .05)); }
- else { webkit_web_view_set_zoom_level(t->view, (webkit_web_view_get_zoom_level(t->view) - .05)); }
+ if (b) { webkit_web_view_set_zoom_level(t->view, (webkit_web_view_get_zoom_level(t->view) + DEFAULT_ZOOM_SIZE)); }
+ else { webkit_web_view_set_zoom_level(t->view, (webkit_web_view_get_zoom_level(t->view) - DEFAULT_ZOOM_SIZE)); }
}
@@ -276,6 +276,7 @@ static void tab_view_source() {
/* create a tab */
static void tab_new(gboolean b) {
+
tab *t;
t = g_new0(tab, 1);