List Info

Thread: Re: drag'n drop patch




Re: drag'n drop patch
user name
2007-08-14 11:53:20
Hi Yana,

As you tell me off list that the previous patch haven't
worked, I have 
checked and rechecked to see what was going wrong. But, all
(nope, 
almost) was working fine (for me). So, I think that it is
probably your 
config files stored by meta contaclist service (or
metacontact list 
storage manager) which have gone inconsistent.

Perhaps if you try to delete them and restart, the merge
operation will 
works fine. But I haven't asked : does the unmerge fails
only with dnd 
or even when you use the right mouse menu ?

I think that there are few things which need to get fixed in
the
	net.java.sip.communicator.impl.contactlist;
package. For the moment, I have made only very minor
changes. I will
look it further later.

The patch wich I provide here also add a background to a
metact contact 
image when it is dragged and make it a little bit
transparent.

regards.


Sympho a écrit :
> Hi all, Emil, Yana
> 
> Emil Ivov a écrit :
>> Hey guys,
>>
>> I've just tried the drag and drop feature, and it
really works great!
>> Excellent contribution Sympho!
>>
> 
> tx 
> 
>> There's just one tine spec bother me. Once you
start dragging someone
>> and you change your mind in the middle of the
process, there's no way to
>> cancel it. Wouldn't it be nice to be able to do
this by pressing Escape?
>>
> 
> It was already possible to cancel the process by
dropping the moved 
> element on it's source. Now, the escape key will also
do it.
> 
>> Emil
>>
>> Yana Stamcheva wrote:
>>> Hi Sympho,
>>>
>>> that's a great work that you've done here! I
just love the drag&drop 
>>> functionality in the contact list!
>>>
> 
> tx 
> 
>>> I have just applied, committed and ack-ed your
patch. Thanks!
>>>
>>> I've made some tests and it works like a charm.
I've noticed two 
>>> little problems that you may have not noticed.
>>>
>>> The first one considers the automatic telephony
account selection. 
>>> When we have two telephony accounts and one of
them is offline and 
>>> the other is online, and if we select a contact
in the contact list 
>>> which belongs on the first one, the account
selector box will select 
>>> the offline account. I think this could be
easily fixed by checking 
>>> if the account corresponding to the selected
contact is currently 
>>> registered.
>>>
> 
> Well. I also think there is a real problem here. In
fact, I see a
> little bit more deep issues ^^
>     1 - Currently, the sip impl allows to successfully
call (online or 
> offline) users even if the account used to call is
marked offline. I 
> think it's wrong (not trying to call an offline
contact, but to use an 
> offline account to issue calls), isn'it ?
>     2 - The contact list displays contacts  even for
offline
> accounts. Is that correct ? Usually, even when you are
"invisible", you 
> have to be logged in to view your contacts.
> 
> I have replaced parts of the previous auto switch code
with
>     CallManager#getTelephonyContact(MetaContact
metaContact)
> Which seems to make the equivalent job. But, it's
temporary because
> I feel like this method isn't appropriate as it doesn't
deal with the 
> fact that a meta contact could have more than one
telephony contact.
> 
> What, if we add a method like that in the MetaContact
interface ?
>     Contact getDefaultContact(OperationSetXXX)
> which return the default contact in a meta contact for
a specified 
> opSet. I think it will greatly ease the deal with meta
contacts.
> 
> The first thing to do will be to define what is the
default contact for 
> a specified opSet.
> 
>>> The second problem is when unmerging contacts.
I haven't make a lot 
>>> of investigation on this one though. I think we
have already 
>>> mentioned this problem off-mailing list and I'm
just mentioning it 
>>> here for the record. I think it's related to
the 
>>> MetaContactListService. If you have time you
could have a look on 
>>> this one.
>>>
> 
> I guess you're talking about strangeness wich could
happen on 
> displaynames when contacts are unmerged.
> 
> The problem comes from the way that displaynames are
managed.
> With this patch, when contacts are unmerged, each new
metacontact 
> retrieves its display name from it's default contact
(only if needed).
> 
> Little changes has been made in the
MetaContactListService to handle 
> this new behaviour.
> 
> I have also fixed a trivial but hard to find and nasty
bug from
>     MetaContactImpI#removeProtoContact
> The default contact wasn't updated after a remoce,
hence a MetaContact 
> could have a removed contact as its default.
> 
>>> As for your code I should say first that your
code is very clear and 
>>> easy to follow and it respects all code
conventions. However there 
>>> were some javadoc comments missing Could you
please add some 
>>> comments in the ContactListDraggable and in the
ContactList for 
>>> methods mousePressed, mouseDragged and
mouseReleased.
>>>
> 
> Commented, Cleaned, a little bit redesigned and
polished.
> The visual feedback of the dnd operation has also been
improved.
> 
> That's all
> 
> ++
> 
>>> I have also made some minor changes for some of
your modifications. 
>>> In the UIServiceImpl I have added an
if(isVisible) before bringing 
>>> window to front. Also I've moved the code that
opens or closes a 
>>> group on a double click in the
if(selectedContact instanceof 
>>> MetaContactGroup). I've also added a javadoc
comment for the 
>>> getAccountSelectorBox method in the
CallManager, and a param in the 
>>> javadoc in ContactListEvent. I think that's it,
as I said, very minor 
>>> changes.
>>>
>>> Once again thanks for your effort!
>>> Yana
>>>
>>> Sympho wrote:
>>>> Hi Yana,
>>>>
>>>> With this patch, the SC window comes on top
of windows when
>>>> we make it visible (from the systray).
>>>>
>>>> After this one, I will let you breathe...
for a moment 
>>>>
>>>> ++
>>>>
>>>> Sympho a écrit :
>>>>> Hi all,
>>>>>
>>>>> This patch will introduce a little
change in gui behaviour.
>>>>> A simple click on the contact list will
not open a chat window 
>>>>> anymore.
>>>>> It will just select the clicked
contact. A chat window will be openned
>>>>> with a double click on a contact.
>>>>>
>>>>> A simple click on protocol icon at the
right of a contact will 
>>>>> continues to
>>>>> directly open a chat window with that
contact with the desired 
>>>>> protocol
>>>>> as always.
>>>>>
>>>>>    - The clicker.
>>>>>
>>>>> PS: Yana this patch include the
previous one with fixes 
>>>>>
>>>>>
>>>>>
>>>>> Sympho a écrit :
>>>>>> Hi Yana,
>>>>>>
>>>>>> Here is the patch we were talking
about. It includes the previous
>>>>>> and minor changes.
>>>>>>
>>>>>> ++
>>>>>>
>>>>>>
------------------------------------------------------------
------------ 
>>>>>>
>>>>>>
>>>>>>
------------------------------------------------------------
---------
>>>>>> To unsubscribe, e-mail:
dev-unsubscribesip-communicator.dev.java.net
>>>>>> For additional commands, e-mail: 
>>>>>> dev-helpsip-communicator.dev.java.net
>>>>>
------------------------------------------------------------
------------ 
>>>>>
>>>>>
>>>>>
------------------------------------------------------------
---------
>>>>> To unsubscribe, e-mail:
dev-unsubscribesip-communicator.dev.java.net
>>>>> For additional commands, e-mail: 
>>>>> dev-helpsip-communicator.dev.java.net
>>>>
------------------------------------------------------------
------------ 
>>>>
>>>>
>>>>
------------------------------------------------------------
---------
>>>> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
>>>> For additional commands, e-mail:
dev-helpsip-communicator.dev.java.net
>>>
------------------------------------------------------------
---------
>>> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
>>> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
>>>
>>>
>>
>>
------------------------------------------------------------
---------
>> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
>> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
>>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Hey! Why have you scrolled at this point ? 
> 
> 
>
------------------------------------------------------------
------------
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
  
Re: drag'n drop patch
user name
2007-08-16 10:33:33
Hi Sympho,

I've tried the last patch and it worked. I'm not sure what
was the 
problem before.

I've now applied the patch and committed the code. I've
applied it as it 
was. I've just added two lines in the ContactListDraggable
in order to 
paint a border around the draggable component. Hope you like
it like this.

Something I've noticed while testing the patch is that when
you drag a 
meta contact, the name of the contact is well shown in the
draggable 
element, but when you drag a protocol contact (unmerge),
only the 
protocol icon is shown. In the code it happens on line 771
in the 
ContactList class. Actually, why don't you create your image
in the 
ContactListDraggable, instead of passing it as a parameter.
Or, as your 
ContactListDraggable extends JComponent, you could actually
make it a 
JLabel, instead of using an image. Maybe that's the way
you're planning 
to do it anyway.

Thanks again for the contribution!

Yana


Sympho wrote:
> Hi Yana,
> 
> As you tell me off list that the previous patch haven't
worked, I have 
> checked and rechecked to see what was going wrong. But,
all (nope, 
> almost) was working fine (for me). So, I think that it
is probably your 
> config files stored by meta contaclist service (or
metacontact list 
> storage manager) which have gone inconsistent.
> 
> Perhaps if you try to delete them and restart, the
merge operation will 
> works fine. But I haven't asked : does the unmerge
fails only with dnd 
> or even when you use the right mouse menu ?
> 
> I think that there are few things which need to get
fixed in the
>     net.java.sip.communicator.impl.contactlist;
> package. For the moment, I have made only very minor
changes. I will
> look it further later.
> 
> The patch wich I provide here also add a background to
a metact contact 
> image when it is dragged and make it a little bit
transparent.
> 
> regards.
> 
> 
> Sympho a écrit :
>> Hi all, Emil, Yana
>>
>> Emil Ivov a écrit :
>>> Hey guys,
>>>
>>> I've just tried the drag and drop feature, and
it really works great!
>>> Excellent contribution Sympho!
>>>
>>
>> tx 
>>
>>> There's just one tine spec bother me. Once you
start dragging someone
>>> and you change your mind in the middle of the
process, there's no way to
>>> cancel it. Wouldn't it be nice to be able to do
this by pressing Escape?
>>>
>>
>> It was already possible to cancel the process by
dropping the moved 
>> element on it's source. Now, the escape key will
also do it.
>>
>>> Emil
>>>
>>> Yana Stamcheva wrote:
>>>> Hi Sympho,
>>>>
>>>> that's a great work that you've done here!
I just love the drag&drop 
>>>> functionality in the contact list!
>>>>
>>
>> tx 
>>
>>>> I have just applied, committed and ack-ed
your patch. Thanks!
>>>>
>>>> I've made some tests and it works like a
charm. I've noticed two 
>>>> little problems that you may have not
noticed.
>>>>
>>>> The first one considers the automatic
telephony account selection. 
>>>> When we have two telephony accounts and one
of them is offline and 
>>>> the other is online, and if we select a
contact in the contact list 
>>>> which belongs on the first one, the account
selector box will select 
>>>> the offline account. I think this could be
easily fixed by checking 
>>>> if the account corresponding to the
selected contact is currently 
>>>> registered.
>>>>
>>
>> Well. I also think there is a real problem here. In
fact, I see a
>> little bit more deep issues ^^
>>     1 - Currently, the sip impl allows to
successfully call (online or 
>> offline) users even if the account used to call is
marked offline. I 
>> think it's wrong (not trying to call an offline
contact, but to use an 
>> offline account to issue calls), isn'it ?
>>     2 - The contact list displays contacts  even
for offline
>> accounts. Is that correct ? Usually, even when you
are "invisible", 
>> you have to be logged in to view your contacts.
>>
>> I have replaced parts of the previous auto switch
code with
>>     CallManager#getTelephonyContact(MetaContact
metaContact)
>> Which seems to make the equivalent job. But, it's
temporary because
>> I feel like this method isn't appropriate as it
doesn't deal with the 
>> fact that a meta contact could have more than one
telephony contact.
>>
>> What, if we add a method like that in the
MetaContact interface ?
>>     Contact getDefaultContact(OperationSetXXX)
>> which return the default contact in a meta contact
for a specified 
>> opSet. I think it will greatly ease the deal with
meta contacts.
>>
>> The first thing to do will be to define what is the
default contact 
>> for a specified opSet.
>>
>>>> The second problem is when unmerging
contacts. I haven't make a lot 
>>>> of investigation on this one though. I
think we have already 
>>>> mentioned this problem off-mailing list and
I'm just mentioning it 
>>>> here for the record. I think it's related
to the 
>>>> MetaContactListService. If you have time
you could have a look on 
>>>> this one.
>>>>
>>
>> I guess you're talking about strangeness wich could
happen on 
>> displaynames when contacts are unmerged.
>>
>> The problem comes from the way that displaynames
are managed.
>> With this patch, when contacts are unmerged, each
new metacontact 
>> retrieves its display name from it's default
contact (only if needed).
>>
>> Little changes has been made in the
MetaContactListService to handle 
>> this new behaviour.
>>
>> I have also fixed a trivial but hard to find and
nasty bug from
>>     MetaContactImpI#removeProtoContact
>> The default contact wasn't updated after a remoce,
hence a MetaContact 
>> could have a removed contact as its default.
>>
>>>> As for your code I should say first that
your code is very clear and 
>>>> easy to follow and it respects all code
conventions. However there 
>>>> were some javadoc comments missing Could you
please add some 
>>>> comments in the ContactListDraggable and in
the ContactList for 
>>>> methods mousePressed, mouseDragged and
mouseReleased.
>>>>
>>
>> Commented, Cleaned, a little bit redesigned and
polished.
>> The visual feedback of the dnd operation has also
been improved.
>>
>> That's all
>>
>> ++
>>
>>>> I have also made some minor changes for
some of your modifications. 
>>>> In the UIServiceImpl I have added an
if(isVisible) before bringing 
>>>> window to front. Also I've moved the code
that opens or closes a 
>>>> group on a double click in the
if(selectedContact instanceof 
>>>> MetaContactGroup). I've also added a
javadoc comment for the 
>>>> getAccountSelectorBox method in the
CallManager, and a param in the 
>>>> javadoc in ContactListEvent. I think that's
it, as I said, very 
>>>> minor changes.
>>>>
>>>> Once again thanks for your effort!
>>>> Yana
>>>>
>>>> Sympho wrote:
>>>>> Hi Yana,
>>>>>
>>>>> With this patch, the SC window comes on
top of windows when
>>>>> we make it visible (from the systray).
>>>>>
>>>>> After this one, I will let you
breathe... for a moment 
>>>>>
>>>>> ++
>>>>>
>>>>> Sympho a écrit :
>>>>>> Hi all,
>>>>>>
>>>>>> This patch will introduce a little
change in gui behaviour.
>>>>>> A simple click on the contact list
will not open a chat window 
>>>>>> anymore.
>>>>>> It will just select the clicked
contact. A chat window will be 
>>>>>> openned
>>>>>> with a double click on a contact.
>>>>>>
>>>>>> A simple click on protocol icon at
the right of a contact will 
>>>>>> continues to
>>>>>> directly open a chat window with
that contact with the desired 
>>>>>> protocol
>>>>>> as always.
>>>>>>
>>>>>>    - The clicker.
>>>>>>
>>>>>> PS: Yana this patch include the
previous one with fixes 
>>>>>>
>>>>>>
>>>>>>
>>>>>> Sympho a écrit :
>>>>>>> Hi Yana,
>>>>>>>
>>>>>>> Here is the patch we were
talking about. It includes the previous
>>>>>>> and minor changes.
>>>>>>>
>>>>>>> ++
>>>>>>>
>>>>>>>
------------------------------------------------------------
------------ 
>>>>>>>
>>>>>>>
>>>>>>>
------------------------------------------------------------
--------- 
>>>>>>>
>>>>>>> To unsubscribe, e-mail: 
>>>>>>> dev-unsubscribesip-communicator.dev.java.net
>>>>>>> For additional commands,
e-mail: 
>>>>>>> dev-helpsip-communicator.dev.java.net
>>>>>>
------------------------------------------------------------
------------ 
>>>>>>
>>>>>>
>>>>>>
------------------------------------------------------------
---------
>>>>>> To unsubscribe, e-mail:
dev-unsubscribesip-communicator.dev.java.net
>>>>>> For additional commands, e-mail: 
>>>>>> dev-helpsip-communicator.dev.java.net
>>>>>
------------------------------------------------------------
------------ 
>>>>>
>>>>>
>>>>>
------------------------------------------------------------
---------
>>>>> To unsubscribe, e-mail:
dev-unsubscribesip-communicator.dev.java.net
>>>>> For additional commands, e-mail: 
>>>>> dev-helpsip-communicator.dev.java.net
>>>>
------------------------------------------------------------
---------
>>>> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
>>>> For additional commands, e-mail:
dev-helpsip-communicator.dev.java.net
>>>>
>>>>
>>>
>>>
------------------------------------------------------------
---------
>>> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
>>> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
>>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Hey! Why have you scrolled at this point ? 
>>
>>
>>
------------------------------------------------------------
------------
>>
>>
------------------------------------------------------------
---------
>> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
>> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net
> 
> 
>
------------------------------------------------------------
------------
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
> For additional commands, e-mail: dev-helpsip-communicator.dev.java.net

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesip-communicator.dev.java.net
For additional commands, e-mail: dev-helpsip-communicator.dev.java.net


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )