Changeset e861d030b244626b06e7d2409ebfb124b466dc59

Show
Ignore:
Timestamp:
10/25/09 16:37:26 (4 years ago)
Author:
Armin Burgmeier <armin@…>
Parents:
e275a84b1e164b543ad6bc2d139b84410e06693b
Children:
d52d8ae14ac8ae79ae2d4c0a1f4c3fbe7a3f441c
git-committer:
Armin Burgmeier <armin@arbur.net> / 2009-10-25T16:37:26Z+0100
Message:

Store path and hostname in DocWindow?

Location:
code
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • code/commands/browser-commands.cpp

    r6b79c69 re861d03  
    290290{ 
    291291        InfSession* session = infc_session_proxy_get_session(proxy); 
     292        gchar* path = infc_browser_iter_get_path(browser, iter); 
     293 
     294        InfGtkBrowserStore* store = m_browser.get_store(); 
     295        GtkTreeIter tree_iter; 
     296        InfcBrowserIter root_iter; 
     297 
     298        infc_browser_iter_get_root(browser, &root_iter); 
     299        inf_gtk_browser_model_browser_iter_to_tree_iter( 
     300                INF_GTK_BROWSER_MODEL(store), browser, 
     301                &root_iter, &tree_iter); 
     302 
     303        gchar* hostname; 
     304        gtk_tree_model_get( 
     305                GTK_TREE_MODEL(store), &tree_iter, 
     306                INF_GTK_BROWSER_MODEL_COL_NAME, &hostname, -1); 
    292307 
    293308        DocWindow& window = m_folder.add_document( 
    294309                INF_TEXT_SESSION(session), 
    295310                infc_browser_iter_get_name(browser, iter), 
     311                path, hostname, 
    296312                m_info_storage.get_key(browser, iter)); 
     313 
     314        g_free(hostname); 
     315        g_free(path); 
    297316 
    298317        // For now we always highlight the newly created session... 
  • code/core/docwindow.cpp

    r6ee38b4 re861d03  
    127127Gobby::DocWindow::DocWindow(InfTextSession* session, 
    128128                            const Glib::ustring& title, 
     129                            const Glib::ustring& path, 
     130                            const Glib::ustring& hostname, 
    129131                            const std::string& info_storage_key, 
    130132                            Preferences& preferences, 
    131133                            GtkSourceLanguageManager* manager): 
    132         m_session(session), m_title(title), 
    133         m_info_storage_key(info_storage_key), m_preferences(preferences), 
     134        m_session(session), m_title(title), m_path(path), 
     135        m_hostname(hostname), m_info_storage_key(info_storage_key), 
     136        m_preferences(preferences), 
    134137        m_view(GTK_SOURCE_VIEW(gtk_source_view_new())), 
    135138        m_userlist(session), m_info_box(false, 0), 
  • code/core/docwindow.hpp

    r6b79c69 re861d03  
    4747 
    4848        DocWindow(InfTextSession* session, const Glib::ustring& title, 
     49                  const Glib::ustring& path, const Glib::ustring& hostname, 
    4950                  const std::string& info_storage_key, 
    5051                  Preferences& preferences, 
     
    5556        InfTextSession* get_session() { return m_session; } 
    5657        const Glib::ustring& get_title() const { return m_title; } 
     58        const Glib::ustring& get_path() const { return m_path; } 
     59        const Glib::ustring& get_hostname() const { return m_hostname; } 
    5760        const std::string& get_info_storage_key() const 
    5861        { 
     
    124127        InfTextSession* m_session; 
    125128        Glib::ustring m_title; 
     129        Glib::ustring m_path; 
     130        Glib::ustring m_hostname; 
    126131        std::string m_info_storage_key; 
    127132        Preferences& m_preferences; 
  • code/core/folder.cpp

    r6b79c69 re861d03  
    118118Gobby::Folder::add_document(InfTextSession* session, 
    119119                            const Glib::ustring& title, 
     120                            const Glib::ustring& path, 
     121                            const Glib::ustring& hostname, 
    120122                            const std::string& info_storage_key) 
    121123{ 
    122124        Gobby::DocWindow* window = Gtk::manage( 
    123                 new DocWindow(session, title, info_storage_key, 
    124                               m_preferences, m_lang_manager)); 
     125                new DocWindow(session, title, path, hostname, 
     126                              info_storage_key, m_preferences, 
     127                              m_lang_manager)); 
    125128        window->show(); 
    126129        m_signal_document_added.emit(*window); 
  • code/core/folder.hpp

    r6b79c69 re861d03  
    4949        DocWindow& add_document(InfTextSession* session, 
    5050                                const Glib::ustring& title, 
     51                                const Glib::ustring& path, 
     52                                const Glib::ustring& hostname, 
    5153                                const std::string& info_storage_key); 
    5254        void remove_document(DocWindow& document);