im.pidgin.cpw.resiak.disconnectreason: b8377770fe2978cc7f25bbbbc9d32a0ca1c271b9
resiak at soc.pidgin.im
resiak at soc.pidgin.im
Mon Nov 5 04:41:11 EST 2007
-----------------------------------------------------------------
Revision: b8377770fe2978cc7f25bbbbc9d32a0ca1c271b9
Ancestor: 4dd3fd798c2196a1e6c84a1044a2c47f3ff7356f
Author: resiak at soc.pidgin.im
Date: 2007-11-04T23:57:43
Branch: im.pidgin.cpw.resiak.disconnectreason
Modified files:
pidgin/minidialog.c
ChangeLog:
Use an idle callback to destroy PidginMiniDialogs when a button is pressed.
Calling gtk_widget_destroy() directly from the button-clicked callback was
eating the stack.
-------------- next part --------------
============================================================
--- pidgin/minidialog.c 02dde520fbd8472c0be4560795e2c137e148f488
+++ pidgin/minidialog.c 684d434b20dfac1b992e80f7e5f684413867a805
@@ -99,6 +99,13 @@ struct _mini_dialog_button_clicked_cb_da
gpointer user_data;
};
+static gboolean
+idle_destroy_cb(GtkWidget *mini_dialog)
+{
+ gtk_widget_destroy(mini_dialog);
+ return FALSE;
+}
+
static void
mini_dialog_button_clicked_cb(GtkButton *button,
gpointer user_data)
@@ -107,7 +114,7 @@ mini_dialog_button_clicked_cb(GtkButton
data->callback(data->mini_dialog, button, data->user_data);
- gtk_widget_destroy(GTK_WIDGET(data->mini_dialog));
+ g_idle_add((GSourceFunc) idle_destroy_cb, data->mini_dialog);
}
static void
More information about the Commits
mailing list