Changeset 91aa9b20f84f5db304446175b7e75cccb2f4bab7
- Timestamp:
- 05/19/08 20:04:09 (5 years ago)
- Author:
- Armin Burgmeier <armin@…>
- Parents:
- b599f99746558fdac9692feab4e0c140f9b9febd
- Children:
- 883ac1c0c36c0f5370a1dcb4bcde33f4b72c0a7f
- git-committer:
- Armin Burgmeier <armin@arbur.net> / 2008-05-19T20:04:09Z+0200
- Message:
-
Added operations class, and OperationNew? as a first operation
2008-05-19 Armin Burgmeier <armin@…>
- inc/Makefile.am:
- inc/operations/Makefile.am:
- inc/operations/operation-new.hpp:
- inc/operations/operations.hpp:
- src/Makefile.am:
- src/operations/Makefile.am:
- src/operations/operation-new.cpp:
- src/operations/operations.cpp: Added Operation subsystem, handling
tracking of asynchronous operations.
- inc/commands/file-commands.hpp:
- src/commands/file-commands.cpp: Make use of OperationNew? to create
new documents.
- inc/window.hpp:
- src/window.cpp: Instantate an Operations object, pass to
FileCommands?.
- configure.ac:
- Makefile.am: Create new makefiles, link libgobby-operations.h.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rb599f99
|
r91aa9b2
|
|
| | 1 | 2008-05-19 Armin Burgmeier <armin@0x539.de> |
| | 2 | |
| | 3 | * inc/Makefile.am: |
| | 4 | * inc/operations/Makefile.am: |
| | 5 | * inc/operations/operation-new.hpp: |
| | 6 | * inc/operations/operations.hpp: |
| | 7 | * src/Makefile.am: |
| | 8 | * src/operations/Makefile.am: |
| | 9 | * src/operations/operation-new.cpp: |
| | 10 | * src/operations/operations.cpp: Added Operation subsystem, handling |
| | 11 | tracking of asynchronous operations. |
| | 12 | |
| | 13 | * inc/commands/file-commands.hpp: |
| | 14 | * src/commands/file-commands.cpp: Make use of OperationNew to create |
| | 15 | new documents. |
| | 16 | |
| | 17 | * inc/window.hpp: |
| | 18 | * src/window.cpp: Instantate an Operations object, pass to |
| | 19 | FileCommands. |
| | 20 | |
| | 21 | * configure.ac: |
| | 22 | * Makefile.am: Create new makefiles, link libgobby-operations.h. |
| | 23 | |
| 1 | 24 | 2008-05-18 Armin Burgmeier <armin@0x539.de> |
| 2 | 25 | |
-
|
rdddf956
|
r91aa9b2
|
|
| 11 | 11 | src/libgobby.a \ |
| 12 | 12 | src/commands/libgobby-commands.a \ |
| | 13 | src/operations/libgobby-operations.a \ |
| 13 | 14 | src/dialogs/libgobby-dialogs.a \ |
| 14 | 15 | src/core/libgobby-core.a \ |
-
|
rdddf956
|
r91aa9b2
|
|
| 75 | 75 | inc/core/Makefile |
| 76 | 76 | inc/dialogs/Makefile |
| | 77 | inc/operations/Makefile |
| 77 | 78 | inc/commands/Makefile |
| 78 | 79 | src/Makefile |
| … |
… |
|
| 80 | 81 | src/core/Makefile |
| 81 | 82 | src/dialogs/Makefile |
| | 83 | src/operations/Makefile |
| 82 | 84 | src/commands/Makefile |
| 83 | 85 | |
-
|
rdddf956
|
r91aa9b2
|
|
| 1 | | SUBDIRS = util core dialogs commands |
| | 1 | SUBDIRS = util core dialogs operations commands |
| 2 | 2 | |
| 3 | 3 | noinst_HEADERS = \ |
-
|
rdddf956
|
r91aa9b2
|
|
| 20 | 20 | #define _GOBBY_FILE_COMMANDS_HPP_ |
| 21 | 21 | |
| | 22 | #include "operations/operations.hpp" |
| 22 | 23 | #include "dialogs/documentlocationdialog.hpp" |
| 23 | 24 | #include "core/header.hpp" |
| … |
… |
|
| 35 | 36 | FileCommands(Gtk::Window& parent, Header& header, |
| 36 | 37 | const Browser& browser, Folder& folder, |
| 37 | | StatusBar& status_bar); |
| | 38 | Operations& operations); |
| 38 | 39 | |
| 39 | 40 | protected: |
| … |
… |
|
| 44 | 45 | const Browser& m_browser; |
| 45 | 46 | Folder& m_folder; |
| 46 | | StatusBar& m_status_bar; |
| | 47 | Operations& m_operations; |
| 47 | 48 | |
| 48 | 49 | std::auto_ptr<DocumentLocationDialog> m_location_dialog; |
-
|
rdddf956
|
r91aa9b2
|
|
| 25 | 25 | #include "commands/browser-commands.hpp" |
| 26 | 26 | #include "commands/file-commands.hpp" |
| | 27 | #include "operations/operations.hpp" |
| 27 | 28 | |
| 28 | | #include "dialogs/finddialog.hpp" |
| | 29 | /*#include "dialogs/finddialog.hpp" |
| 29 | 30 | #include "dialogs/gotodialog.hpp" |
| 30 | | #include "dialogs/preferencesdialog.hpp" |
| | 31 | #include "dialogs/preferencesdialog.hpp"*/ |
| 31 | 32 | #include "dialogs/initialdialog.hpp" |
| 32 | 33 | |
| … |
… |
|
| 87 | 88 | Browser m_browser; |
| 88 | 89 | |
| | 90 | // Functionality |
| | 91 | Operations m_operations; |
| | 92 | |
| 89 | 93 | BrowserCommands m_commands_browser; |
| 90 | 94 | FileCommands m_commands_file; |
| … |
… |
|
| 96 | 100 | // Dialogs |
| 97 | 101 | std::auto_ptr<InitialDialog> m_initial_dlg; |
| 98 | | std::auto_ptr<PreferencesDialog> m_preferences_dlg; |
| | 102 | /* std::auto_ptr<PreferencesDialog> m_preferences_dlg; |
| 99 | 103 | std::auto_ptr<FindDialog> m_finddialog; |
| 100 | | std::auto_ptr<GotoDialog> m_gotodialog; |
| | 104 | std::auto_ptr<GotoDialog> m_gotodialog;*/ |
| 101 | 105 | }; |
| 102 | 106 | |
-
|
rdddf956
|
r91aa9b2
|
|
| 1 | | SUBDIRS = util core dialogs commands |
| | 1 | SUBDIRS = util core dialogs operations commands |
| 2 | 2 | |
| 3 | 3 | noinst_LIBRARIES = libgobby.a |
| … |
… |
|
| 15 | 15 | -DAPPICON_DIR=\""$(appicondir)"\" \ |
| 16 | 16 | -DPIXMAPS_DIR=\""$(pixmapdir)"\" |
| 17 | | |
| 18 | | # We need to link all libraries directly into the executable in the toplevel |
| 19 | | # Makefile.am: |
| 20 | | #libgobby_a_LIBADD = commands/libgobby-commands.a |
-
|
rb599f99
|
r91aa9b2
|
|
| 22 | 22 | Gobby::FileCommands::FileCommands(Gtk::Window& parent, Header& header, |
| 23 | 23 | const Browser& browser, Folder& folder, |
| 24 | | StatusBar& status_bar): |
| | 24 | Operations& operations): |
| 25 | 25 | m_parent(parent), m_browser(browser), m_folder(folder), |
| 26 | | m_status_bar(status_bar) |
| | 26 | m_operations(operations) |
| 27 | 27 | { |
| 28 | 28 | header.action_file_new->signal_activate().connect( |
| … |
… |
|
| 59 | 59 | g_assert(browser != NULL); |
| 60 | 60 | |
| 61 | | Glib::ustring str(m_location_dialog->get_document_name()); |
| 62 | | |
| 63 | | // TODO: Use FileOperations here |
| 64 | | InfcNodeRequest* request = infc_browser_add_note( |
| 65 | | browser, &iter, str.c_str(), |
| 66 | | infc_browser_lookup_plugin(browser, "InfText"), |
| 67 | | FALSE); |
| 68 | | |
| 69 | | // TODO: Info in statusbar, map, etc. |
| | 61 | m_operations.create_document( |
| | 62 | browser, &iter, |
| | 63 | m_location_dialog->get_document_name()); |
| 70 | 64 | } |
| 71 | 65 | |
-
|
rb599f99
|
r91aa9b2
|
|
| 31 | 31 | m_statusbar(m_folder), |
| 32 | 32 | m_browser(*this, Plugins::TEXT, m_statusbar, m_preferences), |
| | 33 | m_operations(m_statusbar), |
| 33 | 34 | m_commands_browser(m_browser, m_folder, m_statusbar, m_preferences), |
| 34 | | m_commands_file(*this, m_header, m_browser, m_folder, m_statusbar) |
| | 35 | m_commands_file(*this, m_header, m_browser, m_folder, m_operations) |
| 35 | 36 | { |
| 36 | 37 | m_header.show(); |