GNOME Bugzilla – Bug 662609
EmpathyAccountChooser clean up
Last modified: 2011-10-27 11:50:48 UTC
I did some cleaning of EmpathyAccountChooser. Nothing really exciting (especially in the first patches) but it did fix a race when account are connecting/disconnecting.
Created attachment 199817 [details] [review] account-chooser: port to new coding style I wanted to clean the account chooser a bit but the old coding style makes me cry... It's good to do anyway, especially if we move this widget to a telepathy-gtk lib at some point.
Created attachment 199818 [details] [review] move down empathy_account_chooser_class_init()
Created attachment 199819 [details] [review] inline account_chooser_setup()
Created attachment 199820 [details] [review] account-chooser: use self->priv pattern
Created attachment 199821 [details] [review] account-chooser: use tp_g_signal_connect_object()
Created attachment 199822 [details] [review] account-chooser: replace finalize by dispose It just unref one object so dispose is the best place.
Created attachment 199823 [details] [review] remove unused empathy_account_chooser_get_has_all_option()
Created attachment 199824 [details] [review] move pre-defined filter at the end of the files
Created attachment 199825 [details] [review] factor out empathy_account_chooser_refilter()
Created attachment 199826 [details] [review] log-window: use empathy_account_chooser_refilter() It's cleaner than re-setting the same filter function.
Created attachment 199827 [details] [review] account-chooser: make sure that TP_ACCOUNT_FEATURE_CONNECTION and TP_CONNECTION_FEATURE_CAPABILITIES are prepared Most filter will need those.
Created attachment 199828 [details] [review] factor out update_account()
Created attachment 199829 [details] [review] refilter if the TpConnection of a TpAccount is changed
Review of attachment 199817 [details] [review]: ++
Review of attachment 199818 [details] [review]: ++
Review of attachment 199819 [details] [review]: ++
Review of attachment 199820 [details] [review]: ++
Review of attachment 199821 [details] [review]: ++
Review of attachment 199822 [details] [review]: ++
Review of attachment 199823 [details] [review]: ++
Review of attachment 199824 [details] [review]: ++
Review of attachment 199825 [details] [review]: ++
Review of attachment 199826 [details] [review]: ++
Review of attachment 199827 [details] [review]: ++
Review of attachment 199828 [details] [review]: ++
Review of attachment 199829 [details] [review]: + * just relying on the account status is not enough. In some case we the + * status change can be notified while the TpConnection is still + * preparing. */ unintentional slip, I guess. Otherwise compiles fine and executes without segfault by my tests.
Review of attachment 199823 [details] [review]: I don't think you should do this, since it's the inverse of set_has_all_option(), just because nobody uses it, they might.
(In reply to comment #27) > unintentional slip, I guess. > Otherwise compiles fine and executes without segfault by my tests. ? ~ All of this, except the patch I don't like, is fine to commit.
Attachment 199817 [details] pushed as f053dfe - account-chooser: port to new coding style Attachment 199818 [details] pushed as 3c80977 - move down empathy_account_chooser_class_init() Attachment 199819 [details] pushed as 8498eee - inline account_chooser_setup() Attachment 199820 [details] pushed as 41a3bfc - account-chooser: use self->priv pattern Attachment 199821 [details] pushed as 71ae7d4 - account-chooser: use tp_g_signal_connect_object() Attachment 199822 [details] pushed as 40babd7 - account-chooser: replace finalize by dispose Attachment 199824 [details] pushed as e220eb6 - move pre-defined filter at the end of the files Attachment 199825 [details] pushed as 75e36b5 - factor out empathy_account_chooser_refilter() Attachment 199826 [details] pushed as bdecc62 - log-window: use empathy_account_chooser_refilter() Attachment 199827 [details] pushed as 14dba3c - account-chooser: make sure that TP_ACCOUNT_FEATURE_CONNECTION and TP_CONNECTION_FEATURE_CAPABILITIES are prepared Attachment 199828 [details] pushed as a6d4518 - factor out update_account() Attachment 199829 [details] pushed as 3b00a09 - refilter if the TpConnection of a TpAccount is changed
I drop this patch and merged it. Thanks for the review!