[totem] main: Add back button to player page
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Add back button to player page
- Date: Wed, 8 May 2013 10:36:57 +0000 (UTC)
commit 047467177ceade941b423da965bf952ddbf75144
Author: Bastien Nocera <hadess hadess net>
Date: Mon May 6 18:03:01 2013 +0200
main: Add back button to player page
src/Makefile.am | 6 ++++--
src/totem-object.c | 20 ++++++++++++++++++++
2 files changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 5f9ad14..d820bf5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -91,7 +91,8 @@ libtotem_la_CPPFLAGS = \
libtotem_la_CFLAGS = \
$(PLAYER_CFLAGS) \
- $(AM_CFLAGS)
+ $(AM_CFLAGS) \
+ -I$(top_srcdir)/libgd
libtotem_la_LDFLAGS = \
-export-dynamic \
@@ -116,7 +117,8 @@ totem_CFLAGS = \
totem_LDADD = \
libtotem.la \
- $(PLAYER_LIBS)
+ $(PLAYER_LIBS) \
+ $(top_builddir)/libgd/libgd.la
# Totem video thumbnailer
totem_video_thumbnailer_SOURCES = \
diff --git a/src/totem-object.c b/src/totem-object.c
index e7b1a87..66f5767 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -44,6 +44,7 @@
#include <stdlib.h>
#include <math.h>
#include <gio/gio.h>
+#include <libgd/gd.h>
#include <string.h>
@@ -2210,6 +2211,14 @@ drag_video_cb (GtkWidget *widget,
}
static void
+back_button_clicked_cb (GtkButton *button,
+ TotemObject *totem)
+{
+ totem_object_action_pause (totem);
+ switch_to_page (totem, "grilo");
+}
+
+static void
on_got_redirect (BaconVideoWidget *bvw, const char *mrl, TotemObject *totem)
{
char *new_mrl;
@@ -3779,6 +3788,7 @@ totem_callback_connect (TotemObject *totem)
GtkActionGroup *action_group;
GtkBox *box;
GAction *gaction;
+ AtkObject *accessible;
/* Menu items */
gaction = g_action_map_lookup_action (G_ACTION_MAP (totem), "repeat");
@@ -3850,6 +3860,16 @@ totem_callback_connect (TotemObject *totem)
target_table, G_N_ELEMENTS (target_table),
GDK_ACTION_COPY | GDK_ACTION_MOVE);
+ /* Add a back button */
+ item = gd_header_simple_button_new ();
+ gd_header_button_set_symbolic_icon_name (GD_HEADER_BUTTON (item),
+ "go-previous-symbolic");
+ accessible = gtk_widget_get_accessible (item);
+ atk_object_set_name (accessible, _("Back"));
+ gtk_header_bar_pack_start (GTK_HEADER_BAR (totem->header), item);
+ gtk_widget_show (item);
+ g_signal_connect (item, "clicked", G_CALLBACK (back_button_clicked_cb), totem);
+
/* Connect the keys */
gtk_widget_add_events (totem->win, GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]