~ubuntu-branches/ubuntu/lucid/konversation/lucid-updates

« back to all changes in this revision

Viewing changes to src/dcc/recipientdialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Modestas Vainius
  • Date: 2009-05-19 09:44:08 UTC
  • mfrom: (1.16.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 47.
  • Revision ID: james.westby@ubuntu.com-20090519094408-yi3yv1v4zzbsu2nx
Tags: 1.1.75+svn969816-1
* New upstream development snapshot:
  - Last Changed Author: tjmchenry
  - Last Changed Rev: 969816
  - Last Changed Date: 2009-05-19 04:45:54 +0300
  - Translations as of Tue, 19 May 2009 09:21:13 are included.
* Update download URL in debian/copyright.
* Update Debian menu icons.
* Update konversation.install: install translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
QString DccRecipientDialog::selectedNickname;     // static
28
28
 
29
 
DccRecipientDialog::DccRecipientDialog(QWidget* parent, QAbstractListModel* model, const QSize &size) :
 
29
DccRecipientDialog::DccRecipientDialog(QWidget* parent, QAbstractListModel* model) :
30
30
  KDialog(parent)
31
31
{
32
32
    // Create the top level widget
59
59
    setButtonGuiItem(KDialog::Ok, KGuiItem(i18n("&OK"), "dialog-ok", i18n("Select nickname and close the window")));
60
60
    setButtonGuiItem(KDialog::Cancel, KGuiItem(i18n("&Cancel"), "dialog-cancel", i18n("Close the window without changes")));
61
61
 
62
 
    setInitialSize(size);
63
 
    show();
 
62
    restoreDialogSize(KConfigGroup(KGlobal::config(), "DCCRecipientDialog"));
 
63
 
64
64
    connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
65
65
    connect( this, SIGNAL( cancelClicked() ), this, SLOT( slotCancel() ) );
66
66
}
67
67
 
68
68
DccRecipientDialog::~DccRecipientDialog()
69
69
{
 
70
    KConfigGroup config(KGlobal::config(), "DCCRecipientDialog");
 
71
    saveDialogSize(config);
70
72
}
71
73
 
72
74
QString DccRecipientDialog::getSelectedNickname()
101
103
 
102
104
QString DccRecipientDialog::getNickname(QWidget* parent, QAbstractListModel* model)
103
105
{
104
 
    QSize size;                                   // TODO: get it from Preferences
105
 
    DccRecipientDialog dlg(parent, model, size);
106
 
    dlg.exec();
 
106
    QPointer<DccRecipientDialog> dlg = new DccRecipientDialog(parent, model);
 
107
    dlg->exec();
 
108
    const QString selectedNick = dlg->getSelectedNickname();
107
109
 
108
 
    return dlg.getSelectedNickname();
 
110
    delete dlg;
 
111
    return selectedNick;
109
112
}
110
113
 
111
114
#include "recipientdialog.moc"