1
0
mirror of https://gitlab.gnome.org/GNOME/nautilus synced 2024-06-28 14:35:28 +00:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Balló György
53fcb43d3e Merge branch 'portal-missing' into 'main'
files-view: Don't abort if failed to create XdpPortal instance

See merge request GNOME/nautilus!1540
2024-06-23 14:08:53 +00:00
Martin
58450f8f22 Update Slovenian translation 2024-06-23 13:13:23 +00:00
Balló György
e5ad7a3a62 files-view: Don't abort if failed to create XdpPortal instance
xdp_portal_new() aborts the whole program if fails. Use xdp_portal_initable_new() instead.
2024-06-18 15:33:29 +02:00
2 changed files with 253 additions and 236 deletions

469
po/sl.po

File diff suppressed because it is too large Load Diff

View File

@ -6535,10 +6535,18 @@ real_send_email (GStrv attachments,
* provide an empty list */
const char * const addresses[] = {NULL};
g_autoptr (XdpPortal) portal = NULL;
g_autoptr (GError) error = NULL;
XdpParent *parent;
GtkWidget *toplevel;
portal = xdp_portal_new ();
portal = xdp_portal_initable_new (&error);
if (error)
{
g_warning ("Failed to create XdpPortal instance: %s", error->message);
return;
}
toplevel = gtk_widget_get_ancestor (GTK_WIDGET (view), GTK_TYPE_WINDOW);
parent = xdp_parent_new_gtk (GTK_WINDOW (toplevel));
xdp_portal_compose_email (portal, parent, addresses,
@ -6735,11 +6743,19 @@ set_wallpaper_with_portal (NautilusFile *file,
gpointer user_data)
{
g_autoptr (XdpPortal) portal = NULL;
g_autoptr (GError) error = NULL;
g_autofree gchar *uri = NULL;
XdpParent *parent = NULL;
GtkWidget *toplevel;
portal = xdp_portal_new ();
portal = xdp_portal_initable_new (&error);
if (error)
{
g_warning ("Failed to create XdpPortal instance: %s", error->message);
return;
}
toplevel = gtk_widget_get_ancestor (GTK_WIDGET (user_data), GTK_TYPE_WINDOW);
parent = xdp_parent_new_gtk (GTK_WINDOW (toplevel));
uri = nautilus_file_get_uri (file);