[Commits] [SCM] claws branch, master, updated. 3.17.8-12-gf676416e8

paul at claws-mail.org paul at claws-mail.org
Wed Dec 30 15:24:25 CET 2020


The branch, master has been updated
       via  f676416e8618aa288f0790b1acc2fbca2aaba810 (commit)
      from  72bc6f83ed98e24f43bca01e5eba82b71c091dec (commit)

Summary of changes:
 src/gtk/quicksearch.c | 31 +++++++++++++------------------
 1 file changed, 13 insertions(+), 18 deletions(-)


- Log -----------------------------------------------------------------
commit f676416e8618aa288f0790b1acc2fbca2aaba810
Author: paul <paul at claws-mail.org>
Date:   Tue Dec 29 12:36:04 2020 +0000

    make the quicksearch clear button more active and useful
    
    clear the search string when not running, clear the string and stop the search when running

diff --git a/src/gtk/quicksearch.c b/src/gtk/quicksearch.c
index f79cbffe9..10cfbf3b9 100644
--- a/src/gtk/quicksearch.c
+++ b/src/gtk/quicksearch.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2018 Colin Leroy and the Claws Mail team
+ * Copyright (C) 1999-2020 the Claws Mail team and Colin Leroy
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -549,9 +549,6 @@ static gboolean clear_search_cb(GtkMenuItem *widget, gpointer data)
 {
 	QuickSearch *quicksearch = (QuickSearch *)data;
 
-	if (!quicksearch->active)
-		return TRUE;
-
 	quicksearch_set(quicksearch, prefs_common.summary_quicksearch_type, "");
 
 	return TRUE;
@@ -961,21 +958,19 @@ static void quicksearch_set_active(QuickSearch *quicksearch, gboolean active)
 		error = TRUE;
 
 	if (active) {
-		gtk_widget_set_sensitive(quicksearch->clear_search, TRUE);
-			gtk_widget_modify_base(
-				gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry))),
-				GTK_STATE_NORMAL, error ? &qs_error_bgcolor : &qs_active_bgcolor);
-			gtk_widget_modify_text(
-				gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry))),
-				GTK_STATE_NORMAL, error ? &qs_error_color : &qs_active_color);
+		gtk_widget_modify_base(
+			gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry))),
+			GTK_STATE_NORMAL, error ? &qs_error_bgcolor : &qs_active_bgcolor);
+		gtk_widget_modify_text(
+			gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry))),
+			GTK_STATE_NORMAL, error ? &qs_error_color : &qs_active_color);
 	} else {
-		gtk_widget_set_sensitive(quicksearch->clear_search, FALSE);
-			gtk_widget_modify_base(
-				gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry))),
-				GTK_STATE_NORMAL, NULL);
-			gtk_widget_modify_text(
-				gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry))),
-				GTK_STATE_NORMAL, NULL);
+		gtk_widget_modify_base(
+			gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry))),
+			GTK_STATE_NORMAL, NULL);
+		gtk_widget_modify_text(
+			gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry))),
+			GTK_STATE_NORMAL, NULL);
 	}
 
 	if (!active) {

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list