aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/event-page.c53
-rw-r--r--calendar/gui/dialogs/event-page.glade160
-rw-r--r--calendar/gui/dialogs/recurrence-page.glade5
3 files changed, 164 insertions, 54 deletions
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 6093718453..50b1fa3ba7 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -65,6 +65,9 @@ struct _EventPagePrivate {
GtkWidget *classification_private;
GtkWidget *classification_confidential;
+ GtkWidget *show_time_as_free;
+ GtkWidget *show_time_as_busy;
+
GtkWidget *contacts_btn;
GtkWidget *contacts;
@@ -172,6 +175,8 @@ event_page_init (EventPage *epage)
priv->classification_public = NULL;
priv->classification_private = NULL;
priv->classification_confidential = NULL;
+ priv->show_time_as_free = NULL;
+ priv->show_time_as_busy = NULL;
priv->contacts_btn = NULL;
priv->contacts = NULL;
priv->categories_btn = NULL;
@@ -215,6 +220,12 @@ static const int classification_map[] = {
-1
};
+static const int transparency_map[] = {
+ CAL_COMPONENT_TRANSP_TRANSPARENT,
+ CAL_COMPONENT_TRANSP_OPAQUE,
+ -1
+};
+
/* get_widget handler for the event page */
static GtkWidget *
event_page_get_widget (CompEditorPage *page)
@@ -305,6 +316,10 @@ clear_widgets (EventPage *epage)
e_dialog_radio_set (priv->classification_public,
CAL_COMPONENT_CLASS_PRIVATE, classification_map);
+ /* Show Time As (Transparency) */
+ e_dialog_radio_set (priv->show_time_as_free,
+ CAL_COMPONENT_TRANSP_OPAQUE, transparency_map);
+
/* Categories */
e_dialog_editable_set (priv->categories, NULL);
}
@@ -317,6 +332,7 @@ event_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
EventPagePrivate *priv;
CalComponentText text;
CalComponentClassification cl;
+ CalComponentTransparency transparency;
CalComponentDateTime start_date, end_date;
GSList *l;
const char *categories;
@@ -449,6 +465,25 @@ event_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
*/
}
+
+ /* Show Time As (Transparency) */
+ cal_component_get_transparency (comp, &transparency);
+ switch (transparency) {
+ case CAL_COMPONENT_TRANSP_TRANSPARENT:
+ e_dialog_radio_set (priv->show_time_as_free,
+ CAL_COMPONENT_TRANSP_TRANSPARENT,
+ transparency_map);
+ break;
+
+ default:
+ e_dialog_radio_set (priv->show_time_as_free,
+ CAL_COMPONENT_TRANSP_OPAQUE,
+ transparency_map);
+ break;
+ }
+
+
+
/* Categories */
cal_component_get_categories (comp, &categories);
e_dialog_editable_set (priv->categories, categories);
@@ -467,6 +502,7 @@ event_page_fill_component (CompEditorPage *page, CalComponent *comp)
gboolean all_day_event, date_set;
char *cat, *str;
CalComponentClassification classif;
+ CalComponentTransparency transparency;
icaltimezone *zone;
epage = EVENT_PAGE (page);
@@ -570,6 +606,12 @@ event_page_fill_component (CompEditorPage *page, CalComponent *comp)
classif = e_dialog_radio_get (priv->classification_public,
classification_map);
cal_component_set_classification (comp, classif);
+
+ /* Show Time As (Transparency) */
+
+ transparency = e_dialog_radio_get (priv->show_time_as_free,
+ transparency_map);
+ cal_component_set_transparency (comp, transparency);
}
/* set_summary handler for the event page */
@@ -626,6 +668,9 @@ get_widgets (EventPage *epage)
priv->classification_private = GW ("classification-private");
priv->classification_confidential = GW ("classification-confidential");
+ priv->show_time_as_free = GW ("show-time-as-free");
+ priv->show_time_as_busy = GW ("show-time-as-busy");
+
priv->contacts_btn = GW ("contacts-button");
priv->contacts = GW ("contacts");
@@ -644,6 +689,8 @@ get_widgets (EventPage *epage)
&& priv->classification_public
&& priv->classification_private
&& priv->classification_confidential
+ && priv->show_time_as_free
+ && priv->show_time_as_busy
&& priv->contacts_btn
&& priv->contacts
&& priv->categories_btn
@@ -1039,6 +1086,12 @@ init_widgets (EventPage *epage)
gtk_signal_connect (GTK_OBJECT (priv->classification_confidential),
"toggled", GTK_SIGNAL_FUNC (field_changed_cb),
epage);
+ gtk_signal_connect (GTK_OBJECT (priv->show_time_as_free),
+ "toggled", GTK_SIGNAL_FUNC (field_changed_cb),
+ epage);
+ gtk_signal_connect (GTK_OBJECT (priv->show_time_as_busy),
+ "toggled", GTK_SIGNAL_FUNC (field_changed_cb),
+ epage);
gtk_signal_connect (GTK_OBJECT (priv->categories), "changed",
GTK_SIGNAL_FUNC (field_changed_cb), epage);
diff --git a/calendar/gui/dialogs/event-page.glade b/calendar/gui/dialogs/event-page.glade
index bd1c094357..380b99302f 100644
--- a/calendar/gui/dialogs/event-page.glade
+++ b/calendar/gui/dialogs/event-page.glade
@@ -325,11 +325,10 @@
</widget>
<widget>
- <class>GtkFrame</class>
- <name>frame32</name>
- <label>Classification</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <class>GtkHBox</class>
+ <name>hbox54</name>
+ <homogeneous>False</homogeneous>
+ <spacing>4</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
@@ -337,55 +336,118 @@
</child>
<widget>
- <class>GtkHBox</class>
- <name>hbox52</name>
- <border_width>2</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
+ <class>GtkFrame</class>
+ <name>frame32</name>
+ <label>Classification</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
<widget>
- <class>GtkRadioButton</class>
- <name>classification-public</name>
- <can_focus>True</can_focus>
- <label>Pu_blic</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
+ <class>GtkHBox</class>
+ <name>hbox52</name>
+ <border_width>2</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>4</spacing>
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-private</name>
- <can_focus>True</can_focus>
- <label>Pri_vate</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>classification-public</name>
+ <can_focus>True</can_focus>
+ <label>Pu_blic</label>
+ <active>True</active>
+ <draw_indicator>True</draw_indicator>
+ <group>classification_radio_group</group>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>classification-private</name>
+ <can_focus>True</can_focus>
+ <label>Pri_vate</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ <group>classification_radio_group</group>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>classification-confidential</name>
+ <can_focus>True</can_focus>
+ <label>Con_fidential</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ <group>classification_radio_group</group>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
</widget>
+ </widget>
+
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame33</name>
+ <label>Show Time As</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
<widget>
- <class>GtkRadioButton</class>
- <name>classification-confidential</name>
- <can_focus>True</can_focus>
- <label>_Confidential</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
+ <class>GtkHBox</class>
+ <name>hbox55</name>
+ <homogeneous>False</homogeneous>
+ <spacing>4</spacing>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>show-time-as-free</name>
+ <can_focus>True</can_focus>
+ <label>F_ree</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ <group>show_time_as_radio_group</group>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>show-time-as-busy</name>
+ <can_focus>True</can_focus>
+ <label>B_usy</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ <group>show_time_as_radio_group</group>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
</widget>
</widget>
</widget>
@@ -405,7 +467,6 @@
<class>GtkButton</class>
<name>contacts-button</name>
<can_focus>True</can_focus>
- <relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@@ -444,7 +505,6 @@
<class>GtkButton</class>
<name>categories-button</name>
<can_focus>True</can_focus>
- <relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
diff --git a/calendar/gui/dialogs/recurrence-page.glade b/calendar/gui/dialogs/recurrence-page.glade
index 92e0712ed9..aaf3f7e05a 100644
--- a/calendar/gui/dialogs/recurrence-page.glade
+++ b/calendar/gui/dialogs/recurrence-page.glade
@@ -447,8 +447,7 @@ forever
<class>GtkButton</class>
<name>exception-add</name>
<can_focus>True</can_focus>
- <label>_Add</label>
- <relief>GTK_RELIEF_NORMAL</relief>
+ <label>A_dd</label>
<child>
<padding>0</padding>
<expand>False</expand>
@@ -461,7 +460,6 @@ forever
<name>exception-modify</name>
<can_focus>True</can_focus>
<label>_Modify</label>
- <relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
@@ -474,7 +472,6 @@ forever
<name>exception-delete</name>
<can_focus>True</can_focus>
<label>_Delete</label>
- <relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>