summaryrefslogtreecommitdiff
path: root/src/backend/bvw-test.c
diff options
context:
space:
mode:
authorYosef Or Boczko <yoseforb@gmail.com>2013-07-01 17:19:56 +0300
committerYosef Or Boczko <yoseforb@gmail.com>2013-07-01 17:19:56 +0300
commitd5997db27969a0653ea42c388b9efb3c22ad828c (patch)
tree058c1c4a94dac62bf73d6d9b4f972ea5f5010a65 /src/backend/bvw-test.c
parentb7c0417aef9f8fe01df50df4000e4b794d5b9c57 (diff)
downloadtotem-d5997db27969a0653ea42c388b9efb3c22ad828c.tar.gz
backend: Set button arrow icons according to locale's text direction
media-playback-start-symbolic in LTR, media-playback-start-rtl-symbolic in RTL. media-skip-forward-symbolic in LTR, media-skip-forward-rtl-symbolic in RTL. media-skip-backward-symbolic in LTR, media-skip-backward-rtl-symbolic in RTL. https://bugzilla.gnome.org/show_bug.cgi?id=702631
Diffstat (limited to 'src/backend/bvw-test.c')
-rw-r--r--src/backend/bvw-test.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/backend/bvw-test.c b/src/backend/bvw-test.c
index d853ea696..8b4aa7389 100644
--- a/src/backend/bvw-test.c
+++ b/src/backend/bvw-test.c
@@ -80,6 +80,7 @@ int main
GtkBox *box;
GtkToolItem *item;
GtkWidget *image;
+ gchar *icon_start, *icon_skip_forward, *icon_skip_backward;
#ifdef GDK_WINDOWING_X11
XInitThreads ();
@@ -88,6 +89,16 @@ int main
if (gtk_clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS)
g_assert_not_reached ();
+ if (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) {
+ icon_start = "media-playback-start-rtl-symbolic";
+ icon_skip_forward = "media-skip-forward-rtl-symbolic";
+ icon_skip_backward = "media-skip-backward-rtl-symbolic";
+ } else {
+ icon_start = "media-playback-start-symbolic";
+ icon_skip_forward = "media-skip-forward-symbolic";
+ icon_skip_backward = "media-skip-backward-symbolic";
+ }
+
context = g_option_context_new ("- Play audio and video inside a web browser");
baconoptiongroup = bacon_video_widget_get_option_group();
g_option_context_add_main_entries (context, option_entries, GETTEXT_PACKAGE);
@@ -129,17 +140,17 @@ int main
/* Previous */
item = gtk_tool_button_new (NULL, NULL);
- gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "media-skip-backward-symbolic");
+ gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), icon_skip_backward);
gtk_box_pack_start (box, GTK_WIDGET (item), FALSE, FALSE, 0);
/* Play/Pause */
item = gtk_tool_button_new (NULL, NULL);
- gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "media-playback-start-symbolic");
+ gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), icon_start);
gtk_box_pack_start (box, GTK_WIDGET (item), FALSE, FALSE, 0);
/* Next */
item = gtk_tool_button_new (NULL, NULL);
- gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "media-skip-forward-symbolic");
+ gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), icon_skip_forward);
gtk_box_pack_start (box, GTK_WIDGET (item), FALSE, FALSE, 0);
/* Separator */