aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/calendar-commands.c8
-rw-r--r--calendar/gui/e-day-view.c2
-rw-r--r--calendar/gui/gnome-cal.c9
3 files changed, 12 insertions, 7 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 7edf38df65..8e50899a61 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -367,7 +367,7 @@ sensitize_items(BonoboUIComponent *uic, struct _sensitize_item *items, guint32 m
static struct _sensitize_item calendar_sensitize_table[] = {
{ "EventOpen", E_CAL_MENU_SELECT_ONE },
- { "Cut", E_CAL_MENU_SELECT_EDITABLE },
+ { "Cut", E_CAL_MENU_SELECT_EDITABLE | E_CAL_MENU_SELECT_ANY },
{ "Copy", E_CAL_MENU_SELECT_ANY },
{ "Paste", E_CAL_MENU_SELECT_EDITABLE },
{ "Delete", E_CAL_MENU_SELECT_EDITABLE|E_CAL_MENU_SELECT_NONRECURRING },
@@ -413,7 +413,7 @@ calendar_control_sensitize_calendar_commands (BonoboControl *control, GnomeCalen
t = e_cal_menu_target_new_select(menu, model, events);
if (!enable)
- t->target.mask = ~0;
+ t->target.mask = ~((~t->target.mask) & E_CAL_MENU_SELECT_EDITABLE);
sensitize_items(uic, calendar_sensitize_table, t->target.mask);
#if 0
@@ -429,7 +429,7 @@ calendar_control_sensitize_calendar_commands (BonoboControl *control, GnomeCalen
}
static struct _sensitize_item taskpad_sensitize_table[] = {
- { "Cut", E_CAL_MENU_SELECT_EDITABLE },
+ { "Cut", E_CAL_MENU_SELECT_EDITABLE | E_CAL_MENU_SELECT_ANY },
{ "Copy", E_CAL_MENU_SELECT_ANY },
{ "Paste", E_CAL_MENU_SELECT_EDITABLE },
{ "Delete", E_CAL_MENU_SELECT_EDITABLE },
@@ -465,7 +465,7 @@ sensitize_taskpad_commands (GnomeCalendar *gcal, BonoboControl *control, gboolea
t = e_cal_menu_target_new_select(menu, model, events);
if (!enable)
- t->target.mask = ~0;
+ t->target.mask = ~((~t->target.mask) & E_CAL_MENU_SELECT_EDITABLE);
sensitize_items(uic, taskpad_sensitize_table, t->target.mask);
}
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 8cc0405381..6928a7e3ef 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -1774,9 +1774,11 @@ e_day_view_remove_event_cb (EDayView *day_view,
if (day == E_DAY_VIEW_LONG_EVENT) {
g_array_remove_index (day_view->long_events, event_num);
day_view->long_events_need_layout = TRUE;
+ gtk_widget_grab_focus (GTK_WIDGET (day_view->top_canvas));
} else {
g_array_remove_index (day_view->events[day], event_num);
day_view->need_layout[day] = TRUE;
+ gtk_widget_grab_focus (GTK_WIDGET (day_view->main_canvas));
}
return TRUE;
}
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index adfcdac09f..576dfc81d2 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -766,7 +766,8 @@ get_focus_location (GnomeCalendar *gcal)
if (GTK_WIDGET_HAS_FOCUS (dv->top_canvas)
|| GNOME_CANVAS (dv->top_canvas)->focused_item != NULL
|| GTK_WIDGET_HAS_FOCUS (dv->main_canvas)
- || GNOME_CANVAS (dv->main_canvas)->focused_item != NULL)
+ || GNOME_CANVAS (dv->main_canvas)->focused_item != NULL
+ || GTK_WIDGET_HAS_FOCUS (dv))
return FOCUS_CALENDAR;
else
return FOCUS_OTHER;
@@ -776,7 +777,8 @@ get_focus_location (GnomeCalendar *gcal)
wv = E_WEEK_VIEW (widget);
if (GTK_WIDGET_HAS_FOCUS (wv->main_canvas)
- || GNOME_CANVAS (wv->main_canvas)->focused_item != NULL)
+ || GNOME_CANVAS (wv->main_canvas)->focused_item != NULL
+ || GTK_WIDGET_HAS_FOCUS (wv))
return FOCUS_CALENDAR;
else
return FOCUS_OTHER;
@@ -784,7 +786,8 @@ get_focus_location (GnomeCalendar *gcal)
case GNOME_CAL_LIST_VIEW:
lv = E_CAL_LIST_VIEW (widget);
- if (GTK_WIDGET_HAS_FOCUS (e_table_scrolled_get_table (lv->table_scrolled)))
+ if (GTK_WIDGET_HAS_FOCUS (e_table_scrolled_get_table (lv->table_scrolled))
+ || GTK_WIDGET_HAS_FOCUS (lv))
return FOCUS_CALENDAR;
else
return FOCUS_OTHER;