[totem] main: Add totem_object_get_main_page() accessor
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Add totem_object_get_main_page() accessor
- Date: Wed, 3 Jul 2013 13:54:10 +0000 (UTC)
commit b4e2454e628ee22ae598ae10026fafb6cf10d771
Author: Bastien Nocera <hadess hadess net>
Date: Wed May 22 17:49:49 2013 +0200
main: Add totem_object_get_main_page() accessor
src/totem-object.c | 13 +++++++++++++
src/totem-private.h | 1 +
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/totem-object.c b/src/totem-object.c
index 48a27b6..a063699 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -871,6 +871,19 @@ totem_object_add_main_page (TotemObject *totem,
}
/**
+ * totem_object_get_main_page:
+ * @totem: a #TotemObject
+ *
+ * Returns the identifier for the current page in Totem's
+ * main view.
+ **/
+const char *
+totem_object_get_main_page (Totem *totem)
+{
+ return gtk_stack_get_visible_child_name (GTK_STACK (totem->stack));
+}
+
+/**
* totem_file_opened:
* @totem: a #TotemObject
* @mrl: the MRL opened
diff --git a/src/totem-private.h b/src/totem-private.h
index 669203b..aa2b0da 100644
--- a/src/totem-private.h
+++ b/src/totem-private.h
@@ -196,6 +196,7 @@ void totem_object_add_main_page (TotemObject *totem,
void totem_object_set_main_page (TotemObject *totem,
const char *page_id,
gboolean animate);
+const char * totem_object_get_main_page (Totem *totem);
/* Signal emission */
void totem_file_opened (TotemObject *totem,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]