Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 11 insertions, 3 deletions
-rw-r--r--badwolf.c14
diff --git a/badwolf.c b/badwolf.c
index fc585a8..06ee461 100644
--- a/badwolf.c
+++ b/badwolf.c
@@ -29,6 +29,7 @@ GtkTreeModel *bookmarks_completion_model;
static gboolean tabs_no_label = false;
static gboolean tabs_constant = false;
static gboolean tray_enabled = false;
+static int custom_favicon_size = 0;
static gboolean WebViewCb_close(WebKitWebView *webView, gpointer user_data);
static gboolean WebViewCb_web_process_terminated(WebKitWebView *webView,
@@ -142,9 +143,11 @@ WebViewCb_notify__uri(WebKitWebView *webView, GParamSpec *pspec, gpointer user_d
cairo_surface_t* scale_favicon(cairo_surface_t *f)
{
if (f == NULL) return NULL;
- gint pixel_size = 0;
- gtk_icon_size_lookup(GTK_ICON_SIZE_SMALL_TOOLBAR, NULL, &pixel_size);
- if (pixel_size == 0) return NULL;
+ gint pixel_size = custom_favicon_size;
+ if (pixel_size == 0) {
+ gtk_icon_size_lookup(GTK_ICON_SIZE_SMALL_TOOLBAR, NULL, &pixel_size);
+ if (pixel_size == 0) return NULL;
+ }
cairo_surface_t *result = cairo_surface_create_similar(f,
cairo_surface_get_content(f),
@@ -1225,6 +1228,11 @@ main(int argc, char *argv[])
tabs_constant = TRUE;
if (argv[1][1] == 't')
tray_enabled = TRUE;
+ if (argv[1][1] == 's') {
+ argv++;
+ argc--;
+ custom_favicon_size = (argv[1][0] - '0') * 10 + argv[1][1] - '0';
+ }
argv++;
argc--;
}