diff options
author | Nikias Bassen | 2010-02-02 23:48:47 +0100 |
---|---|---|
committer | Martin Szulecki | 2010-02-03 00:03:52 +0100 |
commit | f86d923ed490dd226f5e9c162073d9e3bd31f297 (patch) | |
tree | 90e630d8938986fdd77cee923d447ab3f55cd73d | |
parent | 8cead47dc51e330facfc6d19f47f4c912121eeb3 (diff) | |
download | sbmanager-f86d923ed490dd226f5e9c162073d9e3bd31f297.tar.gz sbmanager-f86d923ed490dd226f5e9c162073d9e3bd31f297.tar.bz2 |
Remove sbmanager widget on page close and remove some debug code
-rw-r--r-- | nautilus/nautilus-sbmanager.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/nautilus/nautilus-sbmanager.c b/nautilus/nautilus-sbmanager.c index 1e0c282..95e2f4e 100644 --- a/nautilus/nautilus-sbmanager.c +++ b/nautilus/nautilus-sbmanager.c @@ -137,23 +137,22 @@ static void nautilus_sbmgr_load_finished(gboolean success) static gboolean nautilus_sbmgr_expose_cb(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { - printf("%s\n", __func__); -// if (event->in) { if (loading == FALSE) { loading = TRUE; sbmgr_load((const char*)g_object_get_data(G_OBJECT (widget), "NautilusSBManager::uuid"), NULL, nautilus_sbmgr_load_finished); - } else { - printf("already loading\n"); } -/* } else { - printf("%s: unfocus\n", __func__); - }*/ return TRUE; } -static gboolean nautilus_sbmgr_hide_cb(GtkWidget *widget, gpointer user_data) +static gboolean nautilus_sbmgr_unrealize_cb(GtkWidget *widget, gpointer user_data) { sbmgr_finalize(); + + if (user_data) { + GtkWidget *sbmgr_widget = (GtkWidget*)user_data; + gtk_widget_destroy(sbmgr_widget); + } + return TRUE; } @@ -180,9 +179,9 @@ static GtkWidget *nautilus_sbmgr_new(const char *uuid) NULL); g_signal_connect (G_OBJECT (sbmgr_container), - "destroy-event", - G_CALLBACK(nautilus_sbmgr_hide_cb), - NULL); + "unrealize", + G_CALLBACK(nautilus_sbmgr_unrealize_cb), + sbmgr_widget); return sbmgr_container; } @@ -230,26 +229,22 @@ GList *nautilus_sbmanager_property_page (NautilusPropertyPageProvider *provider, static void nautilus_sbmanager_property_page_provider_iface_init (NautilusPropertyPageProviderIface *iface) { - printf("%s\n", __func__); iface->get_pages = nautilus_sbmanager_property_page; } static void nautilus_sbmanager_instance_init (NautilusSBManager *cvs) { - printf("%s\n", __func__); } static void nautilus_sbmanager_class_init (NautilusSBManagerClass *class) { - printf("%s\n", __func__); } static void nautilus_sbmanager_class_finalize (NautilusSBManagerClass *class) { - printf("%s\n", __func__); } GType |