[gtk/wip/fanc999/gtk-3-24-meson-msvc: 22/297] placesview: Set .error style if unsupported protocol
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/fanc999/gtk-3-24-meson-msvc: 22/297] placesview: Set .error style if unsupported protocol
- Date: Wed, 13 Mar 2019 09:15:27 +0000 (UTC)
commit 4b7976fac4a6b7691c9fcb04106f1bb7a7986700
Author: António Fernandes <antoniof gnome org>
Date: Sat Nov 24 00:31:07 2018 +0000
placesview: Set .error style if unsupported protocol
When the user types an address with a schema that is not supported,
the Connect button doesn't become sensitive, but there is no visible
feedback at all.
This feels unresponsive and leaves the user clueless.
While it doesn't help explain why the address doesn't work, this will
provide a hint that the input was acknowledged but doesn't work.
https://gitlab.gnome.org/GNOME/gtk/issues/1476
gtk/gtkplacesview.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index 7401245da3..14b568dce4 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -1855,6 +1855,13 @@ on_address_entry_text_changed (GtkPlacesView *view)
out:
gtk_widget_set_sensitive (priv->connect_button, supported);
+ if (scheme && !supported)
+ gtk_style_context_add_class (gtk_widget_get_style_context (priv->address_entry),
+ GTK_STYLE_CLASS_ERROR);
+ else
+ gtk_style_context_remove_class (gtk_widget_get_style_context (priv->address_entry),
+ GTK_STYLE_CLASS_ERROR);
+
g_free (address);
g_free (scheme);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]