[nautilus] search-provider: Return TRUE from GDBus method handlers



commit 2e67887344aa9e347d30d0b2c69fb8c84c23b9da
Author: David King <dking redhat com>
Date:   Fri Sep 20 15:28:47 2013 +0100

    search-provider: Return TRUE from GDBus method handlers
    
    As Matthias Clasen noticed, the signal handlers for the gdbus-codegen
    skeleton for the shell search provider have the wrong signature, and
    should return TRUE to indicate that the signal has been handled.
    Otherwise, it is down to chance if the method is handled or if a
    method-not-implemented error is emitted. It seems that the GCC option
    -fstack-protector-strong causes the default return value to be
    interpreted as FALSE, so this might explain why the problem was only
    noticed by a wide variety of users recently.
    
    The bug manifests as Nautilus not returning any search results when
    using the gnome-shell activities overview search.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692041

 src/nautilus-shell-search-provider.c |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c
index 449ab70..d127115 100644
--- a/src/nautilus-shell-search-provider.c
+++ b/src/nautilus-shell-search-provider.c
@@ -438,7 +438,7 @@ execute_search (NautilusShellSearchProvider *self,
   g_free (terms_joined);
 }
 
-static void
+static gboolean
 handle_get_initial_result_set (NautilusShellSearchProvider2  *skeleton,
                                GDBusMethodInvocation         *invocation,
                                gchar                        **terms,
@@ -448,9 +448,10 @@ handle_get_initial_result_set (NautilusShellSearchProvider2  *skeleton,
 
   g_debug ("****** GetInitialResultSet");
   execute_search (self, invocation, terms);
+  return TRUE;
 }
 
-static void
+static gboolean
 handle_get_subsearch_result_set (NautilusShellSearchProvider2  *skeleton,
                                  GDBusMethodInvocation         *invocation,
                                  gchar                        **previous_results,
@@ -461,6 +462,7 @@ handle_get_subsearch_result_set (NautilusShellSearchProvider2  *skeleton,
 
   g_debug ("****** GetSubSearchResultSet");
   execute_search (self, invocation, terms);
+  return TRUE;
 }
 
 typedef struct {
@@ -570,7 +572,7 @@ result_list_attributes_ready_cb (GList    *file_list,
   result_metas_data_free (data);
 }
 
-static void
+static gboolean
 handle_get_result_metas (NautilusShellSearchProvider2  *skeleton,
                          GDBusMethodInvocation         *invocation,
                          gchar                        **results,
@@ -601,7 +603,7 @@ handle_get_result_metas (NautilusShellSearchProvider2  *skeleton,
   if (missing_files == NULL) {
     result_metas_return_from_cache (data);
     result_metas_data_free (data);
-    return;
+    return TRUE;
   }
 
   nautilus_file_list_call_when_ready (missing_files,
@@ -610,9 +612,10 @@ handle_get_result_metas (NautilusShellSearchProvider2  *skeleton,
                                       result_list_attributes_ready_cb,
                                       data);
   nautilus_file_list_free (missing_files);
+  return TRUE;
 }
 
-static void
+static gboolean
 handle_activate_result (NautilusShellSearchProvider2 *skeleton,
                         GDBusMethodInvocation        *invocation,
                         gchar                        *result,
@@ -632,9 +635,10 @@ handle_activate_result (NautilusShellSearchProvider2 *skeleton,
   }
 
   nautilus_shell_search_provider2_complete_activate_result (skeleton, invocation);
+  return TRUE;
 }
 
-static void
+static gboolean
 handle_launch_search (NautilusShellSearchProvider2 *skeleton,
                       GDBusMethodInvocation        *invocation,
                       gchar                       **terms,
@@ -652,6 +656,7 @@ handle_launch_search (NautilusShellSearchProvider2 *skeleton,
   g_free (uri);
 
   nautilus_shell_search_provider2_complete_launch_search (skeleton, invocation);
+  return TRUE;
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]