X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Fmain.c;h=67df7a6a3a3703c981b6d043c71ad87e3df9309e;hp=546628330471e2a377397ac3b13d3e515893691b;hb=1cf8b4ecd92f49dfbbe0472e02d4e5bc8841fe2f;hpb=dc6bbd8a388179d64fdc20bdf18056b0bd9267c4 diff --git a/src/main.c b/src/main.c index 5466283..67df7a6 100644 --- a/src/main.c +++ b/src/main.c @@ -46,14 +46,16 @@ static gboolean on_map(AWeatherGui *gui, GdkEvent *event, gchar *site) int main(int argc, char *argv[]) { /* Arguments */ - gint opt_debug = 6; - gchar *opt_site = "IND"; - gboolean opt_auto = FALSE; + gint opt_debug = 6; + gchar *opt_site = "KIND"; + gboolean opt_auto = FALSE; + gboolean opt_offline = FALSE; GOptionEntry entries[] = { - //long short flg type location description arg desc - {"debug", 'd', 0, G_OPTION_ARG_INT, &opt_debug, "Change default log level", "[1-7]"}, - {"site", 's', 0, G_OPTION_ARG_STRING, &opt_site, "Set initial site", NULL}, - {"auto", 'a', 0, G_OPTION_ARG_NONE, &opt_auto, "Auto update radar (todo)", NULL}, + //long short flg type location description arg desc + {"debug", 'd', 0, G_OPTION_ARG_INT, &opt_debug, "Change default log level", "[1-7]"}, + {"site", 's', 0, G_OPTION_ARG_STRING, &opt_site, "Set initial site", NULL}, + {"offline", 'o', 0, G_OPTION_ARG_NONE, &opt_offline, "Run in offline mode", NULL}, + {"auto", 'a', 0, G_OPTION_ARG_NONE, &opt_auto, "Auto update radar (todo)", NULL}, {NULL} }; @@ -76,6 +78,7 @@ int main(int argc, char *argv[]) /* Set up AWeather */ AWeatherGui *gui = aweather_gui_new(); AWeatherView *view = aweather_gui_get_view(gui); + aweather_view_set_offline(view, opt_offline); g_signal_connect(gui, "map-event", G_CALLBACK(on_map), opt_site); /* Load plugins */