~ubuntu-branches/ubuntu/edgy/psi/edgy

« back to all changes in this revision

Viewing changes to src/historydlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2006-03-28 11:11:02 UTC
  • mfrom: (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20060328111102-v1diqpbwqr4yijoy
Tags: 0.10-2build1
Manual sync from Debian. No Ubuntu-specific changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
#include"eventdb.h"
39
39
#include"userlist.h"
40
40
 
41
 
static QString lastPath;
42
 
 
43
41
static QString getNext(QString *str)
44
42
{
45
43
        // are we in space?
274
272
 
275
273
void HistoryDlg::doSave()
276
274
{
277
 
        if(lastPath.isEmpty())
278
 
                lastPath = QDir::homeDirPath();
 
275
        if(option.lastSavePath.isEmpty())
 
276
                option.lastSavePath = QDir::homeDirPath();
279
277
 
280
278
        UserListItem *u = d->pa->findFirstRelavent(d->jid);
281
279
        QString them = jidnick(u->jid().full(), u->name());
282
280
        QString s = qstrlower(jidEncode(them));
283
281
 
284
 
        QString str = lastPath + "/" + s + ".txt";
 
282
        QString str = option.lastSavePath + "/" + s + ".txt";
285
283
        while(1) {
286
284
                str = QFileDialog::getSaveFileName(str, tr("Text files (*.txt);;All files (*.*)"), this, 0, tr("Export message history"));
287
285
                if(str.isEmpty())
294
292
                                continue;
295
293
                }
296
294
 
297
 
                lastPath = fi.dirPath();
 
295
                option.lastSavePath = fi.dirPath();
298
296
                exportHistory(str);
299
297
                break;
300
298
        }