Skip to main content

gtk/auto/
recent_chooser_dialog.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{
6    Align, Application, Bin, Buildable, Container, Dialog, RecentChooser, RecentFilter,
7    RecentManager, RecentSortType, ResizeMode, Widget, Window, WindowPosition, WindowType, ffi,
8};
9use glib::prelude::*;
10
11glib::wrapper! {
12    ///
13    /// GtkWidget *dialog;
14    /// gint res;
15    ///
16    /// dialog = gtk_recent_chooser_dialog_new ("Recent Documents",
17    ///  parent_window,
18    ///  _("_Cancel"),
19    ///  GTK_RESPONSE_CANCEL,
20    ///  _("_Open"),
21    ///  GTK_RESPONSE_ACCEPT,
22    ///  NULL);
23    ///
24    /// res = gtk_dialog_run (GTK_DIALOG (dialog));
25    /// if (res == GTK_RESPONSE_ACCEPT)
26    ///  {
27    ///  GtkRecentInfo *info;
28    ///  GtkRecentChooser *chooser = GTK_RECENT_CHOOSER (dialog);
29    ///
30    ///  info = gtk_recent_chooser_get_current_item (chooser);
31    ///  open_file (gtk_recent_info_get_uri (info));
32    ///  gtk_recent_info_unref (info);
33    ///  }
34    ///
35    /// gtk_widget_destroy (dialog);
36    /// ]|
37    ///
38    /// Recently used files are supported since GTK+ 2.10.
39    ///
40    /// # Implements
41    ///
42    /// [`DialogExt`][trait@crate::prelude::DialogExt], [`GtkWindowExt`][trait@crate::prelude::GtkWindowExt], [`BinExt`][trait@crate::prelude::BinExt], [`ContainerExt`][trait@crate::prelude::ContainerExt], [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`RecentChooserExt`][trait@crate::prelude::RecentChooserExt], [`DialogExtManual`][trait@crate::prelude::DialogExtManual], [`GtkWindowExtManual`][trait@crate::prelude::GtkWindowExtManual], [`ContainerExtManual`][trait@crate::prelude::ContainerExtManual], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`BuildableExtManual`][trait@crate::prelude::BuildableExtManual]
43    #[doc(alias = "GtkRecentChooserDialog")]
44    pub struct RecentChooserDialog(Object<ffi::GtkRecentChooserDialog, ffi::GtkRecentChooserDialogClass>) @extends Dialog, Window, Bin, Container, Widget, @implements Buildable, RecentChooser;
45
46    match fn {
47        type_ => || ffi::gtk_recent_chooser_dialog_get_type(),
48    }
49}
50
51impl RecentChooserDialog {
52    pub const NONE: Option<&'static RecentChooserDialog> = None;
53
54    //#[doc(alias = "gtk_recent_chooser_dialog_new")]
55    //pub fn new(title: Option<&str>, parent: Option<&impl IsA<Window>>, first_button_text: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> RecentChooserDialog {
56    //    unsafe { TODO: call ffi:gtk_recent_chooser_dialog_new() }
57    //}
58
59    //#[doc(alias = "gtk_recent_chooser_dialog_new_for_manager")]
60    //#[doc(alias = "new_for_manager")]
61    //pub fn for_manager(title: Option<&str>, parent: Option<&impl IsA<Window>>, manager: &impl IsA<RecentManager>, first_button_text: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> RecentChooserDialog {
62    //    unsafe { TODO: call ffi:gtk_recent_chooser_dialog_new_for_manager() }
63    //}
64
65    // rustdoc-stripper-ignore-next
66    /// Creates a new builder-pattern struct instance to construct [`RecentChooserDialog`] objects.
67    ///
68    /// This method returns an instance of [`RecentChooserDialogBuilder`](crate::builders::RecentChooserDialogBuilder) which can be used to create [`RecentChooserDialog`] objects.
69    pub fn builder() -> RecentChooserDialogBuilder {
70        RecentChooserDialogBuilder::new()
71    }
72}
73
74impl Default for RecentChooserDialog {
75    fn default() -> Self {
76        glib::object::Object::new::<Self>()
77    }
78}
79
80// rustdoc-stripper-ignore-next
81/// A [builder-pattern] type to construct [`RecentChooserDialog`] objects.
82///
83/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
84#[must_use = "The builder must be built to be used"]
85pub struct RecentChooserDialogBuilder {
86    builder: glib::object::ObjectBuilder<'static, RecentChooserDialog>,
87}
88
89impl RecentChooserDialogBuilder {
90    fn new() -> Self {
91        Self {
92            builder: glib::object::Object::builder(),
93        }
94    }
95
96    /// [`true`] if the dialog uses a [`HeaderBar`][crate::HeaderBar] for action buttons
97    /// instead of the action-area.
98    ///
99    /// For technical reasons, this property is declared as an integer
100    /// property, but you should only set it to [`true`] or [`false`].
101    pub fn use_header_bar(self, use_header_bar: i32) -> Self {
102        Self {
103            builder: self.builder.property("use-header-bar", use_header_bar),
104        }
105    }
106
107    /// Whether the window should receive the input focus.
108    pub fn accept_focus(self, accept_focus: bool) -> Self {
109        Self {
110            builder: self.builder.property("accept-focus", accept_focus),
111        }
112    }
113
114    /// The [`Application`][crate::Application] associated with the window.
115    ///
116    /// The application will be kept alive for at least as long as it
117    /// has any windows associated with it (see [`ApplicationExtManual::hold()`][crate::gio::prelude::ApplicationExtManual::hold()]
118    /// for a way to keep it alive without windows).
119    ///
120    /// Normally, the connection between the application and the window
121    /// will remain until the window is destroyed, but you can explicitly
122    /// remove it by setting the :application property to [`None`].
123    pub fn application(self, application: &impl IsA<Application>) -> Self {
124        Self {
125            builder: self
126                .builder
127                .property("application", application.clone().upcast()),
128        }
129    }
130
131    /// The widget to which this window is attached.
132    /// See [`GtkWindowExt::set_attached_to()`][crate::prelude::GtkWindowExt::set_attached_to()].
133    ///
134    /// Examples of places where specifying this relation is useful are
135    /// for instance a [`Menu`][crate::Menu] created by a [`ComboBox`][crate::ComboBox], a completion
136    /// popup window created by [`Entry`][crate::Entry] or a typeahead search entry
137    /// created by [`TreeView`][crate::TreeView].
138    pub fn attached_to(self, attached_to: &impl IsA<Widget>) -> Self {
139        Self {
140            builder: self
141                .builder
142                .property("attached-to", attached_to.clone().upcast()),
143        }
144    }
145
146    /// Whether the window should be decorated by the window manager.
147    pub fn decorated(self, decorated: bool) -> Self {
148        Self {
149            builder: self.builder.property("decorated", decorated),
150        }
151    }
152
153    pub fn default_height(self, default_height: i32) -> Self {
154        Self {
155            builder: self.builder.property("default-height", default_height),
156        }
157    }
158
159    pub fn default_width(self, default_width: i32) -> Self {
160        Self {
161            builder: self.builder.property("default-width", default_width),
162        }
163    }
164
165    /// Whether the window frame should have a close button.
166    pub fn deletable(self, deletable: bool) -> Self {
167        Self {
168            builder: self.builder.property("deletable", deletable),
169        }
170    }
171
172    pub fn destroy_with_parent(self, destroy_with_parent: bool) -> Self {
173        Self {
174            builder: self
175                .builder
176                .property("destroy-with-parent", destroy_with_parent),
177        }
178    }
179
180    /// Whether the window should receive the input focus when mapped.
181    pub fn focus_on_map(self, focus_on_map: bool) -> Self {
182        Self {
183            builder: self.builder.property("focus-on-map", focus_on_map),
184        }
185    }
186
187    /// Whether 'focus rectangles' are currently visible in this window.
188    ///
189    /// This property is maintained by GTK+ based on user input
190    /// and should not be set by applications.
191    pub fn focus_visible(self, focus_visible: bool) -> Self {
192        Self {
193            builder: self.builder.property("focus-visible", focus_visible),
194        }
195    }
196
197    /// The window gravity of the window. See [`GtkWindowExt::move_()`][crate::prelude::GtkWindowExt::move_()] and [`gdk::Gravity`][crate::gdk::Gravity] for
198    /// more details about window gravity.
199    pub fn gravity(self, gravity: gdk::Gravity) -> Self {
200        Self {
201            builder: self.builder.property("gravity", gravity),
202        }
203    }
204
205    /// Whether the titlebar should be hidden during maximization.
206    pub fn hide_titlebar_when_maximized(self, hide_titlebar_when_maximized: bool) -> Self {
207        Self {
208            builder: self
209                .builder
210                .property("hide-titlebar-when-maximized", hide_titlebar_when_maximized),
211        }
212    }
213
214    pub fn icon(self, icon: &gdk_pixbuf::Pixbuf) -> Self {
215        Self {
216            builder: self.builder.property("icon", icon.clone()),
217        }
218    }
219
220    /// The :icon-name property specifies the name of the themed icon to
221    /// use as the window icon. See [`IconTheme`][crate::IconTheme] for more details.
222    pub fn icon_name(self, icon_name: impl Into<glib::GString>) -> Self {
223        Self {
224            builder: self.builder.property("icon-name", icon_name.into()),
225        }
226    }
227
228    /// Whether mnemonics are currently visible in this window.
229    ///
230    /// This property is maintained by GTK+ based on user input,
231    /// and should not be set by applications.
232    pub fn mnemonics_visible(self, mnemonics_visible: bool) -> Self {
233        Self {
234            builder: self
235                .builder
236                .property("mnemonics-visible", mnemonics_visible),
237        }
238    }
239
240    pub fn modal(self, modal: bool) -> Self {
241        Self {
242            builder: self.builder.property("modal", modal),
243        }
244    }
245
246    pub fn resizable(self, resizable: bool) -> Self {
247        Self {
248            builder: self.builder.property("resizable", resizable),
249        }
250    }
251
252    pub fn role(self, role: impl Into<glib::GString>) -> Self {
253        Self {
254            builder: self.builder.property("role", role.into()),
255        }
256    }
257
258    pub fn screen(self, screen: &gdk::Screen) -> Self {
259        Self {
260            builder: self.builder.property("screen", screen.clone()),
261        }
262    }
263
264    pub fn skip_pager_hint(self, skip_pager_hint: bool) -> Self {
265        Self {
266            builder: self.builder.property("skip-pager-hint", skip_pager_hint),
267        }
268    }
269
270    pub fn skip_taskbar_hint(self, skip_taskbar_hint: bool) -> Self {
271        Self {
272            builder: self
273                .builder
274                .property("skip-taskbar-hint", skip_taskbar_hint),
275        }
276    }
277
278    /// The :startup-id is a write-only property for setting window's
279    /// startup notification identifier. See [`GtkWindowExt::set_startup_id()`][crate::prelude::GtkWindowExt::set_startup_id()]
280    /// for more details.
281    pub fn startup_id(self, startup_id: impl Into<glib::GString>) -> Self {
282        Self {
283            builder: self.builder.property("startup-id", startup_id.into()),
284        }
285    }
286
287    pub fn title(self, title: impl Into<glib::GString>) -> Self {
288        Self {
289            builder: self.builder.property("title", title.into()),
290        }
291    }
292
293    /// The transient parent of the window. See [`GtkWindowExt::set_transient_for()`][crate::prelude::GtkWindowExt::set_transient_for()] for
294    /// more details about transient windows.
295    pub fn transient_for(self, transient_for: &impl IsA<Window>) -> Self {
296        Self {
297            builder: self
298                .builder
299                .property("transient-for", transient_for.clone().upcast()),
300        }
301    }
302
303    pub fn type_(self, type_: WindowType) -> Self {
304        Self {
305            builder: self.builder.property("type", type_),
306        }
307    }
308
309    pub fn type_hint(self, type_hint: gdk::WindowTypeHint) -> Self {
310        Self {
311            builder: self.builder.property("type-hint", type_hint),
312        }
313    }
314
315    pub fn urgency_hint(self, urgency_hint: bool) -> Self {
316        Self {
317            builder: self.builder.property("urgency-hint", urgency_hint),
318        }
319    }
320
321    pub fn window_position(self, window_position: WindowPosition) -> Self {
322        Self {
323            builder: self.builder.property("window-position", window_position),
324        }
325    }
326
327    pub fn border_width(self, border_width: u32) -> Self {
328        Self {
329            builder: self.builder.property("border-width", border_width),
330        }
331    }
332
333    pub fn child(self, child: &impl IsA<Widget>) -> Self {
334        Self {
335            builder: self.builder.property("child", child.clone().upcast()),
336        }
337    }
338
339    pub fn resize_mode(self, resize_mode: ResizeMode) -> Self {
340        Self {
341            builder: self.builder.property("resize-mode", resize_mode),
342        }
343    }
344
345    pub fn app_paintable(self, app_paintable: bool) -> Self {
346        Self {
347            builder: self.builder.property("app-paintable", app_paintable),
348        }
349    }
350
351    pub fn can_default(self, can_default: bool) -> Self {
352        Self {
353            builder: self.builder.property("can-default", can_default),
354        }
355    }
356
357    pub fn can_focus(self, can_focus: bool) -> Self {
358        Self {
359            builder: self.builder.property("can-focus", can_focus),
360        }
361    }
362
363    pub fn events(self, events: gdk::EventMask) -> Self {
364        Self {
365            builder: self.builder.property("events", events),
366        }
367    }
368
369    /// Whether to expand in both directions. Setting this sets both [`hexpand`][struct@crate::Widget#hexpand] and [`vexpand`][struct@crate::Widget#vexpand]
370    pub fn expand(self, expand: bool) -> Self {
371        Self {
372            builder: self.builder.property("expand", expand),
373        }
374    }
375
376    /// Whether the widget should grab focus when it is clicked with the mouse.
377    ///
378    /// This property is only relevant for widgets that can take focus.
379    ///
380    /// Before 3.20, several widgets (GtkButton, GtkFileChooserButton,
381    /// GtkComboBox) implemented this property individually.
382    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
383        Self {
384            builder: self.builder.property("focus-on-click", focus_on_click),
385        }
386    }
387
388    /// How to distribute horizontal space if widget gets extra space, see [`Align`][crate::Align]
389    pub fn halign(self, halign: Align) -> Self {
390        Self {
391            builder: self.builder.property("halign", halign),
392        }
393    }
394
395    pub fn has_default(self, has_default: bool) -> Self {
396        Self {
397            builder: self.builder.property("has-default", has_default),
398        }
399    }
400
401    pub fn has_focus(self, has_focus: bool) -> Self {
402        Self {
403            builder: self.builder.property("has-focus", has_focus),
404        }
405    }
406
407    /// Enables or disables the emission of [`query-tooltip`][struct@crate::Widget#query-tooltip] on `widget`.
408    /// A value of [`true`] indicates that `widget` can have a tooltip, in this case
409    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to determine
410    /// whether it will provide a tooltip or not.
411    ///
412    /// Note that setting this property to [`true`] for the first time will change
413    /// the event masks of the GdkWindows of this widget to include leave-notify
414    /// and motion-notify events. This cannot and will not be undone when the
415    /// property is set to [`false`] again.
416    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
417        Self {
418            builder: self.builder.property("has-tooltip", has_tooltip),
419        }
420    }
421
422    pub fn height_request(self, height_request: i32) -> Self {
423        Self {
424            builder: self.builder.property("height-request", height_request),
425        }
426    }
427
428    /// Whether to expand horizontally. See [`WidgetExt::set_hexpand()`][crate::prelude::WidgetExt::set_hexpand()].
429    pub fn hexpand(self, hexpand: bool) -> Self {
430        Self {
431            builder: self.builder.property("hexpand", hexpand),
432        }
433    }
434
435    /// Whether to use the [`hexpand`][struct@crate::Widget#hexpand] property. See [`WidgetExt::is_hexpand_set()`][crate::prelude::WidgetExt::is_hexpand_set()].
436    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
437        Self {
438            builder: self.builder.property("hexpand-set", hexpand_set),
439        }
440    }
441
442    pub fn is_focus(self, is_focus: bool) -> Self {
443        Self {
444            builder: self.builder.property("is-focus", is_focus),
445        }
446    }
447
448    /// Sets all four sides' margin at once. If read, returns max
449    /// margin on any side.
450    pub fn margin(self, margin: i32) -> Self {
451        Self {
452            builder: self.builder.property("margin", margin),
453        }
454    }
455
456    /// Margin on bottom side of widget.
457    ///
458    /// This property adds margin outside of the widget's normal size
459    /// request, the margin will be added in addition to the size from
460    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
461    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
462        Self {
463            builder: self.builder.property("margin-bottom", margin_bottom),
464        }
465    }
466
467    /// Margin on end of widget, horizontally. This property supports
468    /// left-to-right and right-to-left text directions.
469    ///
470    /// This property adds margin outside of the widget's normal size
471    /// request, the margin will be added in addition to the size from
472    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
473    pub fn margin_end(self, margin_end: i32) -> Self {
474        Self {
475            builder: self.builder.property("margin-end", margin_end),
476        }
477    }
478
479    /// Margin on start of widget, horizontally. This property supports
480    /// left-to-right and right-to-left text directions.
481    ///
482    /// This property adds margin outside of the widget's normal size
483    /// request, the margin will be added in addition to the size from
484    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
485    pub fn margin_start(self, margin_start: i32) -> Self {
486        Self {
487            builder: self.builder.property("margin-start", margin_start),
488        }
489    }
490
491    /// Margin on top side of widget.
492    ///
493    /// This property adds margin outside of the widget's normal size
494    /// request, the margin will be added in addition to the size from
495    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
496    pub fn margin_top(self, margin_top: i32) -> Self {
497        Self {
498            builder: self.builder.property("margin-top", margin_top),
499        }
500    }
501
502    pub fn name(self, name: impl Into<glib::GString>) -> Self {
503        Self {
504            builder: self.builder.property("name", name.into()),
505        }
506    }
507
508    pub fn no_show_all(self, no_show_all: bool) -> Self {
509        Self {
510            builder: self.builder.property("no-show-all", no_show_all),
511        }
512    }
513
514    /// The requested opacity of the widget. See [`WidgetExt::set_opacity()`][crate::prelude::WidgetExt::set_opacity()] for
515    /// more details about window opacity.
516    ///
517    /// Before 3.8 this was only available in GtkWindow
518    pub fn opacity(self, opacity: f64) -> Self {
519        Self {
520            builder: self.builder.property("opacity", opacity),
521        }
522    }
523
524    pub fn parent(self, parent: &impl IsA<Container>) -> Self {
525        Self {
526            builder: self.builder.property("parent", parent.clone().upcast()),
527        }
528    }
529
530    pub fn receives_default(self, receives_default: bool) -> Self {
531        Self {
532            builder: self.builder.property("receives-default", receives_default),
533        }
534    }
535
536    pub fn sensitive(self, sensitive: bool) -> Self {
537        Self {
538            builder: self.builder.property("sensitive", sensitive),
539        }
540    }
541
542    /// Sets the text of tooltip to be the given string, which is marked up
543    /// with the [Pango text markup language][PangoMarkupFormat].
544    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
545    ///
546    /// This is a convenience property which will take care of getting the
547    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
548    /// will automatically be set to [`true`] and there will be taken care of
549    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
550    ///
551    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
552    /// are set, the last one wins.
553    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
554        Self {
555            builder: self
556                .builder
557                .property("tooltip-markup", tooltip_markup.into()),
558        }
559    }
560
561    /// Sets the text of tooltip to be the given string.
562    ///
563    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
564    ///
565    /// This is a convenience property which will take care of getting the
566    /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
567    /// will automatically be set to [`true`] and there will be taken care of
568    /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
569    ///
570    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
571    /// are set, the last one wins.
572    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
573        Self {
574            builder: self.builder.property("tooltip-text", tooltip_text.into()),
575        }
576    }
577
578    /// How to distribute vertical space if widget gets extra space, see [`Align`][crate::Align]
579    pub fn valign(self, valign: Align) -> Self {
580        Self {
581            builder: self.builder.property("valign", valign),
582        }
583    }
584
585    /// Whether to expand vertically. See [`WidgetExt::set_vexpand()`][crate::prelude::WidgetExt::set_vexpand()].
586    pub fn vexpand(self, vexpand: bool) -> Self {
587        Self {
588            builder: self.builder.property("vexpand", vexpand),
589        }
590    }
591
592    /// Whether to use the [`vexpand`][struct@crate::Widget#vexpand] property. See [`WidgetExt::is_vexpand_set()`][crate::prelude::WidgetExt::is_vexpand_set()].
593    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
594        Self {
595            builder: self.builder.property("vexpand-set", vexpand_set),
596        }
597    }
598
599    pub fn visible(self, visible: bool) -> Self {
600        Self {
601            builder: self.builder.property("visible", visible),
602        }
603    }
604
605    pub fn width_request(self, width_request: i32) -> Self {
606        Self {
607            builder: self.builder.property("width-request", width_request),
608        }
609    }
610
611    /// The [`RecentFilter`][crate::RecentFilter] object to be used when displaying
612    /// the recently used resources.
613    pub fn filter(self, filter: &RecentFilter) -> Self {
614        Self {
615            builder: self.builder.property("filter", filter.clone()),
616        }
617    }
618
619    /// The maximum number of recently used resources to be displayed,
620    /// or -1 to display all items.
621    pub fn limit(self, limit: i32) -> Self {
622        Self {
623            builder: self.builder.property("limit", limit),
624        }
625    }
626
627    /// Whether this [`RecentChooser`][crate::RecentChooser] should display only local (file:)
628    /// resources.
629    pub fn local_only(self, local_only: bool) -> Self {
630        Self {
631            builder: self.builder.property("local-only", local_only),
632        }
633    }
634
635    /// The [`RecentManager`][crate::RecentManager] instance used by the [`RecentChooser`][crate::RecentChooser] to
636    /// display the list of recently used resources.
637    pub fn recent_manager(self, recent_manager: &impl IsA<RecentManager>) -> Self {
638        Self {
639            builder: self
640                .builder
641                .property("recent-manager", recent_manager.clone().upcast()),
642        }
643    }
644
645    /// Allow the user to select multiple resources.
646    pub fn select_multiple(self, select_multiple: bool) -> Self {
647        Self {
648            builder: self.builder.property("select-multiple", select_multiple),
649        }
650    }
651
652    /// Whether this [`RecentChooser`][crate::RecentChooser] should display an icon near the item.
653    pub fn show_icons(self, show_icons: bool) -> Self {
654        Self {
655            builder: self.builder.property("show-icons", show_icons),
656        }
657    }
658
659    /// Whether this [`RecentChooser`][crate::RecentChooser] should display the recently used resources
660    /// even if not present anymore. Setting this to [`false`] will perform a
661    /// potentially expensive check on every local resource (every remote
662    /// resource will always be displayed).
663    pub fn show_not_found(self, show_not_found: bool) -> Self {
664        Self {
665            builder: self.builder.property("show-not-found", show_not_found),
666        }
667    }
668
669    pub fn show_private(self, show_private: bool) -> Self {
670        Self {
671            builder: self.builder.property("show-private", show_private),
672        }
673    }
674
675    /// Whether this [`RecentChooser`][crate::RecentChooser] should display a tooltip containing the
676    /// full path of the recently used resources.
677    pub fn show_tips(self, show_tips: bool) -> Self {
678        Self {
679            builder: self.builder.property("show-tips", show_tips),
680        }
681    }
682
683    /// Sorting order to be used when displaying the recently used resources.
684    pub fn sort_type(self, sort_type: RecentSortType) -> Self {
685        Self {
686            builder: self.builder.property("sort-type", sort_type),
687        }
688    }
689
690    // rustdoc-stripper-ignore-next
691    /// Build the [`RecentChooserDialog`].
692    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
693    pub fn build(self) -> RecentChooserDialog {
694        assert_initialized_main_thread!();
695        self.builder.build()
696    }
697}