mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
64 lines
2.3 KiB
Diff
64 lines
2.3 KiB
Diff
--- fancy_viewer.c 2009/06/16 16:04:35 1.1.2.11
|
|
+++ fancy_viewer.c 2009/07/04 16:34:52 1.1.2.14
|
|
@@ -107,8 +107,19 @@
|
|
return FALSE;
|
|
}
|
|
if (procmime_get_part(viewer->filename, partinfo) < 0) {
|
|
- g_free(viewer->filename);
|
|
+ g_free(viewer->filename);
|
|
+ viewer->filename = NULL;
|
|
} else {
|
|
+ const gchar *charset = NULL;
|
|
+ if (_viewer && _viewer->mimeview &&
|
|
+ _viewer->mimeview->messageview->forced_charset)
|
|
+ charset = _viewer->mimeview->messageview->forced_charset;
|
|
+ else
|
|
+ charset = procmime_mimeinfo_get_parameter(partinfo, "charset");
|
|
+ if (!charset)
|
|
+ charset = conv_get_locale_charset_str();
|
|
+ debug_print("using %s charset\n", charset);
|
|
+ g_object_set(viewer->settings, "default-encoding", charset, NULL);
|
|
gchar *tmp = g_filename_to_uri(viewer->filename, NULL, NULL);
|
|
webkit_web_view_open(viewer->view, tmp);
|
|
g_free(tmp);
|
|
@@ -182,6 +193,7 @@
|
|
debug_print("filename: %s\n", viewer->filename);
|
|
if (!viewer->filename) {
|
|
alertpanel_error(_("Filename is null."));
|
|
+ g_free(program);
|
|
return;
|
|
}
|
|
|
|
@@ -275,8 +287,6 @@
|
|
webkit_web_view_open(viewer->view, "about:blank");
|
|
debug_print("fancy_clear_viewer\n");
|
|
viewer->to_load = NULL;
|
|
- if(viewer->cur_link)
|
|
- g_free(viewer->cur_link);
|
|
vadj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(viewer->scrollwin));
|
|
vadj->value = 0.0;
|
|
g_signal_emit_by_name(G_OBJECT(vadj), "value-changed", 0);
|
|
@@ -345,12 +355,9 @@
|
|
{
|
|
gtk_label_set_text(GTK_LABEL(viewer->l_link), link);
|
|
if(link) {
|
|
- if (viewer->cur_link) {
|
|
+ if (viewer->cur_link)
|
|
g_free(viewer->cur_link);
|
|
- viewer->cur_link = g_strdup(link);
|
|
- } else {
|
|
- viewer->cur_link = g_strdup(link);
|
|
- }
|
|
+ viewer->cur_link = g_strdup(link);
|
|
}
|
|
}
|
|
|
|
@@ -795,7 +802,7 @@
|
|
|
|
const gchar *plugin_desc(void)
|
|
{
|
|
- return g_strdup_printf("This plugin renders HTML e-mail using the WebKit"
|
|
+ return g_strdup_printf("This plugin renders HTML mail using the WebKit "
|
|
"%d.%d.%d library.", WEBKIT_MAJOR_VERSION,
|
|
WEBKIT_MINOR_VERSION, WEBKIT_MICRO_VERSION);
|
|
}
|