aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/calendar-commands.c16
-rw-r--r--calendar/gui/calendar-component.c57
-rw-r--r--calendar/gui/comp-editor-factory.c52
-rw-r--r--calendar/gui/component-factory.c57
-rw-r--r--calendar/gui/dialogs/event-editor.c21
-rw-r--r--calendar/gui/dialogs/event-editor.h7
-rw-r--r--calendar/gui/e-day-view.c12
-rw-r--r--calendar/gui/e-week-view-event-item.c2
-rw-r--r--calendar/gui/e-week-view.c11
-rw-r--r--calendar/gui/gnome-cal.c13
-rw-r--r--calendar/gui/gnome-cal.h6
-rw-r--r--calendar/gui/tasks-control.c2
12 files changed, 158 insertions, 98 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 0b079f8df7..ffa81de654 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -81,6 +81,17 @@ new_appointment_cb (BonoboUIComponent *uic, gpointer data, const char *path)
}
static void
+new_meeting_cb (BonoboUIComponent *uic, gpointer data, const char *path)
+{
+ GnomeCalendar *gcal;
+ time_t dtstart, dtend;
+
+ gcal = GNOME_CALENDAR (data);
+ gnome_calendar_get_current_time_range (gcal, &dtstart, &dtend);
+ gnome_calendar_new_appointment_for (gcal, dtstart, dtend, FALSE, TRUE);
+}
+
+static void
new_event_cb (BonoboUIComponent *uic, gpointer data, const char *path)
{
GnomeCalendar *gcal;
@@ -88,7 +99,7 @@ new_event_cb (BonoboUIComponent *uic, gpointer data, const char *path)
gcal = GNOME_CALENDAR (data);
gnome_calendar_get_current_time_range (gcal, &dtstart, &dtend);
- gnome_calendar_new_appointment_for (gcal, dtstart, dtend, TRUE);
+ gnome_calendar_new_appointment_for (gcal, dtstart, dtend, TRUE, FALSE);
}
static void
@@ -669,6 +680,7 @@ static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("CalendarPrintPreview", file_print_preview_cb),
BONOBO_UI_VERB ("CalendarNewAppointment", new_appointment_cb),
+ BONOBO_UI_VERB ("CalendarNewMeeting", new_meeting_cb),
BONOBO_UI_VERB ("CalendarNewEvent", new_event_cb),
BONOBO_UI_VERB ("CalendarNewTask", new_task_cb),
@@ -697,6 +709,7 @@ static BonoboUIVerb verbs [] = {
static EPixmap pixmaps [] =
{
E_PIXMAP ("/menu/File/New/NewFirstItem/NewAppointment", "new_appointment.xpm"),
+ E_PIXMAP ("/menu/File/New/NewFirstItem/NewMeeting", "meeting.xpm"),
E_PIXMAP ("/menu/File/New/NewFirstItem/NewTask", "new_task-16.png"),
E_PIXMAP ("/menu/EditPlaceholder/Edit/Cut", "16_cut.png"),
E_PIXMAP ("/menu/EditPlaceholder/Edit/Copy", "16_copy.png"),
@@ -706,6 +719,7 @@ static EPixmap pixmaps [] =
E_PIXMAP ("/menu/File/Print/PrintPreview", "print-preview.xpm"),
E_PIXMAP ("/menu/ComponentActionsPlaceholder/Actions/NewAppointment", "new_appointment.xpm"),
E_PIXMAP ("/menu/ComponentActionsPlaceholder/Actions/NewEvent", "new_appointment.xpm"),
+ E_PIXMAP ("/menu/ComponentActionsPlaceholder/Actions/NewMeeting", "meeting.xpm"),
E_PIXMAP ("/menu/ComponentActionsPlaceholder/Actions/NewTask", "new_task-16.png"),
E_PIXMAP ("/menu/Tools/ComponentPlaceholder/CalendarSettings", "configure_16_calendar.xpm"),
E_PIXMAP ("/menu/View/ViewBegin/Goto", "goto-16.png"),
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 979885c10f..26b5a1efb9 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -52,6 +52,7 @@
/* IDs for user creatable items */
#define CREATE_EVENT_ID "event"
+#define CREATE_MEETING_ID "meeting"
#define CREATE_TASK_ID "task"
char *evolution_dir;
@@ -527,29 +528,28 @@ get_data_uri (const char *uri, CalComponentVType vtype)
* uses the default folder for that type of component.
*/
static void
-create_component (const char *uri, CalComponentVType vtype)
+create_component (const char *uri, GNOME_Evolution_Calendar_CompEditorFactory_CompEditorMode type)
{
char *real_uri;
CORBA_Environment ev;
- GNOME_Evolution_Calendar_CalObjType corba_type;
GNOME_Evolution_Calendar_CompEditorFactory factory;
+ CalComponentVType vtype;
- real_uri = get_data_uri (uri, vtype);
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- corba_type = GNOME_Evolution_Calendar_TYPE_EVENT;
+ switch (type) {
+ case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT:
+ case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_MEETING:
+ vtype = CAL_COMPONENT_EVENT;
break;
-
- case CAL_COMPONENT_TODO:
- corba_type = GNOME_Evolution_Calendar_TYPE_TODO;
+ case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_TODO:
+ vtype = CAL_COMPONENT_TODO;
break;
-
default:
g_assert_not_reached ();
return;
}
+ real_uri = get_data_uri (uri, vtype);
+
/* Get the factory */
CORBA_exception_init (&ev);
@@ -567,7 +567,7 @@ create_component (const char *uri, CalComponentVType vtype)
/* Create the item */
CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_CompEditorFactory_editNew (factory, real_uri, corba_type, &ev);
+ GNOME_Evolution_Calendar_CompEditorFactory_editNew (factory, real_uri, type, &ev);
if (ev._major != CORBA_NO_EXCEPTION)
g_message ("create_component(): Exception while creating the component");
@@ -594,14 +594,25 @@ sc_user_create_new_item_cb (EvolutionShellComponent *shell_component,
{
if (strcmp (id, CREATE_EVENT_ID) == 0) {
if (strcmp (parent_folder_type, FOLDER_CALENDAR) == 0)
- create_component (parent_folder_physical_uri, CAL_COMPONENT_EVENT);
+ create_component (parent_folder_physical_uri,
+ GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT);
else
- create_component (NULL, CAL_COMPONENT_EVENT);
+ create_component (NULL,
+ GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT);
+ } else if (strcmp (id, CREATE_MEETING_ID) == 0) {
+ if (strcmp (parent_folder_type, FOLDER_CALENDAR) == 0)
+ create_component (parent_folder_physical_uri,
+ GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_MEETING);
+ else
+ create_component (NULL,
+ GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_MEETING);
} else if (strcmp (id, CREATE_TASK_ID) == 0) {
if (strcmp (parent_folder_type, FOLDER_TASKS) == 0)
- create_component (parent_folder_physical_uri, CAL_COMPONENT_TODO);
+ create_component (parent_folder_physical_uri,
+ GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_TODO);
else
- create_component (NULL, CAL_COMPONENT_TODO);
+ create_component (NULL,
+ GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_TODO);
} else
g_assert_not_reached ();
}
@@ -639,14 +650,20 @@ create_object (void)
evolution_shell_component_add_user_creatable_item (shell_component,
CREATE_EVENT_ID,
- _("Create a new appointment"),
- _("New _Appointment"), 'a',
+ _("New appointment"),
+ _("_Appointment"), 'a',
+ NULL);
+
+ evolution_shell_component_add_user_creatable_item (shell_component,
+ CREATE_MEETING_ID,
+ _("New meeting"),
+ _("_Meeting"), 's',
NULL);
evolution_shell_component_add_user_creatable_item (shell_component,
CREATE_TASK_ID,
- _("Create a new task"),
- _("New _Task"), 't',
+ _("New task"),
+ _("_Task"), 't',
NULL);
gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item",
diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c
index 928c50f937..fbf81248a7 100644
--- a/calendar/gui/comp-editor-factory.c
+++ b/calendar/gui/comp-editor-factory.c
@@ -22,6 +22,7 @@
#include <config.h>
#endif
+#include <evolution-calendar.h>
#include <e-util/e-url.h>
#include <cal-client/cal-client.h>
#include "calendar-config.h"
@@ -48,7 +49,7 @@ typedef struct {
} existing;
struct {
- CalComponentVType vtype;
+ GNOME_Evolution_Calendar_CompEditorFactory_CompEditorMode type;
} new;
} u;
} Request;
@@ -379,21 +380,23 @@ get_default_component (CalComponentVType vtype)
/* Edits a new object in the context of a client */
static void
-edit_new (OpenClient *oc, CalComponentVType vtype)
+edit_new (OpenClient *oc, const GNOME_Evolution_Calendar_CompEditorFactory_CompEditorMode type)
{
CalComponent *comp;
Component *c;
CompEditor *editor;
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
+ CalComponentVType vtype;
+
+ switch (type) {
+ case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT:
+ case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_MEETING:
editor = COMP_EDITOR (event_editor_new ());
+ vtype = CAL_COMPONENT_EVENT;
break;
-
- case CAL_COMPONENT_TODO:
+ case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_TODO:
editor = COMP_EDITOR (task_editor_new ());
+ vtype = CAL_COMPONENT_TODO;
break;
-
default:
g_assert_not_reached ();
return;
@@ -415,6 +418,8 @@ edit_new (OpenClient *oc, CalComponentVType vtype)
comp_editor_set_cal_client (editor, oc->client);
comp_editor_edit_comp (editor, comp);
+ if (type == GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_MEETING)
+ event_editor_show_meeting (EVENT_EDITOR (editor));
comp_editor_focus (editor);
}
@@ -450,7 +455,7 @@ resolve_pending_requests (OpenClient *oc)
break;
case REQUEST_NEW:
- edit_new (oc, request->u.new.vtype);
+ edit_new (oc, request->u.new.type);
break;
}
@@ -637,7 +642,7 @@ impl_editExisting (PortableServer_Servant servant,
/* Queues a request for creating a new object */
static void
-queue_edit_new (OpenClient *oc, CalComponentVType vtype)
+queue_edit_new (OpenClient *oc, const GNOME_Evolution_Calendar_CompEditorFactory_CompEditorMode type)
{
Request *request;
@@ -645,7 +650,7 @@ queue_edit_new (OpenClient *oc, CalComponentVType vtype)
request = g_new (Request, 1);
request->type = REQUEST_NEW;
- request->u.new.vtype = vtype;
+ request->u.new.type = type;
oc->pending = g_slist_append (oc->pending, request);
}
@@ -654,14 +659,13 @@ queue_edit_new (OpenClient *oc, CalComponentVType vtype)
static void
impl_editNew (PortableServer_Servant servant,
const CORBA_char *str_uri,
- const GNOME_Evolution_Calendar_CalObjType corba_type,
+ const GNOME_Evolution_Calendar_CompEditorFactory_CompEditorMode corba_type,
CORBA_Environment *ev)
{
CompEditorFactory *factory;
CompEditorFactoryPrivate *priv;
OpenClient *oc;
- CalComponentVType vtype;
-
+
factory = COMP_EDITOR_FACTORY (bonobo_object_from_servant (servant));
priv = factory->priv;
@@ -669,26 +673,10 @@ impl_editNew (PortableServer_Servant servant,
if (!oc)
return;
- switch (corba_type) {
- case GNOME_Evolution_Calendar_TYPE_EVENT:
- vtype = CAL_COMPONENT_EVENT;
- break;
-
- case GNOME_Evolution_Calendar_TYPE_TODO:
- vtype = CAL_COMPONENT_TODO;
- break;
-
- default:
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_CompEditorFactory_UnsupportedType,
- NULL);
- return;
- }
-
if (!oc->open)
- queue_edit_new (oc, vtype);
+ queue_edit_new (oc, corba_type);
else
- edit_new (oc, vtype);
+ edit_new (oc, corba_type);
}
diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c
index 979885c10f..26b5a1efb9 100644
--- a/calendar/gui/component-factory.c
+++ b/calendar/gui/component-factory.c
@@ -52,6 +52,7 @@
/* IDs for user creatable items */
#define CREATE_EVENT_ID "event"
+#define CREATE_MEETING_ID "meeting"
#define CREATE_TASK_ID "task"
char *evolution_dir;
@@ -527,29 +528,28 @@ get_data_uri (const char *uri, CalComponentVType vtype)
* uses the default folder for that type of component.
*/
static void
-create_component (const char *uri, CalComponentVType vtype)
+create_component (const char *uri, GNOME_Evolution_Calendar_CompEditorFactory_CompEditorMode type)
{
char *real_uri;
CORBA_Environment ev;
- GNOME_Evolution_Calendar_CalObjType corba_type;
GNOME_Evolution_Calendar_CompEditorFactory factory;
+ CalComponentVType vtype;
- real_uri = get_data_uri (uri, vtype);
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- corba_type = GNOME_Evolution_Calendar_TYPE_EVENT;
+ switch (type) {
+ case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT:
+ case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_MEETING:
+ vtype = CAL_COMPONENT_EVENT;
break;
-
- case CAL_COMPONENT_TODO:
- corba_type = GNOME_Evolution_Calendar_TYPE_TODO;
+ case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_TODO:
+ vtype = CAL_COMPONENT_TODO;
break;
-
default:
g_assert_not_reached ();
return;
}
+ real_uri = get_data_uri (uri, vtype);
+
/* Get the factory */
CORBA_exception_init (&ev);
@@ -567,7 +567,7 @@ create_component (const char *uri, CalComponentVType vtype)
/* Create the item */
CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_CompEditorFactory_editNew (factory, real_uri, corba_type, &ev);
+ GNOME_Evolution_Calendar_CompEditorFactory_editNew (factory, real_uri, type, &ev);
if (ev._major != CORBA_NO_EXCEPTION)
g_message ("create_component(): Exception while creating the component");
@@ -594,14 +594,25 @@ sc_user_create_new_item_cb (EvolutionShellComponent *shell_component,
{
if (strcmp (id, CREATE_EVENT_ID) == 0) {
if (strcmp (parent_folder_type, FOLDER_CALENDAR) == 0)
- create_component (parent_folder_physical_uri, CAL_COMPONENT_EVENT);
+ create_component (parent_folder_physical_uri,
+ GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT);
else
- create_component (NULL, CAL_COMPONENT_EVENT);
+ create_component (NULL,
+ GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT);
+ } else if (strcmp (id, CREATE_MEETING_ID) == 0) {
+ if (strcmp (parent_folder_type, FOLDER_CALENDAR) == 0)
+ create_component (parent_folder_physical_uri,
+ GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_MEETING);
+ else
+ create_component (NULL,
+ GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_MEETING);
} else if (strcmp (id, CREATE_TASK_ID) == 0) {
if (strcmp (parent_folder_type, FOLDER_TASKS) == 0)
- create_component (parent_folder_physical_uri, CAL_COMPONENT_TODO);
+ create_component (parent_folder_physical_uri,
+ GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_TODO);
else
- create_component (NULL, CAL_COMPONENT_TODO);
+ create_component (NULL,
+ GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_TODO);
} else
g_assert_not_reached ();
}
@@ -639,14 +650,20 @@ create_object (void)
evolution_shell_component_add_user_creatable_item (shell_component,
CREATE_EVENT_ID,
- _("Create a new appointment"),
- _("New _Appointment"), 'a',
+ _("New appointment"),
+ _("_Appointment"), 'a',
+ NULL);
+
+ evolution_shell_component_add_user_creatable_item (shell_component,
+ CREATE_MEETING_ID,
+ _("New meeting"),
+ _("_Meeting"), 's',
NULL);
evolution_shell_component_add_user_creatable_item (shell_component,
CREATE_TASK_ID,
- _("Create a new task"),
- _("New _Task"), 't',
+ _("New task"),
+ _("_Task"), 't',
NULL);
gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item",
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 1c70b36858..9e6f501efe 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -350,9 +350,8 @@ event_editor_new (void)
}
static void
-schedule_meeting_cmd (GtkWidget *widget, gpointer data)
+show_meeting (EventEditor *ee)
{
- EventEditor *ee = EVENT_EDITOR (data);
EventEditorPrivate *priv;
priv = ee->priv;
@@ -375,6 +374,24 @@ schedule_meeting_cmd (GtkWidget *widget, gpointer data)
COMP_EDITOR_PAGE (priv->meet_page));
}
+void
+event_editor_show_meeting (EventEditor *ee)
+{
+ g_return_if_fail (ee != NULL);
+ g_return_if_fail (IS_EVENT_EDITOR (ee));
+
+
+ show_meeting (ee);
+}
+
+static void
+schedule_meeting_cmd (GtkWidget *widget, gpointer data)
+{
+ EventEditor *ee = EVENT_EDITOR (data);
+
+ show_meeting (ee);
+}
+
static void
refresh_meeting_cmd (GtkWidget *widget, gpointer data)
{
diff --git a/calendar/gui/dialogs/event-editor.h b/calendar/gui/dialogs/event-editor.h
index f32877c864..d27bb8e52d 100644
--- a/calendar/gui/dialogs/event-editor.h
+++ b/calendar/gui/dialogs/event-editor.h
@@ -51,9 +51,10 @@ struct _EventEditorClass {
CompEditorClass parent_class;
};
-GtkType event_editor_get_type (void);
-EventEditor *event_editor_construct (EventEditor *ee);
-EventEditor *event_editor_new (void);
+GtkType event_editor_get_type (void);
+EventEditor *event_editor_construct (EventEditor *ee);
+EventEditor *event_editor_new (void);
+void event_editor_show_meeting (EventEditor *ee);
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 6b473950f7..cb4bf37a62 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -2921,7 +2921,7 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget,
&dtend);
gnome_calendar_new_appointment_for (day_view->calendar,
dtstart, dtend,
- TRUE);
+ TRUE, FALSE);
return TRUE;
}
@@ -3055,7 +3055,7 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
&dtend);
gnome_calendar_new_appointment_for (day_view->calendar,
dtstart, dtend,
- FALSE);
+ FALSE, FALSE);
return TRUE;
}
@@ -3491,7 +3491,7 @@ e_day_view_on_event_double_click (EDayView *day_view,
gtk_signal_disconnect (GTK_OBJECT (event->comp), id);
if (day_view->calendar)
- gnome_calendar_edit_object (day_view->calendar, event->comp);
+ gnome_calendar_edit_object (day_view->calendar, event->comp, FALSE);
else
g_warning ("Calendar not set");
}
@@ -3653,7 +3653,7 @@ e_day_view_on_new_appointment (GtkWidget *widget, gpointer data)
}
gnome_calendar_new_appointment_for (
- day_view->calendar, dtstart, dtend, FALSE);
+ day_view->calendar, dtstart, dtend, FALSE, FALSE);
}
static void
@@ -3664,7 +3664,7 @@ e_day_view_on_new_event (GtkWidget *widget, gpointer data)
e_day_view_get_selected_time_range (day_view, &dtstart, &dtend);
gnome_calendar_new_appointment_for (
- day_view->calendar, dtstart, dtend, TRUE);
+ day_view->calendar, dtstart, dtend, TRUE, FALSE);
}
static void
@@ -3696,7 +3696,7 @@ e_day_view_on_edit_appointment (GtkWidget *widget, gpointer data)
return;
if (day_view->calendar)
- gnome_calendar_edit_object (day_view->calendar, event->comp);
+ gnome_calendar_edit_object (day_view->calendar, event->comp, FALSE);
else
g_warning ("Calendar not set");
}
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 47df421f5d..4d532be5bf 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -855,7 +855,7 @@ e_week_view_event_item_double_click (EWeekViewEventItem *wveitem,
e_week_view_stop_editing_event (week_view);
if (week_view->calendar)
- gnome_calendar_edit_object (week_view->calendar, event->comp);
+ gnome_calendar_edit_object (week_view->calendar, event->comp, FALSE);
else
g_warning ("Calendar not set");
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 7dd9d83cc3..9fbf26b979 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -2137,7 +2137,7 @@ e_week_view_on_button_press (GtkWidget *widget,
dtend = week_view->day_starts[day + 1];
gnome_calendar_new_appointment_for (week_view->calendar,
dtstart, dtend,
- TRUE);
+ TRUE, FALSE);
return TRUE;
}
@@ -2973,7 +2973,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
if (week_view->calendar)
gnome_calendar_edit_object (week_view->calendar,
- event->comp);
+ event->comp, FALSE);
else
g_warning ("Calendar not set");
@@ -3531,7 +3531,7 @@ e_week_view_on_new_appointment (GtkWidget *widget, gpointer data)
}
gnome_calendar_new_appointment_for (
- week_view->calendar, dtstart, dtend, FALSE);
+ week_view->calendar, dtstart, dtend, FALSE, FALSE);
}
static void
@@ -3543,7 +3543,7 @@ e_week_view_on_new_event (GtkWidget *widget, gpointer data)
dtstart = week_view->day_starts[week_view->selection_start_day];
dtend = week_view->day_starts[week_view->selection_end_day + 1];
gnome_calendar_new_appointment_for (
- week_view->calendar, dtstart, dtend, TRUE);
+ week_view->calendar, dtstart, dtend, TRUE, FALSE);
}
static void
@@ -3577,7 +3577,8 @@ e_week_view_on_edit_appointment (GtkWidget *widget, gpointer data)
week_view->popup_event_num);
if (week_view->calendar)
- gnome_calendar_edit_object (week_view->calendar, event->comp);
+ gnome_calendar_edit_object (week_view->calendar, event->comp,
+ FALSE);
else
g_warning ("Calendar not set");
}
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 1590117672..8d75a39c75 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -2123,7 +2123,8 @@ editor_closed_cb (GtkWidget *widget, gpointer data)
}
void
-gnome_calendar_edit_object (GnomeCalendar *gcal, CalComponent *comp)
+gnome_calendar_edit_object (GnomeCalendar *gcal, CalComponent *comp,
+ gboolean meeting)
{
GnomeCalendarPrivate *priv;
EventEditor *ee;
@@ -2147,7 +2148,6 @@ gnome_calendar_edit_object (GnomeCalendar *gcal, CalComponent *comp)
g_message ("gnome_calendar_edit_object(): Could not create the event editor");
return;
}
-
ec->gcal = gcal;
ec->uid = g_strdup (uid);
@@ -2159,6 +2159,8 @@ gnome_calendar_edit_object (GnomeCalendar *gcal, CalComponent *comp)
comp_editor_set_cal_client (COMP_EDITOR (ee), priv->client);
comp_editor_edit_comp (COMP_EDITOR (ee), comp);
+ if (meeting)
+ event_editor_show_meeting (ee);
}
comp_editor_focus (COMP_EDITOR (ee));
@@ -2178,7 +2180,8 @@ gnome_calendar_edit_object (GnomeCalendar *gcal, CalComponent *comp)
void
gnome_calendar_new_appointment_for (GnomeCalendar *cal,
time_t dtstart, time_t dtend,
- gboolean all_day)
+ gboolean all_day,
+ gboolean meeting)
{
GnomeCalendarPrivate *priv;
struct icaltimetype itt;
@@ -2235,7 +2238,7 @@ gnome_calendar_new_appointment_for (GnomeCalendar *cal,
cal_component_commit_sequence (comp);
- gnome_calendar_edit_object (cal, comp);
+ gnome_calendar_edit_object (cal, comp, meeting);
gtk_object_unref (GTK_OBJECT (comp));
}
@@ -2256,7 +2259,7 @@ gnome_calendar_new_appointment (GnomeCalendar *gcal)
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
gnome_calendar_get_current_time_range (gcal, &dtstart, &dtend);
- gnome_calendar_new_appointment_for (gcal, dtstart, dtend, FALSE);
+ gnome_calendar_new_appointment_for (gcal, dtstart, dtend, FALSE, FALSE);
}
/**
diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h
index 64273277ec..2c4eaaf0af 100644
--- a/calendar/gui/gnome-cal.h
+++ b/calendar/gui/gnome-cal.h
@@ -115,12 +115,14 @@ void gnome_calendar_get_selected_time_range (GnomeCalendar *gcal,
time_t *end_time);
void gnome_calendar_edit_object (GnomeCalendar *gcal,
- CalComponent *comp);
+ CalComponent *comp,
+ gboolean meeting);
void gnome_calendar_new_appointment (GnomeCalendar *gcal);
void gnome_calendar_new_appointment_for (GnomeCalendar *cal,
time_t dtstart, time_t dtend,
- gboolean all_day);
+ gboolean all_day,
+ gboolean meeting);
void gnome_calendar_new_task (GnomeCalendar *gcal);
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
index 0edc2723e7..22d87a1e08 100644
--- a/calendar/gui/tasks-control.c
+++ b/calendar/gui/tasks-control.c
@@ -418,7 +418,7 @@ static gboolean
confirm_expunge (ETasks *tasks)
{
GtkWidget *dialog, *label, *checkbox;
- int button, val;
+ int button;
if (!calendar_config_get_confirm_expunge ())
return TRUE;