Show
Ignore:
Timestamp:
04/12/08 16:58:39 (5 years ago)
Author:
Armin Burgmeier <armin@…>
Parents:
b464e34a10c0c8d04d40e60feccf21292deff7af
Children:
36fa5fe45a5f19487d82bff9bb2c33e39175041a
git-committer:
Armin Burgmeier <armin@arbur.net> / 2008-04-12T16:58:39Z+0200
Message:

Changed Folder and DocWindow? to be used with infinote instead of obby

2008-04-12 Armin Burgmeier <armin@…>

  • src/preferences.cpp: Changed default value for homeend_smart to false.
  • inc/resolv.hpp:
  • src/resolv.cpp: Changed signature of callbacks to include the ResolvHandle?.
  • inc/browser.hpp:
  • src/browser.cpp: Added resolv map to correctly cancel pending resolvs on destruction.
  • inc/statusbar.hpp:
  • src/statusbar.cpp: Correctly remove the timeout connection on destruction of a statusbar message.
  • inc/folder.hpp:
  • inc/docwindow.hpp:
  • src/folder.cpp:
  • src/docwindow.cpp: Changed Folder and DocWindow? to be used with InfTextSession? instead of obby::local_document_info.
  • inc/window.hpp:
  • src/finddialog.cpp:
  • src/gotodialog.cpp:
  • src/window.cpp: Adapted to Folder and DocWindow? changes.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/window.cpp

    rb464e34 r6eef44e  
    5757                    InfXmlConnection* sync_connection) 
    5858        { 
    59                 GtkTextBuffer* textbuffer = gtk_text_buffer_new(NULL); 
     59                GtkSourceBuffer* textbuffer = gtk_source_buffer_new(NULL); 
    6060                InfUserTable* user_table = inf_user_table_new(); 
    6161                InfTextGtkBuffer* buffer = 
    62                         inf_text_gtk_buffer_new(textbuffer, user_table); 
     62                        inf_text_gtk_buffer_new(GTK_TEXT_BUFFER(textbuffer), 
     63                                                user_table); 
    6364                InfTextSession* session = 
    6465                        inf_text_session_new_with_user_table( 
     
    8283        m_document_settings(*this), 
    8384        m_header(m_preferences, m_lang_manager), 
    84         m_folder(m_header, m_preferences, m_lang_manager), 
     85        m_folder(m_preferences, m_lang_manager), 
    8586        m_statusbar(m_folder), 
    8687        m_browser(*this, &TEXT_PLUGIN, m_statusbar, m_preferences) 
     
    138139        m_browser.show(); 
    139140 
     141#if 0 
    140142        // Folder 
    141143        m_folder.document_add_event().connect( 
     
    147149        m_folder.tab_switched_event().connect( 
    148150                sigc::mem_fun(*this, &Window::on_folder_tab_switched) ); 
    149  
     151#endif 
    150152        // Settings 
    151153        m_document_settings.document_insert_event().connect( 
     
    317319 
    318320        // Delegate start of obby session 
    319         m_folder.obby_start(*m_buffer); 
    320321        m_document_settings.obby_start(*m_buffer); 
    321322 
     
    390391 
    391392        // Tell GUI components that the session ended 
    392         m_folder.obby_end(); 
    393393        m_document_settings.obby_end(); 
    394394 
     
    539539} 
    540540 
     541#if 0 
    541542void Gobby::Window::on_folder_document_add(DocWindow& window) 
    542543{ 
     
    600601        update_title_bar(); 
    601602} 
     603#endif 
    602604 
    603605void Gobby::Window::on_settings_document_insert(LocalDocumentInfo& info) 
     
    703705                ); 
    704706        } 
    705  
     707#if 0 
    706708        // Is there already a path for this document? 
    707709        std::string path = m_document_settings.get_path(doc->get_info() ); 
     
    723725                return handle_document_save_as(); 
    724726        } 
     727#endif 
    725728} 
    726729 
     
    749752        ); 
    750753 
     754#if 0 
    751755        // TODO: Preselect document's encoding 
    752756        dlg.get_selector().set_encoding( 
     
    794798        } 
    795799        return false; 
     800#endif 
    796801} 
    797802 
     
    983988{ 
    984989        // Tell user join to components 
    985         m_folder.obby_user_join(user); 
     990        //m_folder.obby_user_join(user); 
    986991} 
    987992 
     
    989994{ 
    990995        // Tell user part to components 
    991         m_folder.obby_user_part(user); 
     996        //m_folder.obby_user_part(user); 
    992997} 
    993998 
    994999void Gobby::Window::on_obby_user_colour(const obby::user& user) 
    9951000{ 
    996         m_folder.obby_user_colour(user); 
     1001        //m_folder.obby_user_colour(user); 
    9971002} 
    9981003 
     
    10071012                dynamic_cast<LocalDocumentInfo&>(document); 
    10081013 
    1009         m_folder.obby_document_insert(local_doc); 
     1014        //m_folder.obby_document_insert(local_doc); 
    10101015} 
    10111016 
     
    10151020                dynamic_cast<LocalDocumentInfo&>(document); 
    10161021 
    1017         m_folder.obby_document_remove(local_doc); 
     1022        //m_folder.obby_document_remove(local_doc); 
    10181023} 
    10191024 
     
    10691074        const DocWindow& window = *get_current_document(); 
    10701075        // Get title of current document 
    1071         const Glib::ustring& file = window.get_info().get_suffixed_title(); 
     1076        const Glib::ustring& file = window.get_title(); 
    10721077        // Get path of current document 
    1073         Glib::ustring path = m_document_settings.get_path(window.get_info() ); 
     1078        Glib::ustring path;// = m_document_settings.get_path(window.get_info() ); 
    10741079 
    10751080        // Show path in title, if we know it 
     
    10821087 
    10831088                // Set title with file and path 
    1084                 obby::format_string title_str("%0% (%1%) - Gobby"); 
     1089                obby::format_string title_str("%0% (%1%)"); 
    10851090                title_str << file << Glib::path_get_dirname(path); 
    10861091                set_title(title_str.str() ); 
     
    10891094        { 
    10901095                // Path not known: Set title with file only 
    1091                 obby::format_string title_str("%0% - Gobby"); 
     1096                obby::format_string title_str("%0%"); 
    10921097                title_str << file; 
    10931098                set_title(title_str.str() ); 
     
    13031308                                    const std::string& encoding) 
    13041309{ 
     1310#if 0 
    13051311        try 
    13061312        { 
     
    13451351                display_error(e.what() ); 
    13461352        } 
     1353#endif 
    13471354} 
    13481355 
     
    13511358                                    const std::string& encoding) 
    13521359{ 
     1360#if 0 
    13531361        try 
    13541362        { 
     
    13811389                // Unset modifified flag 
    13821390                gtk_text_buffer_set_modified( 
    1383                         GTK_TEXT_BUFFER(doc.get_document().get_buffer()), 
     1391                        GTK_TEXT_BUFFER(doc.get_text_buffer()), 
    13841392                        FALSE); 
    13851393        } 
     
    13921400                display_error(e.what() ); 
    13931401        } 
     1402#endif 
    13941403} 
    13951404 
    13961405void Gobby::Window::close_document(DocWindow& window) 
    13971406{ 
     1407#if 0 
    13981408        /* Cannot unsubscribe when not subscribed (e.g. unsubscription request 
    13991409         * has already been sent. */ 
     
    14771487 
    14781488        window.get_info().unsubscribe(); 
     1489#endif 
    14791490} 
    14801491