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.
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
d170a4d4ae
commit
97791dbb99
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user