Changeset 91aa9b20f84f5db304446175b7e75cccb2f4bab7

Show
Ignore:
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:
6 added
9 modified

Legend:

Unmodified
Added
Removed
  • ChangeLog

    rb599f99 r91aa9b2  
     12008-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 
    1242008-05-18  Armin Burgmeier  <armin@0x539.de> 
    225 
  • Makefile.am

    rdddf956 r91aa9b2  
    1111        src/libgobby.a \ 
    1212        src/commands/libgobby-commands.a \ 
     13        src/operations/libgobby-operations.a \ 
    1314        src/dialogs/libgobby-dialogs.a \ 
    1415        src/core/libgobby-core.a \ 
  • configure.ac

    rdddf956 r91aa9b2  
    7575                        inc/core/Makefile 
    7676                        inc/dialogs/Makefile 
     77                        inc/operations/Makefile 
    7778                        inc/commands/Makefile 
    7879                src/Makefile 
     
    8081                        src/core/Makefile 
    8182                        src/dialogs/Makefile 
     83                        src/operations/Makefile 
    8284                        src/commands/Makefile 
    8385 
  • inc/Makefile.am

    rdddf956 r91aa9b2  
    1 SUBDIRS = util core dialogs commands 
     1SUBDIRS = util core dialogs operations commands 
    22 
    33noinst_HEADERS = \ 
  • inc/commands/file-commands.hpp

    rdddf956 r91aa9b2  
    2020#define _GOBBY_FILE_COMMANDS_HPP_ 
    2121 
     22#include "operations/operations.hpp" 
    2223#include "dialogs/documentlocationdialog.hpp" 
    2324#include "core/header.hpp" 
     
    3536        FileCommands(Gtk::Window& parent, Header& header, 
    3637                     const Browser& browser, Folder& folder, 
    37                      StatusBar& status_bar); 
     38                     Operations& operations); 
    3839 
    3940protected: 
     
    4445        const Browser& m_browser; 
    4546        Folder& m_folder; 
    46         StatusBar& m_status_bar; 
     47        Operations& m_operations; 
    4748 
    4849        std::auto_ptr<DocumentLocationDialog> m_location_dialog; 
  • inc/window.hpp

    rdddf956 r91aa9b2  
    2525#include "commands/browser-commands.hpp" 
    2626#include "commands/file-commands.hpp" 
     27#include "operations/operations.hpp" 
    2728 
    28 #include "dialogs/finddialog.hpp" 
     29/*#include "dialogs/finddialog.hpp" 
    2930#include "dialogs/gotodialog.hpp" 
    30 #include "dialogs/preferencesdialog.hpp" 
     31#include "dialogs/preferencesdialog.hpp"*/ 
    3132#include "dialogs/initialdialog.hpp" 
    3233 
     
    8788        Browser m_browser; 
    8889 
     90        // Functionality 
     91        Operations m_operations; 
     92 
    8993        BrowserCommands m_commands_browser; 
    9094        FileCommands m_commands_file; 
     
    96100        // Dialogs 
    97101        std::auto_ptr<InitialDialog> m_initial_dlg; 
    98         std::auto_ptr<PreferencesDialog> m_preferences_dlg; 
     102/*      std::auto_ptr<PreferencesDialog> m_preferences_dlg; 
    99103        std::auto_ptr<FindDialog> m_finddialog; 
    100         std::auto_ptr<GotoDialog> m_gotodialog; 
     104        std::auto_ptr<GotoDialog> m_gotodialog;*/ 
    101105}; 
    102106 
  • src/Makefile.am

    rdddf956 r91aa9b2  
    1 SUBDIRS = util core dialogs commands 
     1SUBDIRS = util core dialogs operations commands 
    22 
    33noinst_LIBRARIES = libgobby.a 
     
    1515                      -DAPPICON_DIR=\""$(appicondir)"\" \ 
    1616                      -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 
  • src/commands/file-commands.cpp

    rb599f99 r91aa9b2  
    2222Gobby::FileCommands::FileCommands(Gtk::Window& parent, Header& header, 
    2323                                  const Browser& browser, Folder& folder, 
    24                                   StatusBar& status_bar): 
     24                                  Operations& operations): 
    2525        m_parent(parent), m_browser(browser), m_folder(folder), 
    26         m_status_bar(status_bar) 
     26        m_operations(operations) 
    2727{ 
    2828        header.action_file_new->signal_activate().connect( 
     
    5959                g_assert(browser != NULL); 
    6060 
    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()); 
    7064        } 
    7165 
  • src/window.cpp

    rb599f99 r91aa9b2  
    3131        m_statusbar(m_folder), 
    3232        m_browser(*this, Plugins::TEXT, m_statusbar, m_preferences), 
     33        m_operations(m_statusbar),  
    3334        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) 
    3536{ 
    3637        m_header.show();