_chimara_glk_free_window_private_data(ChimaraGlkPrivate *priv)
{
/* Destroy the window tree */
- trash_windows_recursive(priv, priv->root_window->data);
- g_node_destroy(priv->root_window);
+ if(priv->root_window) {
+ trash_windows_recursive(priv, priv->root_window->data);
+ g_node_destroy(priv->root_window);
+ }
/* Free the window arrangement signaling */
g_mutex_lock(priv->arrange_lock);
g_mutex_unlock(priv->arrange_lock);
g_mutex_free(priv->arrange_lock);
priv->arrange_lock = NULL;
+
+ /* Remove the dispatch callbacks */
+ priv->register_obj = NULL;
+ priv->unregister_obj = NULL;
+ priv->register_arr = NULL;
+ priv->unregister_arr = NULL;
}
static void
GtkWidget *window, *test_picker, *go, *stop, *interp;
} Widgets;
+gboolean
+on_window_delete_event()
+{
+ gtk_main_quit();
+ return TRUE;
+}
+
void
on_go_clicked(GtkButton *go, Widgets *w)
{
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="window">
<property name="border_width">6</property>
- <signal name="destroy" handler="gtk_main_quit"/>
+ <signal name="delete_event" handler="on_window_delete_event"/>
<child>
<object class="GtkVBox" id="vbox">
<property name="visible">True</property>