summaryrefslogtreecommitdiff
path: root/source3/lib/netapi
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-09-02 02:02:20 +0200
committerGünther Deschner <gd@samba.org>2008-09-05 13:06:26 +0200
commit231de7054a8f92990bc3b9da7dbddfa18cc44ff1 (patch)
treef1458f14a86dab4ca2ef2b080f2831868332af2f /source3/lib/netapi
parent685f7e3419b27cd0e274b7a768d9fa23b7de5f85 (diff)
downloadsamba-231de7054a8f92990bc3b9da7dbddfa18cc44ff1.tar.gz
samba-231de7054a8f92990bc3b9da7dbddfa18cc44ff1.tar.bz2
samba-231de7054a8f92990bc3b9da7dbddfa18cc44ff1.zip
netdomjoin-gui: fix some widget closing callbacks.
Guenther (This used to be commit 8d541a3579637bb48c04ebb2b18844509c1f43e8)
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r--source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
index bf41ee430d..98994b69f8 100644
--- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
+++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
@@ -104,14 +104,23 @@ static gboolean callback_delete_event(GtkWidget *widget,
return FALSE;
}
-static void callback_do_close(GtkWidget *widget,
- gpointer data)
+static void callback_do_close_data(GtkWidget *widget,
+ gpointer data)
{
- debug("callback_do_close called\n");
+ debug("callback_do_close_data called\n");
if (data) {
gtk_widget_destroy(GTK_WIDGET(data));
- data = NULL;
+ }
+}
+
+static void callback_do_close_widget(GtkWidget *widget,
+ gpointer data)
+{
+ debug("callback_do_close_widget called\n");
+
+ if (widget) {
+ gtk_widget_destroy(widget);
}
}
@@ -503,7 +512,7 @@ static void callback_creds_prompt(GtkWidget *widget,
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ALWAYS);
g_signal_connect(G_OBJECT(window), "delete_event",
- G_CALLBACK(callback_do_close), window);
+ G_CALLBACK(callback_do_close_widget), NULL);
state->window_creds_prompt = window;
gtk_container_set_border_width(GTK_CONTAINER(window), 10);
@@ -1106,7 +1115,7 @@ static void callback_do_change(GtkWidget *widget,
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ALWAYS);
g_signal_connect(G_OBJECT(window), "delete_event",
- G_CALLBACK(callback_do_close), window);
+ G_CALLBACK(callback_do_close_widget), NULL);
gtk_container_set_border_width(GTK_CONTAINER(window), 10);