After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 656831 - Rely on Empathy's factory to prepare TpConnection features
Rely on Empathy's factory to prepare TpConnection features
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
2.33.x
Other Linux
: Normal enhancement
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-18 16:08 UTC by Guillaume Desmottes
Modified: 2011-08-19 07:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ask factory to prepare TP_ACCOUNT_FEATURE_CONNECTION (1.63 KB, patch)
2011-08-18 16:09 UTC, Guillaume Desmottes
committed Details | Review
account-chooser: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES, (2.76 KB, patch)
2011-08-18 16:09 UTC, Guillaume Desmottes
committed Details | Review
avatar-chooser: rely on the factory to prepare TP_CONNECTION_FEATURE_AVATAR_REQUIREMENTS (1.66 KB, patch)
2011-08-18 16:09 UTC, Guillaume Desmottes
committed Details | Review
contact-search-dialog: rely on the factory to prepare TP_CONNECTION_FEATURE_AVATAR_REQUIREMENTS (2.82 KB, patch)
2011-08-18 16:09 UTC, Guillaume Desmottes
committed Details | Review
contact-widget: rely on the factory to prepare TP_CONNECTION_FEATURE_CONTACT_INFO (2.46 KB, patch)
2011-08-18 16:09 UTC, Guillaume Desmottes
committed Details | Review
individual-widget: rely on the factory to prepare TP_CONNECTION_FEATURE_CONTACT_INFO (5.11 KB, patch)
2011-08-18 16:09 UTC, Guillaume Desmottes
committed Details | Review
new-call-dialog: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES (2.91 KB, patch)
2011-08-18 16:09 UTC, Guillaume Desmottes
committed Details | Review
ft-handler: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES (2.01 KB, patch)
2011-08-18 16:09 UTC, Guillaume Desmottes
committed Details | Review
new-message-dialog: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES (2.80 KB, patch)
2011-08-18 16:09 UTC, Guillaume Desmottes
committed Details | Review
tp-chat: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES (2.96 KB, patch)
2011-08-18 16:09 UTC, Guillaume Desmottes
committed Details | Review
rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES (2.87 KB, patch)
2011-08-18 16:09 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2011-08-18 16:08:19 UTC
Let's use these new API to remove code!
Comment 1 Guillaume Desmottes 2011-08-18 16:09:20 UTC
Created attachment 194144 [details] [review]
ask factory to prepare TP_ACCOUNT_FEATURE_CONNECTION

So we can rely on the connection returned by tp_account_get_connection() to be
usable right away.
Comment 2 Guillaume Desmottes 2011-08-18 16:09:23 UTC
Created attachment 194145 [details] [review]
account-chooser: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES,

Also simplify empathy_account_chooser_filter_supports_chatrooms in the
process.
Comment 3 Guillaume Desmottes 2011-08-18 16:09:26 UTC
Created attachment 194146 [details] [review]
avatar-chooser: rely on the factory to prepare TP_CONNECTION_FEATURE_AVATAR_REQUIREMENTS
Comment 4 Guillaume Desmottes 2011-08-18 16:09:30 UTC
Created attachment 194147 [details] [review]
contact-search-dialog: rely on the factory to prepare TP_CONNECTION_FEATURE_AVATAR_REQUIREMENTS
Comment 5 Guillaume Desmottes 2011-08-18 16:09:33 UTC
Created attachment 194148 [details] [review]
contact-widget: rely on the factory to prepare TP_CONNECTION_FEATURE_CONTACT_INFO
Comment 6 Guillaume Desmottes 2011-08-18 16:09:36 UTC
Created attachment 194149 [details] [review]
individual-widget: rely on the factory to prepare TP_CONNECTION_FEATURE_CONTACT_INFO
Comment 7 Guillaume Desmottes 2011-08-18 16:09:39 UTC
Created attachment 194150 [details] [review]
new-call-dialog: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES
Comment 8 Guillaume Desmottes 2011-08-18 16:09:42 UTC
Created attachment 194151 [details] [review]
ft-handler: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES
Comment 9 Guillaume Desmottes 2011-08-18 16:09:46 UTC
Created attachment 194152 [details] [review]
new-message-dialog: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES
Comment 10 Guillaume Desmottes 2011-08-18 16:09:49 UTC
Created attachment 194153 [details] [review]
tp-chat: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES
Comment 11 Guillaume Desmottes 2011-08-18 16:09:52 UTC
Created attachment 194154 [details] [review]
rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES
Comment 13 Xavier Claessens 2011-08-18 19:26:06 UTC
Review of attachment 194154 [details] [review]:

commit msg is wrong, it is about BALANCE not CAPABILITIES

::: src/empathy-main-window.c
@@ +1077,3 @@
+	/* need to prepare the connection:
+	 * store the account on the connection */
+	g_object_set_data (G_OBJECT (conn), "account", account);

That should not be needed anymore with tp_connection_get_account(). But that's unrelated to this commit, but please open a bug or keep that in mind :)
Comment 14 Xavier Claessens 2011-08-18 19:26:33 UTC
+1 for all others, nice work !
Comment 15 Guillaume Desmottes 2011-08-19 07:28:35 UTC
(In reply to comment #13)
> Review of attachment 194154 [details] [review]:
> 
> commit msg is wrong, it is about BALANCE not CAPABILITIES

Oops, fixed.

> ::: src/empathy-main-window.c
> @@ +1077,3 @@
> +    /* need to prepare the connection:
> +     * store the account on the connection */
> +    g_object_set_data (G_OBJECT (conn), "account", account);
> 
> That should not be needed anymore with tp_connection_get_account(). But that's
> unrelated to this commit, but please open a bug or keep that in mind :)

That was on my mental TODO list, but yeah always better to open a bug: bug #656866
Comment 16 Guillaume Desmottes 2011-08-19 07:29:47 UTC
Attachment 194144 [details] pushed as 5f8f65f - ask factory to prepare TP_ACCOUNT_FEATURE_CONNECTION
Attachment 194145 [details] pushed as 5a38618 - account-chooser: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES,
Attachment 194146 [details] pushed as 7cbbd2e - avatar-chooser: rely on the factory to prepare TP_CONNECTION_FEATURE_AVATAR_REQUIREMENTS
Attachment 194147 [details] pushed as 8b69b96 - contact-search-dialog: rely on the factory to prepare TP_CONNECTION_FEATURE_AVATAR_REQUIREMENTS
Attachment 194148 [details] pushed as c428f8a - contact-widget: rely on the factory to prepare TP_CONNECTION_FEATURE_CONTACT_INFO
Attachment 194149 [details] pushed as a87c731 - individual-widget: rely on the factory to prepare TP_CONNECTION_FEATURE_CONTACT_INFO
Attachment 194150 [details] pushed as 3370401 - new-call-dialog: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES
Attachment 194151 [details] pushed as 686b4e2 - ft-handler: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES
Attachment 194152 [details] pushed as c9b5bba - new-message-dialog: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES
Attachment 194153 [details] pushed as 3f96f6d - tp-chat: rely on the factory to prepare TP_CONNECTION_FEATURE_CAPABILITIES