Le Jeudi 13 Avril 2006 21:18, Conrad Hoffmann a écrit : > On Thursday 13 April 2006 18:52, Olivier Goffart wrote: > > Le Jeudi 13 Avril 2006 17:26, Conrad Hoffmann a écrit : > > > hey folks! > > > > > > I have a question i hope someone can help me with: > > > > > > i am trying to trigger a metacontact context menu from within a plugin. > > > it works well. > > > > How do you do that ? > > I didn't know it was possible. > > I basically copied the code from > KopeteContactListView::slotContextMenu(...) like i said, it works perfectly > for everything except the "Properties"
Even {copy,move} to groups actions ?
> > The solution of using the Kopete::ContactList 's selection instead of the
> > selected MetaContactLVI, as you mentionned, may work, (and i encourage
> > you to try). But probably not with all actions (like groups ones)
>
> i tried some things like iterating over the main list view until i find the
> metacontact i want, but since metacontactlvi.h is not installed, i can't
> query the listview items for their metacontact, and basically everything i
> tried resulted in some really ugly casts and other hacks. so, like i said,
> i will just drop that in favour of subcontact context menus only :)
What i mean is trying to modify the preference to work with MetaContact
instead of with MetaContactLVI
(there is AFAIK no reason to work with LVI)
> > Another problem is that the fact that two "contactlists" are modifying
> > the selection, which may cause bugs if the users switch from one to the
> > other contactlists (i never tested that)
>
> see above... most of it just works.
try to reproduce theses step:
1- Select some items in the main contactlist.
2- Select some items in your contactlist plugins
3- return in the main contactlist, and , without change the selection, go to
the main menu -> edit
I don't remember exactly if i was smart enough to call setSelectedItems when
the contactlist get the focus.
(But when I designed the function setSelectedItems, my objective was precisely
to allow contactlist plugin so maybe i did)
pgpJCS9NBpYTL.pgp
Description: PGP signature
_______________________________________________ kopete-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/kopete-devel
