summaryrefslogtreecommitdiff
path: root/src/reorder-pages-dialog.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2024-07-21 19:58:31 +0200
committerJörg Frings-Fürst <debian@jff.email>2024-07-21 19:58:31 +0200
commit5a514d891db203b803a37c2110184f537fcd5608 (patch)
tree0c85f179d5cfeb471f3227bd4a94998e3aaf4ee1 /src/reorder-pages-dialog.vala
parent408791709f23be34de957320384d02b228ea488f (diff)
parent35c7b263d4fc6910be51005193095cfbdeaa969a (diff)
Merge branch 'release/debian/46.0-1'HEADdebian/46.0-1master
Diffstat (limited to 'src/reorder-pages-dialog.vala')
-rw-r--r--src/reorder-pages-dialog.vala60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/reorder-pages-dialog.vala b/src/reorder-pages-dialog.vala
new file mode 100644
index 0000000..eb249ca
--- /dev/null
+++ b/src/reorder-pages-dialog.vala
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2023 Bartłomiej Maryńczak
+ * Author: Bartłomiej Maryńczak <marynczakbartlomiej@gmail.com>,
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
+ * license.
+ */
+
+[GtkTemplate (ui = "/org/gnome/SimpleScan/ui/reorder-pages-item.ui")]
+private class ReorderPagesItem : Gtk.Button
+{
+ [GtkChild]
+ private unowned Gtk.Label title;
+ [GtkChild]
+ private unowned Gtk.Image before_image;
+ [GtkChild]
+ private unowned Gtk.Image after_image;
+
+ public new string label
+ {
+ get { return title.label; }
+ set { title.label = value; }
+ }
+
+ public string before
+ {
+ get { return before_image.get_icon_name (); }
+ set { before_image.icon_name = value; }
+ }
+
+ public string after
+ {
+ get { return after_image.get_icon_name (); }
+ set { after_image.icon_name = value; }
+ }
+}
+
+
+[GtkTemplate (ui = "/org/gnome/SimpleScan/ui/reorder-pages-dialog.ui")]
+private class ReorderPagesDialog : Gtk.Window
+{
+ [GtkChild]
+ public unowned ReorderPagesItem combine_sides;
+ [GtkChild]
+ public unowned ReorderPagesItem combine_sides_rev;
+ [GtkChild]
+ public unowned ReorderPagesItem flip_odd;
+ [GtkChild]
+ public unowned ReorderPagesItem flip_even;
+ [GtkChild]
+ public unowned ReorderPagesItem reverse;
+
+ public ReorderPagesDialog ()
+ {
+ add_binding_action (Gdk.Key.Escape, 0, "window.close", null);
+ }
+}