aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-shell-sidebar.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/calendar/e-cal-shell-sidebar.c')
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c48
1 files changed, 40 insertions, 8 deletions
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index 4545c88c3a..9491d3fee2 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -278,9 +278,15 @@ static void
cal_shell_sidebar_set_default (ECalShellSidebar *cal_shell_sidebar,
ESource *source)
{
+ EShellView *shell_view;
+ EShellContent *shell_content;
+ EShellSidebar *shell_sidebar;
+ ECalShellContent *cal_shell_content;
ECalSourceType source_type;
GHashTable *client_table;
+ ECalModel *model;
ECal *client;
+ icaltimezone *timezone;
const gchar *uid;
source_type = E_CAL_SOURCE_TYPE_EVENT;
@@ -305,7 +311,17 @@ cal_shell_sidebar_set_default (ECalShellSidebar *cal_shell_sidebar,
G_CALLBACK (cal_shell_sidebar_default_opened_cb),
cal_shell_sidebar);
- e_cal_set_default_timezone (client, e_cal_model_get_timezone (e_cal_shell_content_get_model (E_CAL_SHELL_CONTENT (e_shell_view_get_shell_content (e_shell_sidebar_get_shell_view (E_SHELL_SIDEBAR (cal_shell_sidebar)))))), NULL);
+ /* FIXME Sidebar should not be accessing the EShellContent.
+ * This probably needs to be moved to ECalShellView. */
+ shell_sidebar = E_SHELL_SIDEBAR (cal_shell_sidebar);
+ shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
+ shell_content = e_shell_view_get_shell_content (shell_view);
+
+ cal_shell_content = E_CAL_SHELL_CONTENT (shell_content);
+ model = e_cal_shell_content_get_model (cal_shell_content);
+ timezone = e_cal_model_get_timezone (model);
+
+ e_cal_set_default_timezone (client, timezone, NULL);
e_cal_open_async (client, FALSE);
}
@@ -771,8 +787,8 @@ cal_shell_sidebar_class_init (ECalShellSidebarClass *class)
PROP_DATE_NAVIGATOR,
g_param_spec_object (
"date-navigator",
- _("Date Navigator Widget"),
- _("This widget displays a miniature calendar"),
+ "Date Navigator Widget",
+ "This widget displays a miniature calendar",
E_TYPE_CALENDAR,
G_PARAM_READABLE));
@@ -781,8 +797,8 @@ cal_shell_sidebar_class_init (ECalShellSidebarClass *class)
PROP_DEFAULT_CLIENT,
g_param_spec_object (
"default-client",
- _("Default Calendar Client"),
- _("Default client for calendar operations"),
+ "Default Calendar Client",
+ "Default client for calendar operations",
E_TYPE_CAL,
G_PARAM_READABLE));
@@ -791,8 +807,8 @@ cal_shell_sidebar_class_init (ECalShellSidebarClass *class)
PROP_SELECTOR,
g_param_spec_object (
"selector",
- _("Source Selector Widget"),
- _("This widget displays groups of calendars"),
+ "Source Selector Widget",
+ "This widget displays groups of calendars",
E_TYPE_SOURCE_SELECTOR,
G_PARAM_READABLE));
@@ -926,11 +942,17 @@ void
e_cal_shell_sidebar_add_source (ECalShellSidebar *cal_shell_sidebar,
ESource *source)
{
+ EShellView *shell_view;
+ EShellContent *shell_content;
+ EShellSidebar *shell_sidebar;
+ ECalShellContent *cal_shell_content;
ECalSourceType source_type;
ESourceSelector *selector;
GHashTable *client_table;
+ ECalModel *model;
ECal *default_client;
ECal *client;
+ icaltimezone *timezone;
const gchar *uid;
const gchar *uri;
gchar *message;
@@ -989,7 +1011,17 @@ e_cal_shell_sidebar_add_source (ECalShellSidebar *cal_shell_sidebar,
G_CALLBACK (cal_shell_sidebar_client_opened_cb),
cal_shell_sidebar);
- e_cal_set_default_timezone (client, e_cal_model_get_timezone (e_cal_shell_content_get_model (E_CAL_SHELL_CONTENT (e_shell_view_get_shell_content (e_shell_sidebar_get_shell_view (E_SHELL_SIDEBAR (cal_shell_sidebar)))))), NULL);
+ /* FIXME Sidebar should not be accessing the EShellContent.
+ * This probably needs to be moved to ECalShellView. */
+ shell_sidebar = E_SHELL_SIDEBAR (cal_shell_sidebar);
+ shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
+ shell_content = e_shell_view_get_shell_content (shell_view);
+
+ cal_shell_content = E_CAL_SHELL_CONTENT (shell_content);
+ model = e_cal_shell_content_get_model (cal_shell_content);
+ timezone = e_cal_model_get_timezone (model);
+
+ e_cal_set_default_timezone (client, timezone, NULL);
e_cal_open_async (client, FALSE);
}