[evolution-patches] patch for bug# 271541 [calendar]
- From: lviren <lviren novell com>
- To: evolution-patches lists ximian com
- Subject: [evolution-patches] patch for bug# 271541 [calendar]
- Date: Wed, 13 Jul 2005 17:36:19 +0530
Hi,
Attached file has fix for bug#271541
http://bugzilla.gnome.org/show_bug.cgi?id=271541
Thanks,
Viren.
Index: gui/e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.85
diff -u -p -w -r1.85 e-calendar-view.c
--- gui/e-calendar-view.c 11 Jul 2005 02:35:48 -0000 1.85
+++ gui/e-calendar-view.c 13 Jul 2005 08:33:36 -0000
@@ -1493,9 +1493,9 @@ on_paste (EPopup *ep, EPopupItem *pitem,
}
static EPopupItem ecv_main_items [] = {
- { E_POPUP_ITEM, "00.new", N_("New _Appointment..."), on_new_appointment, NULL, "stock_new-appointment", 0, 0 },
- { E_POPUP_ITEM, "10.newallday", N_("New All Day _Event"), on_new_event, NULL, "stock_new-24h-appointment", 0, 0},
- { E_POPUP_ITEM, "20.meeting", N_("New Meeting"), on_new_meeting, NULL, "stock_new-meeting", 0, 0},
+ { E_POPUP_ITEM, "00.new", N_("New _Appointment..."), on_new_appointment, NULL, "stock_new-appointment", 0, E_CAL_POPUP_SELECT_EDITABLE},
+ { E_POPUP_ITEM, "10.newallday", N_("New All Day _Event"), on_new_event, NULL, "stock_new-24h-appointment", 0, E_CAL_POPUP_SELECT_EDITABLE},
+ { E_POPUP_ITEM, "20.meeting", N_("New Meeting"), on_new_meeting, NULL, "stock_new-meeting", 0, E_CAL_POPUP_SELECT_EDITABLE},
{ E_POPUP_ITEM, "30.task", N_("New Task"), on_new_task, NULL, "stock_task", 0, 0},
{ E_POPUP_BAR, "40."},
@@ -1746,7 +1746,22 @@ open_event_with_flags (ECalendarView *ca
CompEditor *ce;
const char *uid;
ECalComponent *comp;
-
+ ESource *source;
+ gboolean read_only;
+ GtkWidget *dialog;
+
+ if (e_cal_is_read_only (client, &read_only, NULL)) {
+ if(read_only) {
+ source = e_cal_get_source (client);
+ dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE,
+ "Can't create appointment for read-only Calendar '%s'",
+ e_source_peek_name (source));
+ g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
+ gtk_widget_show (dialog);
+ return;
+ }
+ }
priv = cal_view->priv;
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2764
diff -u -p -w -r1.2764 ChangeLog
--- ChangeLog 11 Jul 2005 08:59:37 -0000 1.2764
+++ ChangeLog 13 Jul 2005 08:33:44 -0000
@@ -1,3 +1,12 @@
+2005-07-13 Viren.l <lviren novell com>
+
+ * gui/e-calendar-view.c:(open_event_with_flags):Check whether calendar is
+ read only and display warning dialog if user attempts to add appointment.
+ Specify the sensitivity mask E_CAL_POPUP_SELECT_EDITABLE for the popup items
+ New Appointment,New AlldayEvent and Meeting.
+
+ Fixes #271541
+
2005-07-11 Srinivasa Ragavan <sragavan novell com>
* gui/itip-utils.[ch]: Added a structure.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]