diff options
-rw-r--r-- | calendar/ChangeLog | 8 | ||||
-rw-r--r-- | calendar/gui/gncal-full-day.c | 38 |
2 files changed, 45 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 62e4f049c7..1e1028b2a5 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2000-04-20 Seth Alves <alves@hungry.com> + + * gui/gncal-full-day.c (child_realize): create fullday's gcs + even if pixmap_bell has already been created. this was + causing crashes if the calendar was run twice. + 2000-04-19 Seth Alves <alves@hungry.com> * gui/eventedit.c (ee_rp_init_rule): changed the order around @@ -7,7 +13,7 @@ the todo clist * cal-client/cal-client.c (cal_client_get_uids): don't check - type again CALOBJ_TYPE_ANY since it will always match. + type against CALOBJ_TYPE_ANY since it will always match. (cal_client_get_uids): same (re: CALOBJ_TYPE_ANY) * pcs/cal-backend.c (build_uids_list): same (re: CALOBJ_TYPE_ANY) diff --git a/calendar/gui/gncal-full-day.c b/calendar/gui/gncal-full-day.c index e387e98824..de3372b55f 100644 --- a/calendar/gui/gncal-full-day.c +++ b/calendar/gui/gncal-full-day.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* Full day widget for gncal * * Copyright (C) 1998 The Free Software Foundation @@ -249,6 +250,7 @@ child_realize (GncalFullDay *fullday, Child *child) gdk_window_set_background (child->decor_window, &c); gdk_window_set_user_data (child->decor_window, widget); + /* if (!pixmap_bell){ GdkImlibImage *imlib_bell, *imlib_recur; GdkPixmap *mask; @@ -271,6 +273,42 @@ child_realize (GncalFullDay *fullday, Child *child) if (mask) gdk_gc_set_clip_mask (fullday->recur_gc, mask); } + */ + + if (!pixmap_bell){ + GdkPixmap *mask; + + GdkImlibImage *imlib_bell; + GdkImlibImage *imlib_recur; + + imlib_bell = gdk_imlib_create_image_from_xpm_data (bell_xpm); + gdk_imlib_render (imlib_bell, DECOR_WIDTH, DECOR_HEIGHT); + pixmap_bell = gdk_imlib_move_image (imlib_bell); + + mask = gdk_imlib_move_mask (imlib_bell); + gdk_imlib_destroy_image (imlib_bell); + + imlib_recur = gdk_imlib_create_image_from_xpm_data (recur_xpm); + gdk_imlib_render (imlib_recur, DECOR_WIDTH, DECOR_HEIGHT); + pixmap_recur = gdk_imlib_move_image (imlib_recur); + mask = gdk_imlib_move_mask (imlib_recur); + gdk_imlib_destroy_image (imlib_recur); + } + +#warning "fix this" + + fullday->bell_gc = gdk_gc_new (child->decor_window); + /* + if (mask) + gdk_gc_set_clip_mask (fullday->bell_gc, mask); + */ + + fullday->recur_gc = gdk_gc_new (child->decor_window); + /* + if (mask) + gdk_gc_set_clip_mask (fullday->recur_gc, mask); + */ + child_set_text_pos (child); } |