Module gwy :: Class ResourceEditor
[show private | hide private]
[frames | no frames]

Class ResourceEditor


Method Summary
  commit()
Commits pending resource changes, if there are any.
  get_edited()
Gets the currently edited resource.
  queue_commit()
Queues commit of resource changes, marking the currently edited resource `dirty'.
  setup()
Sets up particular resource editor.

Method Details

commit()

Commits pending resource changes, if there are any.

It calls apply_changes method first (if it exists), then saves resource to disk.

Changes are always immediately committed (if there are any pending): before the editor is destroyed, when a resource stops being edited, before a resource is deleted, before a resource is renamed. When a resource is newly created, it is immediately created on disk too.
Returns:
Always False (to be usable as GSourceFunc).

get_edited()

Gets the currently edited resource.

It is an error to call this method when no resource is being edited.
Returns:
The currently edited resource.

queue_commit()

Queues commit of resource changes, marking the currently edited resource `dirty'.

Call this method in particular resource editor subclass whenever user changes some editor property.

To flush pending commit, call Resource.editor_commit(). To immediately commit a change, call this method and then Resource.editor_commit().

setup()

Sets up particular resource editor.

Helper method only intended for resource editor implementation. To be called in particular resource initialization methods.

Generated by Epydoc 2.1 on Tue Dec 30 04:01:41 2008 http://epydoc.sf.net