diff options
| Commit | 4dbf7617635ca78c820aa13b39361ce4ff4235bf (patch) | |
|---|---|---|
| Author | 2022-06-13 17:45:59 +0300 | |
| Committer | 2022-06-13 17:45:59 +0300 | |
| Files | cd4a3a309e33c667262006e2254f1cc1c3f06e04 | |
| goodwolf-4dbf7617635ca78c820aa13b39361ce4ff4235bf.tar goodwolf-4dbf7617635ca78c820aa13b39361ce4ff4235bf.tar.gz goodwolf-4dbf7617635ca78c820aa13b39361ce4ff4235bf.zip | ||
| Parent | e988d13ddd0537cfe42724e30abcb4b8253dda63 (diff) | |
badwolf: Added the switch -s with which you can define favicon size
1 files changed, 11 insertions, 3 deletions
| -rw-r--r-- | badwolf.c | 14 |
@@ -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--; } |