~ubuntu-branches/ubuntu/natty/digikam/natty

« back to all changes in this revision

Viewing changes to utilities/firstrun/collectionpage.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Luka Renko
  • Date: 2009-11-12 18:02:13 UTC
  • mfrom: (1.2.24 upstream) (3.2.7 sid)
  • Revision ID: james.westby@ubuntu.com-20091112180213-8p63z8taug49ji3t
Tags: 2:1.0.0~beta6-1ubuntu1
* Merge with Debian, remaining changes:
  - Export .pot name and copy to plugins in debian/rules
  - Remove liblqr-1-0-dev from build-deps, not in main

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
#include <kglobalsettings.h>
45
45
#include <kmessagebox.h>
46
46
#include <ktemporaryfile.h>
 
47
#include <kdebug.h>
47
48
 
48
49
// Local includes
49
50
 
50
51
#include "version.h"
51
 
#include "debug.h"
52
52
 
53
53
namespace Digikam
54
54
{
69
69
    QString        rootAlbum;
70
70
    QString        dbPath;
71
71
 
72
 
    KUrlRequester *rootAlbumPathRequester;
73
 
    KUrlRequester *dbPathRequester;
 
72
    KUrlRequester* rootAlbumPathRequester;
 
73
    KUrlRequester* dbPathRequester;
74
74
};
75
75
 
76
76
CollectionPage::CollectionPage(KAssistantDialog* dlg)
77
 
              : AssistantDlgPage(dlg, i18n("<b>Configure where images and meta-data are stored</b>")),
 
77
              : AssistantDlgPage(dlg, i18n("<b>Configure where images and metadata are stored</b>")),
78
78
                d(new CollectionPagePriv)
79
79
{
80
80
    QWidget *widget      = new QWidget(this);
88
88
    picturesPath = QDesktopServices::storageLocation(QDesktopServices::PicturesLocation);
89
89
#endif
90
90
#endif
91
 
    kDebug(digiKamAreaCode) << picturesPath;
 
91
    kDebug() << picturesPath;
92
92
    if (picturesPath.isEmpty())
93
93
    {
94
94
        picturesPath = QDir::homePath() + i18nc("This is a path name so you should "
119
119
 
120
120
    QLabel *textLabel3 = new QLabel(widget);
121
121
    textLabel3->setWordWrap(true);
122
 
    textLabel3->setText(i18n("<p>digiKam stores information and meta-data about your images in a database file. "
 
122
    textLabel3->setText(i18n("<p>digiKam stores information and metadata about your images in a database file. "
123
123
                             "Please set the location of this file or accept the default.</p>"
124
124
                             "<p><i>Note:</i> you need to have write access to the folder used here, "
125
125
                             "and you cannot use a remote location on a networked server, "
170
170
    group.writeEntry("Version", digikam_version);
171
171
 
172
172
    group = config->group("Album Settings");
173
 
    group.writeEntry("Album Path", d->rootAlbum);
 
173
    group.writeEntry("Album Path",         d->rootAlbum);
174
174
    group.writeEntry("Database File Path", d->dbPath);
175
175
 
176
176
    config->sync();
195
195
bool CollectionPage::checkRootAlbum(QString& rootAlbumFolder)
196
196
{
197
197
    rootAlbumFolder = d->rootAlbumPathRequester->url().toLocalFile();
198
 
    kDebug(digiKamAreaCode) << "Root album is : " << rootAlbumFolder;
 
198
    kDebug() << "Root album is : " << rootAlbumFolder;
199
199
 
200
200
    if (rootAlbumFolder.isEmpty())
201
201
    {
259
259
    if (!path.isWritable())
260
260
#endif
261
261
    {
262
 
        KMessageBox::information(this, i18n("You do not seem to have write access for the folder selected to be the root album.\n"
 
262
        KMessageBox::information(this, i18n("You do not seem to have write access for the folder "
 
263
                                            "selected to be the root album.\n"
263
264
                                            "Warning: Without write access, items cannot be edited."));
264
265
    }
265
266
 
269
270
bool CollectionPage::checkDatabase(QString& dbFolder)
270
271
{
271
272
    dbFolder = d->dbPathRequester->url().toLocalFile();
272
 
    kDebug(digiKamAreaCode) << "DB folder is : " << dbFolder;
 
273
    kDebug() << "DB folder is : " << dbFolder;
273
274
 
274
275
    if (dbFolder.isEmpty())
275
276
    {
276
277
        KMessageBox::sorry(this, i18n("You must select a folder for digiKam to "
277
 
                                      "store information and meta-data in a database file."));
 
278
                                      "store information and metadata in a database file."));
278
279
        return false;
279
280
    }
280
281
 
333
334
    if (!path.isWritable())
334
335
#endif
335
336
    {
336
 
        KMessageBox::information(this, i18n("<p>You do not seem to have write access for the folder to host the database file.<br/>"
 
337
        KMessageBox::information(this, i18n("<p>You do not seem to have write access "
 
338
                                            "for the folder to host the database file.<br/>"
337
339
                                            "Please select a different location.</p>"
338
340
                                            "<p><b>%1</b></p>", dbFolder),
339
341
                                 i18n("No Database Write Access"));