[evolution/gtk3] Bug #640523 - Crash when clicking Free/Busy in a meeting editor
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gtk3] Bug #640523 - Crash when clicking Free/Busy in a meeting editor
- Date: Tue, 25 Jan 2011 12:09:14 +0000 (UTC)
commit 0b6c245539a699a443f4568205dc5ebb50d1503d
Author: Milan Crha <mcrha redhat com>
Date: Tue Jan 25 13:08:35 2011 +0100
Bug #640523 - Crash when clicking Free/Busy in a meeting editor
calendar/gui/e-meeting-time-sel.c | 22 +++++-----------------
1 files changed, 5 insertions(+), 17 deletions(-)
---
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 9219ed6..c0f7406 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -104,8 +104,8 @@ static void e_meeting_time_selector_add_key_color (EMeetingTimeSelector * mts,
GtkWidget *hbox,
gchar *label_text,
GdkColor *color);
-static gint e_meeting_time_selector_expose_key_color (GtkWidget *darea,
- GdkEventExpose *event,
+static gint e_meeting_time_selector_draw_key_color (GtkWidget *darea,
+ cairo_t *cr,
GdkColor *color);
static void e_meeting_time_selector_options_menu_detacher (GtkWidget *widget,
GtkMenu *menu);
@@ -885,36 +885,27 @@ e_meeting_time_selector_add_key_color (EMeetingTimeSelector * mts,
gtk_widget_show (label);
g_signal_connect (darea, "draw",
- G_CALLBACK (e_meeting_time_selector_expose_key_color),
+ G_CALLBACK (e_meeting_time_selector_draw_key_color),
color);
}
static gint
-e_meeting_time_selector_expose_key_color (GtkWidget *darea,
- GdkEventExpose *event,
- GdkColor *color)
+e_meeting_time_selector_draw_key_color (GtkWidget *darea, cairo_t *cr, GdkColor *color)
{
EMeetingTimeSelector * mts;
GtkAllocation allocation;
- GdkWindow *window;
GtkStyle *style;
- cairo_t *cr, *window_cr;
style = gtk_widget_get_style (darea);
- window = gtk_widget_get_window (darea);
gtk_widget_get_allocation (darea, &allocation);
mts = g_object_get_data (G_OBJECT (darea), "data");
- window_cr = gdk_cairo_create(window);
-
gtk_paint_shadow (
- style, window_cr, GTK_STATE_NORMAL,
+ style, cr, GTK_STATE_NORMAL,
GTK_SHADOW_IN, NULL, NULL, 0, 0,
allocation.width, allocation.height);
- cr = gdk_cairo_create (event->window);
-
if (color) {
gdk_cairo_set_source_color (cr, color);
} else {
@@ -925,9 +916,6 @@ e_meeting_time_selector_expose_key_color (GtkWidget *darea,
allocation.width - 2, allocation.height - 2);
cairo_fill (cr);
- cairo_destroy (cr);
- cairo_destroy (window_cr);
-
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]