Mercurial > audlegacy
comparison src/audacious/main.c @ 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 | ab8bc8a89a52 |
children | ca64cd387021 |
comparison
equal
deleted
inserted
replaced
4592:bc30700268d3 | 4593:bc29f566be02 |
---|---|
313 exit(EXIT_FAILURE); | 313 exit(EXIT_FAILURE); |
314 } | 314 } |
315 } | 315 } |
316 | 316 |
317 static void | 317 static void |
318 handle_cmd_line_options() | 318 handle_cmd_line_options(gboolean skip) |
319 { | 319 { |
320 gchar **filenames = options.filenames; | 320 gchar **filenames = options.filenames; |
321 #ifdef USE_DBUS | 321 #ifdef USE_DBUS |
322 DBusGProxy *session = audacious_get_dbus_proxy(); | 322 DBusGProxy *session = audacious_get_dbus_proxy(); |
323 gboolean is_running = audacious_remote_is_running(session); | 323 gboolean is_running = audacious_remote_is_running(session); |
428 | 428 |
429 exit(EXIT_SUCCESS); | 429 exit(EXIT_SUCCESS); |
430 } /* is_running */ | 430 } /* is_running */ |
431 else | 431 else |
432 #endif | 432 #endif |
433 { /* !is_running */ | 433 if (!skip) { /* !is_running */ |
434 if (filenames != NULL) | 434 if (filenames != NULL) |
435 { | 435 { |
436 gint pos = 0; | 436 gint pos = 0; |
437 gint i = 0; | 437 gint i = 0; |
438 GList *fns = NULL; | 438 GList *fns = NULL; |
713 | 713 |
714 aud_config_load(); | 714 aud_config_load(); |
715 | 715 |
716 signal_handlers_init(); | 716 signal_handlers_init(); |
717 | 717 |
718 handle_cmd_line_options(); | 718 handle_cmd_line_options(TRUE); |
719 | 719 |
720 if (options.headless == FALSE) | 720 if (options.headless == FALSE) |
721 { | 721 { |
722 ui_main_check_theme_engine(); | 722 ui_main_check_theme_engine(); |
723 | 723 |
732 ui_manager_create_menus(); | 732 ui_manager_create_menus(); |
733 } | 733 } |
734 | 734 |
735 plugin_system_init(); | 735 plugin_system_init(); |
736 playlist_system_init(); | 736 playlist_system_init(); |
737 | |
738 handle_cmd_line_options(FALSE); | |
737 | 739 |
738 #ifdef USE_DBUS | 740 #ifdef USE_DBUS |
739 init_dbus(); | 741 init_dbus(); |
740 #endif | 742 #endif |
741 | 743 |