aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatryk Zawadzki <patrys@pld-linux.org>2009-06-19 22:23:57 +0800
committerPatryk Zawadzki <patrys@pld-linux.org>2009-06-19 22:23:57 +0800
commit140a3e7349025b41e1a0e7f5bd20e85f41cea75e (patch)
tree21f28048635a42b867887d65d16dd22d13876e3f
parent3f1ee55e4b48f8e771abe18808502a2f62f17932 (diff)
downloadgsoc2013-empathy-140a3e7349025b41e1a0e7f5bd20e85f41cea75e.tar
gsoc2013-empathy-140a3e7349025b41e1a0e7f5bd20e85f41cea75e.tar.gz
gsoc2013-empathy-140a3e7349025b41e1a0e7f5bd20e85f41cea75e.tar.bz2
gsoc2013-empathy-140a3e7349025b41e1a0e7f5bd20e85f41cea75e.tar.lz
gsoc2013-empathy-140a3e7349025b41e1a0e7f5bd20e85f41cea75e.tar.xz
gsoc2013-empathy-140a3e7349025b41e1a0e7f5bd20e85f41cea75e.tar.zst
gsoc2013-empathy-140a3e7349025b41e1a0e7f5bd20e85f41cea75e.zip
Partial fix for bug #586379
Added naive support for footer files in adium themes. No macros are actually parsed and replaces but these are mostly used in headers.
-rw-r--r--libempathy-gtk/empathy-theme-adium.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 4aa32a3f6..971594674 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -86,6 +86,8 @@ theme_adium_load (EmpathyThemeAdium *theme)
gchar *file;
gchar *template_html = NULL;
gsize template_len;
+ gchar *footer_html = NULL;
+ gsize footer_len;
GString *string;
gchar **strv = NULL;
gchar *css_path;
@@ -117,6 +119,10 @@ theme_adium_load (EmpathyThemeAdium *theme)
g_file_get_contents (file, &priv->status_html, &priv->status_len, NULL);
g_free (file);
+ file = g_build_filename (priv->basedir, "Footer.html", NULL);
+ g_file_get_contents (file, &footer_html, &footer_len, NULL);
+ g_free (file);
+
file = g_build_filename (priv->basedir, "Incoming", "buddy_icon.png", NULL);
if (g_file_test (file, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) {
priv->default_incoming_avatar_filename = file;
@@ -173,7 +179,8 @@ theme_adium_load (EmpathyThemeAdium *theme)
g_string_append (string, strv[i++]);
g_string_append (string, ""); /* We don't want header */
g_string_append (string, strv[i++]);
- g_string_append (string, ""); /* FIXME: We don't support footer yet */
+ /* FIXME: We should replace adium %macros% in footer */
+ g_string_append (string, footer_html);
g_string_append (string, strv[i++]);
priv->template_html = g_string_free (string, FALSE);
@@ -182,6 +189,7 @@ theme_adium_load (EmpathyThemeAdium *theme)
priv->template_html, basedir_uri);
g_free (basedir_uri);
+ g_free (footer_html);
g_free (template_html);
g_free (css_path);
g_strfreev (strv);