[passepartout] automatically append the filetype extension
- From: Sven Herzberg <herzi src gnome org>
- To: svn-commits-list gnome org
- Subject: [passepartout] automatically append the filetype extension
- Date: Wed, 15 Apr 2009 09:25:14 -0400 (EDT)
commit 9fd2443571ee6694921674389bc91017fc694b4f
Author: Sven Herzberg <herzi lanedo com>
Date: Wed Apr 15 15:11:56 2009 +0200
automatically append the filetype extension
* src/pptout/window.cc: as we currently don't properly save documents with
a proper namespace declaration (which is needed for the xml-based file type
detection, we need to apply the extension ".pp" to every file that doesn't
already have it)
---
src/pptout/window.cc | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/pptout/window.cc b/src/pptout/window.cc
index dc8ed16..7e4d7ef 100644
--- a/src/pptout/window.cc
+++ b/src/pptout/window.cc
@@ -275,7 +275,11 @@ void FrameWindow::save_dialog_done() {
DocMeta document = document_view.get_document_meta();
if(!save_dialog->was_cancelled() && document) {
- const std::string filename = save_dialog->get_filename();
+ std::string filename = save_dialog->get_filename();
+ if (!g_str_has_suffix (filename.c_str(), ".pp"))
+ {
+ filename += ".pp";
+ }
document.set_filename(filename);
document->save(filename);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]