[iagno] Move undo from the app menu to the window
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [iagno] Move undo from the app menu to the window
- Date: Sun, 9 Feb 2014 00:15:17 +0000 (UTC)
commit bac6c98c0b26463b4ae4d67f026103eca6459a64
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Feb 8 18:13:19 2014 -0600
Move undo from the app menu to the window
data/iagno.ui | 4 ----
src/iagno.vala | 14 ++++++++++++++
2 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/data/iagno.ui b/data/iagno.ui
index d86ea28..a76abaa 100644
--- a/data/iagno.ui
+++ b/data/iagno.ui
@@ -9,10 +9,6 @@
<attribute name="accel"><Primary>n</attribute>
</item>
<item>
- <attribute name="label" translatable="yes">_Undo</attribute>
- <attribute name="action">app.undo-move</attribute>
- </item>
- <item>
<attribute name="label" translatable="yes">_Preferences</attribute>
<attribute name="action">app.preferences</attribute>
</item>
diff --git a/src/iagno.vala b/src/iagno.vala
index 74eb16a..71e1deb 100644
--- a/src/iagno.vala
+++ b/src/iagno.vala
@@ -96,9 +96,23 @@ public class Iagno : Gtk.Application
else if (settings.get_boolean ("window-is-maximized"))
window.maximize ();
+ var image = new Gtk.Image ();
+ image.icon_size = Gtk.IconSize.BUTTON;
+ if (Gtk.Widget.get_default_direction () == Gtk.TextDirection.RTL)
+ image.icon_name = "edit-undo-rtl-symbolic";
+ else
+ image.icon_name = "edit-undo-symbolic";
+
+ var undo_button = new Gtk.Button ();
+ undo_button.image = image;
+ undo_button.valign = Gtk.Align.CENTER;
+ undo_button.action_name = "app.undo-move";
+ undo_button.show ();
+
headerbar = new Gtk.HeaderBar ();
headerbar.show_close_button = true;
headerbar.set_title (_("Iagno"));
+ headerbar.pack_start (undo_button);
headerbar.show ();
window.set_titlebar (headerbar);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]