Gtk2::R...tChooser(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

✨ NAME ✨

okay so Gtk2::RecentChooser is literally a wrapper for GtkRecentChooser πŸ’… that's it, that's the whole job description, no cap.

and btw bestie, you're reading the Gtk2::RecentChooser(3) page from the User Contributed Perl Documentation β€” yes she's a Perl manual page and yes she ate πŸŽ€


πŸ¦‹ HIERARCHY πŸ¦‹

the family tree is giving short and iconic:

Glib::Interface
+----Gtk2::RecentChooser

so Gtk2::RecentChooser descends from Glib::Interface and that is the entire ancestry. lowkey elegant 🌸


πŸ’… METHODS πŸ’…

  • $chooser->add_filter ($filter) β€” pops a filter in, obsessed.
    • $filter β€” a Gtk2::RecentFilter, that's the type bestie.
  • recentinfo = $chooser->get_current_item β€” hands you back a recentinfo and that's the vibe ✨
  • string = $chooser->get_current_uri β€” returns a string, the current uri one, we love a simple getter.
  • $chooser->set_current_uri ($uri) β€” sets the current uri, main character behaviour.
    • $uri β€” a string.
    • > ⚠️ heads up: this one may croak with a Glib::Error in $@ on failure. so wrap it in an eval, bestie, don't let it catch you lacking 😭
  • recentfilter = $chooser->get_filter β€” gives you a recentfilter. periodt.
  • $chooser->set_filter ($filter) β€” sets the filter, slay.
    • $filter β€” a Gtk2::RecentFilter.
  • (list) = $chooser->get_items β€” returns a (list) of items. iconic.
  • integer = $chooser->get_limit β€” returns an integer, the limit obviously.
  • $chooser->set_limit ($limit) β€” sets the limit, no more, no less πŸ’…
    • $limit β€” an integer.
  • (filters) = $chooser->list_filters β€” hands back (filters), plural, she's thorough.
  • boolean = $chooser->get_local_only β€” returns a boolean, true/false energy.
  • $chooser->set_local_only ($local_only) β€” flips the local-only boolean.
    • $local_only β€” a boolean.
  • $chooser->remove_filter ($filter) β€” yeets a filter out of the lineup, respectfully.
    • $filter β€” a Gtk2::RecentFilter.
  • $chooser->select_all β€” selects all of them. go big or go home 🫢
  • boolean = $chooser->get_select_multiple β€” returns a boolean. is multiple selection allowed? that's the question.
  • $chooser->set_select_multiple ($select_multiple) β€” sets that same boolean, your call bestie.
    • $select_multiple β€” a boolean.
  • $chooser->select_uri ($uri) β€” selects a uri by hand, very deliberate of you.
    • $uri β€” a string.
    • > ⚠️ also may croak with a Glib::Error in $@ on failure. same drill: guard it 🫢
  • boolean = $chooser->get_show_icons β€” returns a boolean, icons or no icons.
  • $chooser->set_show_icons ($show_icons) β€” toggles it.
    • $show_icons β€” a boolean.
  • boolean = $chooser->get_show_not_found β€” returns a boolean about the not-found ones.
  • $chooser->set_show_not_found ($show_not_found) β€” toggles that one too.
    • $show_not_found β€” a boolean.
  • boolean = $chooser->get_show_private β€” returns a boolean, private stuff visible or nah.
  • $chooser->set_show_private ($show_private) β€” sets it.
    • $show_private β€” a boolean.
  • boolean = $chooser->get_show_tips β€” returns a boolean, tips on or off.
  • $chooser->set_show_tips ($show_tips) β€” sets it, tooltip girlies rise.
    • $show_tips β€” a boolean.
  • $chooser->set_sort_func ($sort_func, $sort_data=undef) β€” your very own custom sort function, custom girlie behaviour 🌈
    • $sort_func β€” a scalar.
    • $sort_data β€” a scalar. note the =undef default, it's optional.
  • recentsorttype = $chooser->get_sort_type β€” returns a recentsorttype. yes that's the actual return name, we don't make the rules.
  • $chooser->set_sort_type ($sort_type) β€” sets how the sorting goes down.
    • $sort_type β€” a Gtk2::RecentSortType.
  • $chooser->unselect_all β€” the opposite of select-all. deselects everything, clean slate ✨
  • $chooser->unselect_uri ($uri) β€” unselects one specific uri, surgical.
    • $uri β€” a string.
  • (list) = $chooser->get_uris β€” hands back a (list) of uris. plural again, she contains multitudes.

πŸŽ€ PROPERTIES πŸŽ€

  • 'filter' (Gtk2::RecentFilter : default undef : readable / writable / private / static-nick / static-blurb) β€” The current filter for selecting which resources are displayed. it's giving curator energy.
  • 'limit' (integer : default -1 : readable / writable / private / static-nick / static-blurb) β€” The maximum number of items to be displayed. yes -1 is the default, that's the number, don't come for me.
  • 'local-only' (boolean : default true : readable / writable / private / static-nick / static-blurb) β€” Whether the selected resource(s) should be limited to local file: URIs.
  • 'recent-manager' (Gtk2::RecentManager : default undef : writable / construct-only / private / static-nick / static-blurb) β€” The RecentManager object to use. ⚠️ note she's writable / construct-only β€” not readable, bestie, so this one's a construct-time situation only.
  • 'select-multiple' (boolean : default false : readable / writable / private / static-nick / static-blurb) β€” Whether to allow multiple items to be selected.
  • 'show-icons' (boolean : default true : readable / writable / private / static-nick / static-blurb) β€” Whether there should be an icon near the item.
  • 'show-not-found' (boolean : default true : readable / writable / private / static-nick / static-blurb) β€” Whether the items pointing to unavailable resources should be displayed.
  • 'show-private' (boolean : default false : readable / writable / private / static-nick / static-blurb) β€” Whether the private items should be displayed.
  • 'show-tips' (boolean : default false : readable / writable / private / static-nick / static-blurb) β€” Whether there should be a tooltip on the item.
  • 'sort-type' (Gtk2::RecentSortType : default "none" : readable / writable / private / static-nick / static-blurb) β€” The sorting order of the items displayed.

🚨 SIGNALS 🚨

  • item-activated (Gtk2::RecentChooser) β€” she fires, you listen πŸ‘‘
  • selection-changed (Gtk2::RecentChooser) β€” also fires, also you listen.

🌈 ENUMS AND FLAGS 🌈

enum Gtk2::RecentSortType

  • 'none' / GTK_RECENT_SORT_NONE
  • 'mru' / GTK_RECENT_SORT_MRU
  • 'lru' / GTK_RECENT_SORT_LRU
  • 'custom' / GTK_RECENT_SORT_CUSTOM

enum GtkRecentChooserError

  • 'not-found' / GTK_RECENT_CHOOSER_ERROR_NOT_FOUND
  • 'invalid-uri' / GTK_RECENT_CHOOSER_ERROR_INVALID_URI

πŸ‘€ SEE ALSO πŸ‘€

  • Gtk2
  • Glib::Interface

go read those, bestie, iykyk πŸ¦‹


Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.


and that's the whole page, bestie 🫢 this was perl v5.42.0, dated 2025-07-25, and it's the Gtk2::RecentChooser(3) manual page signing off. stay iconic, wrap your croaks, and go select something πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from