Changeset 654b4976de6e507f77fdc8c3d46df0be62f72890
- Timestamp:
- 01/06/07 23:31:52 (6 years ago)
- Author:
- Philipp Kern <phil@…>
- Parents:
- d0023f642e7bb92e0db9d191d41d41ee7e252e34
- Children:
- 3edaafe4051a0101b29a54b073c06b46e9e71e89
- git-committer:
- Philipp Kern <phil@0x539.de> / 2007-01-06T22:31:52Z+0000
- Message:
-
[project @ Save document was missing in the source]
Original author: Philipp Kern <phil@…>
Date: 2005-04-18 19:21:37+00:00
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r36e69e2
|
r654b497
|
|
| 18 | 18 | |
| 19 | 19 | #include <stdexcept> |
| | 20 | #include <fstream> |
| | 21 | #include <ostream> |
| 20 | 22 | #include <gtkmm/main.h> |
| 21 | 23 | #include <gtkmm/aboutdialog.h> |
| … |
… |
|
| 297 | 299 | void Gobby::Window::on_document_save() |
| 298 | 300 | { |
| | 301 | Widget* page = m_folder.get_nth_page(m_folder.get_current_page() ); |
| | 302 | obby::document& doc = static_cast<Document*>(page)->get_document(); |
| | 303 | |
| 299 | 304 | Gtk::FileChooserDialog dlg(*this, "Save current document", |
| 300 | 305 | Gtk::FILE_CHOOSER_ACTION_SAVE); |
| … |
… |
|
| 304 | 309 | if(dlg.run() == Gtk::RESPONSE_OK) |
| 305 | 310 | { |
| | 311 | std::ofstream stream(dlg.get_filename().c_str() ); |
| | 312 | stream << doc.get_whole_buffer() << std::endl; |
| 306 | 313 | } |
| 307 | 314 | } |