[the-board] [ui] Trigger model save after moving or resizing Thing



commit 221bbf90ac02fe02f4f5c32b0a3f1ea1059cc88b
Author: Lucas Rocha <lucasr gnome org>
Date:   Mon Nov 22 13:05:18 2010 +0000

    [ui] Trigger model save after moving or resizing Thing
    
    Fixes regression when we started using clutter actions instead of custom
    code.

 src/js/ui/thing.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/js/ui/thing.js b/src/js/ui/thing.js
index dced758..13bbe18 100644
--- a/src/js/ui/thing.js
+++ b/src/js/ui/thing.js
@@ -152,6 +152,8 @@ Thing.prototype = {
                            Lang.bind(this, this._onResizeButtonDragMotion));
         dragAction.connect("drag-begin",
                            Lang.bind(this, this._onResizeButtonDragBegin));
+        dragAction.connect("drag-end",
+                           Lang.bind(this, this._onResizeButtonDragEnd));
 
         this._resizeButton.add_action(dragAction);
 
@@ -249,6 +251,7 @@ Thing.prototype = {
 
     _onMainBoxDragEnd : function(action, actor, eventX, eventY, modifiers) {
         this.emit("drag-end");
+        this.emit("save");
     },
 
     _onMainBoxEnterEvent : function() {
@@ -277,6 +280,10 @@ Thing.prototype = {
         action.dragHandle = actor;
     },
 
+    _onResizeButtonDragEnd : function(action, actor, eventX, eventY, modifiers) {
+        this.emit("save");
+    },
+
     enter : function() {
         // do nothing by default
     },



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]