diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-03-29 17:17:23 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-03-29 17:17:23 +0800 |
commit | c350a4b0424fdb00b9b2d722fd112756c916a03e (patch) | |
tree | 3bd6fcf0a39bf2f43be705a21a8d013212b7a53e /calendar | |
parent | d30e7f782ee451e13beac4858ba44b3bd390a768 (diff) | |
download | gsoc2013-evolution-c350a4b0424fdb00b9b2d722fd112756c916a03e.tar gsoc2013-evolution-c350a4b0424fdb00b9b2d722fd112756c916a03e.tar.gz gsoc2013-evolution-c350a4b0424fdb00b9b2d722fd112756c916a03e.tar.bz2 gsoc2013-evolution-c350a4b0424fdb00b9b2d722fd112756c916a03e.tar.lz gsoc2013-evolution-c350a4b0424fdb00b9b2d722fd112756c916a03e.tar.xz gsoc2013-evolution-c350a4b0424fdb00b9b2d722fd112756c916a03e.tar.zst gsoc2013-evolution-c350a4b0424fdb00b9b2d722fd112756c916a03e.zip |
Fixes #160357
svn path=/trunk/; revision=31756
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/gui/e-meeting-time-sel-item.c | 24 | ||||
-rw-r--r-- | calendar/gui/e-meeting-time-sel-item.h | 4 |
2 files changed, 23 insertions, 5 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); +} diff --git a/calendar/gui/e-meeting-time-sel-item.h b/calendar/gui/e-meeting-time-sel-item.h index 11b355dfa0..2efe68b15e 100644 --- a/calendar/gui/e-meeting-time-sel-item.h +++ b/calendar/gui/e-meeting-time-sel-item.h @@ -58,9 +58,10 @@ struct _EMeetingTimeSelectorItem GdkGC *main_gc; GdkGC *stipple_gc; - /* The normal & resize cursors. */ + /* The normal, resize & busy cursors . */ GdkCursor *normal_cursor; GdkCursor *resize_cursor; + GdkCursor *busy_cursor; /* This remembers the last cursor set on the window. */ GdkCursor *last_cursor_set; @@ -73,6 +74,7 @@ struct _EMeetingTimeSelectorItemClass }; GtkType e_meeting_time_selector_item_get_type (void); +void e_meeting_time_selector_item_set_normal_cursor (EMeetingTimeSelectorItem *mts_item); #endif /* _E_MEETING_TIME_SELECTOR_ITEM_H_ */ |