commit bd86acf42178d20725da31eb5a5146391a03fd50
Author: Vibha Yadav <gtk3@linux-qoy7.site>
Date:   Tue Nov 16 16:25:25 2010 +0530

    Avoid Using Deprecated GdkColormap

diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 98c1515..baa599b 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -159,13 +159,13 @@ day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *main_item,
 				if (first) {
 					first = FALSE;
 
-					if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), event->comp_data), &bg_color)) {
-						GdkColormap *colormap;
+					if(gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), event->comp_data), &bg_color)) {
+						/*GdkColormap *colormap;
 
 						colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
 						if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
 							gdk_cairo_set_source_color (cr, &bg_color);
-						}
+						}*/
 					}
 				}
 
@@ -280,14 +280,14 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
 
 	if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), event->comp_data),
 			     &bg_color)) {
-		GdkColormap *colormap;
+		/*GdkColormap *colormap;
 
 		colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
 		if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
 			red = bg_color.red;
 			green = bg_color.green;
 			blue = bg_color.blue;
-			}
+			}*/
 	}
 
 	is_editing = day_view->editing_event_day == day && day_view->editing_event_num == event_num;
@@ -913,12 +913,12 @@ day_view_main_item_draw_events_in_vbars (EDayViewMainItem *main_item,
 		}
 
 		if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), event->comp_data), &bg_color)) {
-			GdkColormap *colormap;
+			/*GdkColormap *colormap;
 
 			colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
 			if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
 				gdk_cairo_set_source_color (cr, &bg_color);
-			}
+			}*/
 		}
 
 		cairo_rectangle (cr, grid_x, bar_y, E_DAY_VIEW_BAR_WIDTH - 2, bar_h);
@@ -1225,11 +1225,11 @@ day_view_main_item_draw (GnomeCanvasItem *canvas_item,
 				&day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE]);
 
 		if (day_view->marcus_bains_day_view_color && gdk_color_parse (day_view->marcus_bains_day_view_color, &mb_color)) {
-			GdkColormap *colormap;
+			/*GdkColormap *colormap;
 
 			colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
 			if (gdk_colormap_alloc_color (colormap, &mb_color, TRUE, TRUE))
-				gdk_cairo_set_source_color (cr, &mb_color);
+				gdk_cairo_set_source_color (cr, &mb_color);*/
 		}
 		zone = e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view));
 		time_now = icaltime_current_time_with_zone (zone);
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index 35a8e3e..c52b5da 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -431,12 +431,12 @@ edvti_draw_zone (GnomeCanvasItem   *canvas_item,
 		gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE]);
 
 		if (day_view->marcus_bains_time_bar_color && gdk_color_parse (day_view->marcus_bains_time_bar_color, &mb_color)) {
-			GdkColormap *colormap;
+			/*GdkColormap *colormap;
 
 			colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
 			if (gdk_colormap_alloc_color (colormap, &mb_color, TRUE, TRUE)) {
 				gdk_cairo_set_source_color (cr, &mb_color);
-			}
+			}*/
 		} else
 			mb_color = day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE];
 
@@ -451,12 +451,12 @@ edvti_draw_zone (GnomeCanvasItem   *canvas_item,
 		mb_color = day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE];
 
 		if (day_view->marcus_bains_time_bar_color && gdk_color_parse (day_view->marcus_bains_time_bar_color, &mb_color)) {
-			GdkColormap *colormap;
+			/*GdkColormap *colormap;
 
 			colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
 			if (gdk_colormap_alloc_color (colormap, &mb_color, TRUE, TRUE)) {
 				gdk_cairo_set_source_color (cr, &mb_color);
-			}
+			}*/
 		}
 	}
 
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index e517e75..fccc6c6 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -107,7 +107,7 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item,
 		e_cal_model_get_color_for_component (
 		e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
 		event->comp_data), &bg_color)) {
-		GdkColormap *colormap;
+		/*GdkColormap *colormap;
 
 		colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
 		if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
@@ -116,7 +116,7 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item,
 			gdk_cairo_set_source_color (
 				cr, &day_view->colors
 				[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
-		}
+		}*/
 	} else {
 		gdk_cairo_set_source_color (
 			cr, &day_view->colors
@@ -210,7 +210,7 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
 		e_cal_model_get_color_for_component (
 		e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
 		event->comp_data), &bg_color)) {
-		GdkColormap *colormap;
+		/*GdkColormap *colormap;
 
 		colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
 		if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
@@ -221,7 +221,7 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
 			red = day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND].red;
 			green = day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND].green;
 			blue = day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND].blue;
-		}
+		}*/
 	} else {
 		red = day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND].red;
 		green = day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND].green;
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index a30c7a5..1c7655d 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -1443,13 +1443,13 @@ e_day_view_get_text_color (EDayView *day_view, EDayViewEvent *event, GtkWidget *
 
 	if (is_comp_data_valid (event) && gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), event->comp_data),
 	     &bg_color)) {
-                GdkColormap *colormap;
+                /*GdkColormap *colormap;
 		colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
 		if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
 			red = bg_color.red;
 			green = bg_color.green;
 			blue = bg_color.blue;
-                }
+                }*/
 	}
 
 	style = gtk_widget_get_style (widget);
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 4b2ccfc..18a89fa 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -909,7 +909,7 @@ e_meeting_time_selector_expose_key_color (GtkWidget *darea,
 
 	gtk_paint_shadow (
 		style, window, GTK_STATE_NORMAL,
-		GTK_SHADOW_IN, NULL, NULL, NULL, 0, 0,
+		GTK_SHADOW_IN, NULL, NULL, 0, 0,
 		allocation.width, allocation.height);
 
         cr = gdk_cairo_create (event->window);
@@ -933,15 +933,16 @@ static void
 e_meeting_time_selector_alloc_named_color (EMeetingTimeSelector * mts,
 					   const gchar *name, GdkColor *c)
 {
-	GdkColormap *colormap;
+	//GdkColormap *colormap;
 
 	g_return_if_fail (name != NULL);
 	g_return_if_fail (c != NULL);
 
-	gdk_color_parse (name, c);
-	colormap = gtk_widget_get_colormap (GTK_WIDGET (mts));
+	if(!gdk_color_parse (name, c))
+		g_warning ("Failed to parse color: %s\n", name);
+	/*colormap = gtk_widget_get_colormap (GTK_WIDGET (mts));
 	if (!gdk_colormap_alloc_color (colormap, c, TRUE, TRUE))
-		g_warning ("Failed to allocate color: %s\n", name);
+		g_warning ("Failed to allocate color: %s\n", name);*/
 }
 
 static void
@@ -2451,7 +2452,7 @@ e_meeting_time_selector_on_canvas_realized (GtkWidget *widget,
 	GdkWindow *window;
 
 	window = gtk_layout_get_bin_window (GTK_LAYOUT (widget));
-	gdk_window_set_back_pixmap (window, NULL, FALSE);
+	gdk_window_set_background_pattern (window, NULL);
 }
 
 /* This is called when the meeting start time GnomeDateEdit is changed,
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 8a525eb..2892466 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -562,7 +562,7 @@ week_view_event_item_draw_triangle (EWeekViewEventItem *event_item,
 		e_cal_model_get_color_for_component (model, event->comp_data);
 
 	if (gdk_color_parse (color_spec, &bg_color)) {
-		GdkColormap *colormap;
+		/*GdkColormap *colormap;
 
 		colormap = gtk_widget_get_colormap (GTK_WIDGET (week_view));
 		if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
@@ -575,7 +575,7 @@ week_view_event_item_draw_triangle (EWeekViewEventItem *event_item,
 			color = &week_view->colors[wvc];
 
 			gdk_cairo_set_source_color (cr, color);
-		}
+		}*/
 	} else {
 		EWeekViewColors wvc;
 		GdkColor *color;
@@ -813,12 +813,12 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
 
 	bg_color = week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND];
 	if (gdk_color_parse (color_spec, &bg_color)) {
-		GdkColormap *colormap;
+		/*GdkColormap *colormap;
 
 		colormap = gtk_widget_get_colormap (GTK_WIDGET (week_view));
 		if (!gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
 			bg_color = week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND];
-		}
+		}*/
 	}
 
 	red = bg_color.red;
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index c964d1e..fc6062a 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -1048,13 +1048,13 @@ e_week_view_get_text_color (EWeekView *week_view, EWeekViewEvent *event, GtkWidg
 
 	if (is_comp_data_valid (event) && gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)), event->comp_data),
 	     &bg_color)) {
-                GdkColormap *colormap;
+                /*GdkColormap *colormap;
 		colormap = gtk_widget_get_colormap (GTK_WIDGET (week_view));
 		if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
 			red = bg_color.red;
 			green = bg_color.green;
 			blue = bg_color.blue;
-                }
+                }*/
 	}
 
 	style = gtk_widget_get_style (widget);
