Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Suggestions ➜ movewindow very first run coordinates

movewindow very first run coordinates

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Fiendish   USA  (2,558 posts)  Bio   Global Moderator
Date Fri 08 Jul 2011 06:49 AM (UTC)

Amended on Fri 08 Jul 2011 03:24 PM (UTC) by Fiendish

Message
It seemed silly to me that movewindow didn't have a mechanism for specifying the exact initial location, so I made the following modification.


@@ -289,7 +289,7 @@
 -- call movewindow.install in OnPluginInstall to find the position of the window, before creating it
 --  - it also creates the handler functions ready for use later
 
-function movewindow.install (win, default_position, default_flags, nocheck, friends, preprocess)
+function movewindow.install (win, default_position, default_flags, nocheck, friends, preprocess, start_position)
 
   win = win or GetPluginID ()  -- default to current plugin ID
   
@@ -303,8 +303,8 @@
      win = win,   -- save window ID
      
      -- save current position in table (obtained from state file)
-     window_left  = tonumber (GetVariable ("mw_" .. win .. "_windowx")) or 0,
-     window_top   = tonumber (GetVariable ("mw_" .. win .. "_windowy")) or 0,
+     window_left  = tonumber (GetVariable ("mw_" .. win .. "_windowx")) or (start_position and start_position.x) or 0,
+     window_top   = tonumber (GetVariable ("mw_" .. win .. "_windowy")) or (start_position and start_position.y) or 0,
      window_mode  = tonumber (GetVariable ("mw_" .. win .. "_windowmode")) or default_position,
      window_flags = tonumber (GetVariable ("mw_" .. win .. "_windowflags")) or default_flags,
      window_friends = friends or {},

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 10 Jul 2011 10:29 PM (UTC)
Message
Good idea, added to version 4.76.

[master 504a387]

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


8,744 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.