[network-manager-applet/nma-0-9-10: 2/15] c-e: fix passing wrong enum type to gtk_widget_override_background_color()



commit 08ded80e3a430566d7771a1b71e041681e670325
Author: Thomas Haller <thaller redhat com>
Date:   Mon Oct 27 14:43:59 2014 +0100

    c-e: fix passing wrong enum type to gtk_widget_override_background_color()
    
    This had no real effect, because both GTK_STATE_NORMAL
    and GTK_STATE_FLAG_NORMAL have the numerical value 0.
    
    clang warns:
        make[5]: Entering directory `./network-manager-applet/src/connection-editor'
          CC       nm_connection_editor-page-ip4.o
        page-ip4.c:730:63: error: implicit conversion from enumeration type 'GtkStateType' to different 
enumeration type 'GtkStateFlags' [-Werror,-Wenum-conversion]
                gtk_widget_override_background_color (GTK_WIDGET (editable), GTK_STATE_NORMAL, &rgba);
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                         ^~~~~~~~~~~~~~~~
    
    Signed-off-by: Thomas Haller <thaller redhat com>
    (cherry picked from commit 3fc750af4624dbc74290513f41bd9c0ea21c6853)

 src/connection-editor/ip4-routes-dialog.c |    2 +-
 src/connection-editor/ip6-routes-dialog.c |    2 +-
 src/connection-editor/page-dcb.c          |    4 ++--
 src/connection-editor/page-ip4.c          |    2 +-
 src/connection-editor/page-ip6.c          |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/connection-editor/ip4-routes-dialog.c b/src/connection-editor/ip4-routes-dialog.c
index 494a357..95c1107 100644
--- a/src/connection-editor/ip4-routes-dialog.c
+++ b/src/connection-editor/ip4-routes-dialog.c
@@ -455,7 +455,7 @@ cell_changed_cb (GtkEditable *editable,
        colorname = value_valid ? "lightgreen" : "red";
 
        gdk_rgba_parse (&rgba, colorname);
-       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);
 
        g_free (cell_text);
        return FALSE;
diff --git a/src/connection-editor/ip6-routes-dialog.c b/src/connection-editor/ip6-routes-dialog.c
index 74a7129..c1fef55 100644
--- a/src/connection-editor/ip6-routes-dialog.c
+++ b/src/connection-editor/ip6-routes-dialog.c
@@ -396,7 +396,7 @@ cell_changed_cb (GtkEditable *editable,
        colorname = value_valid ? "lightgreen" : "red";
 
        gdk_rgba_parse (&rgba, colorname);
-       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);
 
        g_free (cell_text);
        return FALSE;
diff --git a/src/connection-editor/page-dcb.c b/src/connection-editor/page-dcb.c
index d50e95d..8b3026d 100644
--- a/src/connection-editor/page-dcb.c
+++ b/src/connection-editor/page-dcb.c
@@ -125,10 +125,10 @@ uint_entries_validate (GtkBuilder *builder, const char *fmt, gint max, gboolean
                        if (errno || num < 0 || num > max) {
                                /* FIXME: only sets highlight color? */
                                gdk_rgba_parse (&bgcolor, "red3");
-                               gtk_widget_override_background_color (GTK_WIDGET (entry), GTK_STATE_NORMAL, 
&bgcolor);
+                               gtk_widget_override_background_color (GTK_WIDGET (entry), 
GTK_STATE_FLAG_NORMAL, &bgcolor);
                                valid = FALSE;
                        } else
-                               gtk_widget_override_background_color (GTK_WIDGET (entry), GTK_STATE_NORMAL, 
NULL);
+                               gtk_widget_override_background_color (GTK_WIDGET (entry), 
GTK_STATE_FLAG_NORMAL, NULL);
 
                        total += (guint) num;
                }
diff --git a/src/connection-editor/page-ip4.c b/src/connection-editor/page-ip4.c
index e35e8ac..83b8044 100644
--- a/src/connection-editor/page-ip4.c
+++ b/src/connection-editor/page-ip4.c
@@ -727,7 +727,7 @@ cell_changed_cb (GtkEditable *editable,
        colorname = value_valid ? "lightgreen" : "red";
 
        gdk_rgba_parse (&rgba, colorname);
-       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);
 
        g_free (cell_text);
        return FALSE;
diff --git a/src/connection-editor/page-ip6.c b/src/connection-editor/page-ip6.c
index 7dfea80..35a6819 100644
--- a/src/connection-editor/page-ip6.c
+++ b/src/connection-editor/page-ip6.c
@@ -722,7 +722,7 @@ cell_changed_cb (GtkEditable *editable,
        colorname = value_valid ? "lightgreen" : "red";
 
        gdk_rgba_parse (&rgba, colorname);
-       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);
 
        g_free (cell_text);
        return FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]