# HG changeset patch
# Node ID 658097d2129c
# Parent  c9f7e754c78e
diff --git a/pidgin/pidgindebug.c b/pidgin/pidgindebug.c
--- a/pidgin/pidgindebug.c
+++ b/pidgin/pidgindebug.c
@@ -211,21 +211,18 @@ pause_cb(GtkWidget *w, PidginDebugWindow
  *****************************************************************************/
 static void
 regex_clear_color(GtkWidget *w) {
-	GtkStyleContext *context = gtk_widget_get_style_context(w);
-	gtk_style_context_remove_class(context, "error");
-	gtk_style_context_remove_class(context, "success");
+	gtk_widget_remove_css_class(w, "error");
+	gtk_widget_remove_css_class(w, "success");
 }
 
 static void
 regex_change_color(GtkWidget *w, gboolean success) {
-	GtkStyleContext *context = gtk_widget_get_style_context(w);
-
 	if (success) {
-		gtk_style_context_remove_class(context, "error");
-		gtk_style_context_add_class(context, "success");
+		gtk_widget_remove_css_class(w, "error");
+		gtk_widget_add_css_class(w, "success");
 	} else {
-		gtk_style_context_remove_class(context, "success");
-		gtk_style_context_add_class(context, "error");
+		gtk_widget_remove_css_class(w, "success");
+		gtk_widget_add_css_class(w, "error");
 	}
 }
 
diff --git a/pidgin/prefs/pidginnetworkprefs.c b/pidgin/prefs/pidginnetworkprefs.c
--- a/pidgin/prefs/pidginnetworkprefs.c
+++ b/pidgin/prefs/pidginnetworkprefs.c
@@ -58,23 +58,23 @@ G_DEFINE_TYPE(PidginNetworkPrefs, pidgin
 static void
 network_ip_changed(GtkEditable *editable, gpointer data)
 {
-	const gchar *text = gtk_editable_get_text(GTK_EDITABLE(editable));
-	GtkStyleContext *context = gtk_widget_get_style_context(GTK_WIDGET(editable));
+	const gchar *text = gtk_editable_get_text(editable);
+	GtkWidget *widget = GTK_WIDGET(editable);
 
 	if (text && *text) {
 		if (g_hostname_is_ip_address(text)) {
 			purple_network_set_public_ip(text);
-			gtk_style_context_add_class(context, "good-ip");
-			gtk_style_context_remove_class(context, "bad-ip");
+			gtk_widget_remove_css_class(widget, "error");
+			gtk_widget_add_css_class(widget, "success");
 		} else {
-			gtk_style_context_add_class(context, "bad-ip");
-			gtk_style_context_remove_class(context, "good-ip");
+			gtk_widget_remove_css_class(widget, "success");
+			gtk_widget_add_css_class(widget, "error");
 		}
 
 	} else {
 		purple_network_set_public_ip("");
-		gtk_style_context_remove_class(context, "bad-ip");
-		gtk_style_context_remove_class(context, "good-ip");
+		gtk_widget_remove_css_class(widget, "success");
+		gtk_widget_remove_css_class(widget, "error");
 	}
 }
 
@@ -194,9 +194,6 @@ pidgin_network_prefs_class_init(PidginNe
 static void
 pidgin_network_prefs_init(PidginNetworkPrefs *prefs)
 {
-	GtkStyleContext *context;
-	GtkCssProvider *ip_css;
-
 	gtk_widget_init_template(GTK_WIDGET(prefs));
 
 	gtk_editable_set_text(GTK_EDITABLE(prefs->stun_server),
@@ -208,15 +205,6 @@ pidgin_network_prefs_init(PidginNetworkP
 	gtk_editable_set_text(GTK_EDITABLE(prefs->public_ip),
 	                      purple_network_get_public_ip());
 
-	ip_css = gtk_css_provider_new();
-	gtk_css_provider_load_from_resource(ip_css,
-	                                    "/im/pidgin/Pidgin3/Prefs/ip.css");
-
-	context = gtk_widget_get_style_context(prefs->public_ip);
-	gtk_style_context_add_provider(context,
-	                               GTK_STYLE_PROVIDER(ip_css),
-	                               GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
-
 	g_object_bind_property(prefs->auto_ip, "active",
 			prefs->public_ip_hbox, "sensitive",
 			G_BINDING_SYNC_CREATE|G_BINDING_INVERT_BOOLEAN);
diff --git a/pidgin/resources/Prefs/ip.css b/pidgin/resources/Prefs/ip.css
deleted file mode 100644
--- a/pidgin/resources/Prefs/ip.css
+++ /dev/null
@@ -1,13 +0,0 @@
-.bad-ip {
-	color: @error_fg_color;
-	text-shadow: 0 1px @error_text_shadow;
-	background-image: none;
-	background-color: @error_bg_color;
-}
-
-.good-ip {
-	color: @question_fg_color;
-	text-shadow: 0 1px @question_text_shadow;
-	background-image: none;
-	background-color: @success_color;
-}
diff --git a/pidgin/resources/pidgin.gresource.xml b/pidgin/resources/pidgin.gresource.xml
--- a/pidgin/resources/pidgin.gresource.xml
+++ b/pidgin/resources/pidgin.gresource.xml
@@ -30,7 +30,6 @@
     <file compressed="true">Prefs/conversation.ui</file>
     <file compressed="true">Prefs/credentials.ui</file>
     <file compressed="true">Prefs/credentialprovider.ui</file>
-    <file compressed="true">Prefs/ip.css</file>
     <file compressed="true">Prefs/network.ui</file>
     <file compressed="true">Prefs/prefs.ui</file>
     <file compressed="true">Prefs/proxy.ui</file>
