[evolution-patches] patch for centered dialogs



This makes all calendar dialogs be centered in the evolution window, and
not appear in random places, which is really annoying.
? gui/alarm-notify/alarm-notify.gladep
? gui/dialogs/alarm-options.gladep
? gui/dialogs/alarm-page.gladep
? gui/dialogs/cal-prefs-dialog.gladep
? gui/dialogs/e-delegate-dialog.gladep
? gui/dialogs/event-page.gladep
? gui/dialogs/meeting-page.gladep
? gui/dialogs/recurrence-page.gladep
? gui/dialogs/schedule-page.gladep
? gui/dialogs/task-details-page.gladep
? gui/dialogs/task-page.gladep
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.1804
diff -u -p -r1.1804 ChangeLog
--- ChangeLog	27 Jun 2003 09:01:49 -0000	1.1804
+++ ChangeLog	27 Jun 2003 17:51:28 -0000
@@ -1,3 +1,44 @@
+2003-06-27  Rodrigo Moya <rodrigo ximian com>
+
+	* gui/dialogs/send-comp.[ch] (send_component_dialog):
+	* gui/dialogs/cancel-comp.[ch] (cancel_component_dialog): added a
+	GtkWindow argument for callers to specify the parent window.
+
+	* gui/dialogs/changed-comp.[ch] (changed_component_dialog): added
+	'parent' argument and use GtkMessageDialog instead of
+	gnome_question_dialog.
+
+	* gui/e-calendar-table.c (e_calendar_table_delete_selected):
+	* gui/e-day-view.c (e_day_view_delete_event_internal,
+	  e_day_view_on_cut, e_day_view_finish_long_event_resize,
+	  e_day_view_finish_resize, e_day_view_on_editting_stopped,
+	  e_day_view_on_top_canvas_drag_data_received, selection_received):
+	* gui/e-week-view.c (e_week_view_delete_event_internal,
+	  e_week_view_on_cut, e_week_view_on_editing_stopped,
+	  selection_received):
+	* gui/dialogs/event-editor.c (cancel_meeting_cmd):
+	* gui/dialogs/task-editor.c (cancel_task_cmd):
+	* gui/dialogs/comp-editor.c (delete_cmd, obj_removed_cb): pass the parent window to
+	the *_component_dialog() functions.
+
+	* gui/dialogs/delete-comp.c (delete_component_dialog): use the 'widget'
+	argument to get the parent window for the dialog.
+
 2003-06-25  Rodrigo Moya <rodrigo ximian com>
 
 	Fixes #44723
Index: gui//e-day-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view.c,v
retrieving revision 1.198
diff -u -p -r1.198 e-day-view.c
--- gui//e-day-view.c	25 Jun 2003 15:53:54 -0000	1.198
+++ gui//e-day-view.c	27 Jun 2003 17:51:32 -0000
@@ -4142,7 +4142,8 @@ e_day_view_delete_event_internal (EDayVi
 		const char *uid;
 
 		if (itip_organizer_is_user (event->comp, day_view->client) 
-		    && cancel_component_dialog (day_view->client, event->comp, TRUE))
+		    && cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (day_view),
+						day_view->client, event->comp, TRUE))
 			itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, event->comp, day_view->client, NULL);
 
 		cal_component_get_uid (event->comp, &uid);
@@ -4278,7 +4279,8 @@ e_day_view_on_cut (GtkWidget *widget, gp
 	e_day_view_on_copy (widget, data);
 
 	if (itip_organizer_is_user (event->comp, day_view->client) 
-	    && cancel_component_dialog (day_view->client, event->comp, TRUE))
+	    && cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (day_view),
+					day_view->client, event->comp, TRUE))
 		itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, event->comp, day_view->client, NULL);
 
 	cal_component_get_uid (event->comp, &uid);
@@ -4912,7 +4914,9 @@ e_day_view_finish_long_event_resize (EDa
  
  		if (recur_component_dialog (comp, &mod, NULL)) {
  			if (cal_client_update_object_with_mod (day_view->client, comp, mod) == CAL_CLIENT_RESULT_SUCCESS) {
- 				if (itip_organizer_is_user (comp, day_view->client) && send_component_dialog (day_view->client, comp, FALSE))
+ 				if (itip_organizer_is_user (comp, day_view->client) &&
+				    send_component_dialog (gtk_widget_get_toplevel (day_view),
+							   day_view->client, comp, FALSE))
  					itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, day_view->client, NULL);
  			} else {
  				g_message ("e_day_view_finish_resize(): Could not update the object!");
@@ -4921,7 +4925,9 @@ e_day_view_finish_long_event_resize (EDa
  			gtk_widget_queue_draw (day_view->top_canvas);
  		}		
  	} else if (cal_client_update_object (day_view->client, comp) == CAL_CLIENT_RESULT_SUCCESS) {
- 		if (itip_organizer_is_user (comp, day_view->client) && send_component_dialog (day_view->client, comp, TRUE))
+ 		if (itip_organizer_is_user (comp, day_view->client) &&
+		    send_component_dialog (gtk_widget_get_toplevel (day_view),
+					   day_view->client, comp, TRUE))
   			itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, day_view->client, NULL);
   	} else {
   		g_message ("e_day_view_finish_long_event_resize(): Could not update the object!");
@@ -4990,7 +4996,9 @@ e_day_view_finish_resize (EDayView *day_
 
 		if (recur_component_dialog (comp, &mod, NULL)) {
 			if (cal_client_update_object_with_mod (day_view->client, comp, mod) == CAL_CLIENT_RESULT_SUCCESS) {
-				if (itip_organizer_is_user (comp, day_view->client) && send_component_dialog (day_view->client, comp, FALSE))
+				if (itip_organizer_is_user (comp, day_view->client) &&
+				    send_component_dialog (gtk_widget_get_toplevel (day_view),
+							   day_view->client, comp, FALSE))
 					itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, day_view->client, NULL);
 			} else {
 				g_message ("e_day_view_finish_resize(): Could not update the object!");
@@ -4999,7 +5007,8 @@ e_day_view_finish_resize (EDayView *day_
 			gtk_widget_queue_draw (day_view->main_canvas);
 		}		
 	} else if (cal_client_update_object (day_view->client, comp) == CAL_CLIENT_RESULT_SUCCESS) {
-		if (itip_organizer_is_user (comp, day_view->client) && send_component_dialog (day_view->client, comp, FALSE))
+		if (itip_organizer_is_user (comp, day_view->client) &&
+		    send_component_dialog (gtk_widget_get_toplevel (day_view), day_view->client, comp, FALSE))
 			itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, day_view->client, NULL);
 	} else {
 		g_message ("e_day_view_finish_resize(): Could not update the object!");
@@ -6547,7 +6556,8 @@ e_day_view_on_editing_stopped (EDayView 
 			if (recur_component_dialog (event->comp, &mod, NULL)) {
 				if (cal_client_update_object_with_mod (day_view->client, event->comp, mod) == CAL_CLIENT_RESULT_SUCCESS) {
 					if (itip_organizer_is_user (event->comp, day_view->client) 
-					    && send_component_dialog (day_view->client, event->comp, FALSE))
+					    && send_component_dialog (gtk_widget_get_toplevel (day_view),
+								      day_view->client, event->comp, FALSE))
 						itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, event->comp, 
 								day_view->client, NULL);
 				} else {
@@ -6555,7 +6565,9 @@ e_day_view_on_editing_stopped (EDayView 
 				}
 			}
 		} else if (cal_client_update_object (day_view->client, event->comp) == CAL_CLIENT_RESULT_SUCCESS) {
-			if (itip_organizer_is_user (event->comp, day_view->client) && send_component_dialog (day_view->client, event->comp, FALSE))
+			if (itip_organizer_is_user (event->comp, day_view->client) &&
+			    send_component_dialog (gtk_widget_get_toplevel (day_view),
+						   day_view->client, event->comp, FALSE))
 				itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, event->comp,
 						day_view->client, NULL);
 		} else {
@@ -7660,7 +7672,8 @@ e_day_view_on_top_canvas_drag_data_recei
 				if (recur_component_dialog (comp, &mod, NULL)) {
 					if (cal_client_update_object_with_mod (day_view->client, comp, mod) == CAL_CLIENT_RESULT_SUCCESS) {
 						if (itip_organizer_is_user (comp, day_view->client) 
-						    && send_component_dialog (day_view->client, comp, FALSE))
+						    && send_component_dialog (gtk_widget_get_toplevel (day_view),
+									      day_view->client, comp, FALSE))
 							itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, 
 									day_view->client, NULL);
 					} else {
@@ -7670,7 +7683,9 @@ e_day_view_on_top_canvas_drag_data_recei
 				}
 			} else if (cal_client_update_object (day_view->client, comp)
 			    == CAL_CLIENT_RESULT_SUCCESS) {
-				if (itip_organizer_is_user (comp, day_view->client) && send_component_dialog (day_view->client, comp, FALSE))
+				if (itip_organizer_is_user (comp, day_view->client) &&
+				    send_component_dialog (gtk_widget_get_toplevel (day_view),
+							   day_view->client, comp, FALSE))
 					itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp,
 							day_view->client, NULL);
 			} else {
@@ -7788,7 +7803,8 @@ e_day_view_on_main_canvas_drag_data_rece
 				if (recur_component_dialog (comp, &mod, NULL)) {
 					if (cal_client_update_object_with_mod (day_view->client, comp, mod) == CAL_CLIENT_RESULT_SUCCESS) {
 						if (itip_organizer_is_user (comp, day_view->client) 
-						    && send_component_dialog (day_view->client, comp, FALSE))
+						    && send_component_dialog (gtk_widget_get_toplevel (day_view),
+									      day_view->client, comp, FALSE))
 							itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, 
 									day_view->client, NULL);
 					} else {
@@ -7798,7 +7814,9 @@ e_day_view_on_main_canvas_drag_data_rece
 				}
 			} else if (cal_client_update_object (day_view->client, comp)
 			    == CAL_CLIENT_RESULT_SUCCESS) {
-				if (itip_organizer_is_user (comp, day_view->client) && send_component_dialog (day_view->client, comp, FALSE))
+				if (itip_organizer_is_user (comp, day_view->client) &&
+				    send_component_dialog (gtk_widget_get_toplevel (day_view),
+							   day_view->client, comp, FALSE))
 					itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp,
 							day_view->client, NULL);
 			} else {
@@ -7984,7 +8002,8 @@ selection_received (GtkWidget *invisible
 
 		cal_client_update_object (day_view->client, comp);
 
-		if (itip_organizer_is_user (comp, day_view->client) && send_component_dialog (day_view->client, comp, TRUE))
+		if (itip_organizer_is_user (comp, day_view->client) && 
+		    send_component_dialog (gtk_widget_get_toplevel (day_view), day_view->client, comp, TRUE))
 			itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, day_view->client, NULL);
 
 		g_object_unref (comp);
Index: gui//e-week-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-week-view.c,v
retrieving revision 1.165
diff -u -p -r1.165 e-week-view.c
--- gui//e-week-view.c	19 Jun 2003 02:41:49 -0000	1.165
+++ gui//e-week-view.c	27 Jun 2003 17:51:34 -0000
@@ -3321,7 +3321,8 @@ e_week_view_on_editing_stopped (EWeekVie
 			if (recur_component_dialog (event->comp, &mod, NULL)) {
 				if (cal_client_update_object_with_mod (week_view->client, event->comp, mod) == CAL_CLIENT_RESULT_SUCCESS) {
 					if (itip_organizer_is_user (event->comp, week_view->client) 
-					    && send_component_dialog (week_view->client, event->comp, FALSE))
+					    && send_component_dialog (gtk_widget_get_toplevel (week_view),
+								      week_view->client, event->comp, FALSE))
 						itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, event->comp, 
 								week_view->client, NULL);
 				} else {
@@ -3329,7 +3330,9 @@ e_week_view_on_editing_stopped (EWeekVie
 				}
 			}
 		} else if (cal_client_update_object (week_view->client, event->comp) == CAL_CLIENT_RESULT_SUCCESS) {
-			if (itip_organizer_is_user (event->comp, week_view->client) && send_component_dialog (week_view->client, event->comp, FALSE))
+			if (itip_organizer_is_user (event->comp, week_view->client) &&
+			    send_component_dialog (gtk_widget_get_toplevel (week_view),
+						   week_view->client, event->comp, FALSE))
 				itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, event->comp,
 						week_view->client, NULL);
 		} else {
@@ -3969,7 +3972,8 @@ e_week_view_delete_event_internal (EWeek
 		const char *uid;
 
 		if (itip_organizer_is_user (event->comp, week_view->client) 
-		    && cancel_component_dialog (week_view->client, event->comp, TRUE))
+		    && cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (week_view),
+						week_view->client, event->comp, TRUE))
 			itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, event->comp, week_view->client, NULL);
 
 		cal_component_get_uid (event->comp, &uid);
@@ -4079,7 +4083,8 @@ e_week_view_on_cut (GtkWidget *widget, g
  				week_view->popup_event_num);
  
 	if (itip_organizer_is_user (event->comp, week_view->client) 
-	    && cancel_component_dialog (week_view->client, event->comp, TRUE))
+	    && cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (week_view),
+					week_view->client, event->comp, TRUE))
 		itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, event->comp, week_view->client, NULL);
 
  	cal_component_get_uid (event->comp, &uid);
@@ -4418,7 +4423,8 @@ selection_received (GtkWidget *invisible
 
 		cal_client_update_object (week_view->client, comp);
 
-		if (itip_organizer_is_user (comp, week_view->client) && send_component_dialog (week_view->client, comp, TRUE))
+		if (itip_organizer_is_user (comp, week_view->client) &&
+		    send_component_dialog (gtk_widget_get_toplevel (week_view), week_view->client, comp, TRUE))
 			itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, week_view->client, NULL);
 
 		g_free (uid);
Index: gui//dialogs/cancel-comp.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/cancel-comp.c,v
retrieving revision 1.6
diff -u -p -r1.6 cancel-comp.c
--- gui//dialogs/cancel-comp.c	20 Mar 2003 17:47:54 -0000	1.6
+++ gui//dialogs/cancel-comp.c	27 Jun 2003 17:51:35 -0000
@@ -40,7 +40,7 @@
  * Return value: TRUE if the user clicked Yes, FALSE otherwise.
  **/
 gboolean
-cancel_component_dialog (CalClient *client, CalComponent *comp, gboolean deleting)
+cancel_component_dialog (GtkWindow *parent, CalClient *client, CalComponent *comp, gboolean deleting)
 {
 	GtkWidget *dialog;
 	CalComponentVType vtype;
@@ -81,12 +81,12 @@ cancel_component_dialog (CalClient *clie
 		break;
 
 	default:
-		g_message ("send_component_dialog(): "
+		g_message ("cancel_component_dialog(): "
 			   "Cannot handle object of type %d", vtype);
 		return FALSE;
 	}
 	
-	dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
+	dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL,
 					 GTK_MESSAGE_QUESTION,
 					 GTK_BUTTONS_YES_NO, str);
 
Index: gui//dialogs/cancel-comp.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/cancel-comp.h,v
retrieving revision 1.4
diff -u -p -r1.4 cancel-comp.h
--- gui//dialogs/cancel-comp.h	4 Mar 2003 19:52:34 -0000	1.4
+++ gui//dialogs/cancel-comp.h	27 Jun 2003 17:51:35 -0000
@@ -25,6 +25,6 @@
 #include <cal-client/cal-client.h>
 #include <cal-util/cal-component.h>
 
-gboolean cancel_component_dialog (CalClient *client, CalComponent *comp, gboolean deleting);
+gboolean cancel_component_dialog (GtkWindow *parent, CalClient *client, CalComponent *comp, gboolean deleting);
 
 #endif
Index: gui//dialogs/changed-comp.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/changed-comp.c,v
retrieving revision 1.3
diff -u -p -r1.3 changed-comp.c
--- gui//dialogs/changed-comp.c	7 Nov 2002 02:00:56 -0000	1.3
+++ gui//dialogs/changed-comp.c	27 Jun 2003 17:51:35 -0000
@@ -23,9 +23,8 @@
 #endif
 
 #include <glib.h>
+#include <gtk/gtkmessagedialog.h>
 #include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
 #include <libgnomeui/gnome-uidefs.h>
 #include <gal/widgets/e-unicode.h>
 #include "changed-comp.h"
@@ -34,6 +33,7 @@
 
 /**
  * changed_component_dialog:
+ * @parent: Parent window for the dialog.
  * @comp: A calendar component
  * @deleted: Whether the object is being deleted or updated
  * @changed: Whether or not the user has made changes
@@ -44,11 +44,12 @@
  * Return value: TRUE if the user clicked Yes, FALSE otherwise.
  **/
 gboolean
-changed_component_dialog (CalComponent *comp, gboolean deleted, gboolean changed)
+changed_component_dialog (GtkWindow *parent, CalComponent *comp, gboolean deleted, gboolean changed)
 {
 	GtkWidget *dialog;
 	CalComponentVType vtype;
 	char *str;
+	gint response;
 
 	vtype = cal_component_get_vtype (comp);
 
@@ -101,9 +102,14 @@ changed_component_dialog (CalComponent *
 			str = g_strdup_printf (_("%s  You have made no changes, update the editor?"), str); 
 	}
 	
-	dialog = gnome_question_dialog_modal (str, NULL, NULL);
+	dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL,
+					 GTK_MESSAGE_QUESTION,
+					 GTK_BUTTONS_YES_NO, str);
 
-	if (gnome_dialog_run (GNOME_DIALOG (dialog)) == GNOME_YES)
+	response = gtk_dialog_run (GTK_DIALOG (dialog));
+	gtk_widget_destroy (dialog);
+
+	if (response == GTK_RESPONSE_YES)
 		return TRUE;
 	else
 		return FALSE;
Index: gui//dialogs/changed-comp.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/changed-comp.h,v
retrieving revision 1.2
diff -u -p -r1.2 changed-comp.h
--- gui//dialogs/changed-comp.h	27 Oct 2001 17:38:10 -0000	1.2
+++ gui//dialogs/changed-comp.h	27 Jun 2003 17:51:35 -0000
@@ -22,8 +22,9 @@
 #define CHANGED_COMP_H
 
 #include <glib.h>
+#include <gtk/gtkwindow.h>
 #include <cal-util/cal-component.h>
 
-gboolean changed_component_dialog (CalComponent *comp, gboolean deleted, gboolean changed);
+gboolean changed_component_dialog (GtkWindow *window, CalComponent *comp, gboolean deleted, gboolean changed);
 
 #endif
Index: gui//dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.79
diff -u -p -r1.79 comp-editor.c
--- gui//dialogs/comp-editor.c	24 Jun 2003 11:37:12 -0000	1.79
+++ gui//dialogs/comp-editor.c	27 Jun 2003 17:51:35 -0000
@@ -371,7 +371,7 @@ save_comp_with_send (CompEditor *editor)
 	if (!save_comp (editor))
 		return FALSE;
 
- 	if (send && send_component_dialog (priv->client, priv->comp, !priv->existing_org)) {
+ 	if (send && send_component_dialog ((GtkWindow *) editor, priv->client, priv->comp, !priv->existing_org)) {
  		if (itip_organizer_is_user (priv->comp, priv->client))
  			return comp_editor_send_comp (editor, CAL_COMPONENT_METHOD_REQUEST);
  		else
@@ -1312,7 +1312,8 @@ delete_cmd (GtkWidget *widget, gpointer 
 
 	if (delete_component_dialog (priv->comp, FALSE, 1, vtype, GTK_WIDGET (editor))) {
 		if (itip_organizer_is_user (priv->comp, priv->client) 
-		    && cancel_component_dialog (priv->client, priv->comp, TRUE))
+		    && cancel_component_dialog ((GtkWindow *) editor,
+						priv->client, priv->comp, TRUE))
 			itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, priv->comp, priv->client, NULL);
 
 		delete_comp (editor);
@@ -1448,7 +1449,7 @@ obj_updated_cb (CalClient *client, const
 	cal_component_get_uid (priv->comp, &edit_uid);
 
 	if (!strcmp (uid, edit_uid) && !priv->updating) {
-		if (changed_component_dialog (priv->comp, FALSE, priv->changed)) {
+		if (changed_component_dialog ((GtkWindow *) editor, priv->comp, FALSE, priv->changed)) {
 			status = cal_client_get_object (priv->client, uid, &comp);
 			if (status == CAL_CLIENT_GET_SUCCESS) {
 				comp_editor_edit_comp (editor, comp);
@@ -1475,7 +1476,7 @@ obj_removed_cb (CalClient *client, const
 	cal_component_get_uid (priv->comp, &edit_uid);
 
 	if (!strcmp (uid, edit_uid) && !priv->updating) {
-		if (changed_component_dialog (priv->comp, TRUE, priv->changed))
+		if (changed_component_dialog ((GtkWindow *) editor, priv->comp, TRUE, priv->changed))
 			close_dialog (editor);
 	}
 }
Index: gui//dialogs/delete-comp.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/delete-comp.c,v
retrieving revision 1.15
diff -u -p -r1.15 delete-comp.c
--- gui//dialogs/delete-comp.c	26 Jan 2003 01:42:05 -0000	1.15
+++ gui//dialogs/delete-comp.c	27 Jun 2003 17:51:35 -0000
@@ -150,10 +150,11 @@ delete_component_dialog (CalComponent *c
 		}
 	}
 
-	dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", str);
+	dialog = gtk_message_dialog_new (gtk_widget_get_toplevel (widget),
+					 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", str);
 	g_free (str);
-	ret = gtk_dialog_run((GtkDialog *)dialog) == GTK_RESPONSE_YES;
-	gtk_widget_destroy(dialog);
+	ret = gtk_dialog_run ((GtkDialog *)dialog) == GTK_RESPONSE_YES;
+	gtk_widget_destroy (dialog);
 
 	return ret;
 }
Index: gui//dialogs/event-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/event-editor.c,v
retrieving revision 1.33
diff -u -p -r1.33 event-editor.c
--- gui//dialogs/event-editor.c	2 May 2003 12:37:16 -0000	1.33
+++ gui//dialogs/event-editor.c	27 Jun 2003 17:51:35 -0000
@@ -481,7 +481,8 @@ cancel_meeting_cmd (GtkWidget *widget, g
 	CalComponent *comp;
 	
 	comp = comp_editor_get_current_comp (COMP_EDITOR (ee));
-	if (cancel_component_dialog (comp_editor_get_cal_client (COMP_EDITOR (ee)), comp, FALSE)) {
+	if (cancel_component_dialog ((GtkWindow *) ee,
+				     comp_editor_get_cal_client (COMP_EDITOR (ee)), comp, FALSE)) {
 		comp_editor_send_comp (COMP_EDITOR (ee), CAL_COMPONENT_METHOD_CANCEL);
 		comp_editor_delete_comp (COMP_EDITOR (ee));
 	}
Index: gui//dialogs/recur-comp.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/recur-comp.c,v
retrieving revision 1.3
diff -u -p -r1.3 recur-comp.c
--- gui//dialogs/recur-comp.c	4 Mar 2003 20:03:21 -0000	1.3
+++ gui//dialogs/recur-comp.c	27 Jun 2003 17:51:36 -0000
@@ -64,7 +64,7 @@ recur_component_dialog (CalComponent *co
 	}
 
 
-	dialog = gtk_message_dialog_new(parent, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, "%s", str);
+	dialog = gtk_message_dialog_new (parent, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, "%s", str);
 	g_free (str);
 	
 	hbox = gtk_hbox_new (FALSE, 2);
Index: gui//dialogs/recur-comp.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/recur-comp.h,v
retrieving revision 1.3
diff -u -p -r1.3 recur-comp.h
--- gui//dialogs/recur-comp.h	4 Mar 2003 20:03:21 -0000	1.3
+++ gui//dialogs/recur-comp.h	27 Jun 2003 17:51:36 -0000
@@ -21,7 +21,7 @@
 #ifndef RECUR_COMP_H
 #define RECUR_COMP_H
 
-#include <gtk/gtkwidget.h>
+#include <gtk/gtkwindow.h>
 #include <cal-util/cal-component.h>
 #include <cal-util/cal-util.h>
 
Index: gui//dialogs/send-comp.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/send-comp.c,v
retrieving revision 1.7
diff -u -p -r1.7 send-comp.c
--- gui//dialogs/send-comp.c	18 Mar 2003 19:43:46 -0000	1.7
+++ gui//dialogs/send-comp.c	27 Jun 2003 17:51:36 -0000
@@ -40,7 +40,7 @@
  * Return value: TRUE if the user clicked Yes, FALSE otherwise.
  **/
 gboolean
-send_component_dialog (CalClient *client, CalComponent *comp, gboolean new)
+send_component_dialog (GtkWindow *parent, CalClient *client, CalComponent *comp, gboolean new)
 {
 	GtkWidget *dialog;
 	CalComponentVType vtype;
@@ -80,7 +80,7 @@ send_component_dialog (CalClient *client
 		return FALSE;
 	}
 	
-	dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
+	dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL,
 					 GTK_MESSAGE_QUESTION,
 					 GTK_BUTTONS_YES_NO, str);
 
Index: gui//dialogs/send-comp.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/send-comp.h,v
retrieving revision 1.4
diff -u -p -r1.4 send-comp.h
--- gui//dialogs/send-comp.h	4 Mar 2003 19:52:34 -0000	1.4
+++ gui//dialogs/send-comp.h	27 Jun 2003 17:51:36 -0000
@@ -22,9 +22,10 @@
 #define SEND_COMP_H
 
 #include <glib.h>
+#include <gtk/gtkwindow.h>
 #include <cal-client/cal-client.h>
 #include <cal-util/cal-component.h>
 
-gboolean send_component_dialog (CalClient *client, CalComponent *comp, gboolean new);
+gboolean send_component_dialog (GtkWindow *parent, CalClient *client, CalComponent *comp, gboolean new);
 
 #endif
Index: gui//dialogs/task-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/task-editor.c,v
retrieving revision 1.63
diff -u -p -r1.63 task-editor.c
--- gui//dialogs/task-editor.c	2 May 2003 12:37:17 -0000	1.63
+++ gui//dialogs/task-editor.c	27 Jun 2003 17:51:36 -0000
@@ -428,7 +428,8 @@ cancel_task_cmd (GtkWidget *widget, gpoi
 	CalComponent *comp;
 	
 	comp = comp_editor_get_current_comp (COMP_EDITOR (te));
-	if (cancel_component_dialog (comp_editor_get_cal_client (COMP_EDITOR (te)), comp, FALSE)) {
+	if (cancel_component_dialog ((GtkWindow *) te,
+				     comp_editor_get_cal_client (COMP_EDITOR (te)), comp, FALSE)) {
 		comp_editor_send_comp (COMP_EDITOR (te), CAL_COMPONENT_METHOD_CANCEL);
 		comp_editor_delete_comp (COMP_EDITOR (te));
 	}


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