GNOME Bugzilla – Bug 665038
Stop using EmpathyContactMenu
Last modified: 2011-12-14 12:25:09 UTC
We should always use the IndividualMenu and so reduce code duplication.
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.
Created attachment 203426 [details] [review] remove EMPATHY_INDIVIDUAL_FEATURE_ALL It's a bit fragile, user should say which features he wants.
Created attachment 203427 [details] [review] add EMPATHY_INDIVIDUAL_FEATURE_BLOCK
Created attachment 203428 [details] [review] chat: use an EmpathyIndividualMenu
Created attachment 203429 [details] [review] map-view: use the individual menu
Created attachment 203430 [details] [review] remove empathy-contact-menu
Review of attachment 203426 [details] [review]: ::: src/empathy-main-window.c @@ +2482,1 @@ you should remove EMPATHY_INDIVIDUAL_VIEW_FEATURE_ALL too then.
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.
Review of attachment 203426 [details] [review]: ::: src/empathy-main-window.c @@ +2482,1 @@ good point; done.
Created attachment 203434 [details] [review] fixup! remove EMPATHY_INDIVIDUAL_FEATURE_ALL
Created attachment 203444 [details] [review] fixup! add EMPATHY_INDIVIDUAL_FEATURE_BLOCK Item may be destroyed while the async call is running.
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.
Created attachment 203446 [details] [review] Show a contact as blocked if *all* is personas are blocked It's clearer that way.
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