~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to utilities/firstrun/openfilepage.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
{
51
51
public:
52
52
 
53
 
    OpenFilePagePriv()
 
53
    OpenFilePagePriv() :
 
54
        openAsPreview(0),
 
55
        openInEditor(0),
 
56
        openFileBehavior(0)
54
57
    {
55
 
        openAsPreview    = 0;
56
 
        openInEditor     = 0;
57
 
        openFileBehavour = 0;
58
58
    }
59
59
 
60
60
    QRadioButton* openAsPreview;
61
61
    QRadioButton* openInEditor;
62
62
 
63
 
    QButtonGroup* openFileBehavour;
 
63
    QButtonGroup* openFileBehavior;
64
64
};
65
65
 
66
66
OpenFilePage::OpenFilePage(KAssistantDialog* dlg)
67
 
            : AssistantDlgPage(dlg, i18n("<b>Configure Open File Behavior</b>")), 
68
 
              d(new OpenFilePagePriv)
 
67
    : AssistantDlgPage(dlg, i18n("<b>Configure Open File Behavior</b>")),
 
68
      d(new OpenFilePagePriv)
69
69
{
70
70
    KVBox* vbox    = new KVBox(this);
71
71
    QLabel* label1 = new QLabel(vbox);
77
77
    QWidget* btns       = new QWidget(vbox);
78
78
    QVBoxLayout* vlay   = new QVBoxLayout(btns);
79
79
 
80
 
    d->openFileBehavour = new QButtonGroup(btns);
 
80
    d->openFileBehavior = new QButtonGroup(btns);
81
81
    d->openAsPreview    = new QRadioButton(btns);
82
82
    d->openAsPreview->setText(i18n("Open a preview"));
83
83
    d->openAsPreview->setChecked(true);
84
 
    d->openFileBehavour->addButton(d->openAsPreview);
 
84
    d->openFileBehavior->addButton(d->openAsPreview);
85
85
 
86
86
    d->openInEditor = new QRadioButton(btns);
87
87
    d->openInEditor->setText(i18n("Open in the editor"));
88
 
    d->openFileBehavour->addButton(d->openInEditor);
 
88
    d->openFileBehavior->addButton(d->openInEditor);
89
89
 
90
90
    vlay->addWidget(d->openAsPreview);
91
91
    vlay->addWidget(d->openInEditor);
105
105
    setPageWidget(vbox);
106
106
 
107
107
    QPixmap leftPix = KStandardDirs::locate("data","digikam/data/assistant-openfile.png");
108
 
    setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation)); 
 
108
    setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation));
109
109
}
110
110
 
111
111
OpenFilePage::~OpenFilePage()
117
117
{
118
118
    KSharedConfig::Ptr config = KGlobal::config();
119
119
    KConfigGroup group        = config->group("Album Settings");
120
 
    group.writeEntry("Item Left Click Action", (int)(d->openInEditor->isChecked() ? 
121
 
                                               AlbumSettings::StartEditor : AlbumSettings::ShowPreview));
 
120
    group.writeEntry("Item Left Click Action", (int)(d->openInEditor->isChecked() ?
 
121
                     AlbumSettings::StartEditor : AlbumSettings::ShowPreview));
122
122
 
123
123
    config->sync();
124
124
}