Changeset 092ccc37a6a943df09a8a3b83fa16f22cfed9c63
- Timestamp:
- 08/25/08 00:08:47 (5 years ago)
- Parents:
- 3bb736dc8aaca0b06ecd8cd17b594c34c828759e
- Children:
- e17f0d1480360907f999c68409c415c8022f259f
- git-committer:
- Armin Burgmeier <armin@arbur.net> / 2008-08-25T00:08:47Z+0200
- Files:
-
- 8 added
- 22 modified
-
ChangeLog (modified) (1 diff)
-
TODO (modified) (1 diff)
-
inc/commands/Makefile.am (modified) (1 diff)
-
inc/commands/browser-context-commands.hpp (added)
-
inc/core/Makefile.am (modified) (1 diff)
-
inc/core/browser.hpp (modified) (1 diff)
-
inc/core/nodewatch.hpp (added)
-
inc/dialogs/Makefile.am (modified) (1 diff)
-
inc/dialogs/entrydialog.hpp (added)
-
inc/operations/Makefile.am (modified) (1 diff)
-
inc/operations/operation-delete.hpp (added)
-
inc/operations/operation-new.hpp (modified) (2 diffs)
-
inc/operations/operations.hpp (modified) (2 diffs)
-
inc/window.hpp (modified) (2 diffs)
-
src/commands/Makefile.am (modified) (1 diff)
-
src/commands/browser-context-commands.cpp (added)
-
src/core/Makefile.am (modified) (1 diff)
-
src/core/browser.cpp (modified) (1 diff)
-
src/core/documentinfostorage.cpp (modified) (1 diff)
-
src/core/nodewatch.cpp (added)
-
src/dialogs/Makefile.am (modified) (1 diff)
-
src/dialogs/documentlocationdialog.cpp (modified) (3 diffs)
-
src/dialogs/entrydialog.cpp (added)
-
src/dialogs/finddialog.cpp (modified) (2 diffs)
-
src/dialogs/gotodialog.cpp (modified) (2 diffs)
-
src/operations/Makefile.am (modified) (1 diff)
-
src/operations/operation-delete.cpp (added)
-
src/operations/operation-new.cpp (modified) (3 diffs)
-
src/operations/operations.cpp (modified) (3 diffs)
-
src/window.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r3bb736dc r092ccc3 1 2008-08-24 Armin Burgmeier <armin@arbur.net> 2 3 * inc/core/nodewatch.hpp: 4 * src/core/nodewatch.cpp: Added a class that watches a node in a 5 InfcBrowser and emits a signal when it is removed. 6 7 * inc/dialogs/entrydialog.hpp: 8 * src/dialogs/entrydialog.cpp: Added a class that shows a dialog with 9 an entry, to prompt the user for a string to enter. 10 11 * inc/operations/operation-delete.hpp: 12 * src/operations/operation-delete.cpp: Added an operation that deletes 13 a node. 14 15 * inc/core/browser.hpp: 16 * src/core/browser.cpp: Added get_view(). 17 18 * inc/operations/operation-new.hpp: 19 * src/operations/operation-new.cpp: Allow this to create a directory, 20 via a boolean parameter. 21 22 * inc/operations/operations.hpp: 23 * src/operations/operations.cpp: Added delete_node() and 24 create_directory(). 25 26 * src/core/documentinfostorage.cpp (on_node_removed): Don't require 27 the removed node to be in our map. 28 29 * inc/commands/browser-context-commands.hpp: 30 * src/commands/browser-context-commands.cpp: Added a class that shows 31 a context menu for the left browser pane, allowing the user to create 32 or remove nodes. 33 34 * inc/window.hpp: 35 * src/window.cpp: Instantiate a BrowserContextCommands object. 36 37 * inc/core/Makefile.am: 38 * inc/dialogs/Makefile.am: 39 * inc/operations/Makefile.am: 40 * inc/commands/Makefile.am: 41 * src/core/Makefile.am: 42 * src/dialogs/Makefile.am: 43 * src/operations/Makefile.am: 44 * src/commands/Makefile.am: Added the new files to the build. 45 1 46 2008-08-24 Armin Burgmeier <armin@arbur.net> 2 47 -
TODO
rcfeaba1 r092ccc3 7 7 - ^W should close the window 8 8 - Remove references to doclist, userlist and chat in the icon manager 9 - Implement esingle instance, probably using GtkUnique9 - Implement single instance, probably using GtkUnique 10 10 - Implement self-hosting, this also requires showing and handling directories 11 11 in InfGtkBrowserModel/Store 12 12 - Sort BrowserModel in Left pane and DocumentLocationDialog 13 13 - Add remove and add directory operations to Operations 14 - Add context menu to browser in left pane15 14 - Add user list to DocWindows. 16 15 - Add close buttons to browser in left pane, user lists and docwindow infos, 17 16 and a way to re-show the former two. 17 - hue-only color selector 18 18 19 19 These things need to be implemented in infinote, but again would be nice -
inc/commands/Makefile.am
rcd63729 r092ccc3 2 2 noinst_HEADERS = \ 3 3 browser-commands.hpp \ 4 browser-context-commands.hpp \ 4 5 edit-commands.hpp \ 5 6 file-commands.hpp \ -
inc/core/Makefile.am
r3bb736dc r092ccc3 9 9 header.hpp \ 10 10 iconmanager.hpp \ 11 nodewatch.hpp \ 11 12 noteplugin.hpp \ 12 13 preferences.hpp \ -
inc/core/browser.hpp
rcfeaba1 r092ccc3 66 66 } 67 67 68 InfGtkBrowserView* get_view() { return m_browser_view; } 69 68 70 bool get_selected(InfcBrowser** browser, InfcBrowserIter* iter); 69 71 void set_selected(InfcBrowser* browser, InfcBrowserIter* iter); -
inc/dialogs/Makefile.am
rdddf956 r092ccc3 1 1 noinst_HEADERS = \ 2 2 documentlocationdialog.hpp \ 3 entrydialog.hpp \ 3 4 finddialog.hpp \ 4 5 gotodialog.hpp \ -
inc/operations/Makefile.am
re321deb r092ccc3 2 2 noinst_HEADERS = \ 3 3 operations.hpp \ 4 operation-delete.hpp \ 4 5 operation-new.hpp \ 5 6 operation-open.hpp \ -
inc/operations/operation-new.hpp
r91aa9b2 r092ccc3 29 29 public: 30 30 OperationNew(Operations& operations, InfcBrowser* browser, 31 InfcBrowserIter* parent, const Glib::ustring& name); 31 InfcBrowserIter* parent, const Glib::ustring& name, 32 bool directory); 32 33 33 34 virtual ~OperationNew(); … … 57 58 protected: 58 59 Glib::ustring m_name; 60 bool m_directory; 59 61 InfcNodeRequest* m_request; 60 62 gulong m_finished_id; -
inc/operations/operations.hpp
re321deb r092ccc3 61 61 ~Operations(); 62 62 63 void create_d ocument(InfcBrowser* browser,64 InfcBrowserIter* parent,65 const Glib::ustringname);63 void create_directory(InfcBrowser* browser, 64 InfcBrowserIter* parent, 65 const Glib::ustring& name); 66 66 67 67 void create_document(InfcBrowser* browser, 68 68 InfcBrowserIter* parent, 69 const Glib::ustring name, 70 Preferences& preferences, 69 const Glib::ustring& name); 70 71 void create_document(InfcBrowser* browser, 72 InfcBrowserIter* parent, 73 const Glib::ustring& name, 74 const Preferences& preferences, 71 75 const Glib::ustring& from_uri, 72 76 const char* encoding); … … 77 81 const std::string& encoding, 78 82 DocumentInfoStorage::EolStyle eol_style); 83 84 void delete_node(InfcBrowser* browser, 85 InfcBrowserIter* iter); 79 86 80 87 protected: -
inc/window.hpp
r3bb736dc r092ccc3 24 24 25 25 #include "commands/browser-commands.hpp" 26 #include "commands/browser-context-commands.hpp" 26 27 #include "commands/file-commands.hpp" 27 28 #include "commands/edit-commands.hpp" … … 93 94 94 95 BrowserCommands m_commands_browser; 96 BrowserContextCommands m_commands_browser_context; 95 97 FileCommands m_commands_file; 96 98 EditCommands m_commands_edit; -
src/commands/Makefile.am
rcd63729 r092ccc3 3 3 libgobby_commands_a_SOURCES = \ 4 4 browser-commands.cpp \ 5 browser-context-commands.cpp \ 5 6 edit-commands.cpp \ 6 7 file-commands.cpp \ -
src/core/Makefile.am
r3bb736dc r092ccc3 10 10 header.cpp \ 11 11 iconmanager.cpp \ 12 nodewatch.cpp \ 12 13 noteplugin.cpp \ 13 14 preferences.cpp \ -
src/core/browser.cpp
rcfeaba1 r092ccc3 283 283 GTK_TREE_MODEL(m_browser_store), &tree_iter, 284 284 INF_GTK_BROWSER_MODEL_COL_BROWSER, &tmp_browser, 285 INF_GTK_BROWSER_MODEL_COL_NODE, &tmp_iter, -1); 285 -1); 286 287 if(tmp_browser == NULL) 288 return false; 289 290 gtk_tree_model_get( 291 GTK_TREE_MODEL(m_browser_store), &tree_iter, 292 INF_GTK_BROWSER_MODEL_COL_NODE, &tmp_iter, 293 -1); 286 294 287 295 *browser = tmp_browser; -
src/core/documentinfostorage.cpp
re321deb r092ccc3 319 319 std::string key = get_key(browser, iter); 320 320 InfoMap::iterator map_iter = m_infos.find(key); 321 g_assert(map_iter != m_infos.end()); 322 m_infos.erase(map_iter); 323 } 324 321 322 if(map_iter != m_infos.end()) 323 m_infos.erase(map_iter); 324 } 325 -
src/dialogs/Makefile.am
rdddf956 r092ccc3 3 3 libgobby_dialogs_a_SOURCES = \ 4 4 documentlocationdialog.cpp \ 5 entrydialog.cpp \ 5 6 finddialog.cpp \ 6 7 gotodialog.cpp \ -
src/dialogs/documentlocationdialog.cpp
rda28543 r092ccc3 35 35 Gobby::DocumentLocationDialog::DocumentLocationDialog(Gtk::Window& parent, 36 36 InfGtkBrowserModel* m): 37 Gtk::Dialog(_("Select document's target location"), parent), 37 38 m_table(3, 2), m_name_label(_("Document Name:"), Gtk::ALIGN_RIGHT), 38 39 m_location_label( … … 62 63 Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND); 63 64 m_table.set_spacings(6); 64 m_table.set_border_width(12);65 65 m_table.show(); 66 66 … … 86 86 set_default_response(Gtk::RESPONSE_ACCEPT); 87 87 set_default_size(-1, 480); 88 set_ title(_("Select document's target location"));88 set_border_width(12); 89 89 } 90 90 -
src/dialogs/finddialog.cpp
r8d53871 r092ccc3 87 87 m_box_main.pack_start(m_check_wrap_around, Gtk::PACK_SHRINK); 88 88 m_box_main.set_spacing(12); 89 m_box_main.set_border_width(12);90 89 m_box_main.show(); 91 90 … … 97 96 sigc::mem_fun(*this, &FindDialog::on_replace_text_changed)); 98 97 98 set_border_width(12); 99 99 set_resizable(false); 100 100 -
src/dialogs/gotodialog.cpp
r8d53871 r092ccc3 43 43 Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK); 44 44 m_table.set_spacings(12); 45 m_table.set_border_width(12);46 45 m_table.show(); 47 46 … … 59 58 60 59 set_default_response(Gtk::RESPONSE_ACCEPT); 60 set_border_width(12); 61 61 set_resizable(false); 62 62 -
src/operations/Makefile.am
re321deb r092ccc3 3 3 libgobby_operations_a_SOURCES = \ 4 4 operations.cpp \ 5 operation-delete.cpp \ 5 6 operation-new.cpp \ 6 7 operation-open.cpp \ -
src/operations/operation-new.cpp
rd685cc7 r092ccc3 25 25 InfcBrowser* browser, 26 26 InfcBrowserIter* parent, 27 const Glib::ustring& name): 28 Operation(operations), m_name(name) 27 const Glib::ustring& name, 28 bool directory): 29 Operation(operations), m_name(name), m_directory(directory) 29 30 { 30 // TODO: Use TRUE here as soon as BrowserCommands handles it 31 m_request = infc_browser_add_note(browser, parent, name.c_str(), 32 Plugins::TEXT, TRUE); 31 if(directory) 32 { 33 m_request = infc_browser_add_subdirectory(browser, parent, 34 name.c_str()); 35 } 36 else 37 { 38 m_request = infc_browser_add_note(browser, parent, 39 name.c_str(), Plugins::TEXT, 40 TRUE); 41 } 42 33 43 // Note infc_browser_add_note does not return a 34 44 // new reference. … … 44 54 m_message_handle = get_status_bar().add_message( 45 55 StatusBar::INFO, 46 Glib::ustring::compose(_("Creating document %1âŠ"), name), 0); 56 Glib::ustring::compose( 57 directory ? _("Creating directory %1âŠ") 58 : _("Creating document %1âŠ"), name), 0); 47 59 } 48 60 … … 60 72 get_status_bar().add_message( 61 73 StatusBar::ERROR, 62 Glib::ustring::compose(_("Failed to create document %1: %2"), 63 m_name, error->message), 5); 74 Glib::ustring::compose( 75 m_directory ? _("Failed to create directory %1: %2") 76 : _("Failed to create document %1: %2"), 77 m_name, error->message), 5); 64 78 65 79 remove(); -
src/operations/operations.cpp
re321deb r092ccc3 20 20 #include "operations/operation-open.hpp" 21 21 #include "operations/operation-save.hpp" 22 #include "operations/operation-delete.hpp" 22 23 #include "operations/operations.hpp" 23 24 … … 42 43 } 43 44 44 void Gobby::Operations::create_d ocument(InfcBrowser* browser,45 InfcBrowserIter* parent,46 const Glib::ustringname)45 void Gobby::Operations::create_directory(InfcBrowser* browser, 46 InfcBrowserIter* parent, 47 const Glib::ustring& name) 47 48 { 48 m_operations.insert(new OperationNew(*this, browser, parent, name)); 49 m_operations.insert(new OperationNew(*this, browser, parent, 50 name, true)); 49 51 } 50 52 51 53 void Gobby::Operations::create_document(InfcBrowser* browser, 52 54 InfcBrowserIter* parent, 53 const Glib::ustring name, 54 Preferences& preferences, 55 const Glib::ustring& name) 56 { 57 m_operations.insert(new OperationNew(*this, browser, parent, 58 name, false)); 59 } 60 61 void Gobby::Operations::create_document(InfcBrowser* browser, 62 InfcBrowserIter* parent, 63 const Glib::ustring& name, 64 const Preferences& preferences, 55 65 const Glib::ustring& from_uri, 56 66 const char* encoding) … … 72 82 } 73 83 84 void Gobby::Operations::delete_node(InfcBrowser* browser, 85 InfcBrowserIter* iter) 86 { 87 m_operations.insert(new OperationDelete(*this, browser, iter)); 88 } 89 74 90 void Gobby::Operations::remove_operation(Operation* operation) 75 91 { -
src/window.cpp
r3bb736dc r092ccc3 35 35 m_commands_browser(m_browser, m_folder, m_info_storage, m_statusbar, 36 36 m_preferences), 37 m_commands_browser_context(*this, m_browser, m_file_chooser, 38 m_operations, m_preferences), 37 39 m_commands_file(*this, m_header, m_browser, m_folder, m_file_chooser, 38 40 m_operations, m_info_storage, m_preferences),
