Reset Glk style hints at beginning of program
[projects/chimara/chimara.git] / libchimara / chimara-glk.c
index 9d9b4696e6f8dd58a7a3ba46aa9413ba4ee18b86..4bbb3aa4e87cfd838bc9843de8322068195ceb31 100644 (file)
@@ -1206,7 +1206,10 @@ chimara_glk_run(ChimaraGlk *glk, const gchar *plugin, int argc, char *argv[], GE
        /* Set the program name */
        priv->program_name = g_path_get_basename(plugin);
        g_object_notify(G_OBJECT(glk), "program-name");
-       
+
+       /* Set Glk styles to defaults */
+       style_reset_glk(glk);
+
     /* Run in a separate thread */
        priv->thread = g_thread_try_new("glk", (GThreadFunc)glk_enter, startup, error);
 
@@ -1316,6 +1319,7 @@ chimara_glk_unload_plugin(ChimaraGlk *glk)
     CHIMARA_GLK_USE_PRIVATE(glk, priv);
        if( priv->program && !g_module_close(priv->program) )
                g_warning( "Error closing module :%s", g_module_error() );
+       priv->program = NULL;
 }
 
 /**