diff options
-rw-r--r-- | src/audacious/main.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/audacious/main.cc b/src/audacious/main.cc index 1213a95..3c56676 100644 --- a/src/audacious/main.cc +++ b/src/audacious/main.cc @@ -50,6 +50,7 @@ static struct { int mainwin, show_jump_box; int headless, quit_after_play; int verbose; + int qt; int gtk; } options; @@ -78,6 +79,7 @@ static const struct { {"quit-after-play", 'q', & options.quit_after_play, N_("Quit on playback stop")}, {"verbose", 'V', & options.verbose, N_("Print debugging messages (may be used twice)")}, #if defined(USE_QT) && defined(USE_GTK) + {"qt", 'Q', & options.qt, N_("Run in Qt mode")}, {"gtk", 'G', & options.gtk, N_("Run in GTK mode")}, #endif }; @@ -171,8 +173,16 @@ static bool parse_options (int argc, char * * argv) else if (options.verbose) audlog::set_stderr_level (audlog::Info); - if (options.gtk) + if (options.qt && options.gtk) { + fprintf (stderr, _("Conflicting options: --gtk and --qt\n")); + return false; + } + + if (options.qt) { + aud_set_mainloop_type (MainloopType::Qt); + } else { aud_set_mainloop_type (MainloopType::GLib); + } return true; } |