[network-manager-openvpn: 3/7] properties: use helpers for dev. name entry errors
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn: 3/7] properties: use helpers for dev. name entry errors
- Date: Thu, 8 Sep 2016 10:34:04 +0000 (UTC)
commit 3b8739a607cc88a71562bd21aef4b3289e2d3e46
Author: Daniel Miranda <danielkza2 gmail com>
Date: Wed Sep 7 22:25:47 2016 -0300
properties: use helpers for dev. name entry errors
properties/auth-helpers.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 8a62d5e..9df5d64 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -1501,18 +1501,16 @@ device_name_changed_cb (GtkEntry *entry,
GtkWidget *ok_button = user_data;
gboolean entry_sensitive;
char *entry_text;
- GdkRGBA rgba;
entry_sensitive = gtk_widget_get_sensitive (GTK_WIDGET (entry));
entry_text = gtk_editable_get_chars (editable, 0, -1);
/* Change cell's background to red if the value is invalid */
if (entry_sensitive && entry_text[0] != '\0' && !nm_utils_iface_valid_name (entry_text)) {
- gdk_rgba_parse (&rgba, "red");
- gtk_widget_override_background_color (GTK_WIDGET (editable), GTK_STATE_FLAG_NORMAL, &rgba);
+ widget_set_error (GTK_WIDGET (editable));
gtk_widget_set_sensitive (ok_button, FALSE);
} else {
- gtk_widget_override_background_color (GTK_WIDGET (editable), GTK_STATE_FLAG_NORMAL, NULL);
+ widget_unset_error (GTK_WIDGET (editable));
gtk_widget_set_sensitive (ok_button, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]