]> Pileus Git - aweather/blobdiff - src/plugins/level2.c
Update compat includes
[aweather] / src / plugins / level2.c
index 2edaabcfc61605322b243de410790a31defbdda0..573746a9c7ba0f8268a5ed09429339436d75f9b3 100644 (file)
 
 #include <config.h>
 #include <math.h>
-#include <GL/gl.h>
 #include <glib/gstdio.h>
 #include <grits.h>
 #include <rsl.h>
 
 #include "level2.h"
 
+#include "../compat.h"
+
 #define ISO_MIN 30
 #define ISO_MAX 80
 
@@ -324,7 +325,7 @@ void aweather_level2_set_iso(AWeatherLevel2 *level2, gfloat level)
                vol->disp = GRITS_VOLUME_SURFACE;
                GRITS_OBJECT(vol)->center = GRITS_OBJECT(level2)->center;
                grits_viewer_add(GRITS_OBJECT(level2)->viewer,
-                               GRITS_OBJECT(vol), GRITS_LEVEL_WORLD+1, FALSE);
+                               GRITS_OBJECT(vol), GRITS_LEVEL_WORLD+5, TRUE);
                level2->volume = vol;
        }
        if (ISO_MIN < level && level < ISO_MAX) {
@@ -379,9 +380,9 @@ AWeatherLevel2 *aweather_level2_new_from_file(const gchar *file, const gchar *si
 
        /* Load the radar file */
        RSL_read_these_sweeps("all", NULL);
-       g_message("read start");
+       g_debug("AWeatherLevel2: rsl read start");
        Radar *radar = RSL_wsr88d_to_radar(raw, (gchar*)site);
-       g_message("read done");
+       g_debug("AWeatherLevel2: rsl read done");
        g_free(raw);
        if (!radar)
                return NULL;
@@ -420,7 +421,7 @@ GtkWidget *aweather_level2_get_config(AWeatherLevel2 *level2)
 
        /* Add date */
        gchar *date_str = g_strdup_printf("<b><i>%04d-%02d-%02d %02d:%02d</i></b>",
-                       radar->h.year, radar->h.month, radar->h.day+1,
+                       radar->h.year, radar->h.month, radar->h.day,
                        radar->h.hour, radar->h.minute);
        GtkWidget *date_label = gtk_label_new(date_str);
        gtk_label_set_use_markup(GTK_LABEL(date_label), TRUE);
@@ -460,7 +461,8 @@ GtkWidget *aweather_level2_get_config(AWeatherLevel2 *level2)
                                                        cols-1,cols, 0,1, GTK_FILL,GTK_FILL, 0,0);
                                }
 
-                               elev_box = gtk_hbox_new(TRUE, 0);
+                               elev_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+                               gtk_box_set_homogeneous(GTK_BOX(elev_box), TRUE);
                                gtk_table_attach(GTK_TABLE(table), elev_box,
                                                cols-1,cols, rows-1,rows, GTK_FILL,GTK_FILL, 0,0);
                        }
@@ -490,7 +492,7 @@ GtkWidget *aweather_level2_get_config(AWeatherLevel2 *level2)
        gtk_misc_set_alignment(GTK_MISC(row_label), 1, 0.5);
        gtk_table_attach(GTK_TABLE(table), row_label,
                        0,1, rows,rows+1, GTK_FILL,GTK_FILL, 5,0);
-       GtkWidget *scale = gtk_hscale_new_with_range(ISO_MIN, ISO_MAX, 0.5);
+       GtkWidget *scale = gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, ISO_MIN, ISO_MAX, 0.5);
        gtk_widget_set_size_request(scale, -1, 26);
        gtk_scale_set_value_pos(GTK_SCALE(scale), GTK_POS_LEFT);
        gtk_range_set_inverted(GTK_RANGE(scale), TRUE);