~ubuntu-branches/ubuntu/quantal/psi/quantal

« back to all changes in this revision

Viewing changes to src/infodlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2005-01-10 17:41:43 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050110174143-ltocv5zapl6blf5d
Tags: 0.9.3-1
* New upstream release
* Cleaned up debian/rules (some things are done by upstream Makefiles now)
* Fixed some lintian warnings:
  - removed executable bit from some .png files
  - moved psi.desktop to /usr/share/applications
* Updated menu files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/****************************************************************************
2
 
** infodlg.cpp - show contact info
3
 
** Copyright (C) 2001, 2002  Justin Karneges
4
 
**
5
 
** This program is free software; you can redistribute it and/or
6
 
** modify it under the terms of the GNU General Public License
7
 
** as published by the Free Software Foundation; either version 2
8
 
** of the License, or (at your option) any later version.
9
 
**
10
 
** This program is distributed in the hope that it will be useful,
11
 
** but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
** GNU General Public License for more details.
14
 
**
15
 
** You should have received a copy of the GNU General Public License
16
 
** along with this program; if not, write to the Free Software
17
 
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 
**
19
 
****************************************************************************/
 
1
/*
 
2
 * infodlg.cpp - handle vcard
 
3
 * Copyright (C) 2001, 2002  Justin Karneges
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU General Public License
 
7
 * as published by the Free Software Foundation; either version 2
 
8
 * of the License, or (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this library; if not, write to the Free Software
 
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
 *
 
19
 */
20
20
 
21
21
#include"infodlg.h"
 
22
 
22
23
#include<qlayout.h>
 
24
#include<qlabel.h>
23
25
#include<qtabwidget.h>
24
26
#include<qpushbutton.h>
25
27
#include<qlineedit.h>
26
28
#include<qmessagebox.h>
27
 
 
28
 
 
29
 
InfoDlg::InfoDlg(int _type, const QString &jid, const VCard &_vcard, int _localStatus, QWidget *parent, const char *name)
30
 
:InfoUI(parent, name, FALSE, WDestructiveClose), UniqueWindow(TRUE, "InfoDlg", this, cleanJid(jid))
31
 
{
32
 
        v_jid = jid;
33
 
        vcard = _vcard;
34
 
 
35
 
        isBusy = FALSE;
36
 
 
37
 
        QWidget *w = new QWidget(this);
38
 
        busy = new BusyWidget(w);
39
 
        QHBoxLayout *hb1 = new QHBoxLayout(w);
40
 
        hb1->addStretch(1);
41
 
        hb1->addWidget(busy);
42
 
 
43
 
        int n = InfoDialog1Layout->findWidget(tabwidget);
44
 
        InfoDialog1Layout->insertWidget(n+1, w);
45
 
 
46
 
        setCaption(v_jid);
47
 
        setIcon(*pix_info);
48
 
 
49
 
        if(_localStatus == STATUS_OFFLINE) {
50
 
                pb_refresh->setEnabled(FALSE);
51
 
                pb_submit->setEnabled(FALSE);
52
 
        }
 
29
#include<qtextedit.h>
 
30
#include"xmpp.h"
 
31
#include"xmpp_vcard.h"
 
32
#include"xmpp_tasks.h"
 
33
#include"psiaccount.h"
 
34
#include"busywidget.h"
 
35
#include"common.h"
 
36
#include"vcardfactory.h"
 
37
#include"iconwidget.h"
 
38
 
 
39
using namespace XMPP;
 
40
 
 
41
class InfoDlg::Private
 
42
{
 
43
public:
 
44
        Private() {}
 
45
 
 
46
        int type;
 
47
        Jid jid;
 
48
        VCard vcard;
 
49
        PsiAccount *pa;
 
50
        BusyWidget *busy;
 
51
        bool te_edited;
 
52
        int actionType;
 
53
        JT_VCard *jt;
 
54
        bool cacheVCard;
 
55
};
 
56
 
 
57
InfoDlg::InfoDlg(int type, const Jid &j, const VCard &vcard, PsiAccount *pa, QWidget *parent, const char *name, bool cacheVCard)
 
58
:InfoUI(parent, name, false, WDestructiveClose)
 
59
{
 
60
        d = new Private;
 
61
        d->type = type;
 
62
        d->jid = j;
 
63
        d->vcard = vcard;
 
64
        d->pa = pa;
 
65
        d->te_edited = false;
 
66
        d->jt = 0;
 
67
        d->pa->dialogRegister(this, j);
 
68
        d->cacheVCard = cacheVCard;
 
69
 
 
70
        d->busy = busy;
 
71
 
 
72
        te_desc->setTextFormat(QTextEdit::PlainText);
 
73
 
 
74
        setCaption(d->jid.full());
 
75
#ifndef Q_WS_MAC
 
76
        setIcon(IconsetFactory::icon("psi/vCard"));
 
77
#endif
53
78
 
54
79
        connect(pb_refresh, SIGNAL(clicked()), this, SLOT(doRefresh()));
55
80
        connect(te_desc, SIGNAL(textChanged()), this, SLOT(textChanged()));
56
81
 
57
 
        type = _type;
58
 
        if(type == INFODLG_USER) {
 
82
        if(d->type == Self) {
59
83
                connect(pb_submit, SIGNAL(clicked()), this, SLOT(doSubmit()));
60
84
        }
61
85
        else {
62
86
                pb_submit->hide();
63
 
                setReadOnly(TRUE);
 
87
                setReadOnly(true);
64
88
        }
65
89
 
66
 
        setData(vcard);
67
 
}
68
 
 
69
 
void InfoDlg::closeEvent(QCloseEvent *e)
 
90
        setData(d->vcard);
 
91
}
 
92
 
 
93
InfoDlg::~InfoDlg()
 
94
{
 
95
        d->pa->dialogUnregister(this);
 
96
        delete d;
 
97
}
 
98
 
 
99
/*void InfoDlg::closeEvent(QCloseEvent *e)
 
100
{
 
101
        e->accept();
 
102
        reject();
 
103
}*/
 
104
 
 
105
void InfoDlg::done(int r)
70
106
{
71
107
        // don't close if submitting
72
 
        if(isBusy && actionType == 1) {
73
 
                e->ignore();
 
108
        if(d->busy->isActive() && d->actionType == 1)
74
109
                return;
75
 
        }
76
110
 
77
 
        if(type == INFODLG_USER && edited()) {
78
 
                bool x = QMessageBox::information(this, tr("Warning"), tr("You have not published your account information changes.\nAre you sure you want to discard them?"), tr("Close and discard"), tr("Don't close"));
79
 
                if(x != 0) {
80
 
                        e->ignore();
 
111
        if(d->type == Self && edited()) {
 
112
                int n = QMessageBox::information(this, tr("Warning"), tr("You have not published your account information changes.\nAre you sure you want to discard them?"), tr("Close and discard"), tr("Don't close"));
 
113
                if(n != 0)
81
114
                        return;
82
 
                }
83
115
        }
84
116
 
85
117
        // cancel active transaction (refresh only)
86
 
        if(isBusy && actionType == 0) {
87
 
                signalCancelTransaction(id);
88
 
        }
89
 
 
90
 
        e->accept();
91
 
}
92
 
 
93
 
void InfoDlg::localUpdate(const JabRosterEntry &e)
94
 
{
95
 
        int localStatus = e.localStatus();
96
 
 
97
 
        // if the user goes offline then cancel the request
98
 
        if(localStatus == STATUS_OFFLINE) {
99
 
                if(isBusy) {
100
 
                        busy->stop();
101
 
                        isBusy = FALSE;
102
 
 
103
 
//                      if(actionType == 1)
104
 
//                              QMessageBox::critical(this, tr("Error"), QString(tr("Disconnected")));
105
 
                }
106
 
                pb_refresh->setEnabled(FALSE);
107
 
                pb_submit->setEnabled(FALSE);
108
 
                fieldsEnable(TRUE);
109
 
        }
110
 
        else {
111
 
                if(!isBusy) {
112
 
                        pb_refresh->setEnabled(TRUE);
113
 
                        pb_submit->setEnabled(TRUE);
114
 
                }
115
 
        }
116
 
 
117
 
        pb_close->setEnabled(TRUE);
118
 
}
119
 
 
120
 
void InfoDlg::updateVCard(const VCard &_vcard)
121
 
{
122
 
        vcard = _vcard;
123
 
        setData(vcard);
124
 
 
125
 
        if(isBusy) {
126
 
                busy->stop();
127
 
                isBusy = FALSE;
128
 
                pb_refresh->setEnabled(TRUE);
129
 
                pb_submit->setEnabled(TRUE);
130
 
                pb_close->setEnabled(TRUE);
131
 
                fieldsEnable(TRUE);
132
 
        }
133
 
}
134
 
 
135
 
void InfoDlg::error()
136
 
{
137
 
        if(isBusy) {
138
 
                busy->stop();
139
 
                isBusy = FALSE;
140
 
                if(type == INFODLG_USER)
141
 
                        QMessageBox::critical(this, tr("Error"), QString(tr("Unable to retrieve your account information.  Perhaps you haven't entered any yet.")));
142
 
                else
143
 
                        QMessageBox::critical(this, tr("Error"), QString(tr("Unable to retrieve information about this contact.")));
144
 
                pb_refresh->setEnabled(TRUE);
145
 
                pb_submit->setEnabled(TRUE);
146
 
                pb_close->setEnabled(TRUE);
147
 
                fieldsEnable(TRUE);
148
 
        }
149
 
}
150
 
 
151
 
void InfoDlg::result(bool x)
152
 
{
153
 
        if(!isBusy)
154
 
                return;
155
 
 
156
 
        busy->stop();
157
 
        isBusy = FALSE;
158
 
 
159
 
        if(x) {
160
 
                QMessageBox::information(this, tr("Success"), QString(tr("Your account information has been published.")));
161
 
                vcard = submit_vcard;
162
 
                setData(submit_vcard);
163
 
        }
164
 
        else {
165
 
                QMessageBox::critical(this, tr("Error"), QString(tr("Unable to publish your account information.")));
166
 
        }
167
 
 
168
 
        pb_refresh->setEnabled(TRUE);
169
 
        pb_submit->setEnabled(TRUE);
170
 
        pb_close->setEnabled(TRUE);
171
 
        fieldsEnable(TRUE);
 
118
        if(d->busy->isActive() && d->actionType == 0) {
 
119
                delete d->jt;
 
120
                d->jt = 0;
 
121
        }
 
122
 
 
123
        QDialog::done(r);
 
124
}
 
125
 
 
126
void InfoDlg::jt_finished()
 
127
{
 
128
        d->busy->stop();
 
129
        pb_refresh->setEnabled(true);
 
130
        pb_submit->setEnabled(true);
 
131
        pb_close->setEnabled(true);
 
132
        fieldsEnable(true);
 
133
 
 
134
        if(d->jt->success()) {
 
135
                if(d->actionType == 0) {
 
136
                        d->vcard = d->jt->vcard();
 
137
                        setData(d->vcard);
 
138
                }
 
139
                else if(d->actionType == 1) {
 
140
                        d->vcard = d->jt->vcard();
 
141
                        if ( d->cacheVCard )
 
142
                                VCardFactory::setVCard(d->jid, d->vcard);
 
143
                        setData(d->vcard);
 
144
                }
 
145
 
 
146
                if(d->jid.compare(d->pa->jid(), false)) {
 
147
                        if (!d->vcard.nickName().isEmpty())
 
148
                                d->pa->setNick(d->vcard.nickName());
 
149
                        else
 
150
                                d->pa->setNick(d->pa->jid().user());
 
151
                }
 
152
 
 
153
                if(d->actionType == 1)
 
154
                        QMessageBox::information(this, tr("Success"), tr("Your account information has been published."));
 
155
        }
 
156
        else {
 
157
                if(d->actionType == 0) {
 
158
                        if(d->type == Self)
 
159
                                QMessageBox::critical(this, tr("Error"), tr("Unable to retrieve your account information.  Perhaps you haven't entered any yet."));
 
160
                        else
 
161
                                QMessageBox::critical(this, tr("Error"), tr("Unable to retrieve information about this contact.\nReason: %1").arg(d->jt->statusString()));
 
162
                }
 
163
                else {
 
164
                        QMessageBox::critical(this, tr("Error"), tr("Unable to publish your account information.\nReason: %1").arg(d->jt->statusString()));
 
165
                }
 
166
        }
 
167
 
 
168
        d->jt = 0;
172
169
}
173
170
 
174
171
void InfoDlg::setData(const VCard &i)
175
172
{
176
 
        le_fullname->setText(i.field[vFullname]);
177
 
        le_nickname->setText(i.field[vNickname]);
178
 
        le_bday->setText(i.field[vBday]);
179
 
        le_email->setText(i.field[vEmail]);
180
 
        le_homepage->setText(i.field[vHomepage]);
181
 
        le_phone->setText(i.field[vPhone]);
182
 
        le_street->setText(i.field[vStreet]);
183
 
        le_ext->setText(i.field[vExt]);
184
 
        le_city->setText(i.field[vCity]);
185
 
        le_state->setText(i.field[vState]);
186
 
        le_pcode->setText(i.field[vPcode]);
187
 
        le_country->setText(i.field[vCountry]);
188
 
        le_orgName->setText(i.field[vOrgName]);
189
 
        le_orgUnit->setText(i.field[vOrgUnit]);
190
 
        le_title->setText(i.field[vTitle]);
191
 
        le_role->setText(i.field[vRole]);
192
 
        te_desc->setText(i.field[vDesc]);
193
 
 
194
 
        setEdited(FALSE);
 
173
        le_fullname->setText( i.fullName() );
 
174
        le_nickname->setText( i.nickName() );
 
175
        le_bday->setText( i.bdayStr() );
 
176
 
 
177
        QString email;
 
178
        if ( !i.emailList().isEmpty() )
 
179
                email = i.emailList()[0].userid;
 
180
        le_email->setText( email );
 
181
 
 
182
        le_homepage->setText( i.url() );
 
183
 
 
184
        QString phone;
 
185
        if ( !i.phoneList().isEmpty() )
 
186
                phone = i.phoneList()[0].number;
 
187
        le_phone->setText( phone );
 
188
 
 
189
        VCard::Address addr;
 
190
        if ( !i.addressList().isEmpty() )
 
191
                addr = i.addressList()[0];
 
192
        le_street->setText( addr.street );
 
193
        le_ext->setText( addr.extaddr );
 
194
        le_city->setText( addr.locality );
 
195
        le_state->setText( addr.region );
 
196
        le_pcode->setText( addr.pcode );
 
197
        le_country->setText( addr.country );
 
198
 
 
199
        le_orgName->setText( i.org().name );
 
200
 
 
201
        QString unit;
 
202
        if ( !i.org().unit.isEmpty() )
 
203
                unit = i.org().unit[0];
 
204
        le_orgUnit->setText( unit );
 
205
 
 
206
        le_title->setText( i.title() );
 
207
        le_role->setText( i.role() );
 
208
        te_desc->setText( i.desc() );
 
209
 
 
210
        setEdited(false);
195
211
}
196
212
 
197
213
void InfoDlg::fieldsEnable(bool x)
216
232
        le_role->setEnabled(x);
217
233
        te_desc->setEnabled(x);
218
234
 
219
 
        setEdited(FALSE);
 
235
        setEdited(false);
220
236
}
221
237
 
222
238
void InfoDlg::setEdited(bool x)
238
254
        le_title->setEdited(x);
239
255
        le_role->setEdited(x);
240
256
 
241
 
        te_edited = x;
 
257
        d->te_edited = x;
242
258
}
243
259
 
244
260
bool InfoDlg::edited()
245
261
{
246
 
        bool x = FALSE;
 
262
        bool x = false;
247
263
 
248
 
        if(le_fullname->edited()) x = TRUE;
249
 
        if(le_nickname->edited()) x = TRUE;
250
 
        if(le_bday->edited()) x = TRUE;
251
 
        if(le_email->edited()) x = TRUE;
252
 
        if(le_homepage->edited()) x = TRUE;
253
 
        if(le_phone->edited()) x = TRUE;
254
 
        if(le_street->edited()) x = TRUE;
255
 
        if(le_ext->edited()) x = TRUE;
256
 
        if(le_city->edited()) x = TRUE;
257
 
        if(le_state->edited()) x = TRUE;
258
 
        if(le_pcode->edited()) x = TRUE;
259
 
        if(le_country->edited()) x = TRUE;
260
 
        if(le_orgName->edited()) x = TRUE;
261
 
        if(le_orgUnit->edited()) x = TRUE;
262
 
        if(le_title->edited()) x = TRUE;
263
 
        if(le_role->edited()) x = TRUE;
264
 
        if(te_edited) x = TRUE;
 
264
        if(le_fullname->edited()) x = true;
 
265
        if(le_nickname->edited()) x = true;
 
266
        if(le_bday->edited()) x = true;
 
267
        if(le_email->edited()) x = true;
 
268
        if(le_homepage->edited()) x = true;
 
269
        if(le_phone->edited()) x = true;
 
270
        if(le_street->edited()) x = true;
 
271
        if(le_ext->edited()) x = true;
 
272
        if(le_city->edited()) x = true;
 
273
        if(le_state->edited()) x = true;
 
274
        if(le_pcode->edited()) x = true;
 
275
        if(le_country->edited()) x = true;
 
276
        if(le_orgName->edited()) x = true;
 
277
        if(le_orgUnit->edited()) x = true;
 
278
        if(le_title->edited()) x = true;
 
279
        if(le_role->edited()) x = true;
 
280
        if(d->te_edited) x = true;
265
281
 
266
282
        return x;
267
283
}
289
305
 
290
306
void InfoDlg::doRefresh()
291
307
{
 
308
        if(!d->pa->checkConnected(this))
 
309
                return;
292
310
        if(!pb_refresh->isEnabled())
293
311
                return;
294
 
        if(isBusy)
 
312
        if(d->busy->isActive())
295
313
                return;
296
314
 
297
 
        pb_submit->setEnabled(FALSE);
298
 
        pb_refresh->setEnabled(FALSE);
299
 
        fieldsEnable(FALSE);
300
 
 
301
 
        signalGetVCard(v_jid, &id);
302
 
        isBusy = TRUE;
303
 
        actionType = 0;
304
 
        busy->start();
 
315
        pb_submit->setEnabled(false);
 
316
        pb_refresh->setEnabled(false);
 
317
        fieldsEnable(false);
 
318
 
 
319
        d->actionType = 0;
 
320
        d->busy->start();
 
321
 
 
322
        d->jt = VCardFactory::getVCard(d->jid, d->pa->client()->rootTask(), this, SLOT(jt_finished()), d->cacheVCard);
305
323
}
306
324
 
307
325
void InfoDlg::doSubmit()
308
326
{
 
327
        if(!d->pa->checkConnected(this))
 
328
                return;
309
329
        if(!pb_submit->isEnabled())
310
330
                return;
311
 
        if(isBusy)
 
331
        if(d->busy->isActive())
312
332
                return;
313
333
 
314
 
        pb_submit->setEnabled(FALSE);
315
 
        pb_refresh->setEnabled(FALSE);
316
 
        pb_close->setEnabled(FALSE);
317
 
 
318
 
        makeVCard();
319
 
 
320
 
        fieldsEnable(FALSE);
321
 
        signalSetVCard(submit_vcard, &id);
322
 
        isBusy = TRUE;
323
 
        actionType = 1;
324
 
        busy->start();
 
334
        VCard submit_vcard = makeVCard();
 
335
 
 
336
        pb_submit->setEnabled(false);
 
337
        pb_refresh->setEnabled(false);
 
338
        pb_close->setEnabled(false);
 
339
        fieldsEnable(false);
 
340
 
 
341
        d->actionType = 1;
 
342
        d->busy->start();
 
343
 
 
344
        d->jt = new JT_VCard(d->pa->client()->rootTask());
 
345
        connect(d->jt, SIGNAL(finished()), SLOT(jt_finished()));
 
346
        d->jt->set(submit_vcard);
 
347
        d->jt->go(true);
325
348
}
326
349
 
327
 
void InfoDlg::makeVCard()
 
350
VCard InfoDlg::makeVCard()
328
351
{
329
 
        VCard *v = &submit_vcard;
330
 
 
331
 
        v->field[vFullname] = le_fullname->text();
332
 
        v->field[vNickname] = le_nickname->text();
333
 
        v->field[vBday] = le_bday->text();
334
 
        v->field[vEmail] = le_email->text();
335
 
        v->field[vHomepage] = le_homepage->text();
336
 
        v->field[vPhone] = le_phone->text();
337
 
 
338
 
        v->field[vStreet] = le_street->text();
339
 
        v->field[vExt] = le_ext->text();
340
 
        v->field[vCity] = le_city->text();
341
 
        v->field[vState] = le_state->text();
342
 
        v->field[vPcode] = le_pcode->text();
343
 
        v->field[vCountry] = le_country->text();
344
 
 
345
 
        v->field[vOrgName] = le_orgName->text();
346
 
        v->field[vOrgUnit] = le_orgUnit->text();
347
 
        v->field[vTitle] = le_title->text();
348
 
        v->field[vRole] = le_role->text();
349
 
        v->field[vDesc] = te_desc->text();
 
352
        VCard v;
 
353
 
 
354
        v.setFullName( le_fullname->text() );
 
355
        v.setNickName( le_nickname->text() );
 
356
        v.setBdayStr( le_bday->text() );
 
357
 
 
358
        if ( !le_email->text().isEmpty() ) {
 
359
                VCard::Email email;
 
360
                email.internet = true;
 
361
                email.userid = le_email->text();
 
362
 
 
363
                VCard::EmailList list;
 
364
                list << email;
 
365
                v.setEmailList( list );
 
366
        }
 
367
 
 
368
        v.setUrl( le_homepage->text() );
 
369
 
 
370
        if ( !le_phone->text().isEmpty() ) {
 
371
                VCard::Phone p;
 
372
                p.home = true;
 
373
                p.voice = true;
 
374
                p.number = le_phone->text();
 
375
 
 
376
                VCard::PhoneList list;
 
377
                list << p;
 
378
                v.setPhoneList( list );
 
379
        }
 
380
 
 
381
        if ( !le_street->text().isEmpty() ||
 
382
             !le_ext->text().isEmpty()    ||
 
383
             !le_city->text().isEmpty()   ||
 
384
             !le_state->text().isEmpty()  ||
 
385
             !le_pcode->text().isEmpty()  ||
 
386
             !le_country->text().isEmpty() )
 
387
        {
 
388
                VCard::Address addr;
 
389
                addr.home = true;
 
390
                addr.street = le_street->text();
 
391
                addr.extaddr = le_ext->text();
 
392
                addr.locality = le_city->text();
 
393
                addr.region = le_state->text();
 
394
                addr.pcode = le_pcode->text();
 
395
                addr.country = le_country->text();
 
396
 
 
397
                VCard::AddressList list;
 
398
                list << addr;
 
399
                v.setAddressList( list );
 
400
        }
 
401
 
 
402
        VCard::Org org;
 
403
 
 
404
        org.name = le_orgName->text();
 
405
 
 
406
        if ( !le_orgUnit->text().isEmpty() )
 
407
                org.unit << le_orgUnit->text();
 
408
 
 
409
        v.setOrg( org );
 
410
 
 
411
        v.setTitle( le_title->text() );
 
412
        v.setRole( le_role->text() );
 
413
        v.setDesc( te_desc->text() );
 
414
 
 
415
        return v;
350
416
}
351
417
 
352
418
void InfoDlg::textChanged()
353
419
{
354
 
        te_edited = TRUE;
355
 
}
356
 
 
357
 
 
358
 
/*static*/ InfoDlg * InfoDlg::find(const QString &xjid)
359
 
{
360
 
        return (InfoDlg *)UniqueWindowBank::find("InfoDlg", cleanJid(xjid));
 
420
        d->te_edited = true;
361
421
}