Re: [evolution-patches] Patch for bug#271541
- From: lviren <lviren novell com>
- To: pchenthill <pchenthill novell com>
- Cc: evolution-patches lists ximian com
- Subject: Re: [evolution-patches] Patch for bug#271541
- Date: Tue, 07 Jun 2005 11:57:08 +0530
hi,
I have made changes to display the name of calendar in the warning
dialog for an read only calendar.
Thanks,
Viren
On Fri, 2005-05-27 at 14:47 +0530, pchenthill wrote:
> Although the patch looks good, it would better if we display the name of
> the calendar in which the user is trying to create the appointment in
> the error message.
>
> thanks, chenthill.
>
> On Tue, 2005-05-24 at 12:47 +0530, lviren wrote:
> > hi,
> >
> > This patch is regarding disabling options or displaying warning to user
> > whenever there is an attempt to add appointments to an read-only
> > calendar.
> >
> > thanx,
> > Viren.
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > evolution-patches mailing list
> > evolution-patches lists ximian com
> > http://lists.ximian.com/mailman/listinfo/evolution-patches
> _______________________________________________
> evolution-patches mailing list
> evolution-patches lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-patches
Index: gui/e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.80
diff -u -p -w -r1.80 e-calendar-view.c
--- gui/e-calendar-view.c 6 May 2005 03:29:55 -0000 1.80
+++ gui/e-calendar-view.c 7 Jun 2005 06:23:23 -0000
@@ -1391,9 +1391,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."},
@@ -1650,10 +1650,24 @@ e_calendar_view_edit_appointment (ECalen
CompEditor *ce;
const char *uid;
ECalComponent *comp;
+ GError **error;
+ gboolean read_only;
+ GtkWidget *dialog;
+ ESource *source;
g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
g_return_if_fail (E_IS_CAL (client));
g_return_if_fail (icalcomp != NULL);
+ if (e_cal_is_read_only (client ,&read_only ,error) && 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,
+ "Cannot add appointment to 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.2742
diff -u -p -w -r1.2742 ChangeLog
--- ChangeLog 30 May 2005 09:14:26 -0000 1.2742
+++ ChangeLog 7 Jun 2005 06:23:34 -0000
@@ -1,3 +1,11 @@
+2005-06-07 Viren <lviren novell com>
+
+ * gui/e-calendar-view.c:(e_calendar_view_edit_appointment):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-05-30 Thouis R. Jones <thouis csail mit edu>
Fixes #272301
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]