projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gui: Make File|Recent Files remember the correct encoding.
[pspp-builds.git]
/
src
/
ui
/
gui
/
psppire-syntax-window.c
diff --git
a/src/ui/gui/psppire-syntax-window.c
b/src/ui/gui/psppire-syntax-window.c
index 7459a41d562046583001ae250c4396d0aec90f66..b117825f752f8e7e074ac2f179651733533cd2c9 100644
(file)
--- a/
src/ui/gui/psppire-syntax-window.c
+++ b/
src/ui/gui/psppire-syntax-window.c
@@
-867,6
+867,7
@@
syntax_load (PsppireWindow *window, const gchar *filename)
GtkTextIter iter;
PsppireSyntaxWindow *sw = PSPPIRE_SYNTAX_WINDOW (window);
gchar *encoding;
GtkTextIter iter;
PsppireSyntaxWindow *sw = PSPPIRE_SYNTAX_WINDOW (window);
gchar *encoding;
+ char *mime_type;
/* FIXME: What if it's a very big file ? */
if ( ! g_file_get_contents (filename, &text_locale, &len_locale, &err) )
/* FIXME: What if it's a very big file ? */
if ( ! g_file_get_contents (filename, &text_locale, &len_locale, &err) )
@@
-897,6
+898,10
@@
syntax_load (PsppireWindow *window, const gchar *filename)
free (text_utf8);
free (text_utf8);
+ mime_type = xasprintf ("text/x-spss-syntax; charset=%s", sw->encoding);
+ add_most_recent (filename, mime_type);
+ free (mime_type);
+
return TRUE;
}
return TRUE;
}