about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichal Mazurek <akfaew@jasminek.net>2011-07-30 13:39:19 +0000
committerMichal Mazurek <akfaew@jasminek.net>2011-07-30 13:39:19 +0000
commitb2e20d52cc49fd44bdfeda5b4864c53e2a69e470 (patch)
treed60c0c26943f8a55f9250425d3af7e25df450461
parenta4453e127c43ce830f1f34507bd678c5a792154e (diff)
downloadxombrero-b2e20d52cc49fd44bdfeda5b4864c53e2a69e470.tar.gz
/tmp/cvsS55e3a
-rw-r--r--xxxterm.12
-rw-r--r--xxxterm.c24
-rw-r--r--xxxterm.conf5
3 files changed, 10 insertions, 21 deletions
diff --git a/xxxterm.1 b/xxxterm.1
index ae86dba..1314851 100644
--- a/xxxterm.1
+++ b/xxxterm.1
@@ -737,8 +737,6 @@ A fully qualified host is also valid and is for example www.moo.com.
 Enable cookies.
 .It Cm ctrl_click_focus
 Give focus in newly created tab instead of opening it in the background.
-.It Cm default_font_size
-Set the default browsing font size.
 .It Cm default_script
 Path to the script used as the default value for the run_script
 command.
diff --git a/xxxterm.c b/xxxterm.c
index e039653..6f12386 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -429,9 +429,8 @@ struct karg {
 #define XT_PASTE_CURRENT_TAB	(0)
 #define XT_PASTE_NEW_TAB	(1)
 
-#define XT_ZOOM_SETDEFAULTS	(-1)
-#define XT_ZOOM_IN		(-2)
-#define XT_ZOOM_OUT		(-3)
+#define XT_ZOOM_IN		(-1)
+#define XT_ZOOM_OUT		(-2)
 #define XT_ZOOM_NORMAL		(100)
 
 #define XT_URL_SHOW		(1)
@@ -513,7 +512,6 @@ int		cookies_enabled = 1; /* enable cookies */
 int		read_only_cookies = 0; /* enable to not write cookies */
 int		enable_scripts = 1;
 int		enable_plugins = 0;
-int		default_font_size = 12;
 gfloat		default_zoom_level = 1.0;
 char		default_script[PATH_MAX];
 int		window_height = 768;
@@ -685,7 +683,6 @@ struct settings {
 	{ "cookie_policy",		XT_S_INT, 0, NULL, NULL,&s_cookie },
 	{ "cookies_enabled",		XT_S_INT, 0,		&cookies_enabled, NULL, NULL },
 	{ "ctrl_click_focus",		XT_S_INT, 0,		&ctrl_click_focus, NULL, NULL },
-	{ "default_font_size",		XT_S_INT, 0,		&default_font_size, NULL, NULL },
 	{ "default_zoom_level",		XT_S_FLOAT, 0,		NULL, NULL, NULL, &default_zoom_level },
 	{ "default_script",		XT_S_STR, 0, NULL, NULL,&s_default_script },
 	{ "download_dir",		XT_S_STR, 0, NULL, NULL,&s_download_dir },
@@ -1328,7 +1325,7 @@ struct alias_list	aliases;
 /* protos */
 struct tab		*create_new_tab(char *, struct undo *, int, int);
 void			delete_tab(struct tab *);
-void			adjustfont_webkit(struct tab *, int);
+void			setzoom_webkit(struct tab *, int);
 int			run_script(struct tab *, char *);
 int			download_rb_cmp(struct download *, struct download *);
 gboolean		cmd_execute(struct tab *t, char *str);
@@ -4053,7 +4050,7 @@ resizetab(struct tab *t, struct karg *args)
 	DNPRINTF(XT_D_TAB, "resizetab: tab %d %d\n",
 	    t->tab_id, args->i);
 
-	adjustfont_webkit(t, args->i);
+	setzoom_webkit(t, args->i);
 
 	return (XT_CB_HANDLED);
 }
@@ -7283,7 +7280,6 @@ setup_webkit(struct tab *t)
 	    "spell_checking_languages", spell_check_languages, (char *)NULL);
 	g_object_set(G_OBJECT(t->wv),
 	    "full-content-zoom", TRUE, (char *)NULL);
-	adjustfont_webkit(t, XT_ZOOM_SETDEFAULTS);
 
 	webkit_web_view_set_settings(t->wv, t->settings);
 }
@@ -7705,30 +7701,26 @@ delete_tab(struct tab *t)
 }
 
 void
-adjustfont_webkit(struct tab *t, int adjust)
+setzoom_webkit(struct tab *t, int adjust)
 {
 #define XT_ZOOMPERCENT		0.04
 
 	gfloat			zoom;
 
 	if (t == NULL) {
-		show_oops(NULL, "adjustfont_webkit invalid parameters");
+		show_oops(NULL, "setzoom_webkit invalid parameters");
 		return;
 	}
 
 	g_object_get(G_OBJECT(t->wv), "zoom-level", &zoom, (char *)NULL);
-	if (adjust == XT_ZOOM_SETDEFAULTS) {
-		zoom = default_zoom_level;
-		g_object_set(G_OBJECT(t->settings), "default-font-size",
-		    default_font_size, (char *)NULL);
-	} else if (adjust == XT_ZOOM_IN)
+	if (adjust == XT_ZOOM_IN)
 		zoom += XT_ZOOMPERCENT;
 	else if (adjust == XT_ZOOM_OUT)
 		zoom -= XT_ZOOMPERCENT;
 	else if (adjust > 0)
 		zoom = default_zoom_level + adjust / 100.0 - 1.0;
 	else {
-		show_oops(t, "adjustfont_webkit invalid zoom value");
+		show_oops(t, "setzoom_webkit invalid zoom value");
 		return;
 	}
 
diff --git a/xxxterm.conf b/xxxterm.conf
index b37727f..0473a46 100644
--- a/xxxterm.conf
+++ b/xxxterm.conf
@@ -12,8 +12,7 @@
 # ctrl_click_focus	= 0
 # append_next		= 1
 # download_dir		= ~/downloads
-# default_font_size	= 12
-# default_zoom_level    = 1.0
+# default_zoom_level	= 1.0
 # fancy_bar		= 1
 # refresh_interval	= 10
 # ssl_ca_file		= /etc/ssl/cert.pem
@@ -30,7 +29,7 @@
 # session_autosave	= 0
 # guess_search		= 0
 # enable_spell_checking	= 1
-# spell_check_languages = en_US
+# spell_check_languages	= en_US
 
 #
 # default_script points to a script executed by the run_script command.