summaryrefslogtreecommitdiff
path: root/audio/mp3splt-gtk/default_player.diff
blob: 123bc08a7396567f48e72d1725fb14d64d18b117 (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
40
41
42
43
44
diff -Naur mp3splt-gtk-0.9.2/src/preferences_manager.c mp3splt-gtk-0.9.2.patched/src/preferences_manager.c
--- mp3splt-gtk-0.9.2/src/preferences_manager.c	2014-05-28 18:43:53.000000000 -0400
+++ mp3splt-gtk-0.9.2.patched/src/preferences_manager.c	2015-01-08 17:25:36.000000000 -0500
@@ -42,6 +42,16 @@
 
 #include "preferences_manager.h"
 
+#ifdef NO_GSTREAMER
+  #ifdef NO_AUDACIOUS
+    #define DEFAULT_PLAYER PLAYER_SNACKAMP
+  #else
+    #define DEFAULT_PLAYER PLAYER_AUDACIOUS
+  #endif
+#else
+  #define DEFAULT_PLAYER PLAYER_GSTREAMER
+#endif
+
 static void check_pref_file_and_write_default(ui_state *ui);
 static void pm_free_spinner_int_preferences(GArray *spinner_int_preferences);
 static void pm_free_range_preferences(GArray *range_preferences);
@@ -771,7 +781,7 @@
   if (!g_key_file_has_key(my_key_file, "player", "default_player",NULL))
   {
     g_key_file_set_integer(my_key_file, "player", "default_player",
-        PLAYER_GSTREAMER);
+        DEFAULT_PLAYER);
     g_key_file_set_comment (my_key_file, "player", "default_player",
         "\n 1 = PLAYER_AUDACIOUS, 2 = PLAYER_SNACKAMP, 3 = PLAYER_GSTREAMER",
         NULL);
@@ -784,7 +794,13 @@
     if (the_player == PLAYER_AUDACIOUS)
     {
 #ifdef NO_AUDACIOUS
-      g_key_file_set_integer(my_key_file, "player", "default_player", PLAYER_SNACKAMP);
+      g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER);
+#endif
+    }
+    if (the_player == PLAYER_GSTREAMER)
+    {
+#ifdef NO_GSTREAMER
+      g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER);
 #endif
     }
     //if the value do not make sense