diff options
author | Andrej Shadura <andrewsh@debian.org> | 2021-01-06 16:07:19 +0100 |
---|---|---|
committer | Andrej Shadura <andrewsh@debian.org> | 2021-01-06 16:07:19 +0100 |
commit | b1580ead91ab77244312980d1c0eb37ba544fc34 (patch) | |
tree | d14f24ef0b489584d721dca281a718d5827c4f54 | |
parent | db3ea04f8e5f416ba18983914fada93d5be4a01f (diff) |
Default to the GTK interface, not Qt
Gbp-Pq: Name default-to-gtk.patch
-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; } |