Changeset 4a56e77388e66e83cd7134ba0da4bb42f9d82334
- Timestamp:
- 09/10/08 18:17:10 (5 years ago)
- Author:
- Armin Burgmeier <armin@…>
- Parents:
- 0706e216813d147e530992196c256947401a3a45
- Children:
- 1ad50d8d04611b1640159dde0efde1a2c74229ab
- git-committer:
- Armin Burgmeier <armin@arbur.net> / 2008-09-10T18:17:10Z+0200
- Message:
-
Fix user color change notifications in UserList?
2008-09-10 Armin Burgmeier <armin@…>
- inc/core/userlist.hpp:
- src/core/userlist.cpp: Watch notify::hue instead of notify::color
on InfTextUser? for user color changes. InfTextUser::color does not
exist.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r0706e21
|
r4a56e77
|
|
| | 1 | 2008-09-10 Armin Burgmeier <armin@arbur.net> |
| | 2 | |
| | 3 | * inc/core/userlist.hpp: |
| | 4 | * src/core/userlist.cpp: Watch notify::hue instead of notify::color |
| | 5 | on InfTextUser for user color changes. InfTextUser::color does not |
| | 6 | exist. |
| | 7 | |
| 1 | 8 | 2008-09-09 Armin Burgmeier <armin@arbur.net> |
| 2 | 9 | |
-
|
rfef8f20
|
r4a56e77
|
|
| 43 | 43 | Gtk::TreeModelColumn<InfTextUser*> user; |
| 44 | 44 | Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > color; |
| 45 | | Gtk::TreeModelColumn<gulong> notify_color_handle; |
| | 45 | Gtk::TreeModelColumn<gulong> notify_hue_handle; |
| 46 | 46 | Gtk::TreeModelColumn<gulong> notify_status_handle; |
| 47 | 47 | |
| … |
… |
|
| 50 | 50 | add(user); |
| 51 | 51 | add(color); |
| 52 | | add(notify_color_handle); |
| | 52 | add(notify_hue_handle); |
| 53 | 53 | add(notify_status_handle); |
| 54 | 54 | } |
| … |
… |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | | static void on_notify_color_static(InfUser* user, |
| 66 | | GParamSpec* pspec, |
| 67 | | gpointer user_data) |
| | 65 | static void on_notify_hue_static(InfUser* user, |
| | 66 | GParamSpec* pspec, |
| | 67 | gpointer user_data) |
| 68 | 68 | { |
| 69 | 69 | static_cast<UserList*>(user_data)-> |
| 70 | | on_notify_color(INF_TEXT_USER(user)); |
| | 70 | on_notify_hue(INF_TEXT_USER(user)); |
| 71 | 71 | } |
| 72 | 72 | |
| … |
… |
|
| 89 | 89 | |
| 90 | 90 | void on_add_user(InfTextUser* user); |
| 91 | | void on_notify_color(InfTextUser* user); |
| | 91 | void on_notify_hue(InfTextUser* user); |
| 92 | 92 | void on_notify_status(InfTextUser* user); |
| 93 | 93 | |
-
|
rfef8f20
|
r4a56e77
|
|
| 166 | 166 | { |
| 167 | 167 | InfTextUser* user = (*iter)[m_columns.user]; |
| 168 | | gulong notify_color_handle = |
| 169 | | (*iter)[m_columns.notify_color_handle]; |
| | 168 | gulong notify_hue_handle = |
| | 169 | (*iter)[m_columns.notify_hue_handle]; |
| 170 | 170 | gulong notify_status_handle = |
| 171 | 171 | (*iter)[m_columns.notify_status_handle]; |
| 172 | 172 | |
| 173 | 173 | g_signal_handler_disconnect(G_OBJECT(user), |
| 174 | | notify_color_handle); |
| | 174 | notify_hue_handle); |
| 175 | 175 | g_signal_handler_disconnect(G_OBJECT(user), |
| 176 | 176 | notify_status_handle); |
| … |
… |
|
| 273 | 273 | (*iter)[m_columns.user] = user; |
| 274 | 274 | (*iter)[m_columns.color] = color_pixbuf; |
| 275 | | (*iter)[m_columns.notify_color_handle] = g_signal_connect( |
| 276 | | G_OBJECT(user), "notify::color", |
| 277 | | G_CALLBACK(on_notify_color_static), this); |
| | 275 | (*iter)[m_columns.notify_hue_handle] = g_signal_connect( |
| | 276 | G_OBJECT(user), "notify::hue", |
| | 277 | G_CALLBACK(on_notify_hue_static), this); |
| 278 | 278 | (*iter)[m_columns.notify_status_handle] = g_signal_connect( |
| 279 | 279 | G_OBJECT(user), "notify::status", |
| … |
… |
|
| 281 | 281 | } |
| 282 | 282 | |
| 283 | | void Gobby::UserList::on_notify_color(InfTextUser* user) |
| | 283 | void Gobby::UserList::on_notify_hue(InfTextUser* user) |
| 284 | 284 | { |
| 285 | 285 | Gtk::TreeIter iter = find_user_iter(user); |