Changeset 9541de7ae0dda530e7389c81d49f038995f662f2
- Timestamp:
- 01/06/07 23:46:22 (6 years ago)
- Author:
- Philipp Kern <phil@…>
- Parents:
- fe536413af36297bc864a494c9f55f7cf7545560
- Children:
- 5a6f44aa59c175c482fe4c59c764377531364996
- git-committer:
- Philipp Kern <phil@0x539.de> / 2007-01-06T22:46:22Z+0000
- Message:
-
[project @ Allow to open documents as unowned text, thanks to Ben Levitt [fixes #52]]
Original author: Philipp Kern <phil@…>
Date: 2005-08-05 21:14:50+00:00
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r3d3692a
|
r9541de7
|
|
| 106 | 106 | void apply_preferences(); |
| 107 | 107 | void update_title_bar(const Document& doc); |
| 108 | | void open_local_file(const Glib::ustring& file); |
| | 108 | void open_local_file(const Glib::ustring& file, |
| | 109 | bool open_as_edited = 0); |
| 109 | 110 | void save_local_file(Document& doc, const Glib::ustring& file); |
| 110 | 111 | void close_document(DocWindow& doc); |
-
|
rf121394
|
r9541de7
|
|
| 418 | 418 | dlg.set_current_folder(m_last_path); |
| 419 | 419 | |
| | 420 | // Create open_as_edited toggle |
| | 421 | Gtk::CheckButton open_as_edited_check_button( |
| | 422 | _("Hilight documents to appear written by you") ); |
| | 423 | dlg.get_vbox()->pack_start(open_as_edited_check_button, |
| | 424 | Gtk::PACK_SHRINK); |
| | 425 | open_as_edited_check_button.show(); |
| | 426 | |
| 420 | 427 | // Create buttons to close it |
| 421 | 428 | dlg.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); |
| … |
… |
|
| 435 | 442 | iter != list.end(); |
| 436 | 443 | ++ iter) |
| 437 | | open_local_file(*iter); |
| | 444 | open_local_file(*iter, |
| | 445 | open_as_edited_check_button.get_active() ); |
| 438 | 446 | } |
| 439 | 447 | } |
| … |
… |
|
| 823 | 831 | } |
| 824 | 832 | |
| 825 | | void Gobby::Window::open_local_file(const Glib::ustring& file) |
| | 833 | void Gobby::Window::open_local_file(const Glib::ustring& file, |
| | 834 | bool open_as_edited) |
| 826 | 835 | { |
| 827 | 836 | try |
| … |
… |
|
| 834 | 843 | m_buffer->create_document( |
| 835 | 844 | Glib::path_get_basename(file), |
| 836 | | convert_to_utf8(Glib::file_get_contents(file)) |
| | 845 | convert_to_utf8(Glib::file_get_contents(file)), |
| | 846 | open_as_edited |
| 837 | 847 | ); |
| 838 | 848 | } |