[california] Fix the accelerators for next/previous in RTL: Closes bgo#727212
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california] Fix the accelerators for next/previous in RTL: Closes bgo#727212
- Date: Fri, 28 Mar 2014 19:14:45 +0000 (UTC)
commit 4fc151b461b5402d0594a2dab22fbe547e91d8f3
Author: Yosef Or Boczko <yoseforb src gnome org>
Date: Fri Mar 28 09:17:46 2014 +0300
Fix the accelerators for next/previous in RTL: Closes bgo#727212
src/host/host-main-window.vala | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/host/host-main-window.vala b/src/host/host-main-window.vala
index ff7fc97..96b072d 100644
--- a/src/host/host-main-window.vala
+++ b/src/host/host-main-window.vala
@@ -46,11 +46,13 @@ public class MainWindow : Gtk.ApplicationWindow {
set_default_size(1024, 768);
set_default_icon_name(Application.ICON_NAME);
+ bool rtl = get_direction() == Gtk.TextDirection.RTL;
+
add_action_entries(action_entries, this);
Application.instance.add_accelerator(ACCEL_NEW_EVENT, ACTION_NEW_EVENT, null);
Application.instance.add_accelerator(ACCEL_JUMP_TO_TODAY, ACTION_JUMP_TO_TODAY, null);
- Application.instance.add_accelerator(ACCEL_NEXT, ACTION_NEXT, null);
- Application.instance.add_accelerator(ACCEL_PREVIOUS, ACTION_PREVIOUS, null);
+ Application.instance.add_accelerator(rtl ? ACCEL_PREVIOUS : ACCEL_NEXT, ACTION_NEXT, null);
+ Application.instance.add_accelerator(rtl ? ACCEL_NEXT : ACCEL_PREVIOUS, ACTION_PREVIOUS, null);
// start in Month view
current_view = month_view;
@@ -64,8 +66,6 @@ public class MainWindow : Gtk.ApplicationWindow {
set_titlebar(headerbar);
#endif
- bool rtl = get_direction () == Gtk.TextDirection.RTL;
-
Gtk.Button today = new Gtk.Button.with_label(_("_Today"));
today.use_underline = true;
today.tooltip_text = _("Jump to today's date (Ctrl+T)");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]