sound-juicer r2072 - in trunk: . src
- From: rburton svn gnome org
- To: svn-commits-list gnome org
- Subject: sound-juicer r2072 - in trunk: . src
- Date: Wed, 27 Feb 2008 08:41:04 +0000 (GMT)
Author: rburton
Date: Wed Feb 27 08:41:04 2008
New Revision: 2072
URL: http://svn.gnome.org/viewvc/sound-juicer?rev=2072&view=rev
Log:
2008-02-27 Ross Burton <ross burtonini com>
* src/sj-main.c:
* src/sound-juicer.h:
* src/sj-play.c:
Add a PAUSED track state (#518760, thanks Brian Geppert)
Modified:
trunk/ChangeLog
trunk/src/sj-main.c
trunk/src/sj-play.c
trunk/src/sound-juicer.h
Modified: trunk/src/sj-main.c
==============================================================================
--- trunk/src/sj-main.c (original)
+++ trunk/src/sj-main.c Wed Feb 27 08:41:04 2008
@@ -313,6 +313,9 @@
case STATE_PLAYING:
g_object_set (G_OBJECT (cell), "stock-id", GTK_STOCK_MEDIA_PLAY, NULL);
break;
+ case STATE_PAUSED:
+ g_object_set (G_OBJECT (cell), "stock-id", GTK_STOCK_MEDIA_PAUSE, NULL);
+ break;
case STATE_EXTRACTING:
g_object_set (G_OBJECT (cell), "stock-id", GTK_STOCK_MEDIA_RECORD, NULL);
break;
Modified: trunk/src/sj-play.c
==============================================================================
--- trunk/src/sj-play.c (original)
+++ trunk/src/sj-play.c Wed Feb 27 08:41:04 2008
@@ -127,6 +127,15 @@
return (pipeline != NULL && GST_STATE (pipeline) == GST_STATE_PLAYING);
}
+/**
+ * Are we paused?
+ */
+static gboolean
+is_paused (void)
+{
+ return (pipeline != NULL && GST_STATE (pipeline) == GST_STATE_PAUSED);
+}
+
/*
* callbacks.
*/
@@ -413,9 +422,13 @@
if (is_playing ()) {
pause ();
+ gtk_list_store_set (track_store, ¤t_iter,
+ COLUMN_STATE, STATE_PAUSED, -1);
} else if (pipeline && GST_STATE (pipeline) == GST_STATE_PAUSED &&
current_track == seek_to_track) {
play ();
+ gtk_list_store_set (track_store, ¤t_iter,
+ COLUMN_STATE, STATE_PLAYING, -1);
} else if (pipeline && GST_STATE (pipeline) == GST_STATE_PAUSED &&
current_track != seek_to_track) {
if (!gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (track_store),
@@ -532,6 +545,10 @@
gint track;
GtkTreeSelection *selection = gtk_tree_view_get_selection (treeview);
+ if (is_paused ())
+ gtk_list_store_set (track_store, ¤t_iter,
+ COLUMN_STATE, STATE_IDLE, -1);
+
if (is_playing ())
return;
Modified: trunk/src/sound-juicer.h
==============================================================================
--- trunk/src/sound-juicer.h (original)
+++ trunk/src/sound-juicer.h Wed Feb 27 08:41:04 2008
@@ -78,6 +78,7 @@
typedef enum {
STATE_IDLE,
STATE_PLAYING,
+ STATE_PAUSED,
STATE_EXTRACTING
} TrackState;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]