aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
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 /calendar/gui/dialogs
parentb2b00bfbcdf007a8efa9a73d2f98f28535c51652 (diff)
downloadgsoc2013-evolution-4446fafb69e60a99df4c7b2f3788e6df5f24d778.tar.gz
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
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/meeting-page.c29
1 files changed, 29 insertions, 0 deletions
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;
}