diff options
Diffstat (limited to 'calendar/gui/e-meeting-time-sel-item.c')
-rw-r--r-- | calendar/gui/e-meeting-time-sel-item.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/calendar/gui/e-meeting-time-sel-item.c b/calendar/gui/e-meeting-time-sel-item.c index 39e0b1ae80..c6415f32f8 100644 --- a/calendar/gui/e-meeting-time-sel-item.c +++ b/calendar/gui/e-meeting-time-sel-item.c @@ -141,6 +141,7 @@ e_meeting_time_selector_item_init (EMeetingTimeSelectorItem *mts_item) /* Create the cursors. */ mts_item->normal_cursor = gdk_cursor_new (GDK_LEFT_PTR); mts_item->resize_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW); + mts_item->busy_cursor = gdk_cursor_new (GDK_WATCH); mts_item->last_cursor_set = NULL; item->x1 = 0; @@ -165,7 +166,11 @@ e_meeting_time_selector_item_destroy (GtkObject *object) gdk_cursor_destroy (mts_item->resize_cursor); mts_item->resize_cursor = NULL; } - + if (mts_item->busy_cursor) { + gdk_cursor_destroy (mts_item->busy_cursor); + mts_item->busy_cursor = NULL; + } + if (GTK_OBJECT_CLASS (e_meeting_time_selector_item_parent_class)->destroy) (*GTK_OBJECT_CLASS (e_meeting_time_selector_item_parent_class)->destroy)(object); } @@ -916,10 +921,13 @@ e_meeting_time_selector_item_motion_notify (EMeetingTimeSelectorItem *mts_item, x, y); /* Determine which cursor should be used. */ - if (position == E_MEETING_TIME_SELECTOR_POS_NONE) - cursor = mts_item->normal_cursor; - else + if (position != E_MEETING_TIME_SELECTOR_POS_NONE) cursor = mts_item->resize_cursor; + /* If the Main window shows busy cursor show the same */ + else if (mts_item->mts->last_cursor_set == GDK_WATCH) + cursor = mts_item->busy_cursor; + else + cursor = mts_item->normal_cursor; /* Only set the cursor if it is different to the last one we set. */ if (mts_item->last_cursor_set != cursor) { @@ -988,3 +996,11 @@ e_meeting_time_selector_item_calculate_busy_range (EMeetingTimeSelector *mts, return TRUE; } + +void +e_meeting_time_selector_item_set_normal_cursor (EMeetingTimeSelectorItem *mts_item) +{ + g_return_if_fail (IS_E_MEETING_TIME_SELECTOR_ITEM (mts_item)); + + gdk_window_set_cursor (GTK_WIDGET (GNOME_CANVAS_ITEM (mts_item)->canvas)->window, mts_item->normal_cursor); +} |