[Commits] [SCM] claws branch, gtk3, updated. 3.99.0-19-gfa24a0323

paul at claws-mail.org paul at claws-mail.org
Tue Dec 29 13:36:09 CET 2020


The branch, gtk3 has been updated
       via  fa24a03232e0e688c6bfbd8cb2e3b16d70893a67 (commit)
      from  00fd8f76fb6dba06837a4189600d943f20211808 (commit)

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


- Log -----------------------------------------------------------------
commit fa24a03232e0e688c6bfbd8cb2e3b16d70893a67
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 714b166a0..e9d369306 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-2019 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
@@ -484,9 +484,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;
@@ -1127,21 +1124,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