#include <config.h>
#include <gtk/gtk.h>
-#include <gtk/gtkgl.h>
#include <gdk/gdkkeysyms.h>
#include "grits.h"
*************/
static gboolean grits_shutdown(GtkWidget *window)
{
+ static gboolean shutdown = FALSE;
+ if (shutdown) return TRUE;
+ shutdown = TRUE;
+
grits_plugins_free(plugins);
g_object_unref(prefs);
gtk_widget_destroy(window);
-
- while (gtk_events_pending())
- gtk_main_iteration();
-
gtk_main_quit();
return TRUE;
}
{
GritsPlugin *plugin = grits_plugins_load(plugins, name, viewer, prefs);
GtkWidget *config = grits_plugin_get_config(plugin);
- gtk_notebook_append_page(notebook, config, gtk_label_new(name));
+ if (config)
+ gtk_notebook_append_page(notebook, config, gtk_label_new(name));
}
/***********
g_thread_init(NULL);
gdk_threads_init();
gtk_init(&argc, &argv);
- gtk_gl_init(&argc, &argv);
prefs = grits_prefs_new(NULL, NULL);
plugins = grits_plugins_new(g_getenv("GRITS_PLUGIN_PATH"), prefs);
/* Configurable stuff */
grits_viewer_set_offline(viewer, TRUE);
(void)load_plugin;
- load_plugin(plugins, "elev", viewer, prefs, GTK_NOTEBOOK(config));
load_plugin(plugins, "env", viewer, prefs, GTK_NOTEBOOK(config));
- //load_plugin(plugins, "map", viewer, prefs, GTK_NOTEBOOK(config));
+ load_plugin(plugins, "elev", viewer, prefs, GTK_NOTEBOOK(config));
load_plugin(plugins, "sat", viewer, prefs, GTK_NOTEBOOK(config));
- load_plugin(plugins, "test", viewer, prefs, GTK_NOTEBOOK(config));
+ //load_plugin(plugins, "map", viewer, prefs, GTK_NOTEBOOK(config));
//load_plugin(plugins, "radar", viewer, prefs, GTK_NOTEBOOK(config));
+ load_plugin(plugins, "test", viewer, prefs, GTK_NOTEBOOK(config));
gtk_widget_show_all(config);
gtk_main();