]> Pileus Git - aweather/blobdiff - src/plugins/radar.c
Use/update reflectivity colormap
[aweather] / src / plugins / radar.c
index 73d275985ab9a13202d3bdfcd0df950afea70e61..37ed9e3723435aea3e8c5709d83ca062681457cf 100644 (file)
@@ -620,12 +620,10 @@ void radar_conus_free(RadarConus *conus)
 /******************
  * GisPluginRadar *
  ******************/
-static void _draw_hud(GisCallback *callback, gpointer _self)
+static void _draw_hud(GisCallback *callback, GisOpenGL *opengl, gpointer _self)
 {
-       /* TODO */
-       GisPluginRadar *self = GIS_PLUGIN_RADAR(_self);
-       if (!self->colormap)
-               return;
+       /* TODO, pick correct colormaps */
+       AWeatherColormap *colormap = &colormaps[0];
 
        g_debug("GisPluginRadar: _draw_hud");
        /* Print the color table */
@@ -639,7 +637,7 @@ static void _draw_hud(GisCallback *callback, gpointer _self)
        glBegin(GL_QUADS);
        int i;
        for (i = 0; i < 256; i++) {
-               glColor4ubv(self->colormap->data[i]);
+               glColor4ubv(colormap->data[i]);
                glVertex3f(-1.0, (float)((i  ) - 256/2)/(256/2), 0.0); // bot left
                glVertex3f(-1.0, (float)((i+1) - 256/2)/(256/2), 0.0); // top left
                glVertex3f(-0.9, (float)((i+1) - 256/2)/(256/2), 0.0); // top right
@@ -702,7 +700,8 @@ static void gis_plugin_radar_init(GisPluginRadar *self)
        self->sites      = g_hash_table_new_full(g_str_hash, g_str_equal,
                                NULL, (GDestroyNotify)radar_site_free);
        self->config     = gtk_notebook_new();
-       gtk_notebook_set_tab_pos(GTK_NOTEBOOK(self->config), GTK_POS_LEFT);
+       /* Need to position on the top because of Win32 bug */
+       gtk_notebook_set_tab_pos(GTK_NOTEBOOK(self->config), GTK_POS_BOTTOM);
 }
 static void gis_plugin_radar_dispose(GObject *gobject)
 {