[totem] main: Add current title and content-type properties



commit 68ee8a09016f2ad1e240ef18b782859cd51ac39b
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Jul 14 23:52:03 2012 +0100

    main: Add current title and content-type properties

 src/totem-object.c |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/src/totem-object.c b/src/totem-object.c
index 030407a..f0076c3 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -113,6 +113,8 @@ enum {
 	PROP_SEEKABLE,
 	PROP_CURRENT_TIME,
 	PROP_CURRENT_MRL,
+	PROP_CURRENT_CONTENT_TYPE,
+	PROP_CURRENT_DISPLAY_NAME,
 	PROP_REMEMBER_POSITION
 };
 
@@ -284,6 +286,28 @@ totem_object_class_init (TotemObjectClass *klass)
 							      NULL, G_PARAM_READABLE));
 
 	/**
+	 * TotemObject:current-content-type:
+	 *
+	 * The content-type of the current stream.
+	 **/
+	g_object_class_install_property (object_class, PROP_CURRENT_CONTENT_TYPE,
+					 g_param_spec_string ("current-content-type",
+							      "Current stream's content-type",
+							      "Current stream's content-type.",
+							      NULL, G_PARAM_READABLE));
+
+	/**
+	 * TotemObject:current-display-name:
+	 *
+	 * The display name of the current stream.
+	 **/
+	g_object_class_install_property (object_class, PROP_CURRENT_DISPLAY_NAME,
+					 g_param_spec_string ("current-display-name",
+							      "Current stream's display name",
+							      "Current stream's display name.",
+							      NULL, G_PARAM_READABLE));
+
+	/**
 	 * TotemObject:remember-position:
 	 *
 	 * If %TRUE, Totem will remember the position it was at last time a given file was opened.
@@ -460,6 +484,12 @@ totem_object_get_property (GObject *object,
 	case PROP_CURRENT_MRL:
 		g_value_set_string (value, totem->mrl);
 		break;
+	case PROP_CURRENT_CONTENT_TYPE:
+		g_value_take_string (value, totem_playlist_get_current_content_type (totem->playlist));
+		break;
+	case PROP_CURRENT_DISPLAY_NAME:
+		g_value_take_string (value, totem_playlist_get_current_title (totem->playlist));
+		break;
 	case PROP_REMEMBER_POSITION:
 		g_value_set_boolean (value, totem->remember_position);
 		break;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]