aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2004-02-12 01:06:05 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-02-12 01:06:05 +0800
commitb910aabdb2f68b79fe0514aadf9a241f58964280 (patch)
treeba58574b60d41f6fab8dc2aa41cec16d8c6a7e42 /calendar/gui/gnome-cal.c
parent319c76c39187747c36013872b47e08f58a7c4051 (diff)
downloadgsoc2013-evolution-b910aabdb2f68b79fe0514aadf9a241f58964280.tar.gz
gsoc2013-evolution-b910aabdb2f68b79fe0514aadf9a241f58964280.tar.zst
gsoc2013-evolution-b910aabdb2f68b79fe0514aadf9a241f58964280.zip
Fixes #53886
2004-02-11 Rodrigo Moya <rodrigo@ximian.com> Fixes #53886 * gui/gnome-cal.c (gnome_calendar_paste_clipboard, gnome_calendar_delete_selection, gnome_calendar_cut_clipboard, gnome_calendar_copy_clipboard): removed g_assert_if_reached calls since we might get a different widget getting the focus. (get_focus_location): check the canvas's' focused item. svn path=/trunk/; revision=24707
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 40f40a8513..c994f3980b 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -476,7 +476,9 @@ get_focus_location (GnomeCalendar *gcal)
dv = E_DAY_VIEW (widget);
if (GTK_WIDGET_HAS_FOCUS (dv->top_canvas)
- || GTK_WIDGET_HAS_FOCUS (dv->main_canvas))
+ || GNOME_CANVAS (dv->top_canvas)->focused_item != NULL
+ || GTK_WIDGET_HAS_FOCUS (dv->main_canvas)
+ || GNOME_CANVAS (dv->main_canvas)->focused_item != NULL)
return FOCUS_CALENDAR;
else
return FOCUS_OTHER;
@@ -485,7 +487,8 @@ get_focus_location (GnomeCalendar *gcal)
case GNOME_CAL_MONTH_VIEW:
wv = E_WEEK_VIEW (widget);
- if (GTK_WIDGET_HAS_FOCUS (wv->main_canvas))
+ if (GTK_WIDGET_HAS_FOCUS (wv->main_canvas)
+ || GNOME_CANVAS (wv->main_canvas)->focused_item != NULL)
return FOCUS_CALENDAR;
else
return FOCUS_OTHER;
@@ -2599,8 +2602,6 @@ gnome_calendar_cut_clipboard (GnomeCalendar *gcal)
e_calendar_view_cut_clipboard (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)));
} else if (location == FOCUS_TASKPAD)
e_calendar_table_cut_clipboard (E_CALENDAR_TABLE (priv->todo));
- else
- g_assert_not_reached ();
}
void
@@ -2617,8 +2618,6 @@ gnome_calendar_copy_clipboard (GnomeCalendar *gcal)
e_calendar_view_copy_clipboard (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)));
} else if (location == FOCUS_TASKPAD)
e_calendar_table_copy_clipboard (E_CALENDAR_TABLE (priv->todo));
- else
- g_assert_not_reached ();
}
void
@@ -2635,8 +2634,6 @@ gnome_calendar_paste_clipboard (GnomeCalendar *gcal)
e_calendar_view_paste_clipboard (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)));
} else if (location == FOCUS_TASKPAD)
e_calendar_table_paste_clipboard (E_CALENDAR_TABLE (priv->todo));
- else
- g_assert_not_reached ();
}
@@ -2742,8 +2739,6 @@ gnome_calendar_delete_selection (GnomeCalendar *gcal)
e_calendar_view_delete_selected_events (E_CALENDAR_VIEW (view));
} else if (location == FOCUS_TASKPAD)
e_calendar_table_delete_selected (E_CALENDAR_TABLE (priv->todo));
- else
- g_assert_not_reached ();
}
void