From e988d13ddd0537cfe42724e30abcb4b8253dda63 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 13 Jun 2022 16:09:11 +0300 Subject: badwolf: Tray icon must now be enabled with the switch -t --- badwolf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/badwolf.c b/badwolf.c index f49ba6c..fc585a8 100644 --- a/badwolf.c +++ b/badwolf.c @@ -28,6 +28,7 @@ GtkTreeModel *bookmarks_completion_model; static gboolean tabs_no_label = false; static gboolean tabs_constant = false; +static gboolean tray_enabled = false; static gboolean WebViewCb_close(WebKitWebView *webView, gpointer user_data); static gboolean WebViewCb_web_process_terminated(WebKitWebView *webView, @@ -1124,8 +1125,6 @@ main(int argc, char *argv[]) g_application_register(application, NULL, NULL); //g_application_activate(application); - GtkStatusIcon *tray_icon; - gtk_init(&argc, &argv); fprintf(stderr, _("Running Badwolf version: %s\n"), version); @@ -1224,6 +1223,8 @@ main(int argc, char *argv[]) tabs_no_label = TRUE; if (argv[1][1] == 'c') tabs_constant = TRUE; + if (argv[1][1] == 't') + tray_enabled = TRUE; argv++; argc--; } @@ -1240,7 +1241,8 @@ main(int argc, char *argv[]) gtk_notebook_set_current_page(GTK_NOTEBOOK(window->notebook), 1); - tray_icon = create_tray_icon(window); + if (tray_enabled) + create_tray_icon(window); gtk_main(); -- cgit v1.3.1-23-gd82d