gtk.RecentChooserDialogDisplays recently used files in a dialog (new in PyGTK
2.10)Synopsisgtk.RecentChooserDialoggtk.Dialoggtk.RecentChoosergtk.RecentChooserDialogtitleNoneparentNonemanagerNonebuttonsNoneAncestry+-- gobject.GObject
+-- gtk.Object
+-- gtk.Widget
+-- gtk.Container
+-- gtk.Bin
+-- gtk.Window
+-- gtk.Dialog
+-- gtk.RecentChooserDialog
Implemented Interfacesgtk.RecentChooserDialog
implements
gtk.Buildablegtk.RecentChoosergtk.RecentChooserDialog Propertiesgtk.RecentChooser Propertiesgtk.Object Propertiesgtk.Widget Propertiesgtk.Container Propertiesgtk.Window Propertiesgtk.Dialog Propertiesgtk.RecentChooserDialog Style Propertiesgtk.Widget Style Propertiesgtk.Dialog Style Propertiesgtk.RecentChooserDialog Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.Widget Signal Prototypesgtk.Container Signal Prototypesgtk.Window Signal Prototypesgtk.Dialog Signal Prototypesgtk.RecentChooser Signal PrototypesDescriptiongtk.RecentChooserDialog
is a dialog box suitable for displaying the recently used documents.
This widgets works by putting a gtk.RecentChooserWidget
inside a gtk.Dialog. It
exposes the gtk.RecentChooser
interface, so you can use all the gtk.RecentChooser
methods on the recent chooser dialog as well as those for gtk.Dialog.Note that gtk.RecentChooserDialog
does not have any methods of its own. Instead, you should use the
methods that work on a gtk.RecentChooser.Typical usageIn the simplest of cases, you can use the following code to use
a gtk.RecentChooserDialog
to select a recently used file:
dialog = gtk.RecentChooserDialog("Recent Documents", parent_window, None,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
gtk.STOCK_OPEN, gtk.RESPONSE_ACCEPT))
if dialog.run() == gtk.RESPONSE_ACCEPT:
info = dialog.get_current_item ()
open_file(info.get_uri())
dialog.destroy()
Recently used files are supported since GTK+ 2.10.Constructorgtk.RecentChooserDialoggtk.RecentChooserDialogtitleNoneparentNonemanagerNonebuttonsNonetitle :Title of the dialog, or
Noneparent :Transient parent of the dialog, or
None,manager :a gtk.RecentManager,
or None,buttons :a sequence of text-response
pairsReturns :a new gtk.RecentChooserDialogThis constructor is available in PyGTK 2.10 and above.Creates a new gtk.RecentChooserDialog
with the title text specified by title (or
None for the default title; see gtk.Window.set_title())
and transient parent window specified by parent
(or None for none; see gtk.Window.set_transient_for()).
manager specifies a gtk.RecentManager
object (or None). buttons is
a sequence of button text/response ID pairs should be listed, or
None (the default value) if no buttons are
needed. The button text can be either a stock ID such as
gtk.STOCK_OK, or some arbitrary text. A response
ID can be any positive number, or one of the pre-defined . This constructor
is analogous to gtk.Dialog.