new window

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

new window

WingIDE - User mailing list
Is it possible, or could it be possible, to have an
open-file-as-new-window and new-file-as-new-window options rather than
open file->right click on tab->move to new window as a convenience UI?

Thanks,

coyot

*GLENN GLAZER | /S/**/enior Software Engineer /**
m:*562.305.2920 | *email:* [hidden email]
<mailto:[hidden email]> | *Second Life:* Coyot Linden
*LINDEN LAB* | Create Virtual Experiences
_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: new window

WingIDE - User mailing list
On 2/14/17 11:24 AM, Coyot Linden (Glenn Glazer) via wingide-users wrote:
> Is it possible, or could it be possible, to have an
> open-file-as-new-window and new-file-as-new-window options rather than
> open file->right click on tab->move to new window as a convenience UI?

This can be done via Wing extensions scripts.  I think the code below
implements what you want and creates a NewWindow menu with the commands
(the names could be improved here).  To use this code, put it in a
scripts folder in your Wing settings directory listed in the Help ->
About dialog box.  More documentation about Wing extension scripts is at
https://wingware.com/doc/scripting

Cheers,

John

-------------------

import wingapi

def new_file_in_new_window():

   wingapi.gApplication.ExecuteCommand('new-document-window')
   wingapi.gApplication.ExecuteCommand('new-file')

new_file_in_new_window.contexts = [wingapi.kContextNewMenu('NewWindow')]

def open_file_in_new_window():

   wingapi.gApplication.ExecuteCommand('new-document-window')
   wingapi.gApplication.ExecuteCommand('open-gui')

open_file_in_new_window.contexts = [wingapi.kContextNewMenu('NewWindow')]


_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Loading...