[gnome-packagekit] gpk-application:avoid multi-search at the same time



commit da569fe2e0119661fae6559fcf7c5adbd962e491
Author: Zhang Qiang <qiang z zhang intel com>
Date:   Wed Nov 17 17:12:49 2010 +0800

    gpk-application:avoid multi-search at the same time
    
    This patch avoid multi-search at the same time. With out this patch,
    user can press Enter key to execute search time by time, which  result
    in duplicate entries in the results list.

 src/gpk-application.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gpk-application.c b/src/gpk-application.c
index f2c39ea..6ad9445 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -1753,6 +1753,10 @@ gpk_application_perform_search (gpointer user_data)
 static void
 gpk_application_find_cb (GtkWidget *button_widget, gpointer user_data)
 {
+	/*if we are in the middle of a search, just return*/
+	if (search_in_progress == TRUE)
+		return;
+
 	search_mode = GPK_MODE_NAME_DETAILS_FILE;
 	gpk_application_perform_search (NULL);
 }



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