summaryrefslogtreecommitdiff
path: root/patches/default-to-gtk.patch
blob: c18504bd2d80688b6488a781c40e868e04083171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From: Andrej Shadura <andrewsh@debian.org>
Subject: Default to the GTK interface, not Qt

--- a/src/audacious/main.cc
+++ b/src/audacious/main.cc
@@ -50,6 +50,7 @@
     int mainwin, show_jump_box;
     int headless, quit_after_play;
     int verbose;
+    int qt;
     int gtk;
 } options;
 
@@ -78,6 +79,7 @@
     {"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 @@
     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;
 }