diff options
author | Dan Vrátil <dvratil@redhat.com> | 2012-05-17 01:02:42 +0800 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2012-05-17 01:02:42 +0800 |
commit | f14af6f9988ec850e5da566657163fdcdb22aeaf (patch) | |
tree | 72b90773e5f47f24f2705f79ba07e45c2f073062 | |
parent | f28b9dfded9f083c5d6d6537102e9c56fcc79e6d (diff) | |
download | gsoc2013-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
-rw-r--r-- | calendar/gui/e-cal-component-preview.c | 4 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-content.c | 28 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-content.c | 28 |
3 files changed, 34 insertions, 26 deletions
diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c index 4b727d4d53..a1bfe92850 100644 --- a/calendar/gui/e-cal-component-preview.c +++ b/calendar/gui/e-cal-component-preview.c @@ -58,7 +58,7 @@ struct _ECalComponentPreviewPrivate { #define HTML_HEADER "<!doctype html public \"-//W3C//DTD HTML 4.0 TRANSITIONAL//EN\">\n<html>\n" \ "<head>\n<meta name=\"generator\" content=\"Evolution Calendar Component\">\n" \ - "<link type=\"text/css\" rel=\"stylesheet\" href=\"file://" EVOLUTION_PRIVDATADIR "/theme/webview.css\">\n" \ + "<link type=\"text/css\" rel=\"stylesheet\" href=\"evo-file://" EVOLUTION_PRIVDATADIR "/theme/webview.css\">\n" \ "<style>\n" \ ".description { font-family: monospace; font-size: 1em; }\n" \ "</style>\n" \ @@ -224,7 +224,7 @@ cal_component_preview_write_html (GString *buffer, uri = g_filename_to_uri (icon_file, NULL, NULL); g_string_append_printf ( - buffer, "<img alt=\"%s\" src=\"%s\">", + buffer, "<img alt=\"%s\" src=\"evo-%s\">", category, uri); g_free (uri); } else { 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 |