[network-manager-openvpn/nm-1-0] properties: fix using wrong enum value
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/nm-1-0] properties: fix using wrong enum value
- Date: Wed, 21 Sep 2016 10:11:53 +0000 (UTC)
commit 558e2656d0017ad7bab5468231abed981bdea8e4
Author: Thomas Haller <thaller redhat com>
Date: Mon May 9 14:39:03 2016 +0200
properties: fix using wrong enum value
Clang complains about it. This bug had no consequences, as both
GTK_STATE_NORMAL and GTK_STATE_FLAG_NORMAL are zero.
(cherry picked from commit ee553d8c12e42f820c65537ecb990becf36006ea)
properties/auth-helpers.c | 4 ++--
properties/nm-openvpn.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 1f66fe4..43ab6f7 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -1324,10 +1324,10 @@ device_name_changed_cb (GtkEntry *entry,
/* 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_NORMAL, &rgba);
+ gtk_widget_override_background_color (GTK_WIDGET (editable), GTK_STATE_FLAG_NORMAL, &rgba);
gtk_widget_set_sensitive (ok_button, FALSE);
} else {
- gtk_widget_override_background_color (GTK_WIDGET (editable), GTK_STATE_NORMAL, NULL);
+ gtk_widget_override_background_color (GTK_WIDGET (editable), GTK_STATE_FLAG_NORMAL, NULL);
gtk_widget_set_sensitive (ok_button, TRUE);
}
diff --git a/properties/nm-openvpn.c b/properties/nm-openvpn.c
index e7cb89a..53d6214 100644
--- a/properties/nm-openvpn.c
+++ b/properties/nm-openvpn.c
@@ -190,7 +190,7 @@ check_validity (OpenvpnPluginUiWidget *self, GError **error)
/* Change entry background colour while editing */
if (!gateway_valid)
gdk_rgba_parse (&rgba, "red3");
- gtk_widget_override_background_color (widget, GTK_STATE_NORMAL, !gateway_valid ? &rgba : NULL);
+ gtk_widget_override_background_color (widget, GTK_STATE_FLAG_NORMAL, !gateway_valid ? &rgba : NULL);
if (!gateway_valid) {
g_set_error (error,
OPENVPN_PLUGIN_UI_ERROR,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]