mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-06-30 23:46:35 +00:00
Compare commits
3 Commits
4e76777c9f
...
53fcb43d3e
Author | SHA1 | Date | |
---|---|---|---|
|
53fcb43d3e | ||
|
58450f8f22 | ||
|
e5ad7a3a62 |
|
@ -6535,10 +6535,18 @@ real_send_email (GStrv attachments,
|
||||||
* provide an empty list */
|
* provide an empty list */
|
||||||
const char * const addresses[] = {NULL};
|
const char * const addresses[] = {NULL};
|
||||||
g_autoptr (XdpPortal) portal = NULL;
|
g_autoptr (XdpPortal) portal = NULL;
|
||||||
|
g_autoptr (GError) error = NULL;
|
||||||
XdpParent *parent;
|
XdpParent *parent;
|
||||||
GtkWidget *toplevel;
|
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);
|
toplevel = gtk_widget_get_ancestor (GTK_WIDGET (view), GTK_TYPE_WINDOW);
|
||||||
parent = xdp_parent_new_gtk (GTK_WINDOW (toplevel));
|
parent = xdp_parent_new_gtk (GTK_WINDOW (toplevel));
|
||||||
xdp_portal_compose_email (portal, parent, addresses,
|
xdp_portal_compose_email (portal, parent, addresses,
|
||||||
|
@ -6735,11 +6743,19 @@ set_wallpaper_with_portal (NautilusFile *file,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
g_autoptr (XdpPortal) portal = NULL;
|
g_autoptr (XdpPortal) portal = NULL;
|
||||||
|
g_autoptr (GError) error = NULL;
|
||||||
g_autofree gchar *uri = NULL;
|
g_autofree gchar *uri = NULL;
|
||||||
XdpParent *parent = NULL;
|
XdpParent *parent = NULL;
|
||||||
GtkWidget *toplevel;
|
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);
|
toplevel = gtk_widget_get_ancestor (GTK_WIDGET (user_data), GTK_TYPE_WINDOW);
|
||||||
parent = xdp_parent_new_gtk (GTK_WINDOW (toplevel));
|
parent = xdp_parent_new_gtk (GTK_WINDOW (toplevel));
|
||||||
uri = nautilus_file_get_uri (file);
|
uri = nautilus_file_get_uri (file);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user