diff options
author | Federico Mena Quintero <federico@ximian.com> | 2001-01-19 01:27:22 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2001-01-19 01:27:22 +0800 |
commit | 52f1578c8176b6bf91ee832c6f68e1423210b911 (patch) | |
tree | b45974273f2c4dd272881954ceed8e9658cdea52 /widgets | |
parent | 9bbb56e9b2eae46e8d2a51390569db8d9d9df2d1 (diff) | |
download | gsoc2013-evolution-52f1578c8176b6bf91ee832c6f68e1423210b911.tar gsoc2013-evolution-52f1578c8176b6bf91ee832c6f68e1423210b911.tar.gz gsoc2013-evolution-52f1578c8176b6bf91ee832c6f68e1423210b911.tar.bz2 gsoc2013-evolution-52f1578c8176b6bf91ee832c6f68e1423210b911.tar.lz gsoc2013-evolution-52f1578c8176b6bf91ee832c6f68e1423210b911.tar.xz gsoc2013-evolution-52f1578c8176b6bf91ee832c6f68e1423210b911.tar.zst gsoc2013-evolution-52f1578c8176b6bf91ee832c6f68e1423210b911.zip |
Make zero the minimum number of days that can be specified.
2001-01-17 Federico Mena Quintero <federico@ximian.com>
* e-calendar-item.c (e_calendar_item_set_max_days_sel): Make zero
the minimum number of days that can be specified.
(e_calendar_item_set_arg): We do need an update when the maximum
number of selected days is changed.
(e_calendar_item_set_max_days_sel): Request an update of the
canvas item.
(e_calendar_item_button_press): Do not start selecting days if the
max_days_selected is less than 1.
svn path=/trunk/; revision=7625
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/ChangeLog | 11 | ||||
-rw-r--r-- | widgets/misc/e-calendar-item.c | 12 |
2 files changed, 18 insertions, 5 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 16ef8f1083..00303b3080 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,14 @@ +2001-01-17 Federico Mena Quintero <federico@ximian.com> + + * e-calendar-item.c (e_calendar_item_set_max_days_sel): Make zero + the minimum number of days that can be specified. + (e_calendar_item_set_arg): We do need an update when the maximum + number of selected days is changed. + (e_calendar_item_set_max_days_sel): Request an update of the + canvas item. + (e_calendar_item_button_press): Do not start selecting days if the + max_days_selected is less than 1. + 2001-01-17 Jeffrey Stedfast <fejj@ximian.com> * e-messagebox.c (e_message_box_get_id): Oops. Delete this. I diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index 6442d7d7a5..a13cbb259d 100644 --- a/widgets/misc/e-calendar-item.c +++ b/widgets/misc/e-calendar-item.c @@ -1644,6 +1644,9 @@ e_calendar_item_button_press (ECalendarItem *calitem, if (event->button.button != 1 || day == -1) return FALSE; + if (calitem->max_days_selected < 1) + return TRUE; + if (gnome_canvas_item_grab (GNOME_CANVAS_ITEM (calitem), GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, @@ -2174,11 +2177,12 @@ void e_calendar_item_set_max_days_sel (ECalendarItem *calitem, gint days) { - calitem->max_days_selected = MAX (1, days); + calitem->max_days_selected = MAX (0, days); + gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (calitem)); } -/* Get the maximum number of days selectable */ +/* Get the maximum number of days before whole weeks are selected */ gint e_calendar_item_get_days_start_week_sel(ECalendarItem *calitem) { @@ -2186,7 +2190,7 @@ e_calendar_item_get_days_start_week_sel(ECalendarItem *calitem) } -/* Set the maximum number of days selectable */ +/* Set the maximum number of days before whole weeks are selected */ void e_calendar_item_set_days_start_week_sel(ECalendarItem *calitem, gint days) @@ -2194,7 +2198,6 @@ e_calendar_item_set_days_start_week_sel(ECalendarItem *calitem, calitem->days_to_start_week_selection = days; } -/* Set the maximum number of days before whole weeks are selected */ gboolean e_calendar_item_get_display_popup (ECalendarItem *calitem) { @@ -2202,7 +2205,6 @@ e_calendar_item_get_display_popup (ECalendarItem *calitem) } -/* Get the maximum number of days before whole weeks are selected */ void e_calendar_item_set_display_popup (ECalendarItem *calitem, gboolean display) |