Changeset 8f15b2767f118e46fbe06dd1a54566a656ce89a3
- Timestamp:
- 01/06/07 23:56:42 (6 years ago)
- Author:
- Philipp Kern <phil@…>
- Parents:
- 774f0f8fd0e0da7827ba65e5075e6c4e9e78f153
- Children:
- 990094824987f571e7c4a20b1dfe67c17f167fdd
- git-committer:
- Philipp Kern <phil@0x539.de> / 2007-01-06T22:56:42Z+0000
- Message:
-
[project @ Temporary adjustments for document template parameter in document info]
Original author: Armin Burgmeier <armin@…>
Date: 2006-01-30 11:52:22+00:00
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rcb61def
|
r8f15b27
|
|
| 47 | 47 | void obby_user_join(const obby::user& user); |
| 48 | 48 | void obby_user_part(const obby::user& user); |
| 49 | | void obby_document_insert(obby::local_document_info& document); |
| 50 | | void obby_document_remove(obby::local_document_info& document); |
| | 49 | void obby_document_insert(obby::basic_local_document_info<obby::document, net6::selector>& document); |
| | 50 | void obby_document_remove(obby::basic_local_document_info<obby::document, net6::selector>& document); |
| 51 | 51 | |
| 52 | 52 | //void obby_message(const obby::user& user, const Glib::ustring& message); |
-
|
r7065283
|
r8f15b27
|
|
| 41 | 41 | typedef sigc::signal<void> signal_language_changed_type; |
| 42 | 42 | |
| 43 | | Document(obby::local_document_info& doc, const Folder& folder, |
| | 43 | Document(obby::basic_local_document_info<obby::document, net6::selector>& doc, const Folder& folder, |
| 44 | 44 | const Preferences& preferences); |
| 45 | 45 | |
| 46 | | const obby::local_document_info& get_document() const; |
| 47 | | obby::local_document_info& get_document(); |
| | 46 | const obby::basic_local_document_info<obby::document, net6::selector>& get_document() const; |
| | 47 | obby::basic_local_document_info<obby::document, net6::selector>& get_document(); |
| 48 | 48 | |
| 49 | 49 | /** Writes the current cursor position into row and col. |
| … |
… |
|
| 193 | 193 | /** The underlaying obby document info. |
| 194 | 194 | */ |
| 195 | | obby::local_document_info& m_doc; |
| | 195 | obby::basic_local_document_info<obby::document, net6::selector>& m_doc; |
| 196 | 196 | |
| 197 | 197 | /** Preferences for this document. |
-
|
r24041fb
|
r8f15b27
|
|
| 58 | 58 | virtual void obby_user_part(const obby::user& user); |
| 59 | 59 | virtual void obby_user_colour(const obby::user& user); |
| 60 | | virtual void obby_document_insert(obby::local_document_info& info); |
| 61 | | virtual void obby_document_remove(obby::local_document_info& info); |
| | 60 | virtual void obby_document_insert(obby::basic_local_document_info<obby::document, net6::selector>& info); |
| | 61 | virtual void obby_document_remove(obby::basic_local_document_info<obby::document, net6::selector>& info); |
| 62 | 62 | protected: |
| 63 | | Gtk::TreeIter find_iter(const obby::local_document_info& info) const; |
| | 63 | Gtk::TreeIter find_iter(const obby::basic_local_document_info<obby::document, net6::selector>& info) const; |
| 64 | 64 | |
| 65 | 65 | virtual void on_user_subscribe(const obby::user& user, |
| 66 | | const obby::local_document_info& info); |
| | 66 | const obby::basic_local_document_info<obby::document, net6::selector>& info); |
| 67 | 67 | virtual void on_user_unsubscribe(const obby::user& user, |
| 68 | | const obby::local_document_info& info); |
| | 68 | const obby::basic_local_document_info<obby::document, net6::selector>& info); |
| 69 | 69 | |
| 70 | 70 | virtual void on_subscribe(); |
-
|
r4a2cffc
|
r8f15b27
|
|
| 40 | 40 | signal_language_changed_type; |
| 41 | 41 | |
| 42 | | DocWindow(obby::local_document_info& doc, const Folder& folder, |
| | 42 | DocWindow(obby::basic_local_document_info<obby::document, net6::selector>& doc, const Folder& folder, |
| 43 | 43 | const Preferences& preferences); |
| 44 | 44 | virtual ~DocWindow(); |
-
|
rb70179d
|
r8f15b27
|
|
| 99 | 99 | void obby_user_part(const obby::user& user); |
| 100 | 100 | void obby_user_colour(const obby::user& user); |
| 101 | | void obby_document_insert(obby::local_document_info& document); |
| 102 | | void obby_document_remove(obby::local_document_info& document); |
| | 101 | void obby_document_insert(obby::basic_local_document_info<obby::document, net6::selector>& document); |
| | 102 | void obby_document_remove(obby::basic_local_document_info<obby::document, net6::selector>& document); |
| 103 | 103 | |
| 104 | 104 | /** Signal which will be emitted if a document has been added to the |
| … |
… |
|
| 157 | 157 | |
| 158 | 158 | void on_document_subscribe(const obby::user& user, |
| 159 | | obby::local_document_info& info); |
| | 159 | obby::basic_local_document_info<obby::document, net6::selector>& info); |
| 160 | 160 | void on_document_unsubscribe(const obby::user& user, |
| 161 | | obby::local_document_info& info); |
| | 161 | obby::basic_local_document_info<obby::document, net6::selector>& info); |
| 162 | 162 | |
| 163 | 163 | // Called by on_document_subscribe/unsubscribe if the (un)subscribing |
| 164 | 164 | // user is the local one. |
| 165 | | void on_self_subscribe(obby::local_document_info& info); |
| 166 | | void on_self_unsubscribe(obby::local_document_info& info); |
| | 165 | void on_self_subscribe(obby::basic_local_document_info<obby::document, net6::selector>& info); |
| | 166 | void on_self_unsubscribe(obby::basic_local_document_info<obby::document, net6::selector>& info); |
| 167 | 167 | |
| 168 | 168 | void on_document_modified_changed(DocWindow& window); |
-
|
rafc8e5a
|
r8f15b27
|
|
| 52 | 52 | void obby_user_join(const obby::user& user); |
| 53 | 53 | void obby_user_part(const obby::user& user); |
| 54 | | void obby_document_insert(obby::local_document_info& document); |
| 55 | | void obby_document_remove(obby::local_document_info& document); |
| | 54 | void obby_document_insert(obby::basic_local_document_info<obby::document, net6::selector>& document); |
| | 55 | void obby_document_remove(obby::basic_local_document_info<obby::document, net6::selector>& document); |
| 56 | 56 | |
| 57 | 57 | virtual void on_show(); |
-
|
r24041fb
|
r8f15b27
|
|
| 58 | 58 | virtual void obby_user_part(const obby::user& user); |
| 59 | 59 | virtual void obby_user_colour(const obby::user& user); |
| 60 | | virtual void obby_document_insert(obby::local_document_info& info); |
| 61 | | virtual void obby_document_remove(obby::local_document_info& info); |
| | 60 | virtual void obby_document_insert(obby::basic_local_document_info<obby::document, net6::selector>& info); |
| | 61 | virtual void obby_document_remove(obby::basic_local_document_info<obby::document, net6::selector>& info); |
| 62 | 62 | protected: |
| 63 | 63 | Gtk::TreeIter find_iter(const Gtk::TreeIter& parent, |
| … |
… |
|
| 66 | 66 | |
| 67 | 67 | void on_user_subscribe(const obby::user& user, |
| 68 | | const obby::local_document_info& info); |
| | 68 | const obby::basic_local_document_info<obby::document, net6::selector>& info); |
| 69 | 69 | void on_user_unsubscribe(const obby::user& user, |
| 70 | | const obby::local_document_info& info); |
| | 70 | const obby::basic_local_document_info<obby::document, net6::selector>& info); |
| 71 | 71 | |
| 72 | 72 | Header& m_header; |
-
|
rcb61def
|
r8f15b27
|
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | | void Gobby::Chat::obby_document_insert(obby::local_document_info& document) |
| 149 | | { |
| 150 | | } |
| 151 | | |
| 152 | | void Gobby::Chat::obby_document_remove(obby::local_document_info& document) |
| | 148 | void Gobby::Chat::obby_document_insert(obby::basic_local_document_info<obby::document, net6::selector>& document) |
| | 149 | { |
| | 150 | } |
| | 151 | |
| | 152 | void Gobby::Chat::obby_document_remove(obby::basic_local_document_info<obby::document, net6::selector>& document) |
| 153 | 153 | { |
| 154 | 154 | } |
-
|
r7065283
|
r8f15b27
|
|
| 23 | 23 | #include "folder.hpp" |
| 24 | 24 | |
| 25 | | Gobby::Document::Document(obby::local_document_info& doc, const Folder& folder, |
| | 25 | Gobby::Document::Document(obby::basic_local_document_info<obby::document, net6::selector>& doc, const Folder& folder, |
| 26 | 26 | const Preferences& preferences) |
| 27 | 27 | : Gtk::SourceView(), |
| … |
… |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | | const obby::local_document_info& Gobby::Document::get_document() const |
| | 173 | const obby::basic_local_document_info<obby::document, net6::selector>& Gobby::Document::get_document() const |
| 174 | 174 | { |
| 175 | 175 | return m_doc; |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | | obby::local_document_info& Gobby::Document::get_document() |
| | 178 | obby::basic_local_document_info<obby::document, net6::selector>& Gobby::Document::get_document() |
| 179 | 179 | { |
| 180 | 180 | return m_doc; |
-
|
r24041fb
|
r8f15b27
|
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | | void Gobby::DocumentList::obby_document_insert(obby::local_document_info& info) |
| | 130 | void Gobby::DocumentList::obby_document_insert(obby::basic_local_document_info<obby::document, net6::selector>& info) |
| 131 | 131 | { |
| 132 | 132 | info.subscribe_event().connect( |
| … |
… |
|
| 155 | 155 | (*new_doc)[m_tree_cols.text] = info.get_title(); |
| 156 | 156 | (*new_doc)[m_tree_cols.color] = |
| 157 | | info.is_subscribed(info.get_buffer().get_self() ) ? |
| 158 | | COLOR_SUBSCRIBED : COLOR_UNSUBSCRIBED; |
| | 157 | info.is_subscribed() ? COLOR_SUBSCRIBED : COLOR_UNSUBSCRIBED; |
| 159 | 158 | (*new_doc)[m_tree_cols.data] = static_cast<void*>(&info); |
| 160 | 159 | } |
| 161 | 160 | |
| 162 | | void Gobby::DocumentList::obby_document_remove(obby::local_document_info& info) |
| | 161 | void Gobby::DocumentList::obby_document_remove(obby::basic_local_document_info<obby::document, net6::selector>& info) |
| 163 | 162 | { |
| 164 | 163 | Gtk::TreeIter iter = find_iter(info); |
| … |
… |
|
| 175 | 174 | void |
| 176 | 175 | Gobby::DocumentList::on_user_subscribe(const obby::user& user, |
| 177 | | const obby::local_document_info& info) |
| | 176 | const obby::basic_local_document_info<obby::document, net6::selector>& info) |
| 178 | 177 | { |
| 179 | 178 | if(&user == &info.get_buffer().get_self() ) |
| … |
… |
|
| 190 | 189 | void |
| 191 | 190 | Gobby::DocumentList::on_user_unsubscribe(const obby::user& user, |
| 192 | | const obby::local_document_info& info) |
| | 191 | const obby::basic_local_document_info<obby::document, net6::selector>& info) |
| 193 | 192 | { |
| 194 | 193 | if(&user == &info.get_buffer().get_self() ) |
| … |
… |
|
| 204 | 203 | |
| 205 | 204 | Gtk::TreeIter |
| 206 | | Gobby::DocumentList::find_iter(const obby::local_document_info& info) const |
| | 205 | Gobby::DocumentList::find_iter(const obby::basic_local_document_info<obby::document, net6::selector>& info) const |
| 207 | 206 | { |
| 208 | 207 | const Gtk::TreeNodeChildren& list = m_tree_data->children(); |
| … |
… |
|
| 229 | 228 | { |
| 230 | 229 | Gtk::TreeIter tree_iter = m_tree_data->get_iter(*iter); |
| 231 | | obby::local_document_info* info = |
| 232 | | static_cast<obby::local_document_info*>( |
| | 230 | obby::basic_local_document_info<obby::document, net6::selector>* info = |
| | 231 | static_cast<obby::basic_local_document_info<obby::document, net6::selector>*>( |
| 233 | 232 | static_cast<void*>( |
| 234 | 233 | (*tree_iter)[m_tree_cols.data] |
| … |
… |
|
| 250 | 249 | { |
| 251 | 250 | Gtk::TreeIter tree_iter = m_tree_data->get_iter(*iter); |
| 252 | | const obby::local_document_info* info = |
| 253 | | static_cast<const obby::local_document_info*>( |
| | 251 | const obby::basic_local_document_info<obby::document, net6::selector>* info = |
| | 252 | static_cast<const obby::basic_local_document_info<obby::document, net6::selector>*>( |
| 254 | 253 | static_cast<const void*>( |
| 255 | 254 | (*tree_iter)[m_tree_cols.data] |
-
|
r4a2cffc
|
r8f15b27
|
|
| 19 | 19 | #include "docwindow.hpp" |
| 20 | 20 | |
| 21 | | Gobby::DocWindow::DocWindow(obby::local_document_info& doc, |
| | 21 | Gobby::DocWindow::DocWindow(obby::basic_local_document_info<obby::document, net6::selector>& doc, |
| 22 | 22 | const Folder& folder, |
| 23 | 23 | const Preferences& preferences) |
-
|
rb70179d
|
r8f15b27
|
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | | void Gobby::Folder::obby_document_insert(obby::local_document_info& document) |
| | 196 | void Gobby::Folder::obby_document_insert(obby::basic_local_document_info<obby::document, net6::selector>& document) |
| 197 | 197 | { |
| 198 | 198 | // Document subscription handling |
| … |
… |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | | void Gobby::Folder::obby_document_remove(obby::local_document_info& document) |
| | 214 | void Gobby::Folder::obby_document_remove(obby::basic_local_document_info<obby::document, net6::selector>& document) |
| 215 | 215 | { |
| 216 | 216 | // Nothing to do, the unsubscription signal handler has already removed |
| … |
… |
|
| 315 | 315 | |
| 316 | 316 | void Gobby::Folder::on_document_subscribe(const obby::user& user, |
| 317 | | obby::local_document_info& info) |
| | 317 | obby::basic_local_document_info<obby::document, net6::selector>& info) |
| 318 | 318 | { |
| 319 | 319 | if(&info.get_buffer().get_self() == &user) |
| … |
… |
|
| 321 | 321 | } |
| 322 | 322 | |
| 323 | | void Gobby::Folder::on_self_subscribe(obby::local_document_info& info) |
| | 323 | void Gobby::Folder::on_self_subscribe(obby::basic_local_document_info<obby::document, net6::selector>& info) |
| 324 | 324 | { |
| 325 | 325 | // Create new document |
| … |
… |
|
| 398 | 398 | |
| 399 | 399 | void Gobby::Folder::on_document_unsubscribe(const obby::user& user, |
| 400 | | obby::local_document_info& info) |
| | 400 | obby::basic_local_document_info<obby::document, net6::selector>& info) |
| 401 | 401 | { |
| 402 | 402 | if(&info.get_buffer().get_self() == &user) |
| … |
… |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | | void Gobby::Folder::on_self_unsubscribe(obby::local_document_info& info) |
| | 406 | void Gobby::Folder::on_self_unsubscribe(obby::basic_local_document_info<obby::document, net6::selector>& info) |
| 407 | 407 | { |
| 408 | 408 | DocWindow* wnd = NULL; |
-
|
rafc8e5a
|
r8f15b27
|
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | | void Gobby::StatusBar::obby_document_insert(obby::local_document_info& document) |
| | 112 | void Gobby::StatusBar::obby_document_insert(obby::basic_local_document_info<obby::document, net6::selector>& document) |
| 113 | 113 | { |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | | void Gobby::StatusBar::obby_document_remove(obby::local_document_info& document) |
| | 116 | void Gobby::StatusBar::obby_document_remove(obby::basic_local_document_info<obby::document, net6::selector>& document) |
| 117 | 117 | { |
| 118 | 118 | // Last document that is closed? |
-
|
r24041fb
|
r8f15b27
|
|
| 173 | 173 | on_user_subscribe( |
| 174 | 174 | user, |
| 175 | | dynamic_cast<const obby::local_document_info&>( |
| | 175 | dynamic_cast<const obby::basic_local_document_info<obby::document, net6::selector>&>( |
| 176 | 176 | *iter |
| 177 | 177 | ) |
| … |
… |
|
| 215 | 215 | } |
| 216 | 216 | |
| 217 | | void Gobby::UserList::obby_document_insert(obby::local_document_info& info) |
| | 217 | void Gobby::UserList::obby_document_insert(obby::basic_local_document_info<obby::document, net6::selector>& info) |
| 218 | 218 | { |
| 219 | 219 | info.subscribe_event().connect( |
| … |
… |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | | void Gobby::UserList::obby_document_remove(obby::local_document_info& info) |
| | 234 | void Gobby::UserList::obby_document_remove(obby::basic_local_document_info<obby::document, net6::selector>& info) |
| 235 | 235 | { |
| 236 | 236 | // Do nothing here because unsubscrption signal will be emitted for all |
| … |
… |
|
| 239 | 239 | |
| 240 | 240 | void Gobby::UserList::on_user_subscribe(const obby::user& user, |
| 241 | | const obby::local_document_info& info) |
| | 241 | const obby::basic_local_document_info<obby::document, net6::selector>& info) |
| 242 | 242 | { |
| 243 | 243 | Gtk::TreeIter iter = find_iter(m_iter_online, user.get_name() ); |
| … |
… |
|
| 255 | 255 | |
| 256 | 256 | void Gobby::UserList::on_user_unsubscribe(const obby::user& user, |
| 257 | | const obby::local_document_info& info) |
| | 257 | const obby::basic_local_document_info<obby::document, net6::selector>& info) |
| 258 | 258 | { |
| 259 | 259 | Gtk::TreeIter user_iter = find_iter(m_iter_online, user.get_name() ); |
-
|
r774f0f8
|
r8f15b27
|
|
| 950 | 950 | void Gobby::Window::on_obby_document_insert(obby::basic_document_info<obby::document, net6::selector>& document) |
| 951 | 951 | { |
| 952 | | obby::local_document_info& local_doc = |
| 953 | | dynamic_cast<obby::local_document_info&>(document); |
| | 952 | obby::basic_local_document_info<obby::document, net6::selector>& local_doc = |
| | 953 | dynamic_cast<obby::basic_local_document_info<obby::document, net6::selector>&>(document); |
| 954 | 954 | |
| 955 | 955 | m_folder.obby_document_insert(local_doc); |
| … |
… |
|
| 962 | 962 | void Gobby::Window::on_obby_document_remove(obby::basic_document_info<obby::document, net6::selector>& document) |
| 963 | 963 | { |
| 964 | | obby::local_document_info& local_doc = |
| 965 | | dynamic_cast<obby::local_document_info&>(document); |
| | 964 | obby::basic_local_document_info<obby::document, net6::selector>& local_doc = |
| | 965 | dynamic_cast<obby::basic_local_document_info<obby::document, net6::selector>&>(document); |
| 966 | 966 | |
| 967 | 967 | m_folder.obby_document_remove(local_doc); |