--- a/src/9dm.c Tue Sep 16 13:44:42 2008 +0200
+++ b/src/9dm.c Tue Sep 16 16:38:04 2008 +0200
@@ -172,7 +172,7 @@ int main(int argc, char **argv)
g_timeout_add(TIMEOUT_1*1000, bio_sensor_message_timeout_cb,(gpointer)main_window_height);
#endif
- network_window = window_network_init();
+ network_window = window_network_init(main_window_height);
gtk_widget_show(network_window);
g_timeout_add(200, network_check_available_cb, NULL);
--- a/src/network.c Tue Sep 16 13:44:42 2008 +0200
+++ b/src/network.c Tue Sep 16 16:38:04 2008 +0200
@@ -178,6 +178,7 @@ network_http_request(const char *url, co
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, content_result);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)curl_common_append_data);
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10);
if (postdata)
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postdata);
if (strstr(url, "https://"))
@@ -247,7 +248,7 @@ network_thread_manager(gpointer user_dat
ip = get_wanip_from_http_server();
if (ip)
{
- timeout = 30;
+ timeout = 10;
g_free(ip);
*network_status = NETWORK_STATUS_OK;
}
--- a/src/window_network.c Tue Sep 16 13:44:42 2008 +0200
+++ b/src/window_network.c Tue Sep 16 16:38:04 2008 +0200
@@ -53,7 +53,7 @@ static GtkWidget *network_status_label;
*
*/
GtkWidget *
-window_network_init(void)
+window_network_init(int height_of_main_window)
{
GtkWidget *window, *image, *hbox, *vbox;
GtkWidget *configure_network_button;
@@ -74,7 +74,7 @@ window_network_init(void)
dialog_width = gdk_pixbuf_get_width(dialog_pixbuf);
dialog_height = gdk_pixbuf_get_height(dialog_pixbuf);
window_x = 64;
- window_y = screen_height - dialog_height - 64;
+ window_y = (screen_height- dialog_height)/2+((height_of_main_window)/2+((screen_height/2-height_of_main_window/2)/2));
/* Get the pixel under the dialog we want to display */
dialog_pixbuf_under = gdk_pixbuf_get_from_drawable(NULL,
--- a/src/window_network.h Tue Sep 16 13:44:42 2008 +0200
+++ b/src/window_network.h Tue Sep 16 16:38:04 2008 +0200
@@ -25,7 +25,7 @@
#include "network.h"
-GtkWidget *window_network_init(void);
+GtkWidget *window_network_init(int height_of_main_window);
void window_network_set_network_status(enum network_status network_status);
#endif