evolution/SOURCES/evolution-3.28.5-ecalendaritem-settings.patch

157 lines
5.1 KiB
Diff
Raw Normal View History

2021-05-18 06:48:45 +00:00
diff -up evolution-3.28.5/src/e-util/e-calendar-item.c.ecalendaritem-settings evolution-3.28.5/src/e-util/e-calendar-item.c
--- evolution-3.28.5/src/e-util/e-calendar-item.c.ecalendaritem-settings 2018-07-30 15:37:05.000000000 +0200
+++ evolution-3.28.5/src/e-util/e-calendar-item.c 2020-09-30 15:16:45.798634705 +0200
@@ -45,6 +45,7 @@ static const gint e_calendar_item_days_i
e_calendar_item_days_in_month[month] + (((month) == 1 \
&& ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))) ? 1 : 0)
+static void e_calendar_item_constructed (GObject *object);
static void e_calendar_item_dispose (GObject *object);
static void e_calendar_item_get_property (GObject *object,
guint property_id,
@@ -264,6 +265,7 @@ e_calendar_item_class_init (ECalendarIte
GnomeCanvasItemClass *item_class;
object_class = G_OBJECT_CLASS (class);
+ object_class->constructed = e_calendar_item_constructed;
object_class->dispose = e_calendar_item_dispose;
object_class->get_property = e_calendar_item_get_property;
object_class->set_property = e_calendar_item_set_property;
@@ -637,6 +639,16 @@ e_calendar_item_init (ECalendarItem *cal
}
static void
+e_calendar_item_constructed (GObject *object)
+{
+ ECalendarItem *calitem = E_CALENDAR_ITEM (object);
+
+ G_OBJECT_CLASS (e_calendar_item_parent_class)->constructed (object);
+
+ e_extensible_load_extensions (E_EXTENSIBLE (calitem));
+}
+
+static void
e_calendar_item_dispose (GObject *object)
{
ECalendarItem *calitem;
@@ -787,28 +799,32 @@ e_calendar_item_set_property (GObject *o
dvalue = g_value_get_double (value);
if (calitem->x1 != dvalue) {
calitem->x1 = dvalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_Y1:
dvalue = g_value_get_double (value);
if (calitem->y1 != dvalue) {
calitem->y1 = dvalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_X2:
dvalue = g_value_get_double (value);
if (calitem->x2 != dvalue) {
calitem->x2 = dvalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_Y2:
dvalue = g_value_get_double (value);
if (calitem->y2 != dvalue) {
calitem->y2 = dvalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_FONT_DESC:
@@ -816,21 +832,24 @@ e_calendar_item_set_property (GObject *o
if (calitem->font_desc)
pango_font_description_free (calitem->font_desc);
calitem->font_desc = pango_font_description_copy (font_desc);
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
return;
case PROP_WEEK_NUMBER_FONT_DESC:
font_desc = g_value_get_boxed (value);
if (calitem->week_number_font_desc)
pango_font_description_free (calitem->week_number_font_desc);
calitem->week_number_font_desc = pango_font_description_copy (font_desc);
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
return;
case PROP_MINIMUM_ROWS:
ivalue = g_value_get_int (value);
ivalue = MAX (1, ivalue);
if (calitem->min_rows != ivalue) {
calitem->min_rows = ivalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_MINIMUM_COLUMNS:
@@ -838,35 +857,40 @@ e_calendar_item_set_property (GObject *o
ivalue = MAX (1, ivalue);
if (calitem->min_cols != ivalue) {
calitem->min_cols = ivalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_MAXIMUM_ROWS:
ivalue = g_value_get_int (value);
if (calitem->max_rows != ivalue) {
calitem->max_rows = ivalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_MAXIMUM_COLUMNS:
ivalue = g_value_get_int (value);
if (calitem->max_cols != ivalue) {
calitem->max_cols = ivalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_WEEK_START_DAY:
ivalue = g_value_get_enum (value);
if (calitem->week_start_day != ivalue) {
calitem->week_start_day = ivalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_SHOW_WEEK_NUMBERS:
bvalue = g_value_get_boolean (value);
if (calitem->show_week_numbers != bvalue) {
calitem->show_week_numbers = bvalue;
- gnome_canvas_item_request_update (item);
+ if (item->canvas)
+ gnome_canvas_item_request_update (item);
}
return;
case PROP_KEEP_WDAYS_ON_WEEKNUM_CLICK:
@@ -908,8 +932,6 @@ e_calendar_item_realize (GnomeCanvasItem
calitem = E_CALENDAR_ITEM (item);
e_calendar_item_style_updated (GTK_WIDGET (item->canvas), calitem);
-
- e_extensible_load_extensions (E_EXTENSIBLE (calitem));
}
static void