gtk.RecentChooserMenu — Displays recently used files in a menu (new in PyGTK 2.10)


class gtk.RecentChooserMenu(gtk.Menu, gtk.RecentChooser):

def get_show_numbers()

def set_show_numbers(show_numbers)


+-- gobject.GObject
  +-- gtk.Object
    +-- gtk.Widget
      +-- gtk.Container
        +-- gtk.MenuShell
          +-- gtk.Menu
            +-- gtk.RecentChooserMenu (implements gtk.RecentChooser)

Implemented Interfaces

gtk.RecentChooserMenu implements gtk.Buildable

gtk.RecentChooserMenu Properties

gtk.RecentChooser Properties

gtk.Object Properties

gtk.Widget Properties

gtk.Container Properties

gtk.MenuShell Properties

gtk.Menu Properties

"show-numbers"Read-WriteWhether the first ten items in the menu should be prepended by a number acting as a unique mnemonic. This property is available in GTK+ 2.10 and above.

gtk.RecentChooserMenu Style Properties

gtk.Widget Style Properties

gtk.Menu Style Properties

gtk.RecentChooserMenu Child Properties

gtk.Menu Child Properties


gtk.RecentChooserMenu is a widget suitable for displaying recently used files inside a menu. It can be used to set a sub-menu of a gtk.MenuItem using gtk.MenuItem.set_submenu(), or as the menu of a gtk.MenuToolButton.

Note that gtk.RecentChooserMenu does not have any methods of its own. Instead, you should use the functions that work on a gtk.RecentChooser.

Recently used files are supported since GTK+ 2.10.




manager :

a gtk.RecentManager

Returns :

a new gtk.RecentChooserMenu, bound to manager.


This constructor is available in PyGTK 2.10 and above.

Creates a new gtk.RecentChooserMenu widget using manager as the underlying recently used resources manager.

This is useful if you have implemented your own recent manager, or if you have a customized instance of a gtk.RecentManager object or if you wish to share a common gtk.RecentManager object among multiple gtk.RecentChooser widgets.



    def get_show_numbers()

Returns :

True if numbers should be shown.


This method is available in PyGTK 2.10 and above.

Returns the value set by gtk.RecentChooserMenu.set_show_numbers().


    def set_show_numbers(show_numbers)

show_numbers :

whether to show numbers


This method is available in PyGTK 2.10 and above.

Sets whether a number should be added to the items of menu. The numbers are shown to provide a unique character for a mnemonic to be used inside the menu item's label. Only the first the items get a number to avoid clashes.