aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gncal-full-day.c
diff options
context:
space:
mode:
authorArturo Espinosa Aldama <arturo@nuclecu.unam.mx>1998-04-15 10:40:24 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-15 10:40:24 +0800
commit0e5cfe78a5161e1c98e69f4670552e0d381b3d30 (patch)
tree058ef3f23121fbd5c87361a951c02b611c384529 /calendar/gui/gncal-full-day.c
parent3161696e57f03b5ebc859907725f6836f4220667 (diff)
downloadgsoc2013-evolution-0e5cfe78a5161e1c98e69f4670552e0d381b3d30.tar
gsoc2013-evolution-0e5cfe78a5161e1c98e69f4670552e0d381b3d30.tar.gz
gsoc2013-evolution-0e5cfe78a5161e1c98e69f4670552e0d381b3d30.tar.bz2
gsoc2013-evolution-0e5cfe78a5161e1c98e69f4670552e0d381b3d30.tar.lz
gsoc2013-evolution-0e5cfe78a5161e1c98e69f4670552e0d381b3d30.tar.xz
gsoc2013-evolution-0e5cfe78a5161e1c98e69f4670552e0d381b3d30.tar.zst
gsoc2013-evolution-0e5cfe78a5161e1c98e69f4670552e0d381b3d30.zip
New widget for the year view. added required compilation of the new files.
1998-04-14 Arturo Espinosa Aldama <arturo@nuclecu.unam.mx> * gncal-year-view.[hc]: New widget for the year view. * Makefile.am: added required compilation of the new files. svn path=/trunk/; revision=134
Diffstat (limited to 'calendar/gui/gncal-full-day.c')
-rw-r--r--calendar/gui/gncal-full-day.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/calendar/gui/gncal-full-day.c b/calendar/gui/gncal-full-day.c
index ce64db9173..8c3bf31db2 100644
--- a/calendar/gui/gncal-full-day.c
+++ b/calendar/gui/gncal-full-day.c
@@ -331,13 +331,27 @@ child_focus_out (GtkWidget *widget, GdkEventFocus *event, gpointer data)
/* Notify calendar of change */
- fullday = gtk_object_get_user_data (GTK_OBJECT (widget));
+ fullday = GNCAL_FULL_DAY (widget->parent);
gnome_calendar_object_changed (fullday->calendar, child->ico, CHANGE_SUMMARY);
return FALSE;
}
+static gint
+child_key_press (GtkWidget *widget, GdkEventKey *event, gpointer data)
+{
+ if (event->keyval != GDK_Escape)
+ return FALSE;
+
+ /* If user pressed Esc, un-focus the child by focusing the fullday widget */
+
+ gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "key_press_event");
+ gtk_widget_grab_focus (widget->parent);
+
+ return FALSE;
+}
+
static Child *
child_new (GncalFullDay *fullday, iCalObject *ico)
{
@@ -353,8 +367,6 @@ child_new (GncalFullDay *fullday, iCalObject *ico)
child->width = 0;
child->height = 0;
- gtk_object_set_user_data (GTK_OBJECT (child->widget), fullday);
-
child_range_changed (fullday, child);
/* We set the i-beam cursor and the initial summary text upon realization */
@@ -371,6 +383,10 @@ child_new (GncalFullDay *fullday, iCalObject *ico)
(GtkSignalFunc) child_focus_out,
child);
+ gtk_signal_connect (GTK_OBJECT (child->widget), "key_press_event",
+ (GtkSignalFunc) child_key_press,
+ child);
+
/* Finish setup */
gtk_text_set_editable (GTK_TEXT (child->widget), TRUE);