aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-05-27 01:09:33 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-05-27 01:09:33 +0800
commitc9ec8c3f4dce2b02c91268529977770364ef87fe (patch)
treed574f2be1b5438407e59e2fead1321766c9bbc83 /calendar
parent6fec6bf39467dd32625847be1b021a7e5bc94d76 (diff)
parent96538878911586a9e9ca26b81e1916c04e538980 (diff)
downloadgsoc2013-evolution-c9ec8c3f4dce2b02c91268529977770364ef87fe.tar.gz
gsoc2013-evolution-c9ec8c3f4dce2b02c91268529977770364ef87fe.tar.zst
gsoc2013-evolution-c9ec8c3f4dce2b02c91268529977770364ef87fe.zip
Merge branch 'express2'
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c40
-rw-r--r--calendar/gui/alarm-notify/alarm.c3
-rw-r--r--calendar/gui/apps_evolution_calendar.schemas.in26
-rw-r--r--calendar/gui/calendar-config-keys.h5
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c42
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.h2
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.ui175
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c20
-rw-r--r--calendar/gui/dialogs/comp-editor-util.h2
-rw-r--r--calendar/gui/dialogs/comp-editor.c132
-rw-r--r--calendar/gui/dialogs/comp-editor.h8
-rw-r--r--calendar/gui/dialogs/copy-source-dialog.c14
-rw-r--r--calendar/gui/dialogs/event-editor.c62
-rw-r--r--calendar/gui/dialogs/event-page.c46
-rw-r--r--calendar/gui/dialogs/event-page.h2
-rw-r--r--calendar/gui/dialogs/task-editor.c6
-rw-r--r--calendar/gui/e-cal-model.c15
-rw-r--r--calendar/gui/e-cal-model.h3
-rw-r--r--calendar/gui/e-calendar-view.c2
-rw-r--r--calendar/gui/e-day-view.c11
-rw-r--r--calendar/gui/e-meeting-time-sel.c4
-rw-r--r--calendar/gui/e-week-view.c14
-rw-r--r--calendar/gui/gnome-cal.c2
23 files changed, 407 insertions, 229 deletions
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index afba3e4602..f7ef6fdcf4 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -183,6 +183,25 @@ message_push (Message *msg)
msg->func (msg);
}
+/*
+ * use a static ring-buffer so we can call this twice
+ * in a printf without getting nonsense results.
+ */
+static const gchar *
+e_ctime (const time_t *timep)
+{
+ static gchar *buffer[4] = { 0, };
+ static gint next = 0;
+ const gchar *ret;
+
+ g_free (buffer[next]);
+ ret = buffer[next++] = g_strdup (ctime (timep));
+ if (next >= G_N_ELEMENTS (buffer))
+ next = 0;
+
+ return ret;
+}
+
/* Queues an alarm trigger for midnight so that we can load the next day's worth
* of alarms.
*/
@@ -199,7 +218,7 @@ queue_midnight_refresh (void)
zone = config_data_get_timezone ();
midnight = time_day_end_with_zone (time (NULL), zone);
- d(printf("%s:%d (queue_midnight_refresh) - Refresh at %s \n",__FILE__, __LINE__, ctime(&midnight)));
+ d(printf("%s:%d (queue_midnight_refresh) - Refresh at %s \n",__FILE__, __LINE__, e_ctime(&midnight)));
midnight_refresh_id = alarm_add (midnight, midnight_refresh_cb, NULL, NULL);
if (!midnight_refresh_id) {
@@ -471,7 +490,7 @@ add_component_alarms (ClientAlarms *ca, ECalComponentAlarms *alarms)
alarm_id = alarm_add (instance->trigger, alarm_trigger_cb, cqa, NULL);
if (!alarm_id) {
- d(printf("%s:%d (add_component_alarms) - Could not schedule a trigger for %s. Discarding \n",__FILE__, __LINE__, ctime(&(instance->trigger))));
+ d(printf("%s:%d (add_component_alarms) - Could not schedule a trigger for %s. Discarding \n",__FILE__, __LINE__, e_ctime(&(instance->trigger))));
continue;
}
@@ -482,7 +501,7 @@ add_component_alarms (ClientAlarms *ca, ECalComponentAlarms *alarms)
qa->snooze = FALSE;
cqa->queued_alarms = g_slist_prepend (cqa->queued_alarms, qa);
- d(printf("%s:%d (add_component_alarms) - Adding alarm %p %p at %s %s\n",__FILE__, __LINE__, qa, alarm_id, ctime (&(instance->trigger)), ctime(&tnow)));
+ d(printf("%s:%d (add_component_alarms) - Adding alarm %p %p at %s %s\n",__FILE__, __LINE__, qa, alarm_id, ctime (&(instance->trigger)), e_ctime(&tnow)));
}
id = e_cal_component_get_id (alarms->comp);
@@ -571,7 +590,8 @@ load_alarms_for_today (ClientAlarms *ca)
from = MAX (config_data_get_last_notification_time (ca->client) + 1, day_start);
day_end = time_day_end_with_zone (now, zone);
- d(printf("%s:%d (load_alarms_for_today) - From %s to %s\n",__FILE__, __LINE__, ctime (&from), ctime(&day_end)));
+ d(printf("%s:%d (load_alarms_for_today) - From %s to %s\n",__FILE__, __LINE__,
+ g_strdup (ctime (&from)), g_strdup (e_ctime(&day_end))));
load_alarms (ca, from, day_end);
}
@@ -707,7 +727,7 @@ query_objects_changed_async (struct _query_msg *msg)
day_end = time_day_end_with_zone (time (NULL), zone);
- d(printf("%s:%d (query_objects_changed_async) - Querying for object between %s to %s\n",__FILE__, __LINE__, ctime(&from), ctime(&day_end)));
+ d(printf("%s:%d (query_objects_changed_async) - Querying for object between %s to %s\n",__FILE__, __LINE__, e_ctime(&from), e_ctime(&day_end)));
for (l = objects; l != NULL; l = l->next) {
ECalComponentId *id;
@@ -771,7 +791,7 @@ query_objects_changed_async (struct _query_msg *msg)
alarm_id = alarm_add (instance->trigger, alarm_trigger_cb, cqa, NULL);
if (!alarm_id) {
- d(printf("%s:%d (query_objects_changed_async) -Unable to schedule trigger for %s \n",__FILE__, __LINE__, ctime(&(instance->trigger))));
+ d(printf("%s:%d (query_objects_changed_async) -Unable to schedule trigger for %s \n",__FILE__, __LINE__, e_ctime(&(instance->trigger))));
continue;
}
@@ -869,14 +889,14 @@ create_snooze (CompQueuedAlarms *cqa, gpointer alarm_id, gint snooze_mins)
new_id = alarm_add (t, alarm_trigger_cb, cqa, NULL);
if (!new_id) {
- d(printf("%s:%d (create_snooze) -Unable to schedule trigger for %s \n",__FILE__, __LINE__, ctime(&t)));
+ d(printf("%s:%d (create_snooze) -Unable to schedule trigger for %s \n",__FILE__, __LINE__, e_ctime(&t)));
return;
}
orig_qa->instance->trigger = t;
orig_qa->alarm_id = new_id;
orig_qa->snooze = TRUE;
- d(printf("%s:%d (create_snooze) - Adding a alarm at %s\n",__FILE__, __LINE__, ctime(&t)));
+ d(printf("%s:%d (create_snooze) - Adding a alarm at %s\n",__FILE__, __LINE__, e_ctime(&t)));
}
/* Launches a component editor for a component */
@@ -1839,7 +1859,7 @@ alarm_queue_init (gpointer data)
if (config_data_get_last_notification_time (NULL) == -1) {
time_t tmval = time (NULL);
- d(printf("%s:%d (alarm_queue_init) - Setting last notification time to %s\n",__FILE__, __LINE__, ctime(&tmval)));
+ d(printf("%s:%d (alarm_queue_init) - Setting last notification time to %s\n",__FILE__, __LINE__, e_ctime(&tmval)));
config_data_set_last_notification_time (NULL, tmval);
}
@@ -2145,7 +2165,7 @@ update_cqa (CompQueuedAlarms *cqa, ECalComponent *newcomp)
from = time_day_begin_with_zone (time (NULL), zone);
to = time_day_end_with_zone (time (NULL), zone);
- d(printf("%s:%d (update_cqa) - Generating alarms between %s and %s\n",__FILE__, __LINE__, ctime(&from), ctime(&to)));
+ d(printf("%s:%d (update_cqa) - Generating alarms between %s and %s\n",__FILE__, __LINE__, e_ctime(&from), e_ctime(&to)));
alarms = e_cal_util_generate_alarms_for_comp (newcomp, from, to, omit,
e_cal_resolve_tzid_cb, cqa->parent_client->client, zone);
diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c
index 14f66a68fb..a4be16bd69 100644
--- a/calendar/gui/alarm-notify/alarm.c
+++ b/calendar/gui/alarm-notify/alarm.c
@@ -152,7 +152,8 @@ setup_timeout (void)
now = time (NULL);
/* Add the time out */
- d(g_message ("Setting timeout for %d %lu %lu", diff, ar->trigger, now));
+ d(g_message ("Setting timeout for %d.%2d (from now) %lu %lu",
+ diff / 60, diff % 60, ar->trigger, now));
d(g_message (" %s", ctime (&ar->trigger)));
d(g_message (" %s", ctime (&now)));
timeout_id = g_timeout_add_seconds (diff, alarm_ready_cb, NULL);
diff --git a/calendar/gui/apps_evolution_calendar.schemas.in b/calendar/gui/apps_evolution_calendar.schemas.in
index 38d5525b24..ea33ddc1ca 100644
--- a/calendar/gui/apps_evolution_calendar.schemas.in
+++ b/calendar/gui/apps_evolution_calendar.schemas.in
@@ -284,7 +284,7 @@
<applyto>/apps/evolution/calendar/display/date_navigator_pane_position</applyto>
<owner>evolution-calendar</owner>
<type>int</type>
- <default>150</default>
+ <default>200</default>
<locale name="C">
<short>Month view vertical pane position </short>
<long>Position of the vertical pane, between the calendar lists and the date navigator calendar.</long>
@@ -666,14 +666,14 @@
</schema>
<schema>
- <key>/schemas/apps/evolution/calendar/display/day_view_show_week_number</key>
- <applyto>/apps/evolution/calendar/display/day_view_show_week_number</applyto>
+ <key>/schemas/apps/evolution/calendar/display/show_week_numbers</key>
+ <applyto>/apps/evolution/calendar/display/show_week_numbers</applyto>
<owner>evolution-calendar</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
- <short>Show week number in Day and Work Week View</short>
- <long>Whether to show week number in the Day and Work Week View.</long>
+ <short>Show week numbers in Day View, Work Week View, and Date Navigator</short>
+ <long>Whether to show week numbers in various places in the Calendar.</long>
</locale>
</schema>
@@ -682,27 +682,13 @@
<applyto>/apps/evolution/calendar/display/month_scroll_by_week</applyto>
<owner>evolution-calendar</owner>
<type>bool</type>
- <default>false</default>
+ <default>true</default>
<locale name="C">
<short>Scroll Month View by a week</short>
<long>Whether to scroll a Month View by a week, not by a month.</long>
</locale>
</schema>
- <!-- Date navigator -->
-
- <schema>
- <key>/schemas/apps/evolution/calendar/date_navigator/show_week_numbers</key>
- <applyto>/apps/evolution/calendar/date_navigator/show_week_numbers</applyto>
- <owner>evolution-calendar</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Show week numbers in date navigator</short>
- <long>Whether to show week numbers in the date navigator.</long>
- </locale>
- </schema>
-
<!-- Alarm notification -->
<schema>
diff --git a/calendar/gui/calendar-config-keys.h b/calendar/gui/calendar-config-keys.h
index 9afa8dc7e4..568e211acf 100644
--- a/calendar/gui/calendar-config-keys.h
+++ b/calendar/gui/calendar-config-keys.h
@@ -53,14 +53,11 @@ G_BEGIN_DECLS
#define CALENDAR_CONFIG_COMPRESS_WEEKEND CALENDAR_CONFIG_PREFIX "/display/compress_weekend"
#define CALENDAR_CONFIG_SHOW_EVENT_END CALENDAR_CONFIG_PREFIX "/display/show_event_end"
#define CALENDAR_CONFIG_WORKING_DAYS CALENDAR_CONFIG_PREFIX "/display/working_days"
-#define CALENDAR_CONFIG_DV_WEEK_NUMBER CALENDAR_CONFIG_PREFIX "/display/day_view_show_week_number"
+#define CALENDAR_CONFIG_SHOW_WEEK_NUMBERS CALENDAR_CONFIG_PREFIX "/display/show_week_numbers"
#define CALENDAR_CONFIG_DAY_SECOND_ZONE CALENDAR_CONFIG_PREFIX "/display/day_second_zone"
#define CALENDAR_CONFIG_DAY_SECOND_ZONES_LIST CALENDAR_CONFIG_PREFIX "/display/day_second_zones"
#define CALENDAR_CONFIG_DAY_SECOND_ZONES_MAX CALENDAR_CONFIG_PREFIX "/display/day_second_zones_max"
-/* Date navigator settings */
-#define CALENDAR_CONFIG_DN_SHOW_WEEK_NUMBERS CALENDAR_CONFIG_PREFIX "/date_navigator/show_week_numbers"
-
/* Task display settings */
#define CALENDAR_CONFIG_TASKS_SELECTED_TASKS CALENDAR_CONFIG_PREFIX "/tasks/selected_tasks"
#define CALENDAR_CONFIG_PRIMARY_TASKS CALENDAR_CONFIG_PREFIX "/tasks/primary_tasks"
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index 559d5f879d..914c26c3ec 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -36,6 +36,7 @@
#include "e-util/e-datetime-format.h"
#include "e-util/e-dialog-widgets.h"
#include "e-util/e-util-private.h"
+#include "shell/e-shell-utils.h"
#include <glib/gi18n.h>
#include <string.h>
@@ -739,16 +740,11 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs,
shell_settings, "cal-compress-weekend",
widget, "active");
- widget = e_builder_get_widget (prefs->builder, "dnav_show_week_no");
+ widget = e_builder_get_widget (prefs->builder, "show_week_numbers");
e_mutual_binding_new (
shell_settings, "cal-show-week-numbers",
widget, "active");
- widget = e_builder_get_widget (prefs->builder, "dview_show_week_no");
- e_mutual_binding_new (
- shell_settings, "cal-day-view-show-week-numbers",
- widget, "active");
-
prefs->month_scroll_by_week = e_builder_get_widget (prefs->builder, "month_scroll_by_week");
widget = e_builder_get_widget (prefs->builder, "tasks_due_today_color");
@@ -780,16 +776,42 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs,
e_mutual_binding_new (
shell_settings, "cal-free-busy-template",
widget, "text");
- target = e_cal_config_target_new_prefs (ec, prefs->gconf);
- e_config_set_target ((EConfig *)ec, (EConfigTarget *) target);
- toplevel = e_config_create_widget ((EConfig *)ec);
- gtk_container_add (GTK_CONTAINER (prefs), toplevel);
/* date/time format */
table = e_builder_get_widget (prefs->builder, "datetime_format_table");
e_datetime_format_add_setup_widget (table, 0, "calendar", "table", DTFormatKindDateTime, _("Ti_me and date:"));
e_datetime_format_add_setup_widget (table, 1, "calendar", "table", DTFormatKindDate, _("_Date only:"));
+ /* Hide senseless preferences when running in Express mode */
+ e_shell_hide_widgets_for_express_mode (shell, prefs->builder,
+ "label_second_zone",
+ "hbox_second_zone",
+ "timezone",
+ "timezone_label",
+ "hbox_use_system_timezone",
+ "hbox_time_divisions",
+ "show_end_times",
+ "month_scroll_by_week",
+ NULL);
+
+ /* HACK: GTK+ 2.18 and 2.20 has a GtkTable which includes row/column spacing even for empty rows/columns.
+ * When Evo runs in Express mode, we hide all the rows in the Time section of the calendar's General
+ * preferences page. However, due to that behavior in GTK+, we get a lot of extra spacing in that
+ * section. Since we know that in Express mode we only leave a single row visible, we'll make the
+ * table's row spacing equal to 0 in that case.
+ */
+ if (e_shell_get_express_mode (shell)) {
+ widget = e_builder_get_widget (prefs->builder, "time");
+ gtk_table_set_row_spacings (GTK_TABLE (widget), 0);
+ }
+
+ /* Hook up and add the toplevel widget */
+
+ target = e_cal_config_target_new_prefs (ec, prefs->gconf);
+ e_config_set_target ((EConfig *)ec, (EConfigTarget *) target);
+ toplevel = e_config_create_widget ((EConfig *)ec);
+ gtk_container_add (GTK_CONTAINER (prefs), toplevel);
+
show_config (prefs);
/* FIXME: weakref? */
setup_changes (prefs);
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.h b/calendar/gui/dialogs/cal-prefs-dialog.h
index 14011d8403..1ae585a0e8 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.h
+++ b/calendar/gui/dialogs/cal-prefs-dialog.h
@@ -79,8 +79,6 @@ struct _CalendarPrefsDialog {
GtkWidget *time_divisions;
GtkWidget *show_end_times;
GtkWidget *compress_weekend;
- GtkWidget *dnav_show_week_no;
- GtkWidget *dview_show_week_no;
GtkWidget *month_scroll_by_week;
GtkWidget *tasks_hide_completed;
GtkWidget *tasks_hide_completed_interval;
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.ui b/calendar/gui/dialogs/cal-prefs-dialog.ui
index d4caf1b356..b94803fc43 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.ui
+++ b/calendar/gui/dialogs/cal-prefs-dialog.ui
@@ -167,7 +167,7 @@
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
- <object class="GtkLabel" id="label63">
+ <object class="GtkLabel" id="label_second_zone">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Se_cond zone:</property>
@@ -182,7 +182,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox25">
+ <object class="GtkHBox" id="hbox_second_zone">
<property name="visible">True</property>
<child>
<object class="GtkButton" id="day_second_zone">
@@ -219,25 +219,41 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label11">
+ <object class="ETimezoneEntry" id="timezone">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Time format:</property>
+ <accessibility>
+ <relation type="labelled-by" target="timezone_label"/>
+ </accessibility>
</object>
<packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="timezone_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Time _zone:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">timezone</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox4">
+ <object class="GtkHBox" id="hbox_use_system_timezone">
<property name="visible">True</property>
- <property name="spacing">6</property>
<child>
- <object class="GtkRadioButton" id="use_12_hour">
- <property name="label" translatable="yes">_12 hour (AM/PM)</property>
+ <object class="GtkCheckButton" id="use-system-tz-check">
+ <property name="label" translatable="yes">Use s_ystem time zone</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -246,19 +262,14 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkRadioButton" id="use_24_hour">
- <property name="label" translatable="yes">_24 hour</property>
+ <object class="GtkLabel" id="system-tz-label">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">use_12_hour</property>
+ <property name="xpad">5</property>
+ <property name="label">(system/tz)</property>
</object>
<packing>
<property name="expand">False</property>
@@ -270,34 +281,16 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="ETimezoneEntry" id="timezone">
- <property name="visible">True</property>
- <accessibility>
- <relation type="labelled-by" target="timezone_label"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="timezone_label">
+ <object class="GtkLabel" id="label_time_format">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Time _zone:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">timezone</property>
+ <property name="label" translatable="yes">Time format:</property>
</object>
<packing>
<property name="x_options">GTK_FILL</property>
@@ -305,27 +298,34 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox26">
+ <object class="GtkHBox" id="hbox_time_format">
<property name="visible">True</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkCheckButton" id="use-system-tz-check">
- <property name="label" translatable="yes">Use s_ystem time zone</property>
+ <object class="GtkRadioButton" id="use_12_hour">
+ <property name="label" translatable="yes">_12 hour (AM/PM)</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
+ <property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="system-tz-label">
+ <object class="GtkRadioButton" id="use_24_hour">
+ <property name="label" translatable="yes">_24 hour</property>
<property name="visible">True</property>
- <property name="xpad">5</property>
- <property name="label">(system/tz)</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">use_12_hour</property>
</object>
<packing>
<property name="expand">False</property>
@@ -338,6 +338,7 @@
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -895,7 +896,7 @@
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox10">
+ <object class="GtkHBox" id="hbox_time_divisions">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
@@ -962,8 +963,8 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="dnav_show_week_no">
- <property name="label" translatable="yes">Show week _numbers in date navigator</property>
+ <object class="GtkCheckButton" id="show_week_numbers">
+ <property name="label" translatable="yes">Show week _numbers</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -977,21 +978,6 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="dview_show_week_no">
- <property name="label" translatable="yes">Show week n_umber in Day and Work Week View</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">4</property>
- </packing>
- </child>
- <child>
<object class="GtkCheckButton" id="month_scroll_by_week">
<property name="label" translatable="yes">Sc_roll Month View by a week</property>
<property name="visible">True</property>
@@ -1003,7 +989,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">5</property>
+ <property name="position">4</property>
</packing>
</child>
</object>
@@ -1051,12 +1037,9 @@
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
- <object class="GtkTable" id="table2">
+ <object class="GtkHBox" id="hbox14">
<property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">6</property>
- <property name="row_spacing">6</property>
+ <property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label21">
<property name="visible">True</property>
@@ -1066,57 +1049,59 @@
<property name="mnemonic_widget">tasks_due_today_color</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label22">
+ <object class="GtkColorButton" id="tasks_due_today_color">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Overdue tasks:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">tasks_overdue_color</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="title" translatable="yes">Pick a color</property>
+ <property name="color">#000000000000</property>
</object>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkColorButton" id="tasks_due_today_color">
+ <object class="GtkLabel" id="label22">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="title" translatable="yes">Pick a color</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Overdue tasks:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">tasks_overdue_color</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkColorButton" id="tasks_overdue_color">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="receives_default">True</property>
<property name="title" translatable="yes">Pick a color</property>
+ <property name="color">#000000000000</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
@@ -1441,8 +1426,8 @@
</object>
<object class="GtkSizeGroup" id="day_begins_ends_sizegroup">
<widgets>
- <widget name="day_end_label"/>
<widget name="day_start_label"/>
+ <widget name="day_end_label"/>
</widgets>
</object>
</interface>
diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c
index 45c08d3ae7..9856bd7c96 100644
--- a/calendar/gui/dialogs/comp-editor-util.c
+++ b/calendar/gui/dialogs/comp-editor-util.c
@@ -294,7 +294,9 @@ free_slist_strs (gpointer data)
* @note The list is just string of emails separated by ';'
**/
void
-comp_editor_manage_new_attendees (ECalComponent *comp, EMeetingAttendee *ma, gboolean add)
+comp_editor_manage_new_attendees (ECalComponent *comp,
+ EMeetingAttendee *ma,
+ gboolean add)
{
const gchar *eml;
@@ -306,7 +308,11 @@ comp_editor_manage_new_attendees (ECalComponent *comp, EMeetingAttendee *ma, gbo
eml = itip_strip_mailto (eml);
g_return_if_fail (eml != NULL);
- g_object_set_data_full (G_OBJECT (comp), "new-attendees", manage_new_attendees (g_object_get_data (G_OBJECT (comp), "new-attendees"), eml, add), free_slist_strs);
+ g_object_set_data_full (
+ G_OBJECT (comp), "new-attendees",
+ manage_new_attendees (
+ g_object_get_data (G_OBJECT (comp), "new-attendees"),
+ eml, add), free_slist_strs);
}
/**
@@ -349,15 +355,19 @@ comp_editor_have_in_new_attendees (ECalComponent *comp, EMeetingAttendee *ma)
eml = itip_strip_mailto (eml);
g_return_val_if_fail (eml != NULL, FALSE);
- return comp_editor_have_in_new_attendees_lst (g_object_get_data (G_OBJECT (comp), "new-attendees"), eml);
+ return comp_editor_have_in_new_attendees_lst (
+ g_object_get_data (G_OBJECT (comp), "new-attendees"), eml);
}
/**
* comp_editor_have_in_new_attendees_lst:
- * Same as @ref comp_editor_have_in_new_attendees only parameters are direct GSList and string.
+ *
+ * Same as comp_editor_have_in_new_attendees() only parameters are
+ * direct GSList and string.
**/
gboolean
-comp_editor_have_in_new_attendees_lst (const GSList *new_attendees, const gchar *eml)
+comp_editor_have_in_new_attendees_lst (const GSList *new_attendees,
+ const gchar *eml)
{
const GSList *l;
diff --git a/calendar/gui/dialogs/comp-editor-util.h b/calendar/gui/dialogs/comp-editor-util.h
index d3230051e3..6eeb8c5410 100644
--- a/calendar/gui/dialogs/comp-editor-util.h
+++ b/calendar/gui/dialogs/comp-editor-util.h
@@ -32,6 +32,8 @@
void comp_editor_dates (CompEditorPageDates *date, ECalComponent *comp);
void comp_editor_free_dates (CompEditorPageDates *dates);
+void comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label);
+
GtkWidget * comp_editor_new_date_edit (gboolean show_date,
gboolean show_time,
gboolean make_time_insensitive);
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 1ff43d34f1..010dd1cbf6 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -65,8 +65,6 @@
#define d(x)
-static gboolean comp_lite = FALSE;
-
/* Private part of the CompEditor structure */
struct _CompEditorPrivate {
@@ -163,10 +161,16 @@ static const gchar *ui =
" </menu>"
" </menubar>"
" <toolbar name='main-toolbar'>"
-" <toolitem action='save'/>"
-" <toolitem action='print'/>"
-" <toolitem action='close'/>"
+" <toolitem action='save'/>\n"
+"#if !EXPRESS\n"
+" <toolitem action='print'/>\n"
+"#endif\n"
" <separator/>"
+" <placeholder name='content'/>\n"
+"#if EXPRESS\n"
+" <separator expand='true'/>\n"
+" <toolitem action='close'/>\n"
+"#endif\n"
" </toolbar>"
"</ui>";
@@ -411,7 +415,7 @@ save_comp (CompEditor *editor)
clone = e_cal_component_clone (priv->comp);
comp_editor_copy_new_attendees (clone, priv->comp);
for (l = priv->pages; l != NULL; l = l->next) {
- if (!comp_editor_page_fill_component (l->data, clone)) {
+ if (IS_COMP_EDITOR_PAGE(l->data) && !comp_editor_page_fill_component (l->data, clone)) {
g_object_unref (clone);
g_hash_table_destroy (timezones);
comp_editor_show_page (editor, COMP_EDITOR_PAGE (l->data));
@@ -419,7 +423,8 @@ save_comp (CompEditor *editor)
}
/* retrieve all timezones */
- comp_editor_page_fill_timezones (l->data, timezones);
+ if (IS_COMP_EDITOR_PAGE(l->data))
+ comp_editor_page_fill_timezones (l->data, timezones);
}
/* If we are not the organizer, we don't update the sequence number */
@@ -1588,6 +1593,9 @@ comp_editor_init (CompEditor *editor)
gint n_targets;
GError *error = NULL;
+ /* FIXME Shell should be passed in. */
+ shell = e_shell_get_default ();
+
editor->priv = priv = COMP_EDITOR_GET_PRIVATE (editor);
g_object_weak_ref (
@@ -1611,9 +1619,9 @@ comp_editor_init (CompEditor *editor)
priv->is_group_item = FALSE;
priv->ui_manager = e_ui_manager_new ();
+ e_ui_manager_set_express_mode (E_UI_MANAGER (priv->ui_manager),
+ e_shell_get_express_mode (shell));
- if (comp_lite)
- gtk_window_set_default_size ((GtkWindow *) editor, 800, 450);
gtk_window_add_accel_group (
GTK_WINDOW (editor),
gtk_ui_manager_get_accel_group (priv->ui_manager));
@@ -1695,7 +1703,7 @@ comp_editor_init (CompEditor *editor)
action = comp_editor_get_action (editor, "save");
gtk_action_set_sensitive (action, FALSE);
- gtk_ui_manager_add_ui_from_string (priv->ui_manager, ui, -1, &error);
+ e_ui_manager_add_ui_from_string (E_UI_MANAGER (priv->ui_manager), ui, &error);
if (error != NULL) {
g_warning ("%s: %s", G_STRFUNC, error->message);
g_error_free (error);
@@ -1711,24 +1719,25 @@ comp_editor_init (CompEditor *editor)
container = widget;
- widget = comp_editor_get_managed_widget (editor, "/main-menu");
- gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
- gtk_widget_show (widget);
-
- if (!comp_lite) {
- widget = comp_editor_get_managed_widget (editor, "/main-toolbar");
+ if (!e_shell_get_express_mode (shell)) {
+ widget = comp_editor_get_managed_widget (editor, "/main-menu");
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
- gtk_widget_show (widget);
+ gtk_widget_set_visible (widget, !e_shell_get_meego_mode (shell));
}
+ widget = comp_editor_get_managed_widget (editor, "/main-toolbar");
+ gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
+
widget = e_attachment_paned_new ();
gtk_container_set_border_width (GTK_CONTAINER (widget), 6);
gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
priv->attachment_view = g_object_ref (widget);
gtk_widget_show (widget);
- if (comp_lite) {
- GtkWidget *tmp, *tmp1, *tmp_box, *cont;
+ if (e_shell_get_express_mode (shell)) {
+ /*GtkWidget *tmp, *tmp1, *tmp_box, */
+ GtkWidget *cont;
GtkWidget *combo;
e_attachment_paned_set_expanded (E_ATTACHMENT_PANED (widget), TRUE);
@@ -1739,7 +1748,7 @@ comp_editor_init (CompEditor *editor)
gtk_widget_hide (combo);
cont = e_attachment_paned_get_controls_container (
E_ATTACHMENT_PANED (widget));
-
+ /*
tmp_box = gtk_hbox_new (FALSE, 0);
tmp = gtk_hbox_new (FALSE, 0);
tmp1 = gtk_image_new_from_stock (GTK_STOCK_SAVE, GTK_ICON_SIZE_BUTTON);
@@ -1759,12 +1768,12 @@ comp_editor_init (CompEditor *editor)
gtk_widget_show(tmp_box);
gtk_box_pack_end (GTK_BOX (cont), tmp_box, FALSE, FALSE, 4);
-
+ */
}
container = e_attachment_paned_get_content_area (
E_ATTACHMENT_PANED (priv->attachment_view));
- if (comp_lite) {
+ if (e_shell_get_express_mode (shell)) {
scroll = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy ((GtkScrolledWindow *)scroll, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_widget_show(scroll);
@@ -1772,14 +1781,14 @@ comp_editor_init (CompEditor *editor)
}
widget = gtk_notebook_new ();
- gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE);
- if (!comp_lite)
+ gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), e_shell_get_express_mode (shell));
+ if (!e_shell_get_express_mode (shell))
gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0);
else
gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *) scroll, widget);
priv->notebook = GTK_NOTEBOOK (widget);
gtk_widget_show (widget);
- if (comp_lite)
+ if (e_shell_get_express_mode (shell))
gtk_widget_set_size_request (scroll, 300, -1);
comp_editor_setup_recent_menu (editor);
@@ -1821,9 +1830,8 @@ comp_editor_init (CompEditor *editor)
comp_editor_bind_gconf (editor);
- /* FIXME Shell should be passed in. */
- shell = e_shell_get_default ();
e_shell_watch_window (shell, GTK_WINDOW (editor));
+ e_shell_adapt_window_size (shell, GTK_WINDOW (editor));
}
static gboolean
@@ -2263,6 +2271,51 @@ page_unmapped_cb (GtkWidget *page_widget,
}
/**
+ * comp_editor_append_widget:
+ * @editor: A component editor
+ * @page: A component editor page
+ * @label: Label of the page. Should be NULL if add is FALSE.
+ * @add: Add's the page into the notebook if TRUE
+ *
+ * Appends a page to the notebook if add is TRUE else
+ * just adds it to the list of pages.
+ **/
+void
+comp_editor_append_widget (CompEditor *editor,
+ GtkWidget *page,
+ const gchar *label,
+ gboolean add)
+{
+ CompEditorPrivate *priv;
+ GtkWidget *label_widget = NULL;
+
+ g_return_if_fail (IS_COMP_EDITOR (editor));
+
+ priv = editor->priv;
+
+ g_object_ref (page);
+
+ if (label)
+ label_widget = gtk_label_new_with_mnemonic (label);
+
+ priv->pages = g_list_append (priv->pages, page);
+
+ if (add)
+ gtk_notebook_append_page (priv->notebook, page, label_widget);
+
+ /* Listen for when the page is mapped/unmapped so we can
+ install/uninstall the appropriate GtkAccelGroup.
+ g_signal_connect (
+ page, "map",
+ G_CALLBACK (page_mapped_cb), page);
+ g_signal_connect(
+ page, "unmap",
+ G_CALLBACK (page_unmapped_cb), page);
+ */
+
+}
+
+/**
* comp_editor_append_page:
* @editor: A component editor
* @page: A component editor page
@@ -2553,8 +2606,10 @@ fill_widgets (CompEditor *editor)
g_signal_handlers_block_by_func (
action, G_CALLBACK (action_classification_cb), editor);
- for (iter = priv->pages; iter != NULL; iter = iter->next)
- comp_editor_page_fill_widgets (iter->data, priv->comp);
+ for (iter = priv->pages; iter != NULL; iter = iter->next) {
+ if (IS_COMP_EDITOR_PAGE(iter->data))
+ comp_editor_page_fill_widgets (iter->data, priv->comp);
+ }
g_signal_handlers_unblock_by_func (
action, G_CALLBACK (action_classification_cb), editor);
@@ -2797,8 +2852,10 @@ comp_editor_get_current_comp (CompEditor *editor, gboolean *correct)
comp = e_cal_component_clone (priv->comp);
comp_editor_copy_new_attendees (comp, priv->comp);
if (priv->changed) {
- for (l = priv->pages; l != NULL; l = l->next)
- all_ok = comp_editor_page_fill_component (l->data, comp) && all_ok;
+ for (l = priv->pages; l != NULL; l = l->next) {
+ if (IS_COMP_EDITOR_PAGE(l->data))
+ all_ok = comp_editor_page_fill_component (l->data, comp) && all_ok;
+ }
}
if (correct)
@@ -2966,7 +3023,7 @@ page_dates_changed_cb (CompEditor *editor,
GList *l;
for (l = priv->pages; l != NULL; l = l->next)
- if (page != (CompEditorPage *) l->data)
+ if (page != (CompEditorPage *) l->data && IS_COMP_EDITOR_PAGE(l->data))
comp_editor_page_set_dates (l->data, dates);
if (!priv->warned && priv->existing_org && !priv->user_org && !(editor->priv->flags & COMP_EDITOR_NEW_ITEM)) {
@@ -3023,14 +3080,3 @@ obj_removed_cb (ECal *client,
close_dialog (editor);
}
-gboolean
-comp_editor_get_lite ()
-{
- return comp_lite;
-}
-
-void
-comp_editor_set_lite (gboolean status)
-{
- comp_lite = status;
-}
diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h
index 4871beae8f..bd26ce8b66 100644
--- a/calendar/gui/dialogs/comp-editor.h
+++ b/calendar/gui/dialogs/comp-editor.h
@@ -127,6 +127,11 @@ void comp_editor_append_page (CompEditor *editor,
CompEditorPage *page,
const gchar *label,
gboolean add);
+void comp_editor_append_widget (CompEditor *editor,
+ GtkWidget *page,
+ const gchar *label,
+ gboolean add);
+
void comp_editor_remove_page (CompEditor *editor,
CompEditorPage *page);
void comp_editor_show_page (CompEditor *editor,
@@ -165,9 +170,6 @@ GtkWidget * comp_editor_get_managed_widget (CompEditor *editor,
const gchar *widget_path);
CompEditor * comp_editor_find_instance (const gchar *uid);
-void comp_editor_set_lite (gboolean status);
-gboolean comp_editor_get_lite (void);
-
G_END_DECLS
#endif
diff --git a/calendar/gui/dialogs/copy-source-dialog.c b/calendar/gui/dialogs/copy-source-dialog.c
index 9b8c8c4fed..f1c568849b 100644
--- a/calendar/gui/dialogs/copy-source-dialog.c
+++ b/calendar/gui/dialogs/copy-source-dialog.c
@@ -32,18 +32,19 @@
#include "common/authentication.h"
typedef struct {
+ GtkWindow *parent;
ESource *orig_source;
ECalSourceType obj_type;
ESource *selected_source;
} CopySourceDialogData;
static void
-show_error (GtkWindow *parent, const gchar *msg)
+show_error (CopySourceDialogData *csdd, const gchar *msg)
{
GtkWidget *dialog;
dialog = gtk_message_dialog_new (
- parent, 0, GTK_MESSAGE_ERROR,
+ csdd->parent, 0, GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE, "%s", msg);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -88,7 +89,7 @@ copy_source (CopySourceDialogData *csdd)
/* open the source */
source_client = e_auth_new_cal_from_source (csdd->orig_source, csdd->obj_type);
if (!e_cal_open (source_client, TRUE, NULL)) {
- show_error (NULL, _("Could not open source"));
+ show_error (csdd, _("Could not open source"));
g_object_unref (source_client);
return FALSE;
}
@@ -96,7 +97,7 @@ copy_source (CopySourceDialogData *csdd)
/* open the destination */
dest_client = e_auth_new_cal_from_source (csdd->selected_source, csdd->obj_type);
if (!e_cal_open (dest_client, FALSE, NULL)) {
- show_error (NULL, _("Could not open destination"));
+ show_error (csdd, _("Could not open destination"));
g_object_unref (dest_client);
g_object_unref (source_client);
return FALSE;
@@ -105,7 +106,7 @@ copy_source (CopySourceDialogData *csdd)
/* check if the destination is read only */
e_cal_is_read_only (dest_client, &read_only, NULL);
if (read_only) {
- show_error (NULL, _("Destination is read only"));
+ show_error (csdd, _("Destination is read only"));
} else {
if (e_cal_get_object_list (source_client, "#t", &obj_list, NULL)) {
GList *l;
@@ -135,7 +136,7 @@ copy_source (CopySourceDialogData *csdd)
g_free (uid);
} else {
if (error) {
- show_error (NULL, error->message);
+ show_error (csdd, error->message);
g_error_free (error);
}
break;
@@ -168,6 +169,7 @@ copy_source_dialog (GtkWindow *parent, ESource *source, ECalSourceType obj_type)
g_return_val_if_fail (E_IS_SOURCE (source), FALSE);
+ csdd.parent = parent;
csdd.orig_source = source;
csdd.selected_source = NULL;
csdd.obj_type = obj_type;
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 90fc910708..262751fa86 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -36,6 +36,7 @@
#include <e-util/e-binding.h>
#include <e-util/e-plugin-ui.h>
#include <e-util/e-util-private.h>
+#include <e-util/e-ui-manager.h>
#include "event-page.h"
#include "recurrence-page.h"
@@ -89,11 +90,19 @@ static const gchar *ui =
" </menu>"
" </menubar>"
" <toolbar name='main-toolbar'>"
-" <toolitem action='alarms'/>"
-" <toolitem action='show-time-busy'/>"
-" <toolitem action='recurrence'/>"
-" <toolitem action='all-day-event'/>"
-" <toolitem action='free-busy'/>"
+" <placeholder name='content'>\n"
+"#if !EXPRESS\n"
+" <toolitem action='alarms'/>\n"
+"#endif\n"
+" <toolitem action='show-time-busy'/>\n"
+"#if !EXPRESS\n"
+" <toolitem action='recurrence'/>\n"
+"#endif\n"
+" <toolitem action='all-day-event'/>\n"
+"#if !EXPRESS\n"
+" <toolitem action='free-busy'/>\n"
+"#endif\n"
+" </placeholder>"
" </toolbar>"
"</ui>";
@@ -280,6 +289,8 @@ event_editor_constructor (GType type,
GtkWidget *content_area;
ECal *client;
gboolean is_meeting;
+ GtkWidget *alarm_page;
+ GtkWidget *attendee_page;
/* Chain up to parent's constructor() method. */
object = G_OBJECT_CLASS (event_editor_parent_class)->constructor (
@@ -316,11 +327,34 @@ event_editor_constructor (GType type,
priv->recur_page = recurrence_page_new (editor);
page = COMP_EDITOR_PAGE (priv->recur_page);
- gtk_container_add (
- GTK_CONTAINER (content_area),
- comp_editor_page_get_widget (page));
- gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (priv->recur_window)));
- comp_editor_append_page (editor, page, NULL, FALSE);
+ if (!e_shell_get_express_mode(e_shell_get_default())) {
+ gtk_container_add (
+ GTK_CONTAINER ((GTK_DIALOG (priv->recur_window)->vbox)),
+ comp_editor_page_get_widget (page));
+ gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (priv->recur_window)));
+ comp_editor_append_page (editor, page, NULL, FALSE);
+ } else {
+ comp_editor_append_page (editor, page, _("_Recurrence"), TRUE);
+ }
+
+ if (e_shell_get_express_mode(e_shell_get_default())) {
+ ENameSelector *name_selector;
+
+ priv->sched_page = schedule_page_new (priv->model, editor);
+ page = COMP_EDITOR_PAGE (priv->sched_page);
+
+ name_selector = event_page_get_name_selector (priv->event_page);
+ schedule_page_set_name_selector (priv->sched_page, name_selector);
+
+ comp_editor_append_page (editor, page, _("_Free/Busy"), TRUE);
+ schedule_page_update_free_busy (priv->sched_page);
+
+ /* Alarm page */
+ alarm_page = event_page_get_alarm_page (priv->event_page);
+ comp_editor_append_widget (editor, alarm_page, _("_Alarm"), TRUE);
+ g_object_unref(alarm_page);
+
+ }
if (is_meeting) {
@@ -337,6 +371,12 @@ event_editor_constructor (GType type,
event_page_set_meeting (priv->event_page, TRUE);
priv->meeting_shown=TRUE;
+
+ if (e_shell_get_express_mode(e_shell_get_default())) {
+ attendee_page = event_page_get_attendee_page (priv->event_page);
+ comp_editor_append_widget (editor, attendee_page, _("Attendee_s"), TRUE);
+ g_object_unref(attendee_page);
+ }
}
return object;
@@ -513,7 +553,7 @@ event_editor_init (EventEditor *ee)
G_N_ELEMENTS (meeting_entries), ee);
ui_manager = comp_editor_get_ui_manager (editor);
- gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, &error);
+ e_ui_manager_add_ui_from_string (E_UI_MANAGER (ui_manager), ui, &error);
id = "org.gnome.evolution.event-editor";
e_plugin_ui_register_manager (ui_manager, id, ee);
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index cf1bc620ea..1dfabb7597 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -828,7 +828,8 @@ sensitize_widgets (EventPage *epage)
} else {
gtk_widget_show (priv->calendar_label);
gtk_widget_show (priv->list_box);
- gtk_widget_show (priv->attendee_box);
+ if (!e_shell_get_express_mode(e_shell_get_default()))
+ gtk_widget_show (priv->attendee_box);
gtk_widget_show (priv->organizer);
gtk_label_set_text_with_mnemonic ((GtkLabel *) priv->org_cal_label, _("Or_ganizer:"));
}
@@ -2199,7 +2200,7 @@ get_widgets (EventPage *epage)
priv->invite = GW ("invite");
priv->invite_label = GW ("invite-label");
- if (comp_editor_get_lite ())
+ if (e_shell_get_express_mode (e_shell_get_default ()))
gtk_widget_hide (priv->invite);
else
gtk_widget_hide (priv->invite_label);
@@ -2239,8 +2240,6 @@ get_widgets (EventPage *epage)
priv->source_selector = GW ("source");
-#undef GW
-
e_util_set_source_combo_box_list (priv->source_selector, "/apps/evolution/calendar/sources");
completion = e_category_completion_new ();
@@ -3255,3 +3254,42 @@ event_page_remove_all_attendees (EventPage *epage)
e_meeting_list_view_remove_all_attendees_from_name_selector (E_MEETING_LIST_VIEW (priv->list_view));
}
+GtkWidget *
+event_page_get_alarm_page (EventPage *epage)
+{
+ EventPagePrivate *priv;
+ GtkWidget *alarm_page, *tmp;
+
+ g_return_val_if_fail (epage != NULL, NULL);
+ g_return_val_if_fail (IS_EVENT_PAGE (epage), NULL);
+
+ priv = epage->priv;
+
+ tmp = GW("dialog-vbox1");
+ alarm_page = GW("vbox2");
+ g_object_ref(alarm_page);
+ gtk_container_remove ((GtkContainer *)tmp, alarm_page);
+
+ return alarm_page;
+}
+
+GtkWidget *
+event_page_get_attendee_page (EventPage *epage)
+{
+ EventPagePrivate *priv;
+ GtkWidget *apage;
+
+ g_return_val_if_fail (epage != NULL, NULL);
+ g_return_val_if_fail (IS_EVENT_PAGE (epage), NULL);
+
+ priv = epage->priv;
+
+ apage = priv->list_box;
+ g_object_ref(apage);
+ gtk_container_remove ((GtkContainer *)gtk_widget_get_parent(apage), apage);
+ gtk_widget_hide (priv->attendee_box);
+
+ return apage;
+}
+
+#undef GW
diff --git a/calendar/gui/dialogs/event-page.h b/calendar/gui/dialogs/event-page.h
index ab43c0f7ba..afa191e9c1 100644
--- a/calendar/gui/dialogs/event-page.h
+++ b/calendar/gui/dialogs/event-page.h
@@ -109,6 +109,8 @@ ENameSelector * event_page_get_name_selector (EventPage *epage);
void event_page_add_attendee (EventPage *epage,
EMeetingAttendee *attendee);
void event_page_remove_all_attendees (EventPage *epage);
+GtkWidget * event_page_get_alarm_page (EventPage *epage);
+GtkWidget * event_page_get_attendee_page (EventPage *epage);
G_END_DECLS
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 1733cf3a96..46a2f95d0e 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -81,8 +81,10 @@ static const gchar *ui =
" </menu>"
" </menubar>"
" <toolbar name='main-toolbar'>"
-" <toolitem action='view-time-zone'/>"
-" <toolitem action='option-status'/>"
+" <placeholder name='content'>"
+" <toolitem action='view-time-zone'/>"
+" <toolitem action='option-status'/>"
+" </placeholder>"
" </toolbar>"
"</ui>";
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index ec91442fec..e745d33810 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -138,6 +138,7 @@ enum {
CAL_VIEW_PROGRESS,
CAL_VIEW_DONE,
STATUS_MESSAGE,
+ TIMEZONE_CHANGED,
LAST_SIGNAL
};
@@ -411,6 +412,16 @@ e_cal_model_class_init (ECalModelClass *class)
e_marshal_VOID__STRING_DOUBLE,
G_TYPE_NONE, 2,
G_TYPE_STRING, G_TYPE_DOUBLE);
+ signals[TIMEZONE_CHANGED] = g_signal_new (
+ "timezone-changed",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ECalModelClass, timezone_changed),
+ NULL, NULL,
+ e_marshal_VOID__POINTER_POINTER,
+ G_TYPE_NONE, 2,
+ G_TYPE_POINTER,
+ G_TYPE_POINTER);
}
static void
@@ -1365,12 +1376,14 @@ void
e_cal_model_set_timezone (ECalModel *model,
icaltimezone *zone)
{
+ icaltimezone *old_zone;
g_return_if_fail (E_IS_CAL_MODEL (model));
if (model->priv->zone == zone)
return;
e_table_model_pre_change (E_TABLE_MODEL (model));
+ old_zone = model->priv->zone;
model->priv->zone = zone;
/* the timezone affects the times shown for date fields,
@@ -1378,6 +1391,8 @@ e_cal_model_set_timezone (ECalModel *model,
e_table_model_changed (E_TABLE_MODEL (model));
g_object_notify (G_OBJECT (model), "timezone");
+ g_signal_emit (G_OBJECT (model), signals[TIMEZONE_CHANGED], 0,
+ old_zone, zone);
}
void
diff --git a/calendar/gui/e-cal-model.h b/calendar/gui/e-cal-model.h
index ee914eef67..29c3335310 100644
--- a/calendar/gui/e-cal-model.h
+++ b/calendar/gui/e-cal-model.h
@@ -166,6 +166,9 @@ struct _ECalModelClass {
void (*status_message) (ECalModel *model,
const gchar *message,
gdouble percent);
+ void (*timezone_changed) (ECalModel *model,
+ icaltimezone *old_zone,
+ icaltimezone *new_zone);
};
typedef time_t (*ECalModelDefaultTimeFunc) (ECalModel *model, gpointer user_data);
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 77d8fd2051..63088350c2 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -895,6 +895,8 @@ e_calendar_view_init (ECalendarView *calendar_view)
target_list = gtk_target_list_new (NULL, 0);
e_target_list_add_calendar_targets (target_list, 0);
calendar_view->priv->paste_target_list = target_list;
+
+ e_extensible_load_extensions (E_EXTENSIBLE (calendar_view));
}
static void
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index a171d94d94..010f5bdb32 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -951,12 +951,13 @@ model_comps_deleted_cb (ETableModel *etm, gpointer data, gpointer user_data)
}
static void
-timezone_changed_cb (ECalendarView *cal_view, icaltimezone *old_zone,
+timezone_changed_cb (ECalModel *cal_model, icaltimezone *old_zone,
icaltimezone *new_zone, gpointer user_data)
{
struct icaltimetype tt;
time_t lower;
- EDayView *day_view = (EDayView *) cal_view;
+ EDayView *day_view = (EDayView *) user_data;
+ ECalendarView *cal_view = (ECalendarView *) day_view;
g_return_if_fail (E_IS_DAY_VIEW (day_view));
@@ -1307,10 +1308,6 @@ e_day_view_init (EDayView *day_view)
GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_ASK);
e_drag_dest_add_calendar_targets (day_view->main_canvas);
-
- /* connect to ECalendarView's signals */
- g_signal_connect (G_OBJECT (day_view), "timezone_changed",
- G_CALLBACK (timezone_changed_cb), NULL);
}
static void
@@ -1327,6 +1324,8 @@ init_model (EDayView *day_view, ECalModel *model)
G_CALLBACK (model_rows_inserted_cb), day_view);
g_signal_connect (G_OBJECT (model), "comps_deleted",
G_CALLBACK (model_comps_deleted_cb), day_view);
+ g_signal_connect (G_OBJECT (model), "timezone_changed",
+ G_CALLBACK (timezone_changed_cb), day_view);
}
/* Turn off the background of the canvas windows. This reduces flicker
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 1511482b6b..4c19b5a3aa 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -1471,6 +1471,10 @@ e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, gint row,
GdkCursor *cursor;
GdkWindow *window;
+ /* nothing to refresh, lets not leak a busy cursor */
+ if (e_meeting_store_count_actual_attendees (mts->model) <= 0)
+ return;
+
start = mts->meeting_start_time;
g_date_subtract_days (&start.date, E_MEETING_TIME_SELECTOR_FB_DAYS_BEFORE);
start.hour = 0;
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 173b79bbd5..accafd9ac2 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -428,11 +428,12 @@ week_view_time_range_changed_cb (EWeekView *week_view,
}
static void
-timezone_changed_cb (ECalendarView *cal_view,
+timezone_changed_cb (ECalModel *cal_model,
icaltimezone *old_zone,
icaltimezone *new_zone,
gpointer user_data)
{
+ ECalendarView *cal_view = (ECalendarView *) user_data;
struct icaltimetype tt = icaltime_null_time ();
time_t lower;
EWeekView *week_view = (EWeekView *) cal_view;
@@ -828,10 +829,6 @@ e_week_view_init (EWeekView *week_view)
week_view->move_cursor = gdk_cursor_new (GDK_FLEUR);
week_view->resize_width_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW);
week_view->last_cursor_set = NULL;
-
- /* connect to ECalendarView's signals */
- g_signal_connect (G_OBJECT (week_view), "timezone_changed",
- G_CALLBACK (timezone_changed_cb), NULL);
}
/**
@@ -843,9 +840,14 @@ e_week_view_init (EWeekView *week_view)
ECalendarView *
e_week_view_new (ECalModel *model)
{
+ ECalendarView *view;
g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
- return g_object_new (E_TYPE_WEEK_VIEW, "model", model, NULL);
+ view = g_object_new (E_TYPE_WEEK_VIEW, "model", model, NULL);
+
+ g_signal_connect (G_OBJECT (model), "timezone_changed",
+ G_CALLBACK (timezone_changed_cb), view);
+ return view;
}
static void
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index f7ab89bec0..a24dfa26ed 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1425,7 +1425,7 @@ gnome_calendar_init (GnomeCalendar *gcal)
priv->todo_update_lock = g_mutex_new ();
priv->dn_query_lock = g_mutex_new ();
- priv->current_view_type = GNOME_CAL_DAY_VIEW;
+ priv->current_view_type = GNOME_CAL_WORK_WEEK_VIEW;
priv->range_selected = FALSE;
priv->lview_select_daten_range = TRUE;