Hello,

I wanted an option to start audacious hidden in the status bar. I
visited the IRC channel and posted my wish. The only answer was "it will
if you submit a patch". So I get the svn version and modified the main.c
and it works. But if I click on the status icon, the main window
appears, but the playlist and equalizer are always hidden. Enclosed is
the diff file.

Greeting,
Benjamin Drung
Index: src/audacious/main.c
===================================================================
--- src/audacious/main.c	(Revision 4317)
+++ src/audacious/main.c	(Arbeitskopie)
@@ -96,6 +96,7 @@
     gboolean no_log;
     gboolean enqueue_to_temp;
     gboolean version;
+    gboolean hidden;
     gchar *previous_session_id;
 };
 
@@ -862,6 +863,7 @@
     {"headless", 'H', 0, G_OPTION_ARG_NONE, &options.headless, N_("Enable headless operation"), NULL},
     {"no-log", 'N', 0, G_OPTION_ARG_NONE, &options.no_log, N_("Print all errors and warnings to stdout"), NULL},
     {"version", 'v', 0, G_OPTION_ARG_NONE, &options.version, N_("Show version and builtin features"), NULL},
+    {"hidden", 'i', 0, G_OPTION_ARG_NONE, &options.hidden, N_("Enable hidden"), NULL},
     {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &options.filenames, N_("FILE..."), NULL},
     {NULL},
 };
@@ -1165,6 +1167,13 @@
 
     handle_cmd_line_options(&options, FALSE);
 
+    if (options.hidden)
+    {
+        cfg.player_visible = FALSE;
+        cfg.equalizer_visible = FALSE;
+        cfg.playlist_visible = FALSE;
+    }
+
     if (options.headless != 1)
     {
         GDK_THREADS_ENTER();
@@ -1181,7 +1190,7 @@
 
         if (cfg.player_visible)
             mainwin_show(TRUE);
-        else if (!cfg.playlist_visible && !cfg.equalizer_visible)
+        else if (!cfg.playlist_visible && !cfg.equalizer_visible && !options.hidden)
             mainwin_show(TRUE);
 
         if (cfg.equalizer_visible)
_______________________________________________
Audacious mailing list
[email protected]
http://mail.atheme.org/mailman/listinfo/audacious

Reply via email to