aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/ChangeLog11
-rw-r--r--widgets/misc/e-calendar-item.c12
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)