aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/itip-formatter/itip-formatter.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-12-04 19:08:15 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-12-04 19:08:15 +0800
commit7dafe33520316eadd8ee9df234ba8eb5e6333160 (patch)
tree7997ba4b8ce7f26bff810a7ef84a0282c5a8c31b /plugins/itip-formatter/itip-formatter.c
parentf4d3ee5d5923e8a91b45fc6dd8eb8fb2857f41de (diff)
downloadgsoc2013-evolution-7dafe33520316eadd8ee9df234ba8eb5e6333160.tar
gsoc2013-evolution-7dafe33520316eadd8ee9df234ba8eb5e6333160.tar.gz
gsoc2013-evolution-7dafe33520316eadd8ee9df234ba8eb5e6333160.tar.bz2
gsoc2013-evolution-7dafe33520316eadd8ee9df234ba8eb5e6333160.tar.lz
gsoc2013-evolution-7dafe33520316eadd8ee9df234ba8eb5e6333160.tar.xz
gsoc2013-evolution-7dafe33520316eadd8ee9df234ba8eb5e6333160.tar.zst
gsoc2013-evolution-7dafe33520316eadd8ee9df234ba8eb5e6333160.zip
** Fix for bug #220846
2007-12-04 Milan Crha <mcrha@redhat.com> ** Fix for bug #220846 * itip-view.h: * itip-view.c: (itip_view_set_show_free_time_check), (itip_view_get_free_time_check_state), (struct _ItipViewPrivate), (itip_view_init): * itip-formatter.c: (view_response_cb), (format_itip_object): New option to accept meeting request as free time. svn path=/trunk/; revision=34640
Diffstat (limited to 'plugins/itip-formatter/itip-formatter.c')
-rw-r--r--plugins/itip-formatter/itip-formatter.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index 4dabf551a8..a3bb6c2e80 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -1617,11 +1617,17 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
ECalComponentTransparency trans;
gboolean flag;
- e_cal_component_get_transparency (pitip->comp, &trans);
- /* FIXME we should be providing an option to accept as free or busy */
- if (trans == E_CAL_COMPONENT_TRANSP_NONE)
- e_cal_component_set_transparency (pitip->comp, E_CAL_COMPONENT_TRANSP_OPAQUE);
+ if (pitip->method == ICAL_METHOD_PUBLISH || pitip->method == ICAL_METHOD_REQUEST) {
+ if (itip_view_get_free_time_check_state (ITIP_VIEW (pitip->view)))
+ e_cal_component_set_transparency (pitip->comp, E_CAL_COMPONENT_TRANSP_TRANSPARENT);
+ else
+ e_cal_component_set_transparency (pitip->comp, E_CAL_COMPONENT_TRANSP_OPAQUE);
+ } else {
+ e_cal_component_get_transparency (pitip->comp, &trans);
+ if (trans == E_CAL_COMPONENT_TRANSP_NONE)
+ e_cal_component_set_transparency (pitip->comp, E_CAL_COMPONENT_TRANSP_OPAQUE);
+ }
if (!pitip->to_address && pitip->current_ecal != NULL)
e_cal_get_cal_address (pitip->current_ecal, &pitip->to_address, NULL);
@@ -2140,6 +2146,8 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject
if (response_enabled) {
g_signal_connect (pitip->view, "response", G_CALLBACK (view_response_cb), pitip);
+ itip_view_set_show_free_time_check (ITIP_VIEW (pitip->view), pitip->type == E_CAL_SOURCE_TYPE_EVENT && (pitip->method == ICAL_METHOD_PUBLISH || pitip->method == ICAL_METHOD_REQUEST));
+
if (pitip->calendar_uid)
pitip->current_ecal = start_calendar_server_by_uid (pitip, pitip->calendar_uid, pitip->type);
else {