[totem/gnome-3-10] browser-plugin: Set button arrow icons according to locale's text direction



commit fe628f82eebb05cad67d5856710447af5960ae81
Author: Yosef Or Boczko <yoseforb gmail com>
Date:   Thu Aug 1 02:57:49 2013 +0300

    browser-plugin: Set button arrow icons according to locale's text direction
    
    media-playback-start-symbolic in LTR,
    media-playback-start-rtl-symbolic in RTL.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702631

 browser-plugin/Makefile.am           |    1 +
 browser-plugin/totem-plugin-viewer.c |    9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/browser-plugin/Makefile.am b/browser-plugin/Makefile.am
index 60798d6..325ae0b 100644
--- a/browser-plugin/Makefile.am
+++ b/browser-plugin/Makefile.am
@@ -82,6 +82,7 @@ totem_plugin_viewer_SOURCES = \
 totem_plugin_viewer_CPPFLAGS = \
        -DGNOMELOCALEDIR="\"$(datadir)/locale\""        \
        -DG_LOG_DOMAIN=\""TotemEmbedded\""              \
+       -I$(top_srcdir)/src/gst                         \
        $(AM_CPPFLAGS)
 
 totem_plugin_viewer_CFLAGS = \
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index f00384e..a83f2a4 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -49,6 +49,7 @@
 #include "totem-time-label.h"
 #include "totem-fullscreen.h"
 #include "totem-glow-button.h"
+#include "totem-rtl-helpers.h"
 #include "video-utils.h"
 
 #include "totem-plugin-viewer-constants.h"
@@ -347,7 +348,7 @@ totem_embedded_set_state (TotemEmbedded *emb, TotemStates state)
 
        switch (state) {
        case TOTEM_STATE_STOPPED:
-               id = "media-playback-start-symbolic";
+               id = totem_get_rtl_icon_name ("media-playback-start");
                totem_statusbar_set_text (emb->statusbar, _("Stopped"));
                totem_statusbar_set_time_and_length (emb->statusbar, 0, 0);
                totem_time_label_set_time
@@ -359,7 +360,7 @@ totem_embedded_set_state (TotemEmbedded *emb, TotemStates state)
                }
                break;
        case TOTEM_STATE_PAUSED:
-               id = "media-playback-start-symbolic";
+               id = totem_get_rtl_icon_name ("media-playback-start");
                totem_statusbar_set_text (emb->statusbar, _("Paused"));
                break;
        case TOTEM_STATE_PLAYING:
@@ -1704,7 +1705,7 @@ totem_embedded_construct (TotemEmbedded *emb,
                          G_CALLBACK (totem_embedded_on_fullscreen_exit), emb);
 
        emb->pp_fs_button = GTK_WIDGET (gtk_tool_button_new_from_stock
-                                       ("media-playback-start-symbolic"));
+                                       (totem_get_rtl_icon_name ("media-playback-start")));
        g_signal_connect (G_OBJECT (emb->pp_fs_button), "clicked",
                          G_CALLBACK (on_play_pause), emb);
        gtk_container_add (GTK_CONTAINER (emb->fs->buttons_box), emb->pp_fs_button);
@@ -1768,7 +1769,7 @@ totem_embedded_construct (TotemEmbedded *emb,
                          G_CALLBACK (cb_on_seek), emb);
 
        emb->pp_button = GTK_WIDGET (gtk_builder_get_object (emb->xml, "pp_button"));
-       image = gtk_image_new_from_icon_name ("media-playback-start-symbolic", GTK_ICON_SIZE_MENU);
+       image = gtk_image_new_from_icon_name (totem_get_rtl_icon_name ("media-playback-start"), 
GTK_ICON_SIZE_MENU);
        gtk_button_set_image (GTK_BUTTON (emb->pp_button), image);
        g_signal_connect (G_OBJECT (emb->pp_button), "clicked",
                          G_CALLBACK (on_play_pause), emb);



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