[eog/gestures: 3/5] EogWindow: Handle EogScrollView rotation-changed signal
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog/gestures: 3/5] EogWindow: Handle EogScrollView rotation-changed signal
- Date: Wed, 13 Aug 2014 11:44:29 +0000 (UTC)
commit bb61625f073d83fad937618bfe30c078a96b4c7f
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Aug 13 13:26:54 2014 +0200
EogWindow: Handle EogScrollView rotation-changed signal
This makes sure the undo stack gets properly modified, as it happens when
clicking the "rotate" buttons in the UI.
src/eog-window.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index 52b0027..4aa4b31 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -4833,6 +4833,14 @@ eog_window_add_open_editor_action (EogWindow *window)
}
static void
+eog_window_view_rotation_changed_cb (EogScrollView *view,
+ gdouble degrees,
+ EogWindow *window)
+{
+ apply_transformation (window, eog_transform_rotate_new (degrees));
+}
+
+static void
eog_window_construct_ui (EogWindow *window)
{
EogWindowPrivate *priv;
@@ -5032,6 +5040,10 @@ eog_window_construct_ui (EogWindow *window)
priv->overlay = gtk_overlay_new();
priv->view = eog_scroll_view_new ();
+ g_signal_connect (priv->view,
+ "rotation-changed",
+ G_CALLBACK (eog_window_view_rotation_changed_cb),
+ window);
gtk_container_add (GTK_CONTAINER(priv->overlay), priv->view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]