changeset 4593:bc29f566be02

Handle properly the situation when player is not running and files are added from commandline.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 29 May 2008 01:03:13 +0300
parents bc30700268d3
children 974b7a03152a
files src/audacious/main.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/main.c	Thu May 29 01:01:44 2008 +0300
+++ b/src/audacious/main.c	Thu May 29 01:03:13 2008 +0300
@@ -315,7 +315,7 @@
 }
 
 static void
-handle_cmd_line_options()
+handle_cmd_line_options(gboolean skip)
 {
     gchar **filenames = options.filenames;
 #ifdef USE_DBUS
@@ -430,7 +430,7 @@
     } /* is_running */
     else
 #endif
-    { /* !is_running */
+    if (!skip) { /* !is_running */
         if (filenames != NULL)
         {
             gint pos = 0;
@@ -715,7 +715,7 @@
 
     signal_handlers_init();
 
-    handle_cmd_line_options();
+    handle_cmd_line_options(TRUE);
 
     if (options.headless == FALSE)
     {
@@ -735,6 +735,8 @@
     plugin_system_init();
     playlist_system_init();
 
+    handle_cmd_line_options(FALSE);
+
 #ifdef USE_DBUS
     init_dbus();
 #endif