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 666163 - EmpathyIndividualMenu cleanup
EmpathyIndividualMenu cleanup
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-12-14 11:54 UTC by Guillaume Desmottes
Modified: 2011-12-14 14:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
individual-menu: export only the methods we need (7.04 KB, patch)
2011-12-14 14:20 UTC, Guillaume Desmottes
committed Details | Review
Stop passing an EmpathyContact to menu_item_new() fonctions (18.46 KB, patch)
2011-12-14 14:20 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2011-12-14 11:54:13 UTC
Most menu_item_new functions uses this pattern:

GtkWidget *
empathy_individual_chat_menu_item_new (FolksIndividual *individual,
    EmpathyContact *contact)

We could simplify this code by dropping the @contact arg and just crafting another individual containing only the persona we care about it.
Comment 1 Guillaume Desmottes 2011-12-14 14:20:45 UTC
Created attachment 203473 [details] [review]
individual-menu: export only the methods we need

No need to export everything. I added prototypes in the C file to not have to
move everything upside down.
Comment 2 Guillaume Desmottes 2011-12-14 14:20:48 UTC
Created attachment 203474 [details] [review]
Stop passing an EmpathyContact to menu_item_new() fonctions

Best to always use an individual so we don't have 2 code paths to maintain.
Comment 3 Guillaume Desmottes 2011-12-14 14:28:12 UTC
Attachment 203473 [details] pushed as cb2e624 - individual-menu: export only the methods we need
Attachment 203474 [details] pushed as 9dd688a - Stop passing an EmpathyContact to menu_item_new() fonctions