aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@novell.com>2004-06-15 20:13:25 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-06-15 20:13:25 +0800
commit4446fafb69e60a99df4c7b2f3788e6df5f24d778 (patch)
tree205190b1878976a0c9a764b9bb3f8c52b907a110
parentb2b00bfbcdf007a8efa9a73d2f98f28535c51652 (diff)
downloadgsoc2013-evolution-4446fafb69e60a99df4c7b2f3788e6df5f24d778.tar
gsoc2013-evolution-4446fafb69e60a99df4c7b2f3788e6df5f24d778.tar.gz
gsoc2013-evolution-4446fafb69e60a99df4c7b2f3788e6df5f24d778.tar.bz2
gsoc2013-evolution-4446fafb69e60a99df4c7b2f3788e6df5f24d778.tar.lz
gsoc2013-evolution-4446fafb69e60a99df4c7b2f3788e6df5f24d778.tar.xz
gsoc2013-evolution-4446fafb69e60a99df4c7b2f3788e6df5f24d778.tar.zst
gsoc2013-evolution-4446fafb69e60a99df4c7b2f3788e6df5f24d778.zip
connect to "client_changed" signal on the page. (client_changed_cb): new
2004-06-15 Rodrigo Moya <rodrigo@novell.com> * gui/dialogs/meeting-page.c (meeting_page_construct): connect to "client_changed" signal on the page. (client_changed_cb): new callback. (sensitize_widgets): new function. (meeting_page_fill_widgets): call sensitize_widgets(). svn path=/trunk/; revision=26345
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/dialogs/meeting-page.c29
-rw-r--r--calendar/gui/e-meeting-time-sel.c16
3 files changed, 43 insertions, 8 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 90139f7ed4..1c9fd30a38 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,11 @@
2004-06-15 Rodrigo Moya <rodrigo@novell.com>
+ * gui/dialogs/meeting-page.c (meeting_page_construct): connect
+ to "client_changed" signal on the page.
+ (client_changed_cb): new callback.
+ (sensitize_widgets): new function.
+ (meeting_page_fill_widgets): call sensitize_widgets().
+
* gui/e-meeting-time-sel.[ch]
(e_meeting_time_selector_set_read_only): new function.
(e_meeting_time_selector_construct): store some missing buttons
diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
index ef45d1a50e..ce5938e6ec 100644
--- a/calendar/gui/dialogs/meeting-page.c
+++ b/calendar/gui/dialogs/meeting-page.c
@@ -393,6 +393,8 @@ meeting_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
priv->updating = FALSE;
+ sensitize_widgets (mpage);
+
return TRUE;
}
@@ -598,6 +600,30 @@ init_widgets (MeetingPage *mpage)
}
static void
+sensitize_widgets (MeetingPage *mpage)
+{
+ gboolean read_only;
+ MeetingPagePrivate *priv = mpage->priv;
+
+ if (!e_cal_is_read_only (COMP_EDITOR_PAGE (mpage)->client, &read_only, NULL))
+ read_only = TRUE;
+
+ gtk_widget_set_sensitive (priv->organizer, !read_only);
+ gtk_widget_set_sensitive (priv->existing_organizer_btn, !read_only);
+ gtk_widget_set_sensitive (priv->add, !read_only);
+ gtk_widget_set_sensitive (priv->invite, !read_only);
+ gtk_widget_set_sensitive (priv->list_view, !read_only);
+}
+
+static void
+client_changed_cb (CompEditorPage *page, ECal *client, gpointer user_data)
+{
+ MeetingPage *mpage = MEETING_PAGE (page);
+
+ sensitize_widgets (mpage);
+}
+
+static void
popup_delete_cb (GtkWidget *widget, gpointer data)
{
MeetingPage *mpage = MEETING_PAGE (data);
@@ -795,6 +821,9 @@ meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems,
/* Init the widget signals */
init_widgets (mpage);
+ g_signal_connect_after (G_OBJECT (mpage), "client_changed",
+ G_CALLBACK (client_changed_cb), NULL);
+
return mpage;
}
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 43b3dacce6..a985f81eab 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -1268,14 +1268,14 @@ e_meeting_time_selector_set_read_only (EMeetingTimeSelector *mts, gboolean read_
{
g_return_if_fail (IS_E_MEETING_TIME_SELECTOR (mts));
- gtk_widget_set_sensitive (GTK_WIDGET (mts->list_view), !read_only);
- gtk_widget_set_sensitive (GTK_WIDGET (mts->display_main), !read_only);
- gtk_widget_set_sensitive (GTK_WIDGET (mts->add_attendees_button), !read_only);
- gtk_widget_set_sensitive (GTK_WIDGET (mts->autopick_down_button), !read_only);
- gtk_widget_set_sensitive (GTK_WIDGET (mts->autopick_button), !read_only);
- gtk_widget_set_sensitive (GTK_WIDGET (mts->autopick_up_button), !read_only);
- gtk_widget_set_sensitive (GTK_WIDGET (mts->start_date_edit), !read_only);
- gtk_widget_set_sensitive (GTK_WIDGET (mts->end_date_edit), !read_only);
+ gtk_widget_set_sensitive (mts->list_view, !read_only);
+ gtk_widget_set_sensitive (mts->display_main, !read_only);
+ gtk_widget_set_sensitive (mts->add_attendees_button, !read_only);
+ gtk_widget_set_sensitive (mts->autopick_down_button, !read_only);
+ gtk_widget_set_sensitive (mts->autopick_button, !read_only);
+ gtk_widget_set_sensitive (mts->autopick_up_button, !read_only);
+ gtk_widget_set_sensitive (mts->start_date_edit, !read_only);
+ gtk_widget_set_sensitive (mts->end_date_edit, !read_only);
}
/*