[nautilus] search-provider: fix activation behavior
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] search-provider: fix activation behavior
- Date: Tue, 19 Feb 2013 15:26:23 +0000 (UTC)
commit 0309ecae8568b69ed6356dab6d983bc0d53fcd74
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Feb 19 10:21:03 2013 -0500
search-provider: fix activation behavior
It was unintentionally changed from opening the default application for
the result to selecting it in a view.
src/nautilus-shell-search-provider.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c
index c2c4b69..5eaff72 100644
--- a/src/nautilus-shell-search-provider.c
+++ b/src/nautilus-shell-search-provider.c
@@ -646,9 +646,16 @@ handle_activate_result (NautilusShellSearchProvider2 *skeleton,
guint32 timestamp,
gpointer user_data)
{
- GFile *file = g_file_new_for_uri (result);
- g_application_open (g_application_get_default (), &file, 1, "");
- g_object_unref (file);
+ gboolean res;
+ GFile *file;
+
+ res = gtk_show_uri (NULL, result, timestamp, NULL);
+
+ if (!res) {
+ file = g_file_new_for_uri (result);
+ g_application_open (g_application_get_default (), &file, 1, "");
+ g_object_unref (file);
+ }
nautilus_shell_search_provider2_complete_activate_result (skeleton, invocation);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]