sound-juicer r1991 - in trunk: . src
- From: rburton svn gnome org
- To: svn-commits-list gnome org
- Subject: sound-juicer r1991 - in trunk: . src
- Date: Mon, 21 Jan 2008 10:40:01 +0000 (GMT)
Author: rburton
Date: Mon Jan 21 10:40:01 2008
New Revision: 1991
URL: http://svn.gnome.org/viewvc/sound-juicer?rev=1991&view=rev
Log:
2008-01-21 Ross Burton <ross burtonini com>
* src/sj-play.c:
When playback finishes, reset the UI (#413005, thanks Bill O'Shea)
Modified:
trunk/ChangeLog
trunk/src/sj-play.c
Modified: trunk/src/sj-play.c
==============================================================================
--- trunk/src/sj-play.c (original)
+++ trunk/src/sj-play.c Mon Jan 21 10:40:01 2008
@@ -92,7 +92,7 @@
}
/**
- * Stop.
+ * Stop and reset UI.
*/
static void
stop (void)
@@ -100,11 +100,22 @@
if (pipeline != NULL)
gst_element_set_state (pipeline, GST_STATE_NULL);
+ /* TODO: this should be centralised into the state change logic really */
gtk_widget_set_sensitive (next_menuitem, FALSE);
gtk_widget_set_sensitive (prev_menuitem, FALSE);
gtk_widget_set_sensitive (reread_menuitem, TRUE);
- /* Call this to ensure that the UI is reset */
+ gtk_widget_hide (seek_scale);
+ gtk_widget_hide (volume_button);
sj_main_set_title (NULL);
+ if (!gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (track_store),
+ ¤t_iter, NULL, current_track))
+ return;
+ gtk_list_store_set (track_store, ¤t_iter, COLUMN_STATE, STATE_IDLE, -1);
+ gtk_statusbar_push (GTK_STATUSBAR (statusbar), 0, "");
+ gtk_button_set_label (GTK_BUTTON (play_button), GTK_STOCK_MEDIA_PLAY);
+ slen = GST_CLOCK_TIME_NONE;
+ current_track = -1;
+
}
/**
@@ -146,7 +157,7 @@
stop ();
seek_to_track = 0;
} else {
- seek_to_track = next_track;
+ seek_to_track = next_track;
set_gst_ui_and_play ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]