aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-08-07 08:46:56 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-08-07 08:46:56 +0800
commit9d8f94804917a0338a08be9f36a8e047ccedd939 (patch)
tree4e29f6218af7cbdc4a84933d9cffddd1b7caa61c /calendar/gui/dialogs
parent5949b39e3437ebbf7e7461c58df50424e0993809 (diff)
downloadgsoc2013-evolution-9d8f94804917a0338a08be9f36a8e047ccedd939.tar.gz
gsoc2013-evolution-9d8f94804917a0338a08be9f36a8e047ccedd939.tar.zst
gsoc2013-evolution-9d8f94804917a0338a08be9f36a8e047ccedd939.zip
added 'different_timezone' fields to EDayViewEvent and EWeekViewEvent, to
2001-08-06 Damon Chaplin <damon@ximian.com> * gui/e-week-view.h: * gui/e-day-view.h: added 'different_timezone' fields to EDayViewEvent and EWeekViewEvent, to note that the event is in a different timezone. We now compute this once when we add the event to the array, rather than each time we draw the event. If it is set, we will draw the timezone icon next to the event. * gui/e-day-view-main-item.c: take transparency into account when drawing the blue vertical bars to represent busy time. * gui/tag-calendar.c: take transparency into account when tagging the mini calendar. * gui/e-calendar-table.c (e_calendar_table_init): removed the "None" options for transparency and classification, since these properties have defaults anyway, so we may as well use those to keep it simple. Also use "Free" and "Busy" for transparency, rather than "Transparent" and "Opaque". * gui/calendar-model.c: updated classification & transparency code as above. * gui/e-calendar-table.etspec: changed "Transparency" to "Show Time As" since people have a chance of understanding that. * gui/e-week-view.c: * gui/e-day-view.c: * gui/gnome-cal.c: added functions to get the visible time range. * gui/calendar-commands.c: finished stuff to set the folder bar label to the dates currently displayed. * gui/control-factory.c (control_factory_new_control): connected signal to update the folder title bar label when the dates shown are changed. I had to connect it here since we need the BonoboControl in the callback, and I don't know how to get the control from the widget. * gui/tasks-control.c (tasks_control_activate): clear the folder bar label. We could display something here at some point. * gui/dialogs/recurrence-page.glade: changed "_Add" to "A_dd", since we have an "_Actions" menu. (These also use Alt+key, right?) * gui/dialogs/event-page.glade: * gui/dialogs/event-page.c: added 'Show Time As' field, which is really the TRANSP property but with a better name! Also changed one of the "_Confidential" to "Con_fidential" since we already have "_Contacts" using the same 'C' key. * pcs/cal-backend-file.c (cal_backend_file_get_free_busy): skip events that are TRANSPARENT. Also added comment as this code looks inefficient. * cal-util/cal-component.c: removed stuff for comparing timezones. * gui/comp-util.c (cal_comp_util_compare_event_timezones): moved the above function here, and updated it to compare the UTC offsets of the times as well as the TZIDs. svn path=/trunk/; revision=11717
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>