Module IODialog
source code
Plugin provides basic dialogs for Save, Save As, Open, New, and Close
functionality. Shows a dialog for Save As and Open. Checks if the existing
document is modified before closing or overwriting it.
This is a simple plugin to get I/O up ASAP and to allow a simple editor for
those that don't need more. A more robust implementation might do things like
take care of automatically FTPing or CVSing or provide other virtual filesystem
functionality.
This plugin provides the following actions:
SaveActive
Save the active buffer. Shows a dialog to choose a filename only
if the buffer does not have one associated yet.
SaveActiveAs
Save the active buffer, showing a dialog to choose a new filename.
OpenFile
Open a file and load it into the active textview.
CloseFile
Close the active buffer.
NewFile
Create a new untitled file in the active buffer.
This plugin issues the following events:
FileSaved
When a buffer is saved
FileOpened
When a buffer is opened
FileClosed
When a buffer is closed
NewFileCreated
When a new untitled buffer is created
This plugin invokes the following actions:
SetStatusMessage
When an open or save event occurs
|
|
|
|
|
SaveActiveAs(data=None)
Prompt for a filename and save the active buffer to that file |
source code
|
|
|
OpenFile(data=None)
If data is none, prompt for filenames and load the files contents
into the active textview. |
source code
|
|
|
|
|
|
|
|
Save the active buffer to its file. If no filename has yet been
specified, prompt the saveas dialog
|
If data is none, prompt for filenames and load the files contents into
the active textview. Otherwise, assume data is a list of filenames to be
opened.
|
Close the current file and remove it from the buffer switcher. Return
true if the buffer was closed, false if it was not.
|
Create a new blank buffer in the focused textview. The old docpointer
will remain in the docSelector
|
Determine if its ok to close the document in the active textview. If
the document hasn't been modified since last save, its ok. If it has, we
ask the user if we should ignore tha changes or not. Return True if its
ok to discard the document, false otherwise.
|