gtk.RecentChooserDialog

gtk.RecentChooserDialog — Displays recently used files in a dialog (new in PyGTK 2.10)

Synopsis

class gtk.RecentChooserDialog(gtk.Dialog, gtk.RecentChooser):
    gtk.RecentChooserDialog(title=None, parent=None, manager=None, buttons=None)

Ancestry

+-- gobject.GObject
  +-- gtk.Object
    +-- gtk.Widget
      +-- gtk.Container
        +-- gtk.Bin
          +-- gtk.Window
            +-- gtk.Dialog
              +-- gtk.RecentChooserDialog (implements gtk.RecentChooser)

gtk.RecentChooserDialog Properties

gtk.RecentChooser Properties

gtk.Object Properties

gtk.Widget Properties

gtk.Container Properties

gtk.Window Properties

gtk.Dialog Properties

gtk.RecentChooserDialog Style Properties

gtk.Widget Style Properties

gtk.Dialog Style Properties

gtk.RecentChooserDialog Signal Prototypes

gobject.GObject Signal Prototypes

gtk.Object Signal Prototypes

gtk.Widget Signal Prototypes

gtk.Container Signal Prototypes

gtk.Window Signal Prototypes

gtk.Dialog Signal Prototypes

gtk.RecentChooser Signal Prototypes

Description

gtk.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.

Example 4. Typical usage

In 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.

Constructor

gtk.RecentChooserDialog

    gtk.RecentChooserDialog(title=None, parent=None, manager=None, buttons=None)
title :Title of the dialog, or None
parent :Transient parent of the dialog, or None,
manager :a gtk.RecentManager, or None,
buttons :a sequence of text-response pairs
Returns :a new gtk.RecentChooserDialog

Note

This 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 GTK Response Type Constants. This constructor is analogous to gtk.Dialog.