aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/meeting-page.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-10-13 06:09:57 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-10-13 06:09:57 +0800
commit1bd22eb65b2d1fa1cb8a589871337290c1cb258f (patch)
tree1fb6480c5a86900e4a3bcc34ac80964b9f471162 /calendar/gui/dialogs/meeting-page.c
parent02c6e327892d45a00722a7f5e5d8c7ef62d3edf7 (diff)
downloadgsoc2013-evolution-1bd22eb65b2d1fa1cb8a589871337290c1cb258f.tar
gsoc2013-evolution-1bd22eb65b2d1fa1cb8a589871337290c1cb258f.tar.gz
gsoc2013-evolution-1bd22eb65b2d1fa1cb8a589871337290c1cb258f.tar.bz2
gsoc2013-evolution-1bd22eb65b2d1fa1cb8a589871337290c1cb258f.tar.lz
gsoc2013-evolution-1bd22eb65b2d1fa1cb8a589871337290c1cb258f.tar.xz
gsoc2013-evolution-1bd22eb65b2d1fa1cb8a589871337290c1cb258f.tar.zst
gsoc2013-evolution-1bd22eb65b2d1fa1cb8a589871337290c1cb258f.zip
return fill_component success
2001-10-12 JP Rosevear <jpr@ximian.com> * gui/dialogs/alarm-page.c: return fill_component success * gui/dialogs/task-page.c: ditto * gui/dialogs/task-details-page.c: ditto * gui/dialogs/schedule-page.c: ditto * gui/dialogs/recurrence-page.c: ditto * gui/dialogs/event-page.c: ditto * gui/dialogs/meeting-page.c: use e_notice instead of duplicate_error (meeting_page_get_cancel_comp): duh, deleted_attendees is an array now (meeting_page_fill_component): spew gui errors if there is no organizer or no attendees, return success * gui/dialogs/event-editor.c (event_editor_send_comp): always call parent method and don't send the cancellation comp if the method is publish (refresh_meeting_cmd): use the orginal comp to refresh (forward_cmd): prompt the user for the version they want to send (current, original) * gui/dialogs/task-editor.c (forward_cmd): as above (refresh_task_cmd): ditto * gui/dialogs/comp-editor-page.c (comp_editor_page_fill_component): return boolean of whether the component could be filled or not * gui/dialogs/comp-editor-page.h: update proto * gui/dialogs/comp-editor.c (prompt_to_save_changes): take a param on whether to try and send or not (comp_editor_get_current_comp): only fill component if its changed (comp_editor_save_comp): prompt user as well * gui/dialogs/comp-editor.h: change proto * gui/itip-utils.c: replace error_dialog with e_notice (comp_content_type): specify charset svn path=/trunk/; revision=13635
Diffstat (limited to 'calendar/gui/dialogs/meeting-page.c')
-rw-r--r--calendar/gui/dialogs/meeting-page.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
index 22c8f6e05a..bef302cb9f 100644
--- a/calendar/gui/dialogs/meeting-page.c
+++ b/calendar/gui/dialogs/meeting-page.c
@@ -37,9 +37,8 @@
#include <gtk/gtkwindow.h>
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-stock.h>
-#include <libgnomeui/gnome-dialog-util.h>
#include <glade/glade.h>
+#include <libgnomeui/gnome-stock.h>
#include <gal/e-table/e-cell-combo.h>
#include <gal/e-table/e-cell-text.h>
#include <gal/e-table/e-table-simple.h>
@@ -128,7 +127,7 @@ static void meeting_page_destroy (GtkObject *object);
static GtkWidget *meeting_page_get_widget (CompEditorPage *page);
static void meeting_page_focus_main_widget (CompEditorPage *page);
static void meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static void meeting_page_fill_component (CompEditorPage *page, CalComponent *comp);
+static gboolean meeting_page_fill_component (CompEditorPage *page, CalComponent *comp);
static gint right_click_cb (ETable *etable, gint row, gint col, GdkEvent *event, gpointer data);
@@ -409,13 +408,13 @@ meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
}
/* fill_component handler for the meeting page */
-static void
+static gboolean
meeting_page_fill_component (CompEditorPage *page, CalComponent *comp)
{
MeetingPage *mpage;
MeetingPagePrivate *priv;
CalComponentOrganizer organizer = {NULL, NULL, NULL, NULL};
-
+
mpage = MEETING_PAGE (page);
priv = mpage->priv;
@@ -438,10 +437,12 @@ meeting_page_fill_component (CompEditorPage *page, CalComponent *comp)
g_free (str);
}
- if (addr == NULL || strlen (addr) == 0) {
+ if (addr == NULL || strlen (addr) == 0) {
+ e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
+ _("An organizer is required."));
g_free (addr);
- g_free (cn);
- return;
+ g_free (cn);
+ return FALSE;
} else {
gchar *tmp;
@@ -457,7 +458,14 @@ meeting_page_fill_component (CompEditorPage *page, CalComponent *comp)
g_free (cn);
}
+ if (e_meeting_model_count_attendees (priv->model) < 1) {
+ e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
+ "Atleast one attendee is required.");
+ return FALSE;
+ }
set_attendees (comp, e_meeting_model_get_attendees (priv->model));
+
+ return TRUE;
}
@@ -505,13 +513,6 @@ get_widgets (MeetingPage *mpage)
}
static void
-duplicate_error (void)
-{
- GtkWidget *dlg = gnome_error_dialog (_("That person is already attending the meeting!"));
- gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
-}
-
-static void
invite_entry_changed (BonoboListener *listener,
char *event_name,
CORBA_any *arg,
@@ -760,7 +761,8 @@ popup_delegate_cb (GtkWidget *widget, gpointer data)
/* Make sure we can add the new delegatee person */
if (e_meeting_model_find_attendee (priv->model, address, NULL) != NULL) {
- duplicate_error ();
+ e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
+ _("That person is already attending the meeting!"));
goto cleanup;
}
@@ -963,7 +965,7 @@ meeting_page_get_cancel_comp (MeetingPage *mpage)
priv = mpage->priv;
- if (priv->deleted_attendees == NULL)
+ if (priv->deleted_attendees->len == 0)
return NULL;
set_attendees (priv->comp, priv->deleted_attendees);