[sushi] all: remove x, y coordinates from the DBus method for now



commit cbfb7cbe01231af4a21e74bb18dab9505c2850d2
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Apr 27 14:18:09 2011 -0400

    all: remove x, y coordinates from the DBus method for now

 src/js/ui/application.js |    7 +++----
 src/js/ui/mainWindow.js  |   14 +++++---------
 2 files changed, 8 insertions(+), 13 deletions(-)
---
diff --git a/src/js/ui/application.js b/src/js/ui/application.js
index 7016228..5933c06 100644
--- a/src/js/ui/application.js
+++ b/src/js/ui/application.js
@@ -21,7 +21,7 @@ const SushiIface = {
                  inSignature: '',
                  outSignature: '' },
                { name: "ShowFile",
-                 inSignature: 'siii',
+                 inSignature: 'si',
                  outSignature: '' } ],
 
     signals: [],
@@ -85,9 +85,8 @@ Application.prototype = {
     activate : function() {
     },
 
-    ShowFile : function(uri, xid, x, y) {
-        if (xid)
-            this._mainWindow.setParent(xid, x, y);
+    ShowFile : function(uri, xid) {
+        this._mainWindow.setParent(xid);
         this._mainWindow.showAll();
 
         this._mainWindow.setFile(Gio.file_new_for_uri(uri));
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index ca697ae..9ea0e0f 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -481,17 +481,13 @@ MainWindow.prototype = {
     /**************************************************************************
      ************************ public methods **********************************
      **************************************************************************/
-    setParent : function(xid, x, y) {
-        let parent = Sushi.create_foreign_window(xid);
-        let root_x, root_y;
-        [ root_x, root_y ] = parent.get_root_origin();
+    setParent : function(xid) {
+        this._parent = Sushi.create_foreign_window(xid);
 
-        if (!this._gtkWindow.get_realized())
+        if (!this._gtkWindow.get_realized()) {
             this._gtkWindow.realize();
-
-        this._gtkWindow.get_window().set_transient_for(parent);
-        this._gtkWindow.move(root_x + x,
-                             root_y + y);
+            this._gtkWindow.get_window().set_transient_for(this._parent);
+        }
     },
 
     showAll : function() {



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