Changeset e861d030b244626b06e7d2409ebfb124b466dc59
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r6b79c69
|
re861d03
|
|
| 290 | 290 | { |
| 291 | 291 | 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); |
| 292 | 307 | |
| 293 | 308 | DocWindow& window = m_folder.add_document( |
| 294 | 309 | INF_TEXT_SESSION(session), |
| 295 | 310 | infc_browser_iter_get_name(browser, iter), |
| | 311 | path, hostname, |
| 296 | 312 | m_info_storage.get_key(browser, iter)); |
| | 313 | |
| | 314 | g_free(hostname); |
| | 315 | g_free(path); |
| 297 | 316 | |
| 298 | 317 | // For now we always highlight the newly created session... |
-
|
r6ee38b4
|
re861d03
|
|
| 127 | 127 | Gobby::DocWindow::DocWindow(InfTextSession* session, |
| 128 | 128 | const Glib::ustring& title, |
| | 129 | const Glib::ustring& path, |
| | 130 | const Glib::ustring& hostname, |
| 129 | 131 | const std::string& info_storage_key, |
| 130 | 132 | Preferences& preferences, |
| 131 | 133 | 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), |
| 134 | 137 | m_view(GTK_SOURCE_VIEW(gtk_source_view_new())), |
| 135 | 138 | m_userlist(session), m_info_box(false, 0), |
-
|
r6b79c69
|
re861d03
|
|
| 47 | 47 | |
| 48 | 48 | DocWindow(InfTextSession* session, const Glib::ustring& title, |
| | 49 | const Glib::ustring& path, const Glib::ustring& hostname, |
| 49 | 50 | const std::string& info_storage_key, |
| 50 | 51 | Preferences& preferences, |
| … |
… |
|
| 55 | 56 | InfTextSession* get_session() { return m_session; } |
| 56 | 57 | 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; } |
| 57 | 60 | const std::string& get_info_storage_key() const |
| 58 | 61 | { |
| … |
… |
|
| 124 | 127 | InfTextSession* m_session; |
| 125 | 128 | Glib::ustring m_title; |
| | 129 | Glib::ustring m_path; |
| | 130 | Glib::ustring m_hostname; |
| 126 | 131 | std::string m_info_storage_key; |
| 127 | 132 | Preferences& m_preferences; |
-
|
r6b79c69
|
re861d03
|
|
| 118 | 118 | Gobby::Folder::add_document(InfTextSession* session, |
| 119 | 119 | const Glib::ustring& title, |
| | 120 | const Glib::ustring& path, |
| | 121 | const Glib::ustring& hostname, |
| 120 | 122 | const std::string& info_storage_key) |
| 121 | 123 | { |
| 122 | 124 | 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)); |
| 125 | 128 | window->show(); |
| 126 | 129 | m_signal_document_added.emit(*window); |
-
|
r6b79c69
|
re861d03
|
|
| 49 | 49 | DocWindow& add_document(InfTextSession* session, |
| 50 | 50 | const Glib::ustring& title, |
| | 51 | const Glib::ustring& path, |
| | 52 | const Glib::ustring& hostname, |
| 51 | 53 | const std::string& info_storage_key); |
| 52 | 54 | void remove_document(DocWindow& document); |