mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
61bda44f3f
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
81 lines
3.1 KiB
Diff
81 lines
3.1 KiB
Diff
Index: mp3splt-gtk/src/ui_manager.c
|
|
===================================================================
|
|
--- mp3splt-gtk/src/ui_manager.c (revision 1508)
|
|
+++ mp3splt-gtk/src/ui_manager.c (revision 1509)
|
|
@@ -255,7 +255,7 @@
|
|
infos->filtered_points_presence = NULL;
|
|
infos->silence_wave_number_of_points_threshold = DEFAULT_SILENCE_WAVE_NUMBER_OF_POINTS_THRESHOLD;
|
|
|
|
- infos->selected_player = PLAYER_GSTREAMER;
|
|
+ infos->selected_player = DEFAULT_PLAYER;
|
|
|
|
infos->douglas_peucker_thresholds_defaults[0] = 2.0;
|
|
infos->douglas_peucker_thresholds_defaults[1] = 5.0;
|
|
Index: mp3splt-gtk/src/player_control.h
|
|
===================================================================
|
|
--- mp3splt-gtk/src/player_control.h (revision 1508)
|
|
+++ mp3splt-gtk/src/player_control.h (revision 1509)
|
|
@@ -50,6 +50,16 @@
|
|
#define PLAYER_SNACKAMP 2
|
|
#define PLAYER_GSTREAMER 3
|
|
|
|
+#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
|
|
+
|
|
gint player_get_elapsed_time(ui_state *ui);
|
|
gint player_get_total_time(ui_state *ui);
|
|
gint player_is_running(ui_state *ui);
|
|
Index: mp3splt-gtk/src/preferences_manager.c
|
|
===================================================================
|
|
--- mp3splt-gtk/src/preferences_manager.c (revision 1508)
|
|
+++ mp3splt-gtk/src/preferences_manager.c (revision 1509)
|
|
@@ -770,29 +770,28 @@
|
|
//default player
|
|
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);
|
|
+ g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER);
|
|
g_key_file_set_comment (my_key_file, "player", "default_player",
|
|
- "\n 1 = PLAYER_AUDACIOUS, 2 = PLAYER_SNACKAMP, 3 = PLAYER_GSTREAMER",
|
|
- NULL);
|
|
+ "\n 1 = PLAYER_AUDACIOUS, 2 = PLAYER_SNACKAMP, 3 = PLAYER_GSTREAMER", NULL);
|
|
}
|
|
else
|
|
{
|
|
//check if we support selected player
|
|
- gint the_player =
|
|
- g_key_file_get_integer(my_key_file, "player", "default_player", NULL);
|
|
- if (the_player == PLAYER_AUDACIOUS)
|
|
- {
|
|
+ gint the_player = g_key_file_get_integer(my_key_file, "player", "default_player", NULL);
|
|
+ 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 value do not make sense
|
|
- else if ((the_player > PLAYER_GSTREAMER) || (the_player < 0))
|
|
- {
|
|
- g_key_file_set_integer(my_key_file, "player", "default_player",
|
|
- PLAYER_GSTREAMER);
|
|
+ else 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 does not make sense
|
|
+ else if ((the_player > PLAYER_GSTREAMER) || (the_player < 0)) {
|
|
+ g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER);
|
|
+ }
|
|
}
|
|
|
|
pm_write_default(my_key_file, ui->preferences);
|