summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Shadura <andrewsh@debian.org>2020-04-19 12:03:44 +0200
committerAndrej Shadura <andrewsh@debian.org>2020-04-19 12:03:44 +0200
commit356442525d8bd0f134c273695e9bfd2a45cdf528 (patch)
tree98a34e08cd0c84a5a06de2af1702c7bfe2840cdf
parent18c6f31ba84570715c16bf4e19507555e37a28a4 (diff)
Default to the GTK interface, not Qt
Gbp-Pq: Name default-to-gtk.patch
-rw-r--r--src/audacious/main.cc12
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;
}