+
+#define IDLE 0
+#define SEARCHING_LOCATION 1
+#define LOCATION_RECEIVED 2
+
+static int widget_state = IDLE;
+
+void get_me_home(KKJ x, KKJ y)
+{
+ time_t t;
+ struct tm *tmp;
+
+ char hour[4];
+ char minute[4];
+
+ // Get the current time
+ t = time(NULL);
+ tmp = localtime(&t);
+ if (tmp == NULL) {
+ return;
+ }
+
+ // Format needed parts from the current time
+ strftime(hour, sizeof(hour), "%H", tmp);
+ strftime(minute, sizeof(minute), "%M", tmp);
+
+ debug("Hour %s minute %s", hour, minute);
+
+ // Format the URL
+
+
+ // Open the browser
+ char command[1024];
+ sprintf(command, "browser_dbuscmd.sh load_url http://www.reittiopas.fi");
+ system(command);
+
+ widget_state = IDLE;
+}
+