The account buttons + avatar changing should be split into a different class. The main view area (with the contacts) could be a different class too. Also make an effort to make the slot names consistent.
I agree. I'm assigning it to myself. You mean avatar button? Because AccountButton is already a completely separate class.
I meant the "account buttons" as a group. There's quite a bit of code to add/remove these buttons when the accounts change. This code could be moved out to one widget that takes an AccountManagerPtr and add/removes AccountButtons as appropriate.
Git commit 54600f7bfef6183c6e7106a05b943c9d502810e1 by Martin Klapetek. Committed on 12/09/2011 at 18:39. Pushed by mklapetek into branch 'master'. First refactor of MainWidget class. So far, only avatar handling code was moved out to a separate class and bunch of slots were moved and/or renamed. Reviewed-by: David Edmundson REVIEW: 102584 CCBUG: 279107 M +1 -1 CMakeLists.txt A +228 -0 avatar-button.cpp [License: LGPL (v2.1+)] A +62 -0 avatar-button.h [License: LGPL (v2.1+)] M +51 -225 main-widget.cpp M +34 -35 main-widget.h M +6 -1 main-widget.ui http://commits.kde.org/telepathy-contact-list/54600f7bfef6183c6e7106a05b943c9d502810e1
The accounts buttons have also been split out. This is good progress - I would suggest (maybe) splitting out the entire contact view widget and associated code, then I'll be happy.
Git commit 459d9b48b03a8d649c435a208806c56c213f78d1 by Martin Klapetek. Committed on 21/12/2011 at 13:01. Pushed by mklapetek into branch 'master'. Move contact list view to a separate class The ContactListWidget is now fully self contained and easily embeddable widget, ie. you can have contact list in your application with minimal effort. Reviewed-by: Dario Freddi REVIEW: 103481 BUG: 279107 DIGEST M +1 -0 CMakeLists.txt A +570 -0 contact-list-widget.cpp [License: LGPL (v2.1+)] A +86 -0 contact-list-widget.h [License: LGPL (v2.1+)] A +48 -0 contact-list-widget_p.h [License: LGPL (v2.1+)] M +9 -5 context-menu.cpp M +3 -3 context-menu.h M +40 -537 main-widget.cpp M +5 -33 main-widget.h M +6 -1 main-widget.ui http://commits.kde.org/telepathy-contact-list/459d9b48b03a8d649c435a208806c56c213f78d1