[shotwell] Allow CCW rotation by ctrl-Space on tool button
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Allow CCW rotation by ctrl-Space on tool button
- Date: Wed, 8 Mar 2017 21:02:00 +0000 (UTC)
commit 764d257bd4e532b858c4338b6c52e69125505856
Author: Jens Georg <mail jensge org>
Date: Wed Mar 8 22:01:06 2017 +0100
Allow CCW rotation by ctrl-Space on tool button
Signed-off-by: Jens Georg <mail jensge org>
https://bugzilla.gnome.org/show_bug.cgi?id=715501
src/CollectionPage.vala | 6 ++++++
src/PhotoPage.vala | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/CollectionPage.vala b/src/CollectionPage.vala
index df39f64..3434b13 100644
--- a/src/CollectionPage.vala
+++ b/src/CollectionPage.vala
@@ -63,6 +63,12 @@ public abstract class CollectionPage : MediaPage {
MediaPage.ZoomSliderAssembly zoom_slider_assembly = create_zoom_slider_assembly();
connect_slider(zoom_slider_assembly);
get_toolbar().insert(zoom_slider_assembly, -1);
+
+ Gtk.ToolButton? rotate_button = this.builder.get_object ("ToolRotate") as Gtk.ToolButton;
+ unowned Gtk.BindingSet binding_set = Gtk.BindingSet.by_class(rotate_button.get_class());
+ Gtk.BindingEntry.add_signal(binding_set, Gdk.Key.KP_Space, Gdk.ModifierType.CONTROL_MASK,
"clicked", 0);
+ Gtk.BindingEntry.add_signal(binding_set, Gdk.Key.space, Gdk.ModifierType.CONTROL_MASK,
"clicked", 0);
+
}
return toolbar;
diff --git a/src/PhotoPage.vala b/src/PhotoPage.vala
index 5c182a8..9bed855 100644
--- a/src/PhotoPage.vala
+++ b/src/PhotoPage.vala
@@ -440,6 +440,9 @@ public abstract class EditingHostPage : SinglePhotoPage {
rotate_button.clicked.connect(on_rotate_clockwise);
rotate_button.is_important = true;
toolbar.insert(rotate_button, -1);
+ unowned Gtk.BindingSet binding_set = Gtk.BindingSet.by_class(rotate_button.get_class());
+ Gtk.BindingEntry.add_signal(binding_set, Gdk.Key.KP_Space, Gdk.ModifierType.CONTROL_MASK, "clicked",
0);
+ Gtk.BindingEntry.add_signal(binding_set, Gdk.Key.space, Gdk.ModifierType.CONTROL_MASK, "clicked", 0);
// crop tool
crop_button = new Gtk.ToggleToolButton ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]