mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-10 20:50:12 +00:00
filechoosernative: Drop the use_portal override
We are going to prefer portals when available anyway, going forward, so there shouldn't be a need for this anymore.
This commit is contained in:
parent
a03109a7b9
commit
2ed95e542a
@ -561,13 +561,6 @@ gtk_file_chooser_native_new (const char *title,
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_file_chooser_native_set_use_portal (GtkFileChooserNative *self,
|
||||
gboolean use_portal)
|
||||
{
|
||||
self->use_portal = use_portal;
|
||||
}
|
||||
|
||||
static void
|
||||
dialog_response_cb (GtkDialog *dialog,
|
||||
int response_id,
|
||||
|
@ -478,7 +478,7 @@ gtk_file_chooser_native_portal_show (GtkFileChooserNative *self,
|
||||
GtkFileChooserAction action;
|
||||
const char *method_name;
|
||||
|
||||
if (!self->use_portal && !gdk_should_use_portal ())
|
||||
if (!gdk_should_use_portal ())
|
||||
return FALSE;
|
||||
|
||||
connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
|
||||
|
@ -51,13 +51,9 @@ struct _GtkFileChooserNative
|
||||
GtkWidget *accept_button;
|
||||
GtkWidget *cancel_button;
|
||||
|
||||
gboolean use_portal;
|
||||
gpointer mode_data;
|
||||
};
|
||||
|
||||
void gtk_file_chooser_native_set_use_portal (GtkFileChooserNative *self,
|
||||
gboolean use_portal);
|
||||
|
||||
gboolean gtk_file_chooser_native_win32_show (GtkFileChooserNative *self);
|
||||
void gtk_file_chooser_native_win32_hide (GtkFileChooserNative *self);
|
||||
|
||||
|
@ -804,7 +804,6 @@ create_file_chooser (GtkFileDialog *self,
|
||||
GtkFileChooserNative *chooser;
|
||||
const char *default_accept_label, *accept;
|
||||
const char *default_title, *title;
|
||||
GdkDisplay *display G_GNUC_UNUSED;
|
||||
|
||||
switch (action)
|
||||
{
|
||||
@ -839,16 +838,6 @@ create_file_chooser (GtkFileDialog *self,
|
||||
|
||||
chooser = gtk_file_chooser_native_new (title, parent, action, accept, _("_Cancel"));
|
||||
|
||||
if (parent)
|
||||
display = gtk_widget_get_display (GTK_WIDGET (parent));
|
||||
else
|
||||
display = gdk_display_get_default ();
|
||||
|
||||
if (GDK_DISPLAY_DEBUG_CHECK (display, NO_PORTALS))
|
||||
gtk_file_chooser_native_set_use_portal (chooser, FALSE);
|
||||
else
|
||||
gtk_file_chooser_native_set_use_portal (chooser, TRUE);
|
||||
|
||||
gtk_native_dialog_set_modal (GTK_NATIVE_DIALOG (chooser), self->modal);
|
||||
gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (chooser), select_multiple);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user