From 97791dbb99e458fd30584fd4a0d8d0d03cc1fe3e Mon Sep 17 00:00:00 2001 From: Adrien Plazas Date: Fri, 21 Mar 2025 09:28:13 +0100 Subject: [PATCH] weather-settings: Drop error style on empty search This prevents an empty search entry from having the error style, otherwise typing in it just once and not finding a location will keep the entry red until the app is started anew. --- src/gui/gcal-weather-settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/gcal-weather-settings.c b/src/gui/gcal-weather-settings.c index 3744c639..a4119673 100644 --- a/src/gui/gcal-weather-settings.c +++ b/src/gui/gcal-weather-settings.c @@ -250,7 +250,7 @@ on_weather_location_searchbox_changed_cb (GtkEntry *entry, auto_location = gtk_switch_get_active (self->weather_auto_location_switch); location = get_checked_fixed_location (self); - if (!location && !auto_location) + if (!location && !auto_location && gtk_entry_get_text_length (entry) > 0) { gtk_widget_add_css_class (GTK_WIDGET (self->weather_location_entry), "error"); }