aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2006-04-06 17:25:04 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2006-04-06 17:25:04 +0800
commitd9756961e7535fbb00fa9349a27183e9975a2f04 (patch)
treea0a916add9d79faa559e7c4cf0f2ff34b4139608 /calendar
parent0ee60adcf709d2ff0cd21d844db46f2c8d53cc95 (diff)
downloadgsoc2013-evolution-d9756961e7535fbb00fa9349a27183e9975a2f04.tar
gsoc2013-evolution-d9756961e7535fbb00fa9349a27183e9975a2f04.tar.gz
gsoc2013-evolution-d9756961e7535fbb00fa9349a27183e9975a2f04.tar.bz2
gsoc2013-evolution-d9756961e7535fbb00fa9349a27183e9975a2f04.tar.lz
gsoc2013-evolution-d9756961e7535fbb00fa9349a27183e9975a2f04.tar.xz
gsoc2013-evolution-d9756961e7535fbb00fa9349a27183e9975a2f04.tar.zst
gsoc2013-evolution-d9756961e7535fbb00fa9349a27183e9975a2f04.zip
Fixes #328808
svn path=/trunk/; revision=31779
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog17
-rw-r--r--calendar/gui/dialogs/event-editor.c15
-rw-r--r--calendar/gui/dialogs/event-page.c13
-rw-r--r--calendar/gui/dialogs/event-page.h1
-rw-r--r--calendar/gui/dialogs/schedule-page.c13
-rw-r--r--calendar/gui/dialogs/schedule-page.h2
-rw-r--r--calendar/gui/e-meeting-list-view.c32
-rw-r--r--calendar/gui/e-meeting-list-view.h3
8 files changed, 91 insertions, 5 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index ecfff3733d..d4cbbf4090 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,22 @@
2006-04-05 Chenthill Palanisamy <pchenthill@novell.com>
+ Fixes #328808
+ * gui/dialogs/event-editor.c:
+ (event_editor_construct): Set the name selector dialog present in the schedule page
+ in event page also.
+ * gui/dialogs/event-page.[ch]
+ (event_page_get_name_selector): Gets the name selector from the meeting list
+ view.
+ * gui/dialogs/schedule-page.[ch]
+ (schedule_page_set_name_selector): Sets the name selector to the meeting
+ list view.
+ * gui/e-meeting-list-view.[ch]:
+ (e_meeting_list_view_get_name_selector),
+ (e_meeting_list_view_set_name_selector): Functions to get and set the name
+ selector.
+
+2006-04-06 Chenthill Palanisamy <pchenthill@novell.com>
+
* gui/e-day-view.c: (e_day_view_on_main_canvas_motion):
Enable drag and drop of recurring appointments.
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 6123384650..a34751259a 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -360,7 +360,7 @@ menu_action_freebusy_cmd (BonoboUIComponent *uic,
const char *path)
{
EventEditor *ee = (EventEditor *) data;
-
+
gtk_widget_show (ee->priv->sched_window);
}
@@ -569,10 +569,12 @@ event_editor_construct (EventEditor *ee, ECal *client)
comp_editor_set_group_item (COMP_EDITOR (ee), TRUE);
if ((flags & COMP_EDITOR_USER_ORG) || (flags & COMP_EDITOR_DELEGATE)|| (flags & COMP_EDITOR_NEW_ITEM)) {
+ ENameSelector *name_selector;
+
priv->sched_window = gtk_dialog_new_with_buttons (_("Free/Busy"),
- (GtkWindow *) ee, GTK_DIALOG_MODAL,
- "gtk-close", GTK_RESPONSE_CLOSE,
- NULL);
+ (GtkWindow *) ee, GTK_DIALOG_MODAL,
+ "gtk-close", GTK_RESPONSE_CLOSE,
+ NULL);
priv->sched_page = schedule_page_new (priv->model);
g_object_ref (priv->sched_page);
gtk_object_sink (GTK_OBJECT (priv->sched_page));
@@ -582,8 +584,11 @@ event_editor_construct (EventEditor *ee, ECal *client)
g_signal_connect (priv->sched_window, "response", G_CALLBACK(gtk_widget_hide), NULL);
g_signal_connect ((GtkWidget *) priv->sched_window, "delete-event", G_CALLBACK(window_delete_event), NULL);
+ name_selector = event_page_get_name_selector (priv->event_page);
+ schedule_page_set_name_selector (priv->sched_page, name_selector);
comp_editor_append_page (COMP_EDITOR (ee), COMP_EDITOR_PAGE (priv->sched_page), NULL, FALSE);
- } else
+
+ } else
bonobo_ui_component_set_prop (editor->uic, "/commands/ActionFreeBusy", "hidden", "1", NULL);
event_page_set_meeting (priv->event_page, TRUE);
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 357ba6e7f4..b560f5c9cd 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -3207,3 +3207,16 @@ event_page_get_cancel_comp (EventPage *page)
return e_cal_component_clone (priv->comp);
}
+
+ENameSelector *
+event_page_get_name_selector (EventPage *epage)
+{
+ EventPagePrivate *priv;
+
+ g_return_val_if_fail (epage != NULL, NULL);
+ g_return_val_if_fail (IS_EVENT_PAGE (epage), NULL);
+
+ priv = epage->priv;
+
+ return e_meeting_list_view_get_name_selector (priv->list_view);
+}
diff --git a/calendar/gui/dialogs/event-page.h b/calendar/gui/dialogs/event-page.h
index 3585b15b0a..57610da201 100644
--- a/calendar/gui/dialogs/event-page.h
+++ b/calendar/gui/dialogs/event-page.h
@@ -77,6 +77,7 @@ void event_page_set_view_role (EventPage *epage, gboolean state);
void event_page_set_view_status (EventPage *epage, gboolean state);
void event_page_set_view_type (EventPage *epage, gboolean state);
void event_page_set_view_rvsp (EventPage *epage, gboolean state);
+ENameSelector *event_page_get_name_selector (EventPage *epage);
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index ccfa98ee25..4eaa235278 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -470,6 +470,19 @@ schedule_page_new (EMeetingStore *ems)
return spage;
}
+void
+schedule_page_set_name_selector (SchedulePage *spage, ENameSelector *name_selector)
+{
+ SchedulePagePrivate *priv;
+
+ g_return_if_fail (spage != NULL);
+ g_return_if_fail (IS_SCHEDULE_PAGE (spage));
+
+ priv = spage->priv;
+
+ e_meeting_list_view_set_name_selector (priv->sel->list_view, name_selector);
+}
+
static void
times_changed_cb (GtkWidget *widget, gpointer data)
{
diff --git a/calendar/gui/dialogs/schedule-page.h b/calendar/gui/dialogs/schedule-page.h
index d4c7eafbdd..a5150d638f 100644
--- a/calendar/gui/dialogs/schedule-page.h
+++ b/calendar/gui/dialogs/schedule-page.h
@@ -23,6 +23,7 @@
#include "../e-meeting-store.h"
#include "comp-editor-page.h"
+#include <libedataserverui/e-name-selector.h>
G_BEGIN_DECLS
@@ -51,6 +52,7 @@ typedef struct {
GtkType schedule_page_get_type (void);
SchedulePage *schedule_page_construct (SchedulePage *mpage, EMeetingStore *ems);
SchedulePage *schedule_page_new (EMeetingStore *ems);
+void schedule_page_set_name_selector (SchedulePage *spage, ENameSelector *name_selector);
diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c
index 31696ae2b6..5ac6c7c463 100644
--- a/calendar/gui/e-meeting-list-view.c
+++ b/calendar/gui/e-meeting-list-view.c
@@ -873,3 +873,35 @@ e_meeting_list_view_set_editable (EMeetingListView *lview, gboolean set)
g_hash_table_foreach (priv->renderers, change_edit_cols_for_organizer, GINT_TO_POINTER (edit_level));
}
+ENameSelector *
+e_meeting_list_view_get_name_selector (EMeetingListView *lview)
+{
+ EMeetingListViewPrivate *priv;
+
+ g_return_val_if_fail (lview != NULL, NULL);
+ g_return_val_if_fail (E_IS_MEETING_LIST_VIEW (lview), NULL);
+
+ priv = lview->priv;
+
+ return priv->name_selector;
+}
+
+void
+e_meeting_list_view_set_name_selector (EMeetingListView *lview, ENameSelector *name_selector)
+{
+ EMeetingListViewPrivate *priv;
+
+ g_return_if_fail (lview != NULL);
+ g_return_if_fail (E_IS_MEETING_LIST_VIEW (lview));
+
+ priv = lview->priv;
+
+ if (priv->name_selector) {
+ g_object_unref (priv->name_selector);
+ priv->name_selector = NULL;
+ }
+
+ priv->name_selector = g_object_ref (name_selector);
+}
+
+
diff --git a/calendar/gui/e-meeting-list-view.h b/calendar/gui/e-meeting-list-view.h
index 76db532b70..7189dfee46 100644
--- a/calendar/gui/e-meeting-list-view.h
+++ b/calendar/gui/e-meeting-list-view.h
@@ -25,6 +25,7 @@
#include <gtk/gtktreeview.h>
#include "e-meeting-store.h"
+#include <libedataserverui/e-name-selector.h>
G_BEGIN_DECLS
@@ -64,6 +65,8 @@ void e_meeting_list_view_invite_others_dialog (EMeetingListView *emlv);
void e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view, EMeetingAttendee *ma);
void e_meeting_list_view_add_attendee_to_name_selector (EMeetingListView *view, EMeetingAttendee *ma);
void e_meeting_list_view_set_editable (EMeetingListView *lview, gboolean set);
+ENameSelector * e_meeting_list_view_get_name_selector (EMeetingListView *lview);
+void e_meeting_list_view_set_name_selector (EMeetingListView *lview, ENameSelector *name_selector);
G_END_DECLS