pidgin: 3a68abca: Don't colourize the IP entry field when ...
qulogic at pidgin.im
qulogic at pidgin.im
Sat Jul 4 00:31:20 EDT 2009
-----------------------------------------------------------------
Revision: 3a68abca93e8d2c768fac191dfe7ce49e63e7cbc
Ancestor: eaf8f9a796d478b3a422d6fa958826e76a5ab9a5
Author: qulogic at pidgin.im
Date: 2009-07-04T04:22:25
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3a68abca93e8d2c768fac191dfe7ce49e63e7cbc
Modified files:
pidgin/gtkprefs.c
ChangeLog:
Don't colourize the IP entry field when it's empty, and reset the actual
public IP pref as well, so old entries don't keep showing up.
-------------- next part --------------
============================================================
--- pidgin/gtkprefs.c 6d724453646fe7a5111577de89ffe9b580fec58c
+++ pidgin/gtkprefs.c 0623f40ef64143d6f5566827c5247bf3cc47323f
@@ -1642,22 +1642,25 @@ network_ip_changed(GtkEntry *entry, gpoi
const gchar *text = gtk_entry_get_text(entry);
GdkColor color;
- if (purple_ip_address_is_valid(text))
- {
- color.red = 0xAFFF;
- color.green = 0xFFFF;
- color.blue = 0xAFFF;
+ if (text && *text) {
+ if (purple_ip_address_is_valid(text)) {
+ color.red = 0xAFFF;
+ color.green = 0xFFFF;
+ color.blue = 0xAFFF;
- purple_network_set_public_ip(text);
- }
- else
- {
- color.red = 0xFFFF;
- color.green = 0xAFFF;
- color.blue = 0xAFFF;
- }
+ purple_network_set_public_ip(text);
+ } else {
+ color.red = 0xFFFF;
+ color.green = 0xAFFF;
+ color.blue = 0xAFFF;
+ }
- gtk_widget_modify_base(GTK_WIDGET(entry), GTK_STATE_NORMAL, &color);
+ gtk_widget_modify_base(GTK_WIDGET(entry), GTK_STATE_NORMAL, &color);
+
+ } else {
+ purple_network_set_public_ip("");
+ gtk_widget_modify_base(GTK_WIDGET(entry), GTK_STATE_NORMAL, NULL);
+ }
}
static gboolean
More information about the Commits
mailing list