summaryrefslogtreecommitdiff
path: root/src/app-window.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-09-04 18:18:13 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-09-04 18:18:13 +0200
commitb2fe70f34ddcec7550630efd5cd9f8ed9c7bada8 (patch)
tree8bb3a861dd93f3e7052d6d12d6a0b98528c7399d /src/app-window.vala
parent92a79aacbf96307f4d31f0034f5058415cc34c5c (diff)
parentfeffc9fa14d9edbd4cd924de55020c311607a8ff (diff)
Update upstream source from tag 'upstream/3.30.0'
Update to upstream version '3.30.0' with Debian dir b4810f15e03280de0ce8db7bb4647da6a4db4948
Diffstat (limited to 'src/app-window.vala')
-rw-r--r--src/app-window.vala53
1 files changed, 27 insertions, 26 deletions
diff --git a/src/app-window.vala b/src/app-window.vala
index 1475e0a..153b975 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -52,6 +52,8 @@ public class AppWindow : Gtk.ApplicationWindow
[GtkChild]
private Gtk.RadioMenuItem custom_crop_menuitem;
[GtkChild]
+ private Gtk.RadioMenuItem a3_menuitem;
+ [GtkChild]
private Gtk.RadioMenuItem a4_menuitem;
[GtkChild]
private Gtk.RadioMenuItem a5_menuitem;
@@ -762,7 +764,9 @@ public class AppWindow : Gtk.ApplicationWindow
var crop_name = page.crop_name;
if (crop_name != null)
{
- if (crop_name == "A4")
+ if (crop_name == "A3")
+ menuitem = a3_menuitem;
+ else if (crop_name == "A4")
menuitem = a4_menuitem;
else if (crop_name == "A5")
menuitem = a5_menuitem;
@@ -814,9 +818,9 @@ public class AppWindow : Gtk.ApplicationWindow
}
}
- private void show_page_menu_cb (BookView view)
+ private void show_page_menu_cb (BookView view, Gdk.Event event)
{
- page_menu.popup (null, null, null, 3, Gtk.get_current_event_time ());
+ page_menu.popup_at_pointer (event);
}
[GtkCallback]
@@ -925,6 +929,13 @@ public class AppWindow : Gtk.ApplicationWindow
}
[GtkCallback]
+ private void a3_menuitem_toggled_cb (Gtk.CheckMenuItem widget)
+ {
+ if (widget.active)
+ set_crop ("A3");
+ }
+
+ [GtkCallback]
private void crop_rotate_menuitem_activate_cb (Gtk.Widget widget)
{
var page = book_view.selected_page;
@@ -1068,7 +1079,7 @@ public class AppWindow : Gtk.ApplicationWindow
{
if (items[i] == '-')
{
- var a = new Gtk.Arrow (Gtk.ArrowType.RIGHT, Gtk.ShadowType.NONE);
+ var a = new Gtk.Label ("➤");
a.visible = true;
box.pack_start (a, false, false, 0);
page_box = null;
@@ -1561,34 +1572,24 @@ public class AppWindow : Gtk.ApplicationWindow
app.add_action_entries (action_entries, this);
- var appmenu = new Menu ();
-
- var section = new Menu ();
- appmenu.append_section (null, section);
- section.append (_("Preferences"), "app.preferences");
-
- section = new Menu ();
- appmenu.append_section (null, section);
- section.append (_("Keyboard Shortcuts"), "win.show-help-overlay");
- section.append (_("Help"), "app.help");
- section.append (_("About"), "app.about");
- section.append (_("Quit"), "app.quit");
-
- app.app_menu = appmenu;
-
- app.add_accelerator ("<Ctrl>N", "app.new_document", null);
- app.add_accelerator ("<Ctrl>S", "app.save", null);
- app.add_accelerator ("<Ctrl>E", "app.email", null);
- app.add_accelerator ("<Ctrl>P", "app.print", null);
- app.add_accelerator ("F1", "app.help", null);
- app.add_accelerator ("<Ctrl>Q", "app.quit", null);
+ app.set_accels_for_action ("app.new_document", { "<Ctrl>N" });
+ app.set_accels_for_action ("app.save", { "<Ctrl>S" });
+ app.set_accels_for_action ("app.email", { "<Ctrl>E" });
+ app.set_accels_for_action ("app.print", { "<Ctrl>P" });
+ app.set_accels_for_action ("app.help", { "F1" });
+ app.set_accels_for_action ("app.quit", { "<Ctrl>Q" });
var gear_menu = new Menu ();
- section = new Menu ();
+ var section = new Menu ();
gear_menu.append_section (null, section);
section.append (_("Email"), "app.email");
section.append (_("Reorder Pages"), "app.reorder");
+ section = new Menu ();
+ gear_menu.append_section (null, section);
section.append (_("Preferences"), "app.preferences");
+ section.append (_("Keyboard Shortcuts"), "win.show-help-overlay");
+ section.append (_("Help"), "app.help");
+ section.append (_("About"), "app.about");
menu_button.set_menu_model (gear_menu);
}
app.add_window (this);