[goobox] notification: Set arrow icons according to locale's text direction
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goobox] notification: Set arrow icons according to locale's text direction
- Date: Sun, 19 Jan 2014 15:38:23 +0000 (UTC)
commit c96d77363bc83bc73617d975a47d09ce53a9aa64
Author: Yosef Or Boczko <yoseforb gmail com>
Date: Tue Jan 14 16:27:29 2014 +0200
notification: Set arrow icons according to locale's text direction
https://bugzilla.gnome.org/show_bug.cgi?id=722176
src/main.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 09908b2..010c037 100644
--- a/src/main.c
+++ b/src/main.c
@@ -261,8 +261,12 @@ system_notify (GooWindow *window,
notify_notification_set_image_from_pixbuf (notification, cover);
if (notification_supports_actions) {
+ gboolean rtl;
+
notify_notification_clear_actions (notification);
+ rtl = gtk_widget_get_direction (GTK_WIDGET (window)) == GTK_TEXT_DIR_RTL;
+
if (goo_player_get_state (goo_window_get_player (window)) == GOO_PLAYER_STATE_PLAYING)
notify_notification_add_action (notification,
GOO_ICON_NAME_PAUSE,
@@ -272,14 +276,14 @@ system_notify (GooWindow *window,
NULL);
else
notify_notification_add_action (notification,
- GOO_ICON_NAME_PLAY,
+ rtl ? GOO_ICON_NAME_PLAY : GOO_ICON_NAME_PLAY,
_("Play"),
notify_action_toggle_play_cb,
window,
NULL);
notify_notification_add_action (notification,
- GOO_ICON_NAME_NEXT,
+ rtl ? GOO_ICON_NAME_NEXT_RTL : GOO_ICON_NAME_NEXT,
_("Next"),
notify_action_next_cb,
window,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]