[evolution-patches] Fix for tooltip crash



Hi,

I have attached a patch. It fixes the tooltip crash.
It also fixes some layout issue as well as shows a alarm icon in the
editor if the alarm is on.

-Srini
Index: e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.101
diff -u -p -r1.101 e-calendar-view.c
--- e-calendar-view.c	28 Nov 2005 19:05:24 -0000	1.101
+++ e-calendar-view.c	2 Dec 2005 10:52:55 -0000
@@ -1903,7 +1903,7 @@ get_label (struct icaltimetype *tt)
 
 
 gboolean
-e_calendar_view_get_tooltips (ECalendarViewEvent *pevent)
+e_calendar_view_get_tooltips (ECalendarViewEventData *data)
 {
 	GtkWidget *label, *box, *hbox, *ebox, *frame;
 	const char *str;
@@ -1912,7 +1912,11 @@ e_calendar_view_get_tooltips (ECalendarV
 	ECalComponentDateTime dtstart, dtend;
 	icalcomponent *clone_comp;
 	time_t t_start, t_end;
+	ECalendarViewEvent *pevent;
 	
+	pevent = data->get_view_event (data->cal_view, data->day, data->event_num);
+	g_free (data);
+
 	ECalComponent *newcomp = e_cal_component_new ();
 	icaltimezone *zone;
 	GdkColor color, outer_color;
Index: e-calendar-view.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.h,v
retrieving revision 1.30
diff -u -p -r1.30 e-calendar-view.h
--- e-calendar-view.h	23 Nov 2005 08:18:59 -0000	1.30
+++ e-calendar-view.h	2 Dec 2005 10:52:55 -0000
@@ -75,7 +75,7 @@ typedef enum {
 typedef struct {
 	E_CALENDAR_VIEW_EVENT_FIELDS
 } ECalendarViewEvent;
-        
+ 
 typedef struct _ECalendarView        ECalendarView;
 typedef struct _ECalendarViewClass   ECalendarViewClass;
 typedef struct _ECalendarViewPrivate ECalendarViewPrivate;
@@ -85,6 +85,13 @@ struct _ECalendarView {
 	ECalendarViewPrivate *priv;
 };
 
+typedef struct {
+	ECalendarViewEvent * (* get_view_event) (ECalendarView *view, int day, int event_num);
+	ECalendarView *cal_view;
+	int day;
+	int event_num;
+} ECalendarViewEventData;
+
 struct _ECalendarViewClass {
 	GtkTableClass parent_class;
 
@@ -158,7 +165,7 @@ void           e_calendar_view_modify_an
 					       GtkWindow *toplevel,
 					       gboolean new);
 
-gboolean	e_calendar_view_get_tooltips (ECalendarViewEvent *pevent);
+gboolean	e_calendar_view_get_tooltips (ECalendarViewEventData *data);
 G_END_DECLS
 
 #endif
Index: e-day-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view.c,v
retrieving revision 1.287
diff -u -p -r1.287 e-day-view.c
--- e-day-view.c	23 Nov 2005 08:18:59 -0000	1.287
+++ e-day-view.c	2 Dec 2005 10:53:07 -0000
@@ -4466,9 +4466,10 @@ e_day_view_reshape_long_event (EDayView 
 					       "fill_color_gdk", &widget->style->text[GTK_STATE_NORMAL],
 					       "im_context", E_CANVAS (day_view->top_canvas)->im_context,
 					       NULL);
+		g_object_set_data (event->canvas_item, "event-num", GINT_TO_POINTER (event_num));
+		g_object_set_data (event->canvas_item, "event-day", GINT_TO_POINTER (E_DAY_VIEW_LONG_EVENT));
 		g_signal_connect (event->canvas_item, "event",
 				  G_CALLBACK (e_day_view_on_text_item_event), day_view);
-		g_object_set_data ((GObject *)event->canvas_item, "event", (gpointer)event);
 		g_signal_emit_by_name (G_OBJECT(day_view),
 				       "event_added", event);
 
@@ -4648,9 +4649,10 @@ e_day_view_reshape_day_event (EDayView *
 						       "fill_color_gdk", &widget->style->text[GTK_STATE_NORMAL],
 						       "im_context", E_CANVAS (day_view->main_canvas)->im_context,
 						       NULL);
+			g_object_set_data (event->canvas_item, "event-num", GINT_TO_POINTER (event_num));
+			g_object_set_data (event->canvas_item, "event-day", GINT_TO_POINTER (day));
 			g_signal_connect (event->canvas_item, "event",
 					  G_CALLBACK (e_day_view_on_text_item_event), day_view);
-			g_object_set_data ((GObject *)event->canvas_item, "event", (gpointer)event);
 			g_signal_emit_by_name (G_OBJECT(day_view),
 					       "event_added", event);
 
@@ -5770,6 +5772,44 @@ cancel_editing (EDayView *day_view)
 	e_day_view_stop_editing_event (day_view);
 }
 
+static EDayViewEvent *
+tooltip_get_view_event (EDayView *day_view, int day, int event_num)
+{
+	EDayViewEvent *pevent;
+
+	
+	if (day == E_DAY_VIEW_LONG_EVENT) {
+		pevent = &g_array_index (day_view->long_events, EDayViewEvent,
+					event_num);
+	} else {
+		pevent = &g_array_index (day_view->events[day], EDayViewEvent,
+					event_num);
+	}	
+
+	return pevent;
+}
+
+static void
+tooltip_destroy (EDayView *day_view, GnomeCanvasItem *item)
+{
+	int day = GPOINTER_TO_INT (g_object_get_data (item, "event-day"));
+	int event_num = GPOINTER_TO_INT (g_object_get_data (item, "event-num"));
+	EDayViewEvent *pevent;
+
+	pevent = tooltip_get_view_event (day_view, day, event_num);
+	if (pevent) {
+		if (pevent->tooltip) {
+			gtk_widget_destroy (pevent->tooltip);
+			pevent->tooltip = NULL;
+		}
+
+		if (pevent->timeout != -1) {
+			g_source_remove (pevent->timeout);
+			pevent->timeout = -1;
+		}
+	}
+}
+
 static gboolean
 e_day_view_on_text_item_event (GnomeCanvasItem *item,
 			       GdkEvent *event,
@@ -5777,8 +5817,10 @@ e_day_view_on_text_item_event (GnomeCanv
 {
 	switch (event->type) {
 	case GDK_KEY_PRESS:
+		tooltip_destroy (day_view, item);
 		if (event && event->key.keyval == GDK_Return) {
 			day_view->resize_event_num = -1;
+			day_view->resize_event_num = -1;
 
 			/* We set the keyboard focus to the EDayView, so the
 			   EText item loses it and stops the edit. */
@@ -5817,6 +5859,7 @@ e_day_view_on_text_item_event (GnomeCanv
 
 	case GDK_BUTTON_PRESS:
 	case GDK_BUTTON_RELEASE:
+		tooltip_destroy (day_view, item);
 		/* Only let the EText handle the event while editing. */
 		if (!E_TEXT (item)->editing)
 			gtk_signal_emit_stop_by_name (GTK_OBJECT (item),
@@ -5831,35 +5874,37 @@ e_day_view_on_text_item_event (GnomeCanv
 		return FALSE;
 	case GDK_ENTER_NOTIFY:
 		{
-			EDayViewEvent *pevent = (EDayViewEvent *)g_object_get_data ((GObject *)item, "event");
+			int day = GPOINTER_TO_INT (g_object_get_data (item, "event-day"));
+			int event_num = GPOINTER_TO_INT (g_object_get_data (item, "event-num"));
+			EDayViewEvent *pevent;
+			ECalendarViewEventData *data;
 			
+			pevent = tooltip_get_view_event (day_view, day, event_num);
+
+			data = g_malloc (sizeof (ECalendarViewEventData));
 			pevent->x = ((GdkEventCrossing *)event)->x_root;
 			pevent->y = ((GdkEventCrossing *)event)->y_root;
-			pevent->tooltip = NULL;			
-			pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, pevent);
+			pevent->tooltip = NULL;
+
+			data->cal_view = day_view;
+			data->day = day;
+			data->event_num = event_num;
+			data->get_view_event = tooltip_get_view_event;
+			pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, data);
 			
 		return TRUE;
 		}
 	case GDK_LEAVE_NOTIFY:
-		{
-			EDayViewEvent *pevent = (EDayViewEvent *)g_object_get_data ((GObject *)item, "event");
-			
-			if (pevent && pevent->tooltip) {
-				gtk_widget_destroy (pevent->tooltip);
-				pevent->tooltip = NULL;
-			}
-
-			if (pevent && pevent->timeout != -1) {
-				g_source_remove (pevent->timeout);
-				pevent->timeout = -1;
-			}
-			
+		tooltip_destroy (day_view, item);
 		return TRUE;
-		}
 	case GDK_MOTION_NOTIFY:
 		{
-			EDayViewEvent *pevent = (EDayViewEvent *)g_object_get_data ((GObject *)item, "event");
-			
+			int day = GPOINTER_TO_INT (g_object_get_data (item, "event-day"));
+			int event_num = GPOINTER_TO_INT (g_object_get_data (item, "event-num"));
+			EDayViewEvent *pevent;
+
+			pevent = tooltip_get_view_event (day_view, day, event_num);
+						
 			pevent->x = ((GdkEventMotion *)event)->x_root;
 			pevent->y = ((GdkEventMotion *)event)->y_root;
 
Index: e-timezone-entry.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-timezone-entry.c,v
retrieving revision 1.28
diff -u -p -r1.28 e-timezone-entry.c
--- e-timezone-entry.c	26 Nov 2004 13:58:56 -0000	1.28
+++ e-timezone-entry.c	2 Dec 2005 10:53:09 -0000
@@ -120,7 +120,7 @@ e_timezone_entry_init		(ETimezoneEntry	*
 	priv->entry  = gtk_entry_new ();
 	gtk_entry_set_editable (GTK_ENTRY (priv->entry), FALSE);
 	/*gtk_widget_set_usize (priv->date_entry, 90, 0);*/
-	gtk_box_pack_start (GTK_BOX (tentry), priv->entry, TRUE, TRUE, 6);
+	gtk_box_pack_start (GTK_BOX (tentry), priv->entry, TRUE, TRUE, 0);
 	gtk_widget_show (priv->entry);
 	g_signal_connect (priv->entry, "changed", G_CALLBACK (on_entry_changed), tentry);
 	
Index: e-week-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-week-view.c,v
retrieving revision 1.250
diff -u -p -r1.250 e-week-view.c
--- e-week-view.c	23 Nov 2005 08:19:00 -0000	1.250
+++ e-week-view.c	2 Dec 2005 10:53:26 -0000
@@ -2549,35 +2549,65 @@ e_week_view_reshape_events (EWeekView *w
 	}
 }
 
+static EWeekViewEvent *
+tooltip_get_view_event (EWeekView *week_view, int day, int event_num)
+{
+	EWeekViewEvent *pevent;
+
+	pevent = &g_array_index (week_view->events, EWeekViewEvent, event_num);
+	
+	return pevent;
+}
+
+static void
+tooltip_destroy (EWeekView *week_view, GnomeCanvasItem *item)
+{
+	int event_num = GPOINTER_TO_INT (g_object_get_data (item, "event-num"));
+	EWeekViewEvent *pevent;
+
+	pevent = tooltip_get_view_event (week_view, -1, event_num);
+	if (pevent) {
+		if (pevent->tooltip) {
+			gtk_widget_destroy (pevent->tooltip);
+			pevent->tooltip = NULL;
+		}
+
+		if (pevent->timeout != -1) {
+			g_source_remove (pevent->timeout);
+			pevent->timeout = -1;
+		}
+	}
+}
 
 static gboolean
 tooltip_event_cb (GnomeCanvasItem *item,
    	          GdkEvent *event,
 		  EWeekView *view)
 {
-	EWeekViewEvent *pevent = g_object_get_data ((GObject *)item, "event");
+	int event_num = GPOINTER_TO_INT (g_object_get_data (item, "event-num"));
+	EWeekViewEvent *pevent;
+	
+	pevent = tooltip_get_view_event (view, -1, event_num);
 	
 	switch (event->type) {
 		case GDK_ENTER_NOTIFY:
+		{
+			ECalendarViewEventData *data;
+			
+			data = g_malloc (sizeof (ECalendarViewEventData));
 			
 			pevent->x = ((GdkEventCrossing *)event)->x_root;
 			pevent->y = ((GdkEventCrossing *)event)->y_root;
 			pevent->tooltip = NULL;			
-			pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, pevent);
-			
-			return TRUE;
-		
-		case GDK_LEAVE_NOTIFY:
-			if (pevent && pevent->tooltip) {
-				gtk_widget_destroy (pevent->tooltip);
-				pevent->tooltip = NULL;
-			}
 
-			if (pevent && pevent->timeout != -1) {
-				g_source_remove (pevent->timeout);
-				pevent->timeout = -1;
-			}
-			return TRUE;
+			data->cal_view = view;
+			data->day = -1;
+			data->event_num = event_num;
+			data->get_view_event = tooltip_get_view_event;
+			pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, data);
+			
+		return TRUE;
+		}
 		case GDK_MOTION_NOTIFY:
 			pevent->x = ((GdkEventMotion *)event)->x_root;
 			pevent->y = ((GdkEventMotion *)event)->y_root;
@@ -2587,6 +2617,10 @@ tooltip_event_cb (GnomeCanvasItem *item,
 			}
 
 			return TRUE;
+		case GDK_LEAVE_NOTIFY:
+		case GDK_KEY_PRESS:
+		case GDK_BUTTON_PRESS:
+			tooltip_destroy (view, item);
 		default:
 			return FALSE;
 	}
@@ -2992,7 +3026,10 @@ e_week_view_on_text_item_event (GnomeCan
 {
 	EWeekViewEvent *event;
 	gint event_num, span_num;
-	EWeekViewEvent *pevent = g_object_get_data ((GObject *)item, "event");
+	int nevent = GPOINTER_TO_INT (g_object_get_data (item, "event-num"));
+	EWeekViewEvent *pevent;
+	
+	pevent = tooltip_get_view_event (week_view, -1, nevent);
 	
 #if 0
 	g_print ("In e_week_view_on_text_item_event\n");
@@ -3000,6 +3037,7 @@ e_week_view_on_text_item_event (GnomeCan
 	
 	switch (gdkevent->type) {
 	case GDK_KEY_PRESS:
+		tooltip_destroy (week_view, item);
 		if (gdkevent && gdkevent->key.keyval == GDK_Return) {
 			/* We set the keyboard focus to the EDayView, so the
 			   EText item loses it and stops the edit. */
@@ -3033,6 +3071,7 @@ e_week_view_on_text_item_event (GnomeCan
 		gtk_signal_emit_stop_by_name (GTK_OBJECT (item), "event");
 		return TRUE;
 	case GDK_BUTTON_PRESS:
+		tooltip_destroy (week_view, item);
 		if (!e_week_view_find_event_from_item (week_view, item,
 						       &event_num, &span_num))
 			return FALSE;
@@ -3108,35 +3147,36 @@ e_week_view_on_text_item_event (GnomeCan
 		}
 		week_view->pressed_event_num = -1;
 		break;
-		case GDK_ENTER_NOTIFY:
+	case GDK_ENTER_NOTIFY:
+	{
+		ECalendarViewEventData *data;
 			
-			pevent->x = ((GdkEventCrossing *)gdkevent)->x_root;
-			pevent->y = ((GdkEventCrossing *)gdkevent)->y_root;
-			pevent->tooltip = NULL;
-			pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, pevent);
+		data = g_malloc (sizeof (ECalendarViewEventData));
 			
-			return TRUE;
+		pevent->x = ((GdkEventCrossing *)gdkevent)->x_root;
+		pevent->y = ((GdkEventCrossing *)gdkevent)->y_root;
+		pevent->tooltip = NULL;
+
+		data->cal_view = week_view;
+		data->day = -1;
+		data->event_num = event_num;
+		data->get_view_event = tooltip_get_view_event;
+		pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, data);		
+			
+		return TRUE;
+	}	
+	case GDK_LEAVE_NOTIFY:
+		tooltip_destroy (week_view, item);
 		
-		case GDK_LEAVE_NOTIFY:
-			if (pevent && pevent->tooltip) {
-				gtk_widget_destroy (pevent->tooltip);
-				pevent->tooltip = NULL;
-			}
-
-			if (pevent && pevent->timeout != -1) {
-				g_source_remove (pevent->timeout);
-				pevent->timeout = -1;
-			}
-			return TRUE;
-		case GDK_MOTION_NOTIFY:
-			pevent->x = ((GdkEventMotion *)gdkevent)->x_root;
-			pevent->y = ((GdkEventMotion *)gdkevent)->y_root;
+		return FALSE;
+	case GDK_MOTION_NOTIFY:
+		pevent->x = ((GdkEventMotion *)gdkevent)->x_root;
+		pevent->y = ((GdkEventMotion *)gdkevent)->y_root;
 
-			if (pevent->tooltip) {
-				gtk_window_move ((GtkWindow *)pevent->tooltip, ((int)((GdkEventMotion *)gdkevent)->x_root)+16, ((int)((GdkEventMotion *)gdkevent)->y_root) +16);
-			}
+		if (pevent->tooltip)
+			gtk_window_move ((GtkWindow *)pevent->tooltip, ((int)((GdkEventMotion *)gdkevent)->x_root)+16, ((int)((GdkEventMotion *)gdkevent)->y_root) +16);
 
-			return TRUE;		
+		return TRUE;		
 	case GDK_FOCUS_CHANGE:
 		if (gdkevent->focus_change.in) {
 			e_week_view_on_editing_started (week_view, item);
Index: dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.155
diff -u -p -r1.155 comp-editor.c
--- dialogs/comp-editor.c	26 Nov 2005 02:31:51 -0000	1.155
+++ dialogs/comp-editor.c	2 Dec 2005 10:53:32 -0000
@@ -1169,6 +1169,22 @@ key_press_event(GtkWidget *widget, GdkEv
         return FALSE;
 }
 
+static gint
+editor_key_press_event(GtkWidget *widget, GdkEventKey *event, CompEditor *editor)
+{
+        EAttachmentBar *bar = E_ATTACHMENT_BAR (widget);
+
+        if (event->keyval == GDK_Escape) {
+		commit_all_fields (editor);
+		
+		if (prompt_to_save_changes (editor, TRUE))
+			close_dialog (editor);
+
+                return TRUE;
+        }
+                                                                                
+        return FALSE;
+}
 /* Menu callbacks */
 static void
 menu_file_save_cb (BonoboUIComponent *uic,
@@ -1338,6 +1354,7 @@ setup_widgets (CompEditor *editor)
 	gtk_notebook_set_show_tabs (priv->notebook, FALSE);
 
 	g_signal_connect (editor, "delete_event", G_CALLBACK (delete_event_cb), editor);
+	g_signal_connect (editor, "key_press_event", G_CALLBACK (editor_key_press_event), editor);	
 
 	/*Attachments */
 	priv->attachment_scrolled_window = gtk_scrolled_window_new (NULL, NULL);
Index: dialogs/event-page.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/event-page.c,v
retrieving revision 1.92
diff -u -p -r1.92 event-page.c
--- dialogs/event-page.c	26 Nov 2005 02:39:46 -0000	1.92
+++ dialogs/event-page.c	2 Dec 2005 10:53:35 -0000
@@ -45,6 +45,7 @@
 #include "../e-timezone-entry.h"
 #include <e-util/e-dialog-utils.h>
 #include <e-util/e-dialog-widgets.h>
+#include <e-util/e-icon-factory.h>
 #include <e-util/e-util-private.h>
 
 #include "../e-meeting-attendee.h"
@@ -64,7 +65,6 @@
 struct _EventPagePrivate {
 	/* Glade XML data */
 	GladeXML *xml;
-
 	/* Widgets from the Glade file */
 
 	GtkWidget *main;
@@ -98,6 +98,9 @@ struct _EventPagePrivate {
 	GtkWidget *end_timezone;
 	GtkWidget *timezone_label;
 	gboolean   all_day_event;
+	GtkWidget *status_icons;
+	GtkWidget *alarm_icon;
+	GtkWidget *recur_icon;
 
 	GtkWidget *description;
 
@@ -214,6 +217,9 @@ event_page_init (EventPage *epage)
 	priv->end_timezone = NULL;
 	priv->timezone_label = NULL;
 	priv->all_day_event = FALSE;
+	priv->status_icons = NULL;
+	priv->alarm_icon = NULL;
+	priv->recur_icon = NULL;
 	priv->description = NULL;
 	priv->classification = E_CAL_COMPONENT_CLASS_NONE;
 	priv->show_time_as_busy = FALSE;
@@ -752,6 +758,23 @@ event_page_set_classification (EventPage
 	epage->priv->classification = class;
 }
 
+static GtkWidget *
+create_image_event_box (const char *image_text, const char *tip_text)
+{
+	GtkWidget *image, *box;
+	GtkTooltips *tip;
+	
+	box = gtk_event_box_new ();
+	tip = gtk_tooltips_new ();
+	image = e_icon_factory_get_image (image_text, E_ICON_SIZE_MENU);
+
+	gtk_container_add ((GtkContainer *) box, image);
+	gtk_widget_show_all (box);
+	gtk_tooltips_set_tip (tip, box, tip_text, NULL);
+
+	return box;	
+}
+
 static void
 sensitize_widgets (EventPage *epage)
 {
@@ -772,6 +795,11 @@ sensitize_widgets (EventPage *epage)
 
 	custom = is_custom_alarm_store (priv->alarm_list_store, priv->old_summary, priv->alarm_units, priv->alarm_interval, NULL);
 	alarm = e_dialog_toggle_get (priv->alarm);
+
+	if (alarm && !priv->alarm_icon) {
+		priv->alarm_icon = create_image_event_box ("stock_bell", "This event has alarms");
+		gtk_box_pack_start ((GtkBox *)priv->status_icons, priv->alarm_icon, FALSE, FALSE, 3);
+	}
 	
 	gtk_entry_set_editable (GTK_ENTRY (priv->summary), sensitize);
 	gtk_entry_set_editable (GTK_ENTRY (priv->location), sensitize);
@@ -2027,6 +2055,9 @@ get_widgets (EventPage *epage)
 	priv->timezone_label = GW ("timezone-label");
 	priv->start_timezone = GW ("start-timezone");
 	priv->end_timezone = priv->start_timezone;
+	priv->status_icons = GW ("status-icons");
+
+	gtk_widget_show (priv->status_icons);
 
 	if (!calendar_config_get_show_timezone()) {
 		gtk_widget_hide (priv->timezone_label);
@@ -2502,8 +2533,17 @@ alarm_changed_cb (GtkWidget *widget, gpo
 		icalcomponent_add_property (icalcomp, icalprop);
 
 		e_alarm_list_append (priv->alarm_list_store, NULL, ca);
+
+		if (!priv->alarm_icon) {
+			priv->alarm_icon = create_image_event_box ("stock_bell", "This event has alarms");
+			gtk_box_pack_start ((GtkBox *)priv->status_icons, priv->alarm_icon, FALSE, FALSE, 3);
+		}
 	} else {
 		e_alarm_list_clear (priv->alarm_list_store);
+		if (priv->alarm_icon) {
+			gtk_container_remove (priv->status_icons, priv->alarm_icon);
+			priv->alarm_icon = NULL;
+		}
 	}	
 		
 	sensitize_widgets (epage);	
@@ -2692,8 +2732,10 @@ init_widgets (EventPage *epage)
 	}
 	
 	g_signal_connect (priv->alarm,
-			  "toggled", G_CALLBACK (alarm_changed_cb),
+			  "toggled", G_CALLBACK (field_changed_cb),
 			  epage);
+	g_signal_connect (priv->alarm_time, "changed",
+			  G_CALLBACK (field_changed_cb), epage);
 	g_signal_connect (priv->alarm_custom, "clicked",
 			  G_CALLBACK (alarm_custom_clicked_cb), epage);
 
@@ -2715,8 +2757,6 @@ init_widgets (EventPage *epage)
 	g_signal_connect (priv->alarm,
 			  "toggled", G_CALLBACK (alarm_changed_cb),
 			  epage);
-	g_signal_connect (priv->alarm_custom, "clicked",
-			  G_CALLBACK (alarm_custom_clicked_cb), epage);
 
 	/* Set the default timezone, so the timezone entry may be hidden. */
 	zone = calendar_config_get_icaltimezone ();
@@ -2887,6 +2927,14 @@ event_page_create_source_option_menu (vo
 
 	gtk_widget_show (menu);
 	return menu;
+}
+
+GtkWidget *make_status_icons (void);
+
+GtkWidget *
+make_status_icons (void)
+{
+	return gtk_hbox_new (FALSE, 2);
 }
 
 static void
Index: dialogs/event-page.glade
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/event-page.glade,v
retrieving revision 1.32
diff -u -p -r1.32 event-page.glade
--- dialogs/event-page.glade	22 Nov 2005 07:51:19 -0000	1.32
+++ dialogs/event-page.glade	2 Dec 2005 10:53:36 -0000
@@ -689,6 +689,21 @@
 			  <property name="fill">True</property>
 			</packing>
 		      </child>
+
+		      <child>
+			<widget class="Custom" id="status-icons">
+			  <property name="visible">True</property>
+			  <property name="creation_function">make_status_icons</property>
+			  <property name="int1">0</property>
+			  <property name="int2">0</property>
+			  <property name="last_modification_time">Thu, 24 Nov 2005 07:10:06 GMT</property>
+			</widget>
+			<packing>
+			  <property name="padding">4</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]