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 665038 - Stop using EmpathyContactMenu
Stop using EmpathyContactMenu
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
2.33.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on: 665853
Blocks: 660547
 
 
Reported: 2011-11-28 13:05 UTC by Guillaume Desmottes
Modified: 2011-12-14 12:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
individual-menu: allow priv->store to be NULL (1.41 KB, patch)
2011-12-14 09:59 UTC, Guillaume Desmottes
committed Details | Review
remove EMPATHY_INDIVIDUAL_FEATURE_ALL (1.89 KB, patch)
2011-12-14 09:59 UTC, Guillaume Desmottes
committed Details | Review
add EMPATHY_INDIVIDUAL_FEATURE_BLOCK (6.53 KB, patch)
2011-12-14 09:59 UTC, Guillaume Desmottes
committed Details | Review
chat: use an EmpathyIndividualMenu (1.88 KB, patch)
2011-12-14 10:00 UTC, Guillaume Desmottes
committed Details | Review
map-view: use the individual menu (2.12 KB, patch)
2011-12-14 10:00 UTC, Guillaume Desmottes
committed Details | Review
remove empathy-contact-menu (22.42 KB, patch)
2011-12-14 10:00 UTC, Guillaume Desmottes
committed Details | Review
fixup! remove EMPATHY_INDIVIDUAL_FEATURE_ALL (2.18 KB, patch)
2011-12-14 10:31 UTC, Guillaume Desmottes
committed Details | Review
fixup! add EMPATHY_INDIVIDUAL_FEATURE_BLOCK (3.39 KB, patch)
2011-12-14 12:05 UTC, Guillaume Desmottes
committed Details | Review
individual_menu_add_personas: add the block menu item, if needed (3.04 KB, patch)
2011-12-14 12:05 UTC, Guillaume Desmottes
committed Details | Review
Show a contact as blocked if *all* is personas are blocked (1.37 KB, patch)
2011-12-14 12:05 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2011-11-28 13:05:12 UTC
We should always use the IndividualMenu and so reduce code duplication.
Comment 1 Guillaume Desmottes 2011-12-14 09:59:52 UTC
Created attachment 203425 [details] [review]
individual-menu: allow priv->store to be NULL

We already checks if it's a IndividualStoreChannel before using it so that's
safe.
Comment 2 Guillaume Desmottes 2011-12-14 09:59:55 UTC
Created attachment 203426 [details] [review]
remove EMPATHY_INDIVIDUAL_FEATURE_ALL

It's a bit fragile, user should say which features he wants.
Comment 3 Guillaume Desmottes 2011-12-14 09:59:58 UTC
Created attachment 203427 [details] [review]
add EMPATHY_INDIVIDUAL_FEATURE_BLOCK
Comment 4 Guillaume Desmottes 2011-12-14 10:00:00 UTC
Created attachment 203428 [details] [review]
chat: use an EmpathyIndividualMenu
Comment 5 Guillaume Desmottes 2011-12-14 10:00:03 UTC
Created attachment 203429 [details] [review]
map-view: use the individual menu
Comment 6 Guillaume Desmottes 2011-12-14 10:00:06 UTC
Created attachment 203430 [details] [review]
remove empathy-contact-menu
Comment 7 Xavier Claessens 2011-12-14 10:12:17 UTC
Review of attachment 203426 [details] [review]:

::: src/empathy-main-window.c
@@ +2482,1 @@
 

you should remove EMPATHY_INDIVIDUAL_VIEW_FEATURE_ALL too then.
Comment 8 Xavier Claessens 2011-12-14 10:23:14 UTC
I'm a bit worried that if one of the merged TpContact is blocked, it consider the whole individual as blocked. IMO it should let block personas individually.
Comment 9 Guillaume Desmottes 2011-12-14 10:30:59 UTC
Review of attachment 203426 [details] [review]:

::: src/empathy-main-window.c
@@ +2482,1 @@
 

good point; done.
Comment 10 Guillaume Desmottes 2011-12-14 10:31:09 UTC
Created attachment 203434 [details] [review]
fixup! remove EMPATHY_INDIVIDUAL_FEATURE_ALL
Comment 11 Guillaume Desmottes 2011-12-14 12:05:36 UTC
Created attachment 203444 [details] [review]
fixup! add EMPATHY_INDIVIDUAL_FEATURE_BLOCK

Item may be destroyed while the async call is running.
Comment 12 Guillaume Desmottes 2011-12-14 12:05:39 UTC
Created attachment 203445 [details] [review]
individual_menu_add_personas: add the block menu item, if needed

This allow user to select the personas he wants to block.

Note that I didn't pass an EmpathyContact as second argument to
empathy_individiual_block_menu_item_new() as we currently do with most
item_new() methods. Instead I just craft a new individual containing only the
persona we care about. This approach is much cleaner as we don't have to deal
with 2 different code paths. I filed bug #666163 to do the same with the
existing functions.
Comment 13 Guillaume Desmottes 2011-12-14 12:05:42 UTC
Created attachment 203446 [details] [review]
Show a contact as blocked if *all* is personas are blocked

It's clearer that way.
Comment 14 Guillaume Desmottes 2011-12-14 12:24:41 UTC
Attachment 203425 [details] pushed as 27de0b9 - individual-menu: allow priv->store to be NULL
Attachment 203426 [details] pushed as d1aa75b - remove EMPATHY_INDIVIDUAL_FEATURE_ALL
Attachment 203427 [details] pushed as a401d8e - add EMPATHY_INDIVIDUAL_FEATURE_BLOCK
Attachment 203428 [details] pushed as 4db0964 - chat: use an EmpathyIndividualMenu
Attachment 203429 [details] pushed as a162bb9 - map-view: use the individual menu
Attachment 203430 [details] pushed as fe992c0 - remove empathy-contact-menu
Attachment 203445 [details] pushed as a5bde7c - individual_menu_add_personas: add the block menu item, if needed
Attachment 203446 [details] pushed as 6fce69d - Show a contact as blocked if *all* is personas are blocked