summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2021-12-24 01:05:29 +0000
committerAntónio Fernandes <antoniof@gnome.org>2022-01-01 22:24:03 +0000
commit7f6331313b9367bc5dcd0e527df3fcbd59b4a64f (patch)
tree12379141df866a09fc317965a98430582241ded3
parentad12055bbdc93d665578265afd8fcb734cac300e (diff)
downloadnautilus-7f6331313b9367bc5dcd0e527df3fcbd59b4a64f.tar.gz
general: Adapt to gtk_show_uri* API changes
-rw-r--r--src/nautilus-application.c3
-rw-r--r--src/nautilus-shell-search-provider.c12
2 files changed, 6 insertions, 9 deletions
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 87b780819..2c0cc2929 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -764,8 +764,7 @@ action_help (GSimpleAction *action,
GError *error = NULL;
window = gtk_application_get_active_window (application);
- gtk_show_uri_on_window (window, "help:gnome-help/files",
- gtk_get_current_event_time (), &error);
+ gtk_show_uri (window, "help:gnome-help/files", GDK_CURRENT_TIME);
if (error)
{
diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c
index 82850dafc..081896520 100644
--- a/src/nautilus-shell-search-provider.c
+++ b/src/nautilus-shell-search-provider.c
@@ -739,12 +739,13 @@ typedef struct
} ShowURIData;
static void
-show_uri_callback (gboolean res,
- gpointer user_data)
+show_uri_callback (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ShowURIData *data = user_data;
- if (!res)
+ if (!gtk_show_uri_full_finish (NULL, result, NULL))
{
g_application_open (g_application_get_default (), &data->file, 1, "");
}
@@ -764,16 +765,13 @@ handle_activate_result (NautilusShellSearchProvider2 *skeleton,
gpointer user_data)
{
ShowURIData *data;
- gboolean res;
data = g_new (ShowURIData, 1);
data->file = g_file_new_for_uri (result);
data->skeleton = skeleton;
data->invocation = invocation;
- res = gtk_show_uri_on_window (NULL, result, timestamp, NULL);
-
- show_uri_callback (res, data);
+ gtk_show_uri_full (NULL, result, timestamp, NULL, show_uri_callback, data);
return TRUE;
}