Summary: | Contact chooser should allow multiple contacts choice | ||
---|---|---|---|
Product: | [Unmaintained] telepathy | Reporter: | Daniele E. Domenichelli <ddomenichelli> |
Component: | common-internals | Assignee: | Telepathy Bugs <kde-telepathy-bugs> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | wishlist | CC: | kde |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | Future | ||
Platform: | unspecified | ||
OS: | All | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Bug Depends on: | |||
Bug Blocks: | 246229, 316759 |
Description
Daniele E. Domenichelli
2010-07-30 11:40:47 UTC
We should already be able to do it in the widget, so we need to expose it in the dialog (moving to wishlist) Also I'm unsure how best to do this: Adding this to ContactGridWidget would suck because because then we have methods selectedContact() and signal selectionChanged(account, contact); which would be fundamentally broken. We need to return a QList < QPair<KTp::ContactPtr, Tp::AccountPtr> > which is a bit messy. Modifying it to always select lists makes all code using it a bit more complicated. Making a new widget would suck too because we now have two classes that do the same thing, and have a lot of duplication. Perhaps we can be inspired by QFileDialog, that can handle single/multiple file selection and have similar methods/signals https://qt-project.org/doc/qt-4.8/QFileDialog.html assuming we're editing KTp::ContactGridWidget: current interface: public: Tp::AccountPtr selectedAccount() const; Tp::ContactPtr selectedContact() const; Q_SIGNALS: void selectionChanged(Tp::AccountPtr selectedAccount, Tp::ContactPtr selectedContact); Stupid bugzilla (this is all meant to be one comment) proposed new interface: public: void setMultipleSelection(bool); QPair<Tp::AccountPtr, Tp::ContactPtr> selectedContact() const; QList<QPair<Tp::AccountPtr, Tp::ContactPtr> >selectedContacts() const; Q_SIGNALS: void selectionChanged(QList<QPair<Tp::AccountPtr, Tp::ContactPtr> >); then update all code to use it? Having a mix of selectedAccount, selectedContact and lists of pairs would be rubbish. ...and I don't really like using QPair. Maybe we could instead do: QList<Tp::ContactPtr> selectedContacts(); Tp::AccountPtr accountForContact(Tp::ContactPtr); instead? Seems neater. I wonder why can't we have a Contact that has a pointer to its account in TelepathyQt Perhaps we can have it in KTp::Contact? In that way we could just have QList<KTp::ContactPtr> selectedContacts(); contact->account(); Also we could simplify a lot of methods that require both account and contact... Anyway for now using the GlobalContactManager seems to be the easier option Dear user, unfortunately Telepathy is no longer maintained. Please migrate to another solution, e.g. for Jabber a possibility is Kaidan, for Matrix a candidate is NeoChat. |