# HG changeset patch # User Mark Doliner # Date 1056820523 0 # Node ID 730015652f4dd2daa359bfb57b2475fa97b07049 # Parent 4b1d6ed1204f3bc5ef8288238968e336c0caa528 [gaim-migrate @ 6417] Fixes one of those GDK warning things. Happened when clicking cancel on select font dialog for conversations. Problem was gtk_widget_destroy was getting called twice for gtkconv->dialogs.font, second time being passed NULL. This font stuff is ugly, IMHO. Like, look at show_font_dialog. Yeesh. No code re-use whatsoever. That function should either be split up or made to suck less. One of gai'ms young aspiring actors should take care of that. Aren't there always people that are like, "I want to code something but don't know what to do?!??" Well there you go. I also changed a bit o' proxy.c code in an attempt to fix KimuSan^'s problem. I'm not really sure what his problem is, but I have a strong feeling that the lines I changed are better the way they are now. If I'm wrong, someone should probably correct me. But if I'm right... we'll lets just say we'll all be a whole lot thinner. "And somebody get this walking carpet out of my way." "No reward is worth this." committer: Tailor Script diff -r 4b1d6ed1204f -r 730015652f4d src/dialogs.c --- a/src/dialogs.c Sat Jun 28 08:51:44 2003 +0000 +++ b/src/dialogs.c Sat Jun 28 17:15:23 2003 +0000 @@ -3124,9 +3124,11 @@ GTK_TOGGLE_BUTTON(gtkconv->toolbar.font), FALSE); } - dialogwindows = g_list_remove(dialogwindows, gtkconv->dialogs.font); - gtk_widget_destroy(gtkconv->dialogs.font); - gtkconv->dialogs.font = NULL; + if (gtkconv->dialogs.font) { + dialogwindows = g_list_remove(dialogwindows, gtkconv->dialogs.font); + gtk_widget_destroy(gtkconv->dialogs.font); + gtkconv->dialogs.font = NULL; + } } void apply_font(GtkWidget *widget, GtkFontSelection *fontsel) diff -r 4b1d6ed1204f -r 730015652f4d src/proxy.c --- a/src/proxy.c Sat Jun 28 08:51:44 2003 +0000 +++ b/src/proxy.c Sat Jun 28 17:15:23 2003 +0000 @@ -737,15 +737,15 @@ struct PHB *phb = data; unsigned int len; int error=0; - int ret=0; gaim_debug(GAIM_DEBUG_INFO, "proxy", "Connected.\n"); len = sizeof(error); - ret = getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len); - if (ret < 0 || error != 0) { - if(ret==0) errno = error; + if (getsockopt(source, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { +/* if (ret < 0 || error != 0) { */ + /* The fourth parameter above isn't really "error", is it? */ + /* if(ret==0) errno = error; */ close(source); gaim_input_remove(phb->inpa);