Changeset cc37110c28b330da46dc5136468afb1e18701df3
- Timestamp:
- 01/30/11 01:53:44 (2 years ago)
- Author:
- Armin Burgmeier <armin@…>
- Parents:
- 061584b90a59d08011ad2a0f88f1be2b160acf6a
- Children:
- 1335dccb9e3311971ba63b63980147343be6b457
- git-committer:
- Armin Burgmeier <armin@arbur.net> / 2011-01-30T01:53:44Z+0100
- Message:
-
Jump to a user's cursor when double-clicking it in the user list
2011-01-29 Armin Burgmeier <armin@…>
- code/core/textsessionuserview.hpp:
- code/core/textsessionuserview.cpp:
- code/core/Makefile.am: Add the InfTextSessionUserView? class which
handles scrolling to a remote user's cursor when double-clicking it in
the user list.
- code/core/userlist.hpp:
- code/core/userlist.cpp: Add the user_activated signal.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r061584b
|
rcc37110
|
|
| | 1 | 2011-01-29 Armin Burgmeier <armin@arbur.net> |
| | 2 | |
| | 3 | * code/core/textsessionuserview.hpp: |
| | 4 | * code/core/textsessionuserview.cpp: |
| | 5 | * code/core/Makefile.am: Add the InfTextSessionUserView class which |
| | 6 | handles scrolling to a remote user's cursor when double-clicking it in |
| | 7 | the user list. |
| | 8 | |
| | 9 | * code/core/userlist.hpp: |
| | 10 | * code/core/userlist.cpp: Add the user_activated signal. |
| | 11 | |
| | 12 | * code/core/folder.cpp: Create a TextSessionUserView for text |
| | 13 | sessions. |
| | 14 | |
| 1 | 15 | 2011-01-29 Armin Burgmeier <armin@arbur.net> |
| 2 | 16 | |
-
|
r626c210
|
rcc37110
|
|
| 19 | 19 | statusbar.cpp \ |
| 20 | 20 | tablabel.cpp \ |
| | 21 | textsessionuserview.cpp \ |
| 21 | 22 | textsessionview.cpp \ |
| 22 | 23 | textundogrouping.cpp \ |
| … |
… |
|
| 43 | 44 | statusbar.hpp \ |
| 44 | 45 | tablabel.hpp \ |
| | 46 | textsessionuserview.hpp \ |
| 45 | 47 | textsessionview.hpp \ |
| 46 | 48 | textundogrouping.hpp \ |
-
|
r124c09a
|
rcc37110
|
|
| 18 | 18 | |
| 19 | 19 | #include "core/folder.hpp" |
| | 20 | #include "core/textsessionuserview.hpp" |
| 20 | 21 | #include "core/sessionuserview.hpp" |
| 21 | 22 | #include "core/chattablabel.hpp" |
| … |
… |
|
| 134 | 135 | m_signal_document_added.emit(*view); |
| 135 | 136 | |
| 136 | | SessionUserView* userview = Gtk::manage( |
| 137 | | new SessionUserView( |
| | 137 | TextSessionUserView* userview = Gtk::manage( |
| | 138 | new TextSessionUserView( |
| 138 | 139 | *view, true, |
| 139 | 140 | m_preferences.appearance.show_document_userlist, |
-
|
r124c09a
|
rcc37110
|
|
| 123 | 123 | sigc::mem_fun(*this, &UserList::name_cell_data_func)); |
| 124 | 124 | |
| | 125 | m_view.signal_row_activated().connect( |
| | 126 | sigc::mem_fun(*this, &UserList::on_row_activated)); |
| | 127 | |
| 125 | 128 | column->set_spacing(6); |
| 126 | 129 | m_view.append_column(*column); |
| … |
… |
|
| 333 | 336 | } |
| 334 | 337 | |
| | 338 | void Gobby::UserList::on_row_activated(const Gtk::TreePath& path, |
| | 339 | Gtk::TreeViewColumn* column) |
| | 340 | { |
| | 341 | Gtk::TreePath parent_path; |
| | 342 | if(m_filter_model) |
| | 343 | parent_path = m_filter_model->convert_path_to_child_path(path); |
| | 344 | else |
| | 345 | parent_path = path; |
| | 346 | |
| | 347 | const Gtk::TreeIter& iter = m_store->get_iter(path); |
| | 348 | InfUser* user = (*iter)[m_columns.user]; |
| | 349 | |
| | 350 | if(inf_user_get_status(user) != INF_USER_UNAVAILABLE) |
| | 351 | m_signal_user_activated.emit(user); |
| | 352 | } |
| | 353 | |
| 335 | 354 | Gtk::TreeIter Gobby::UserList::find_user_iter(InfUser* user) |
| 336 | 355 | { |
-
|
r61cce2c
|
rcc37110
|
|
| 33 | 33 | { |
| 34 | 34 | public: |
| | 35 | typedef sigc::signal<void, InfUser*> SignalUserActivated; |
| | 36 | |
| 35 | 37 | UserList(InfUserTable* table); |
| 36 | 38 | ~UserList(); |
| … |
… |
|
| 38 | 40 | void set_show_disconnected(bool show_disconnected); |
| 39 | 41 | |
| | 42 | SignalUserActivated signal_user_activated() const |
| | 43 | { |
| | 44 | return m_signal_user_activated; |
| | 45 | } |
| | 46 | |
| 40 | 47 | protected: |
| 41 | 48 | InfUserTable* m_table; |
| … |
… |
|
| 96 | 103 | void on_notify_hue(InfTextUser* user); |
| 97 | 104 | |
| | 105 | //void on_select_func(const Gtk::TreeIter& iter); |
| | 106 | void on_row_activated(const Gtk::TreePath& path, |
| | 107 | Gtk::TreeViewColumn* column); |
| | 108 | |
| 98 | 109 | Gtk::TreeIter find_user_iter(InfUser* user); |
| 99 | 110 | |
| … |
… |
|
| 104 | 115 | |
| 105 | 116 | gulong m_add_user_handle; |
| | 117 | |
| | 118 | SignalUserActivated m_signal_user_activated; |
| 106 | 119 | }; |
| 107 | 120 | } |