Index: debian/changelog
===================================================================
--- debian/changelog	(.../omweather-0.21.4)	(revision 2269)
+++ debian/changelog	(.../omweather-0.21.5)	(revision 2269)
@@ -1,3 +1,13 @@
+omweather (0.21.5) unstable; urgency=low
+
+  * Fixed the bug - background color is not saving and loading properly #3006
+  * Increased  events area of buttons in popup and settings windows
+  * Fixed problem with multi starting of popup window
+  * Fixed problem with accelerated starting of window popup with current weather
+  * Corrected showing of icon, title wind and wind direction in night time on main display
+
+ -- Vlad Vasiliev <vlad@gas.by>  Thu, 20 Nov 2008 19:36:00 +0200
+
 omweather (0.21.4) unstable; urgency=low
 
   * Fixed problem starting of applet under OS2008, if the checkbox of internal
Index: src/weather-popup.c
===================================================================
--- src/weather-popup.c	(.../omweather-0.21.4)	(revision 2269)
+++ src/weather-popup.c	(.../omweather-0.21.5)	(revision 2269)
@@ -312,7 +312,7 @@
 	current_tab = gtk_vbox_new(FALSE, 0);
 
     if(current_tab){
-	if(active_tab == 0 && app->config->separate)
+	if(active_tab == 0)
         {
     	    gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
 				current_tab,
@@ -397,10 +397,10 @@
 			(gpointer)app->popup_window);
 
 /* Pack buttons to the buttons box */
-    gtk_box_pack_start(GTK_BOX(buttons_box), settings_button, FALSE, FALSE, 60);
+    gtk_box_pack_start(GTK_BOX(buttons_box), settings_button, TRUE, TRUE, 5);
     gtk_box_pack_start(GTK_BOX(buttons_box), refresh_button, TRUE, TRUE, 5);
     gtk_box_pack_start(GTK_BOX(buttons_box), about_button, TRUE, TRUE, 5);
-    gtk_box_pack_start(GTK_BOX(buttons_box), close_button, FALSE, FALSE, 60);
+    gtk_box_pack_start(GTK_BOX(buttons_box), close_button, TRUE, TRUE, 5);
 
     /* check if no data file for this station */
     if(gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook)) > 0){
Index: src/weather-config.c
===================================================================
--- src/weather-config.c	(.../omweather-0.21.4)	(revision 2269)
+++ src/weather-config.c	(.../omweather-0.21.5)	(revision 2269)
@@ -436,6 +436,14 @@
 	config->font = g_strdup(tmp);
 	g_free(tmp);
     }
+   /* Get background color. */
+    tmp = NULL;
+    tmp = gconf_client_get_string(gconf_client,
+                                    GCONF_KEY_WEATHER_BACKGROUND_COLOR, NULL);
+    if(!tmp || !gdk_color_parse(tmp, &(config->background_color)))
+        config->background_color = DEFAULT_FONT_COLOR;
+    g_free(tmp);
+    tmp = NULL;
 
     #ifndef OS2008
 	/* Get Enable Transparency flag. Default is TRUE. */
@@ -790,7 +798,14 @@
     gconf_client_set_bool(gconf_client,
         		GCONF_KEY_SEPARATE_DATA,
 			config->separate, NULL);
-
+     /* Save Background Color */
+    sprintf(temp_buffer, "#%02x%02x%02x",
+                         config->background_color.red >> 8,
+                         config->background_color.green >> 8,
+                         config->background_color.blue >> 8);
+    gconf_client_set_string(gconf_client,
+                         GCONF_KEY_WEATHER_BACKGROUND_COLOR,
+                         temp_buffer, NULL);
      /* Save Downloading after connecting State */
     gconf_client_set_bool(gconf_client,
         		GCONF_KEY_DOWNLOADING_AFTER_CONNECTING,
Index: src/weather-home.c
===================================================================
--- src/weather-home.c	(.../omweather-0.21.4)	(revision 2269)
+++ src/weather-home.c	(.../omweather-0.21.5)	(revision 2269)
@@ -464,15 +464,20 @@
 			sprintf(buffer_icon, "%s48.png", path_large_icon);
 		    }
 		    else{ /* if first day and not config->separate data */
-			create_day_temperature_text(day, buffer, FALSE, FALSE);
-			/* displaying wind if necessary */    
-			if(app->config->show_wind)
-			    add_wind_text(day, buffer + strlen(buffer));
 			/* if current time is night show night icon */
-			if(current_time > night_begin_time && current_time < day_begin_time)
+			if(current_time > night_begin_time || current_time < day_begin_time){
+			    create_day_temperature_text(day, buffer, FALSE, FALSE);
+			    /* displaying wind if necessary */    
+			    if(app->config->show_wind)
+				add_wind_text(day, buffer + strlen(buffer),FALSE);
 			    sprintf(buffer_icon, "%s%s.png", path_large_icon, item_value(day, "night_icon"));
-			else
+			}else{
+			    create_day_temperature_text(day, buffer, FALSE, FALSE);
+			    /* displaying wind if necessary */    
+			    if(app->config->show_wind)
+				add_wind_text(day, buffer + strlen(buffer),TRUE);
 			    sprintf(buffer_icon, "%s%s.png", path_large_icon, item_value(day, "day_icon"));
+			}
 		    }
 		}
 	    }
@@ -480,10 +485,18 @@
 		buffer[0] = 0;
 		(app->config->separate && i == 1) ? (tmp_day = first) : (tmp_day = day);
 		create_day_temperature_text(tmp_day, buffer, FALSE, FALSE);
-		if(app->config->show_wind)
-		    add_wind_text(tmp_day, buffer + strlen(buffer));
-		sprintf(buffer_icon, "%s%s.png", path_large_icon,
+		if((app->config->separate) && (i == 1) &&
+		   (current_time > night_begin_time || current_time < day_begin_time)){
+		    if(app->config->show_wind)
+			add_wind_text(tmp_day, buffer + strlen(buffer),FALSE);
+		    sprintf(buffer_icon, "%s%s.png", path_large_icon,
+			item_value(tmp_day, "night_icon"));
+		}else{
+		    if(app->config->show_wind)
+			add_wind_text(tmp_day, buffer + strlen(buffer),TRUE);
+		    sprintf(buffer_icon, "%s%s.png", path_large_icon,
 			item_value(tmp_day, "day_icon"));
+		}	
 	    }
 	}
 	else{ /* Show N/A for all others day buttons when it not inside range */
@@ -517,7 +530,8 @@
 						    app->config->transparency,
 						    TRUE,
 						    &(app->config->background_color));
-	g_signal_connect(tmp_button->button, "button-release-event",
+//	g_signal_connect(tmp_button->button, "button-release-event",
+	g_signal_connect(tmp_button->button, "button-press-event",
 			    G_CALLBACK(weather_window_popup),
 			    (is_na_day ? (GINT_TO_POINTER(-1)) : (GINT_TO_POINTER(i))));
 	add_item2object(&(app->buttons), (void*)tmp_button);
@@ -1626,31 +1640,46 @@
     return  mktime(&tm);
 }
 /*******************************************************************************/
-void add_wind_text(GSList *day, gchar *buffer){
+void add_wind_text(GSList *day, gchar *buffer, gboolean is_day){
     gchar	*wind_direction = NULL;
 #ifdef DEBUGFUNCTIONCALL
     START_FUNCTION;
 #endif
-    if(strcmp((char*)item_value(day, "day_wind_speed"), "N/A")){
-	if(!strcmp((char*)item_value(day, "day_wind_title"), "N/A"))
-	    wind_direction = _("N/A");
-	else
-	    wind_direction = (char*)hash_table_find(item_value(day, "day_wind_title"), TRUE);
+
+    if( (is_day && !strcmp((char*)item_value(day, "day_wind_speed"), "N/A"))||
+	!strcmp((char*)item_value(day, "night_wind_speed"), "N/A")){
 	sprintf(buffer + strlen(buffer),
-		"<span foreground='#%02x%02x%02x'>\n%s\n%.1f</span>",
-		app->config->font_color.red >> 8,
-		app->config->font_color.green >> 8,
-		app->config->font_color.blue >> 8,
-		wind_direction,
-		convert_wind_units(app->config->wind_units, atof(item_value(day, "day_wind_speed"))));
-    }
-    else
-	sprintf(buffer + strlen(buffer),
 		"<span foreground='#%02x%02x%02x'>\n%s\n%s</span>",
 		app->config->font_color.red >> 8,
 		app->config->font_color.green >> 8,
 		app->config->font_color.blue >> 8,
 		_("N/A"), _("N/A"));
+    }
+    else{
+    	if((is_day && !strcmp((char*)item_value(day, "day_wind_title"), "N/A"))||
+    	    !strcmp((char*)item_value(day, "night_wind_title"), "N/A"))
+	    wind_direction = _("N/A");
+	else
+	    if (is_day){
+		wind_direction = (char*)hash_table_find(item_value(day, "day_wind_title"), TRUE);
+		sprintf(buffer + strlen(buffer),
+		    "<span foreground='#%02x%02x%02x'>\n%s\n%.1f</span>",
+		    app->config->font_color.red >> 8,
+		    app->config->font_color.green >> 8,
+		    app->config->font_color.blue >> 8,
+		    wind_direction,
+		    convert_wind_units(app->config->wind_units, atof(item_value(day, "day_wind_speed"))));
+	    }else{
+		wind_direction = (char*)hash_table_find(item_value(day, "night_wind_title"), TRUE);
+		sprintf(buffer + strlen(buffer),
+		    "<span foreground='#%02x%02x%02x'>\n%s\n%.1f</span>",
+		    app->config->font_color.red >> 8,
+		    app->config->font_color.green >> 8,
+		    app->config->font_color.blue >> 8,
+		    wind_direction,
+		    convert_wind_units(app->config->wind_units, atof(item_value(day, "night_wind_speed"))));
+	    }
+    }
 }
 /*******************************************************************************/
 void create_current_temperature_text(GSList *day, gchar *buffer, gboolean valid,
Index: src/weather-home.h
===================================================================
--- src/weather-home.h	(.../omweather-0.21.4)	(revision 2269)
+++ src/weather-home.h	(.../omweather-0.21.5)	(revision 2269)
@@ -60,7 +60,7 @@
 int calculate_offset_of_day(int count_day);
 void add_change_day_part_event(GSList *day, guint year, guint month);
 time_t get_day_part_begin_time(GSList *day, guint year, const gchar *day_part);
-void add_wind_text(GSList *day, gchar *buffer);
+void add_wind_text(GSList *day, gchar *buffer, gboolean is_day);
 void create_current_temperature_text(GSList *day, gchar *buffer, gboolean valid,
 							const gchar *day_name);
 void create_day_temperature_text(GSList *day, gchar *buffer, gboolean valid,
Index: src/weather-settings.c
===================================================================
--- src/weather-settings.c	(.../omweather-0.21.4)	(revision 2269)
+++ src/weather-settings.c	(.../omweather-0.21.5)	(revision 2269)
@@ -775,10 +775,10 @@
 /* Change background color on buttons */
 
 /* Pack buttons to the buttons box */
-    gtk_box_pack_start(GTK_BOX(buttons_box), back_button, TRUE, TRUE, 25);
-    gtk_box_pack_start(GTK_BOX(buttons_box), apply_button, TRUE, TRUE, 10);
-    gtk_box_pack_start(GTK_BOX(buttons_box), help_button, TRUE, TRUE, 10);
-    gtk_box_pack_start(GTK_BOX(buttons_box), close_button, TRUE, TRUE, 25);
+    gtk_box_pack_start(GTK_BOX(buttons_box), back_button, TRUE, TRUE, 0);
+    gtk_box_pack_start(GTK_BOX(buttons_box), apply_button, TRUE, TRUE, 0);
+    gtk_box_pack_start(GTK_BOX(buttons_box), help_button, TRUE, TRUE, 0);
+    gtk_box_pack_start(GTK_BOX(buttons_box), close_button, TRUE, TRUE, 0);
 
 /* create tabs widget */
     notebook = gtk_notebook_new();
Index: ChangeLog
===================================================================
--- ChangeLog	(.../omweather-0.21.4)	(revision 2269)
+++ ChangeLog	(.../omweather-0.21.5)	(revision 2269)
@@ -1,3 +1,10 @@
+0.21.5 
+  * Fixed the bug - background color is not saving and loading properly #3006
+  * Increased  events area of buttons in popup and settings windows
+  * Fixed problem with multi starting of popup window
+  * Fixed problem with accelerated starting of window popup with current weather
+  * Corrected showing of icon, title wind and wind direction in night time on main display
+  
 0.21.4
   * Fixed problem starting of applet under OS2008, if the checkbox of internal
     temperature is switched on and  time of updating the temperature is set to never
Index: configure.ac
===================================================================
--- configure.ac	(.../omweather-0.21.4)	(revision 2269)
+++ configure.ac	(.../omweather-0.21.5)	(revision 2269)
@@ -1,6 +1,6 @@
 AC_PREREQ(2.59)
-AC_INIT(omweather, 0.21.4)
-AM_INIT_AUTOMAKE(omweather, 0.21.4)
+AC_INIT(omweather, 0.21.5)
+AM_INIT_AUTOMAKE(omweather, 0.21.5)
 AC_CONFIG_HEADER([src/config.h:src/config.h.in])
 AC_CONFIG_SRCDIR([src/weather-home.c])
 AC_CANONICAL_HOST
