Edit business card dialog can be opened multiple times

Bug #179936 reported by sander
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Coccinella
Fix Released
Low
buzzdee

Bug Description

The dialog to edit your business card currently can be opened several times. This may not be. When the user tries to open File-->Edit Business Card... for a second time, the opened dialog should become in focus (*and* updated: otherwise this may introduce a new bug when the user switched profile in the meantime!).

URL: http://coccinella.im/node/159

sander (s-devrieze)
Changed in coccinella:
assignee: nobody → matsben
importance: Undecided → Low
Revision history for this message
Mats (matsben) wrote :

I think that the bug in http://coccinella.im/node/159 is something else and unrelated to this tracker item. In any case I added a better error check for partial vcards which have 'binval' element but missing the photo mime type.

Else there are two issues:

1) dialog shall be disabled after logout

2) don't create multiple dialogs for the same JID

Revision history for this message
sander (s-devrieze) wrote : Re: [Bug 179936] Re: Edit business card dialog can be opened multiple times

2008/1/3, Mats <email address hidden>:
> I think that the bug in http://coccinella.im/node/159 is something else
> and unrelated to this tracker item.

It's only a part of that report:
"(cosmetic bug: when I show this dialog and click again on File->Edit
bu.... dialog is showing again, maybe it is nonmodal)"

Revision history for this message
buzzdee (sebastia) wrote :

I created a patch to UserInfo.tcl in order to only raise the edit business card dialog only once for the same JID

Therefore I had to change how the uid is defined. For each click on edit business card, the uid was incremented by 1. Now I took the
jid2 to create a unique ID and window name.
Now it is possible to check whether a window with the same name already exists, and just only raise that window indstead of open a new one.

Revision history for this message
buzzdee (sebastia) wrote :

with above patch, when someone has geolocation set, an exception still shows up, need again take a look...

Changed in coccinella:
milestone: none → 0.96.16
assignee: Mats (matsben) → Coccinella (coccinella)
status: New → In Progress
assignee: Coccinella (coccinella) → buzzdee (sebastia)
Revision history for this message
buzzdee (sebastia) wrote :

hi,

appended patch supersedes the patch attached to comment #3,
It fixes the mentioned problem when geolocation was set on the called parter
Further the rotating arrows now are not started on subsequent load of the vcard
further a problem with the client info that arose when the client info is able to be retrieved is fixed

Revision history for this message
buzzdee (sebastia) wrote :

forgot to mention, the patch in comment #5 also contains the patch to the geoloc error bug I reported some days ago...
Whereas I am not perfectly sure whether this will break translation of the string manipulated there, not yet figured out how that is exactly working ;)

Revision history for this message
sander (s-devrieze) wrote :

"Now it is possible to check whether a window with the same name already exists, and just only raise that window indstead of open a new one."

Your patch only partially works: no new window is opened. However, raising the window does not work. I will apply your patch, but please fix this bug so that this bug entry can be closed.

Revision history for this message
sander (s-devrieze) wrote :
Download full text (4.0 KiB)

1) Forget about comment #7; as I already thought this seems to be a misfeature in Metacity: Bug #379242. Though, if there is another solution that does not have this issue, you can update the patch.

2) As you said by im, I did omit this part of the patch:

+ if ([winfo exists $priv(wpageversion).l0]) {
+ return
+ }

...to fix this error:

can't read "priv(wpageversion)": no such element in array
can't read "priv(wpageversion)": no such element in array
while executing
"winfo exists $priv(wpageversion).l0"
(procedure "::UserInfo::VersionCB" line 7)
invoked from within
"::UserInfo::VersionCB ::UserInfo::ladybugjabberse ::jlib::jlib1 error {service-unavailable {The server or recipient does not currently provide the req..."
("uplevel" body line 1)
invoked from within
"uplevel #0 $cmd [list $jlibname $type $subiq]"
(procedure
<snip>

*However*, a new error appears:

window name "l0" already exists in parent
window name "l0" already exists in parent
    while executing
"ttk::label $f.l$i -text $key: -wraplength 300 -justify left"
    (procedure "::UserInfo::VersionCB" line 37)
    invoked from within
"::UserInfo::VersionCB ::UserInfo::ladybugjabberse ::jlib::jlib1 result {query {xmlns jabber:iq:version} 0 {} {{name {} 0 Coccinella {}} {version {} 0 ..."
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 $cmd [list $jlibname $type $subiq]"
    (procedure "::jlib::invoke_iq_callback" line 5)
    invoked from within
"::jlib::invoke_iq_callback ::jlib::jlib1 {::UserInfo::VersionCB ::UserInfo::ladybugjabberse} result {query {xmlns jabber:iq:version} 0 {} {{name {} 0 ..."
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 $iqcmd($id) [list result $subiq]"
    (procedure "iq_handler" line 67)
    invoked from within
"iq_handler $jlibname $xmldata"
    (procedure "::jlib::dispatcher" line 9)
    invoked from within
"::jlib::dispatcher ::jlib::jlib1 {iq {from <email address hidden>/Coccinella@sander-laptop id 1022 xml:lang en type result to <email address hidden>/Coccinella@..."
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 $wrapper($id,parsecmd) [list $wrapper($id,tree,2)]"
    (procedure "::wrapper::elementend" line 41)
    invoked from within
"::wrapper::elementend wrap1 iq -namespace jabber:iq:version"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 $options(-elementendcommand) [list $tag] $empty $ns"
    invoked from within
"ParseEvent:ElementClose $tag [array get options]"
    invoked from within
"::sgml::parseEvent {{} {} {} {} iq {} { <email address hidden>/Coccinella@sander-laptop' <email address hidden>/Coccinella@sander-laptop' xml:lang='en..."
    ("eval" body line 1)
    invoked from within
"eval ::sgml::parseEvent [list $tokenised] $parseOptions"
    (procedure "parse" line 60)
    invoked from within
"parse xmlparser2 {<iq <email address hidden>/Coccinella@sander-laptop' <email address hidden>/Coccinella@sander-laptop' xml:lang='en' type='result' id..."
    (in namespace inscope "::xml::tclparser" script line 1)
    invoked from within
"::namespace inscope ::xml::tclparser parse xmlparser2 {<iq <email address hidden>/Coccinella@sander-laptop' <email address hidden>/Coccinella@sander-l..."
  ...

Read more...

Revision history for this message
sander (s-devrieze) wrote :

4) It seems that the Send File dialog got broken someway by the latest patches. It keeps showing "Waiting for disco result..." but nothing happens.

Revision history for this message
sander (s-devrieze) wrote :

"Whereas I am not perfectly sure whether this will break translation of the string manipulated there, not yet figured out how that is exactly working ;)"

fyi: I fixed translation of strings in revision 2732. Also, your patch inspired me to improve the code in another dialog.

Revision history for this message
buzzdee (sebastia) wrote :

reply to #9, I guess this could only be because of patch to roster.tcl, need to take a look there.
The exception in comment #8 happens without the stuff that you omitted, I had that too, need to take a look at it again, maybe you added it in the wrong place?

Revision history for this message
buzzdee (sebastia) wrote :

appended patch fixes the exception for me, tried requesting info from jabber and icq contacts.

Revision history for this message
buzzdee (sebastia) wrote :

I am unable to reproduce the problem you mentioned in comment #9, I can just send a file and the other one receives it...
I have svn version 2732 running with both sender and receiver of a file, both connected to my ejbberd...

Revision history for this message
sander (s-devrieze) wrote :

All works now, except the Metacity issue (Bug #379242) and the third item in comment #8 (see "read more" :-) ).

Revision history for this message
buzzdee (sebastia) wrote :

citing comment #8 (someone with open eyes is really in an advantageous position ;):
3) Maybe it is a good idea to add similar code to the History, Edit Contact, and Contact Actions dialogs.

I'll take a look, however, not sure whether I can get to it this week, the rest of it is probably a bit busy with other things ;)

cheers

Revision history for this message
buzzdee (sebastia) wrote :

I also changed the code to only show one window per JID in the History and Contact Actions dialog, further added focus to the Edit Contact dialog.
Please test.

Revision history for this message
sander (s-devrieze) wrote :

It seems to work perfectly; no bugs found. If you don't have any related code changes in mind, I think you can mark this bug as "fix committed".

buzzdee (sebastia)
Changed in coccinella:
status: In Progress → Won't Fix
status: Won't Fix → Fix Committed
buzzdee (sebastia)
Changed in coccinella:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.