[rhythmbox] remove the 'crossfade between songs on the same album' setting
- From: Jonathan Matthew <jmatthew src gnome org>
- To: svn-commits-list gnome org
- Subject: [rhythmbox] remove the 'crossfade between songs on the same album' setting
- Date: Thu, 4 Jun 2009 22:17:46 -0400 (EDT)
commit fdebe06c0cbd9337ba72fd259ed57e1eb76c7bdf
Author: Jonathan Matthew <jonathan d14n org>
Date: Fri Jun 5 12:17:13 2009 +1000
remove the 'crossfade between songs on the same album' setting
---
data/ui/playback-prefs.ui | 60 ------------------------------------------
shell/rb-shell-player.c | 51 +++++++++--------------------------
shell/rb-shell-preferences.c | 26 ------------------
3 files changed, 13 insertions(+), 124 deletions(-)
diff --git a/data/ui/playback-prefs.ui b/data/ui/playback-prefs.ui
index b135637..93ac506 100644
--- a/data/ui/playback-prefs.ui
+++ b/data/ui/playback-prefs.ui
@@ -131,66 +131,6 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox7">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="crossfade_type_label">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Crossfade Type</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <child>
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label"> </property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="album_check">
- <property name="label" translatable="yes">C_rossfade between songs on the same album</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
<object class="GtkVBox" id="vbox6">
<property name="visible">True</property>
<property name="orientation">vertical</property>
diff --git a/shell/rb-shell-player.c b/shell/rb-shell-player.c
index d039c12..a478144 100644
--- a/shell/rb-shell-player.c
+++ b/shell/rb-shell-player.c
@@ -177,8 +177,6 @@ static void gconf_song_position_slider_visibility_changed (GConfClient *client,
GConfEntry *entry, RBShellPlayer *player);
static void gconf_track_transition_time_changed (GConfClient *client, guint cnxn_id,
GConfEntry *entry, RBShellPlayer *player);
-static void gconf_track_transition_album_check_changed (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, RBShellPlayer *player);
static void gconf_network_buffer_size_changed (GConfClient *client, guint cnxn_id,
GConfEntry *entry, RBShellPlayer *player);
static void rb_shell_player_playing_changed_cb (RBShellPlayer *player,
@@ -255,7 +253,6 @@ struct RBShellPlayerPrivate
guint elapsed;
gint track_transition_time;
- gboolean track_transition_album_check;
RhythmDBEntry *playing_entry;
gboolean playing_entry_eos;
gboolean jump_to_playing_entry;
@@ -271,7 +268,6 @@ struct RBShellPlayerPrivate
guint gconf_play_order_id;
guint gconf_song_position_slider_visibility_id;
guint gconf_track_transition_time_id;
- guint gconf_track_transition_album_check_id;
guint gconf_network_buffer_size_id;
gboolean mute;
@@ -1009,15 +1005,10 @@ rb_shell_player_init (RBShellPlayer *player)
player->priv->volume = eel_gconf_get_float (CONF_STATE_VOLUME);
player->priv->track_transition_time = (int)(eel_gconf_get_float (CONF_PLAYER_TRANSITION_TIME));
- player->priv->track_transition_album_check = eel_gconf_get_boolean (CONF_PLAYER_TRANSITION_ALBUM_CHECK);
player->priv->gconf_track_transition_time_id =
eel_gconf_notification_add (CONF_PLAYER_TRANSITION_TIME,
(GConfClientNotifyFunc) gconf_track_transition_time_changed,
player);
- player->priv->gconf_track_transition_album_check_id =
- eel_gconf_notification_add (CONF_PLAYER_TRANSITION_ALBUM_CHECK,
- (GConfClientNotifyFunc) gconf_track_transition_album_check_changed,
- player);
player->priv->gconf_network_buffer_size_id =
eel_gconf_notification_add (CONF_PLAYER_NETWORK_BUFFER_SIZE,
(GConfClientNotifyFunc) gconf_network_buffer_size_changed,
@@ -1675,22 +1666,17 @@ rb_shell_player_set_playing_entry (RBShellPlayer *player,
if (player->priv->playing_entry != NULL &&
player->priv->track_transition_time > 0) {
- if (player->priv->track_transition_album_check) {
- const char *previous_album;
- const char *album;
-
- previous_album = rhythmdb_entry_get_string (player->priv->playing_entry, RHYTHMDB_PROP_ALBUM);
- album = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ALBUM);
- /* only crossfade if we're not going from the end of one song on an
- * album to the start of another. "Unknown" doesn't count as an album.
- */
- if (wait_for_eos == FALSE ||
- strcmp (album, _("Unknown")) == 0 ||
- strcmp (album, previous_album) != 0) {
- play_type = CROSSFADE;
- }
- } else {
- /* always crossfade */
+ const char *previous_album;
+ const char *album;
+
+ previous_album = rhythmdb_entry_get_string (player->priv->playing_entry, RHYTHMDB_PROP_ALBUM);
+ album = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_ALBUM);
+ /* only crossfade if we're not going from the end of one song on an
+ * album to the start of another. "Unknown" doesn't count as an album.
+ */
+ if (wait_for_eos == FALSE ||
+ strcmp (album, _("Unknown")) == 0 ||
+ strcmp (album, previous_album) != 0) {
play_type = CROSSFADE;
}
}
@@ -3565,9 +3551,8 @@ tick_cb (RBPlayer *mmplayer,
/*
* just pretending we got an EOS will do exactly what we want
- * here. for the album crossfade case, it might mean we leave
- * the stream prerolled for a few extra seconds, in which time
- * something interesting (file being deleted?) might happen.
+ * here. if we don't want to crossfade, we'll just leave the stream
+ * prerolled until the current stream really ends.
*/
if (remaining_check > 0 &&
duration > 0 &&
@@ -3806,16 +3791,6 @@ gconf_track_transition_time_changed (GConfClient *client,
}
static void
-gconf_track_transition_album_check_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- RBShellPlayer *player)
-{
- rb_debug ("track transition album check flag changed");
- player->priv->track_transition_album_check = eel_gconf_get_boolean (CONF_PLAYER_TRANSITION_ALBUM_CHECK);
-}
-
-static void
gconf_network_buffer_size_changed (GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
diff --git a/shell/rb-shell-preferences.c b/shell/rb-shell-preferences.c
index 372302c..f7f3c85 100644
--- a/shell/rb-shell-preferences.c
+++ b/shell/rb-shell-preferences.c
@@ -91,8 +91,6 @@ static void rb_shell_preferences_toolbar_style_cb (GtkComboBox *box,
RBShellPreferences *preferences);
static void rb_shell_preferences_player_backend_cb (GtkToggleButton *button,
RBShellPreferences *preferences);
-static void rb_shell_preferences_album_crossfade_cb (GtkToggleButton *button,
- RBShellPreferences *preferences);
static void rb_shell_preferences_transition_duration_cb (GtkRange *range,
RBShellPreferences *preferences);
static void rb_shell_preferences_network_buffer_size_cb (GtkRange *range,
@@ -125,7 +123,6 @@ struct RBShellPreferencesPrivate
GtkWidget *location_check;
GtkWidget *xfade_backend_check;
- GtkWidget *album_crossfade_check;
GtkWidget *transition_duration;
GtkWidget *network_buffer_size;
@@ -277,14 +274,11 @@ rb_shell_preferences_init (RBShellPreferences *shell_preferences)
builder = rb_builder_load ("playback-prefs.ui", shell_preferences);
rb_builder_boldify_label (builder, "backend_label");
- rb_builder_boldify_label (builder, "crossfade_type_label");
rb_builder_boldify_label (builder, "duration_label");
rb_builder_boldify_label (builder, "buffer_size_label");
shell_preferences->priv->xfade_backend_check =
GTK_WIDGET (gtk_builder_get_object (builder, "use_xfade_backend"));
- shell_preferences->priv->album_crossfade_check =
- GTK_WIDGET (gtk_builder_get_object (builder, "album_check"));
shell_preferences->priv->transition_duration =
GTK_WIDGET (gtk_builder_get_object (builder, "duration"));
shell_preferences->priv->network_buffer_size =
@@ -295,11 +289,6 @@ rb_shell_preferences_init (RBShellPreferences *shell_preferences)
G_CALLBACK (rb_shell_preferences_player_backend_cb),
shell_preferences, 0);
- g_signal_connect_object (shell_preferences->priv->album_crossfade_check,
- "toggled",
- G_CALLBACK (rb_shell_preferences_album_crossfade_cb),
- shell_preferences, 0);
-
g_signal_connect_object (shell_preferences->priv->transition_duration,
"value-changed",
G_CALLBACK (rb_shell_preferences_transition_duration_cb),
@@ -608,9 +597,6 @@ rb_shell_preferences_sync (RBShellPreferences *shell_preferences)
b = eel_gconf_get_boolean (CONF_PLAYER_USE_XFADE_BACKEND);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (shell_preferences->priv->xfade_backend_check), b);
- b = eel_gconf_get_boolean (CONF_PLAYER_TRANSITION_ALBUM_CHECK);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (shell_preferences->priv->album_crossfade_check), !b);
-
duration = eel_gconf_get_float (CONF_PLAYER_TRANSITION_TIME);
gtk_range_set_value (GTK_RANGE (shell_preferences->priv->transition_duration), duration);
@@ -665,7 +651,6 @@ update_playback_prefs_sensitivity (RBShellPreferences *preferences)
backend = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (preferences->priv->xfade_backend_check));
- gtk_widget_set_sensitive (preferences->priv->album_crossfade_check, backend);
gtk_widget_set_sensitive (preferences->priv->transition_duration, backend);
}
@@ -680,17 +665,6 @@ rb_shell_preferences_player_backend_cb (GtkToggleButton *button,
}
static void
-rb_shell_preferences_album_crossfade_cb (GtkToggleButton *button,
- RBShellPreferences *preferences)
-{
- /* sense is inverted here because the wording sounded more natural
- * this way. "[ ] Don't do x" sucks.
- */
- eel_gconf_set_boolean (CONF_PLAYER_TRANSITION_ALBUM_CHECK,
- !gtk_toggle_button_get_active (button));
-}
-
-static void
rb_shell_preferences_transition_duration_cb (GtkRange *range,
RBShellPreferences *preferences)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]