~ubuntu-branches/ubuntu/wily/psi/wily-proposed

« back to all changes in this revision

Viewing changes to src/profiledlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-08-28 18:46:52 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080828184652-iiik12dl91nq7cdi
Tags: 0.12-2
Uploading to unstable (Closes: Bug#494352)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "profiledlg.h"
22
22
#include "applicationinfo.h"
23
23
#include "iconset.h"
 
24
#include "psioptions.h"
24
25
 
25
26
#include <QLabel>
26
27
#include <QComboBox>
36
37
#include <Q3ButtonGroup>
37
38
#include <QPixmap>
38
39
#include "profiles.h"
 
40
#include "common.h"
39
41
#include "iconwidget.h"
40
42
 
41
43
#include <qpainter.h>
65
67
        setupUi(this);
66
68
        setModal(true);
67
69
        setWindowTitle(CAP(caption()));
 
70
        pb_open->setDefault(true);
68
71
 
69
72
        langs = _langs;
70
73
 
331
334
        }
332
335
 
333
336
        // save config
334
 
        UserProfile p;
335
 
        p.prefs.defaultAction = bg_defAct->selected() == (Q3Button *)rb_message ? 0: 1;
336
 
        p.prefs.useEmoticons = ck_useEmoticons->isChecked();
337
 
        p.toFile(pathToProfileConfig(name));
338
 
 
 
337
        PsiOptions o;
 
338
        
 
339
        if (!o.newProfile()) {
 
340
                qWarning("ERROR: Failed to new profile default options");
 
341
        }
 
342
        
 
343
        
 
344
        o.setOption("options.messages.default-outgoing-message-type" ,bg_defAct->selected() == (Q3Button *)rb_message ? "message": "chat");
 
345
        o.setOption("options.ui.emoticons.use-emoticons" ,ck_useEmoticons->isChecked());
 
346
        o.save(pathToProfile(name) + "/options.xml");
 
347
        
339
348
        accept();
340
349
}
341
350