Gtk.RecentChooserMenu

const Gtk = imports.gi.Gtk;

let recent_chooser_menu = new Gtk.RecentChooserMenu({
    show_numbers: value,
});
  

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

Note also that Gtk.RecentChooserMenu does not support multiple filters, as it has no way to let the user choose between them as the Gtk.RecentChooserWidget and Gtk.RecentChooserDialog widgets do. Thus using Gtk.RecentChooser.prototype.add_filter on a Gtk.RecentChooserMenu widget will yield the same effects as using Gtk.RecentChooser.prototype.set_filter, replacing any currently set filter with the supplied filter; Gtk.RecentChooser.prototype.remove_filter will remove any currently set Gtk.RecentFilter object and will unset the current filter; Gtk.RecentChooser.prototype.list_filters will return a list containing a single Gtk.RecentFilter object.

Recently used files are supported since GTK+ 2.10.

Hierarchy

  • GObject.Object
    • GObject.InitiallyUnowned
      • Gtk.Widget
        • Gtk.Container
          • Gtk.MenuShell
            • Gtk.Menu
              • Gtk.RecentChooserMenu