aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2012-05-17 01:02:42 +0800
committerDan Vrátil <dvratil@redhat.com>2012-05-17 01:02:42 +0800
commitf14af6f9988ec850e5da566657163fdcdb22aeaf (patch)
tree72b90773e5f47f24f2705f79ba07e45c2f073062 /modules/calendar
parentf28b9dfded9f083c5d6d6537102e9c56fcc79e6d (diff)
downloadgsoc2013-evolution-f14af6f9988ec850e5da566657163fdcdb22aeaf.tar
gsoc2013-evolution-f14af6f9988ec850e5da566657163fdcdb22aeaf.tar.gz
gsoc2013-evolution-f14af6f9988ec850e5da566657163fdcdb22aeaf.tar.bz2
gsoc2013-evolution-f14af6f9988ec850e5da566657163fdcdb22aeaf.tar.lz
gsoc2013-evolution-f14af6f9988ec850e5da566657163fdcdb22aeaf.tar.xz
gsoc2013-evolution-f14af6f9988ec850e5da566657163fdcdb22aeaf.tar.zst
gsoc2013-evolution-f14af6f9988ec850e5da566657163fdcdb22aeaf.zip
Bug #675863 - Cannot load webview.css from Tasks/Memos
Diffstat (limited to 'modules/calendar')
-rw-r--r--modules/calendar/e-memo-shell-content.c28
-rw-r--r--modules/calendar/e-task-shell-content.c28
2 files changed, 32 insertions, 24 deletions
diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c
index 24f7a68d73..19dbf8e564 100644
--- a/modules/calendar/e-memo-shell-content.c
+++ b/modules/calendar/e-memo-shell-content.c
@@ -194,7 +194,6 @@ memo_shell_content_cursor_change_cb (EMemoShellContent *memo_shell_content,
ECalComponentPreview *memo_preview;
ECalModel *memo_model;
ECalModelComponent *comp_data;
- ECalComponent *comp;
EPreviewPane *preview_pane;
EWebView *web_view;
const gchar *uid;
@@ -206,26 +205,31 @@ memo_shell_content_cursor_change_cb (EMemoShellContent *memo_shell_content,
memo_preview = E_CAL_COMPONENT_PREVIEW (web_view);
if (e_table_selected_count (table) != 1) {
- e_cal_component_preview_clear (memo_preview);
+ if (memo_shell_content->priv->preview_visible)
+ e_cal_component_preview_clear (memo_preview);
return;
}
row = e_table_get_cursor_row (table);
comp_data = e_cal_model_get_component_at (memo_model, row);
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (
- comp, icalcomponent_new_clone (comp_data->icalcomp));
- e_cal_component_preview_display (
- memo_preview, comp_data->client, comp,
- e_cal_model_get_timezone (memo_model),
- e_cal_model_get_use_24_hour_format (memo_model));
+ if (memo_shell_content->priv->preview_visible) {
+ ECalComponent *comp;
+
+ comp = e_cal_component_new_from_icalcomponent (
+ icalcomponent_new_clone (comp_data->icalcomp));
- e_cal_component_get_uid (comp, &uid);
+ e_cal_component_preview_display (
+ memo_preview, comp_data->client, comp,
+ e_cal_model_get_timezone (memo_model),
+ e_cal_model_get_use_24_hour_format (memo_model));
+
+ g_object_unref (comp);
+ }
+
+ uid = icalcomponent_get_uid (comp_data->icalcomp);
g_free (memo_shell_content->priv->current_uid);
memo_shell_content->priv->current_uid = g_strdup (uid);
-
- g_object_unref (comp);
}
static void
diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c
index 0ebff795bf..8284a63446 100644
--- a/modules/calendar/e-task-shell-content.c
+++ b/modules/calendar/e-task-shell-content.c
@@ -194,7 +194,6 @@ task_shell_content_cursor_change_cb (ETaskShellContent *task_shell_content,
ECalComponentPreview *task_preview;
ECalModel *task_model;
ECalModelComponent *comp_data;
- ECalComponent *comp;
EPreviewPane *preview_pane;
EWebView *web_view;
const gchar *uid;
@@ -206,26 +205,31 @@ task_shell_content_cursor_change_cb (ETaskShellContent *task_shell_content,
task_preview = E_CAL_COMPONENT_PREVIEW (web_view);
if (e_table_selected_count (table) != 1) {
- e_cal_component_preview_clear (task_preview);
+ if (task_shell_content->priv->preview_visible)
+ e_cal_component_preview_clear (task_preview);
return;
}
row = e_table_get_cursor_row (table);
comp_data = e_cal_model_get_component_at (task_model, row);
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (
- comp, icalcomponent_new_clone (comp_data->icalcomp));
- e_cal_component_preview_display (
- task_preview, comp_data->client, comp,
- e_cal_model_get_timezone (task_model),
- e_cal_model_get_use_24_hour_format (task_model));
+ if (task_shell_content->priv->preview_visible) {
+ ECalComponent *comp;
+
+ comp = e_cal_component_new_from_icalcomponent (
+ icalcomponent_new_clone (comp_data->icalcomp));
- e_cal_component_get_uid (comp, &uid);
+ e_cal_component_preview_display (
+ task_preview, comp_data->client, comp,
+ e_cal_model_get_timezone (task_model),
+ e_cal_model_get_use_24_hour_format (task_model));
+
+ g_object_unref (comp);
+ }
+
+ uid = icalcomponent_get_uid (comp_data->icalcomp);
g_free (task_shell_content->priv->current_uid);
task_shell_content->priv->current_uid = g_strdup (uid);
-
- g_object_unref (comp);
}
static void