SVN commit 1082393 by mturkia:
GUI: Moved modified file detection configurations from General tab to it's own
configuration tab called 'File Versions' (General tab was taller than my
screen)
M +1 -0 CMakeLists.txt
M +6 -0 ChangeLog
A Settings/FileVersionDetectionPage.cpp [License: UNKNOWN]
A Settings/FileVersionDetectionPage.h [License: UNKNOWN]
M +1 -52 Settings/GeneralPage.cpp
M +0 -8 Settings/GeneralPage.h
M +12 -7 Settings/SettingsData.cpp
M +5 -0 Settings/SettingsData.h
M +5 -0 Settings/SettingsDialog.cpp
M +2 -0 Settings/SettingsDialog.h
--- trunk/extragear/graphics/kphotoalbum/CMakeLists.txt #1082392:1082393
@@ -78,6 +78,7 @@
${CMAKE_CURRENT_SOURCE_DIR}/Settings/CategoryPage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Settings/SubCategoriesPage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Settings/GeneralPage.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/Settings/FileVersionDetectionPage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Settings/ThumbnailsPage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Settings/ViewerPage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/Settings/DatabaseBackendPage.cpp
--- trunk/extragear/graphics/kphotoalbum/ChangeLog #1082392:1082393
@@ -1,3 +1,9 @@
+2010-01-30 Miika Turkia <theBro at luukku.com>
+
+ * Moved modified file detection configurations from General tab to
+ it's own configuration tab called 'File Versions' (General tab was
+ taller than my screen)
+
2010-01-24 Miika Turkia <theBro at luukku.com>
* GUI: Added checkboxes for display filters to view which ones are
--- trunk/extragear/graphics/kphotoalbum/Settings/GeneralPage.cpp
#1082392:1082393
@@ -67,33 +67,11 @@
lay2->addStretch( 1 );
// Exclude directories from search
- QLabel* excludeDirectoriesLabel = new QLabel( i18n("Directories to exclude
from search:" ), box );
+ QLabel* excludeDirectoriesLabel = new QLabel( i18n("Directories to exclude
from new file search:" ), box );
_excludeDirectories = new KLineEdit( box );
excludeDirectoriesLabel->setBuddy( _excludeDirectories );
- // Original/Modified File Support
- Q3VGroupBox* modifiedBox = new Q3VGroupBox( i18n("Modified File Detection
Settings"), this );
- lay1->addWidget( modifiedBox );
- _detectModifiedFiles = new QCheckBox(i18n("Try to detect modified files"),
modifiedBox);
-
- QLabel* modifiedFileComponentLabel = new QLabel( i18n("Modified file
search regexp:" ), modifiedBox );
- _modifiedFileComponent = new QLineEdit(modifiedBox);
-
- QLabel* originalFileComponentLabel = new QLabel( i18n("Original file
replacement text:" ), modifiedBox );
- _originalFileComponent = new QLineEdit(modifiedBox);
-
- _moveOriginalContents = new QCheckBox(i18n("Move meta-data (i.e. delete
tags from the original):"), modifiedBox);
-
- _autoStackNewFiles = new QCheckBox(i18n("Auto-stack new files on top of
old:"), modifiedBox);
-
- QLabel* copyFileComponentLabel = new QLabel( i18n("Copy file search
regexp:" ), modifiedBox );
- _copyFileComponent = new QLineEdit(modifiedBox);
-
- QLabel* copyFileReplacementComponentLabel = new QLabel( i18n("Copy file
replacement text:" ), modifiedBox );
- _copyFileReplacementComponent = new QLineEdit(modifiedBox);
-
-
// Datebar size
container = new QWidget( this );
lay1->addWidget( container );
@@ -189,21 +167,6 @@
txt = i18n( "Show the KPhotoAlbum splash screen on start up" );
_showSplashScreen->setWhatsThis( txt );
-
- txt = i18n( "<p>When KPhotoAlbum searches for new files and finds a file
that matches the <i>modified file search regexp</i> it is assumed that an
original version of the image may exist. The regexp pattern will be replaced
with the <i>original file string</i> text and if that file exists, all
associated metadata (category information, ratings, etc) will be copied from
the original file to the new one.</p>");
- _detectModifiedFiles->setWhatsThis( txt );
- modifiedFileComponentLabel->setWhatsThis( txt );
- _modifiedFileComponent->setWhatsThis( txt );
- originalFileComponentLabel->setWhatsThis( txt );
- _originalFileComponent->setWhatsThis( txt );
- _moveOriginalContents->setWhatsThis( txt );
- _autoStackNewFiles->setWhatsThis( txt );
-
- txt = i18n("<p>KPhotoAlbum can make a copy of an image before opening it
with an external program. These settings set the original regexp to search for
and contents to replace it with when deciding what the new filename should
be.</p>");
- copyFileComponentLabel->setWhatsThis( txt );
- _copyFileComponent->setWhatsThis( txt );
- copyFileReplacementComponentLabel->setWhatsThis( txt );
- _copyFileReplacementComponent->setWhatsThis( txt );
}
void Settings::GeneralPage::loadSettings( Settings::SettingsData* opt )
@@ -224,14 +187,6 @@
cat = DB::ImageDB::instance()->categoryCollection()->categories()[0];
_albumCategory->setEditText( cat->text() );
- _detectModifiedFiles->setChecked( opt->detectModifiedFiles() );
- _modifiedFileComponent->setText( opt->modifiedFileComponent() );
- _originalFileComponent->setText( opt->originalFileComponent() );
- _moveOriginalContents->setChecked( opt->moveOriginalContents() );
- _autoStackNewFiles->setChecked( opt->autoStackNewFiles() );
- _copyFileComponent->setText( opt->copyFileComponent() );
- _copyFileReplacementComponent->setText(
opt->copyFileReplacementComponent() );
-
}
void Settings::GeneralPage::saveSettings( Settings::SettingsData* opt )
@@ -251,12 +206,6 @@
opt->setHistogramSize( QSize( _barWidth->value(), _barHeight->value() ) );
opt->setAlbumCategory( name );
- opt->setDetectModifiedFiles( _detectModifiedFiles->isChecked() );
- opt->setModifiedFileComponent( _modifiedFileComponent->text() );
- opt->setOriginalFileComponent( _originalFileComponent->text() );
- opt->setAutoStackNewFiles( _autoStackNewFiles->isChecked() );
- opt->setCopyFileComponent( _copyFileComponent->text() );
- opt->setCopyFileReplacementComponent(
_copyFileReplacementComponent->text() );
}
void Settings::GeneralPage::setUseRawThumbnailSize( const QSize& size )
--- trunk/extragear/graphics/kphotoalbum/Settings/GeneralPage.h #1082392:1082393
@@ -3,7 +3,6 @@
#include <QWidget>
class QComboBox;
-class QLineEdit;
class QSpinBox;
class QCheckBox;
class KComboBox;
@@ -35,13 +34,6 @@
QCheckBox* _showSplashScreen;
QComboBox* _albumCategory;
KLineEdit* _excludeDirectories; // Directories to exclude
- QCheckBox* _detectModifiedFiles;
- QLineEdit* _modifiedFileComponent;
- QLineEdit* _originalFileComponent;
- QCheckBox* _moveOriginalContents;
- QCheckBox* _autoStackNewFiles;
- QLineEdit* _copyFileComponent;
- QLineEdit* _copyFileReplacementComponent;
};
}
--- trunk/extragear/graphics/kphotoalbum/Settings/SettingsData.cpp
#1082392:1082393
@@ -164,13 +164,6 @@
property_copy( backupCount , setBackupCount , int
, General, 5 )
property_enum( tTimeStamps , setTTimeStamps ,
TimeStampTrust, General, Always )
property_copy( excludeDirectories , setExcludeDirectories , QString
, General, QString::fromLatin1("xml,ThumbNails,.thumbs") )
-property_copy( detectModifiedFiles , setDetectModifiedFiles , bool
, General, false )
-property_copy( modifiedFileComponent , setModifiedFileComponent , QString
, General, QString() )
-property_copy( originalFileComponent , setOriginalFileComponent , QString
, General, QString() )
-property_copy( moveOriginalContents , setMoveOriginalContents , bool
, General, false )
-property_copy( autoStackNewFiles , setAutoStackNewFiles , bool
, General, true )
-property_copy( copyFileComponent , setCopyFileComponent , QString
, General, QString() )
-property_copy( copyFileReplacementComponent , setCopyFileReplacementComponent
, QString , General, QString() )
getValueFunc( QSize,histogramSize, General,QSize(15,30) )
getValueFunc( ViewSortType,viewSortType, General,(int)SortLastUse )
@@ -220,6 +213,18 @@
}
}
+////////////////////////////////
+//// File Version Detection ////
+////////////////////////////////
+
+property_copy( detectModifiedFiles , setDetectModifiedFiles , bool
, FileVersionDetection, false )
+property_copy( modifiedFileComponent , setModifiedFileComponent , QString
, FileVersionDetection, QString() )
+property_copy( originalFileComponent , setOriginalFileComponent , QString
, FileVersionDetection, QString() )
+property_copy( moveOriginalContents , setMoveOriginalContents , bool
, FileVersionDetection, false )
+property_copy( autoStackNewFiles , setAutoStackNewFiles , bool
, FileVersionDetection, true )
+property_copy( copyFileComponent , setCopyFileComponent , QString
, FileVersionDetection, QString() )
+property_copy( copyFileReplacementComponent , setCopyFileReplacementComponent
, QString , FileVersionDetection, QString() )
+
////////////////////
//// Thumbnails ////
////////////////////
--- trunk/extragear/graphics/kphotoalbum/Settings/SettingsData.h
#1082392:1082393
@@ -89,6 +89,11 @@
property_copy( viewSortType , setViewSortType ,
ViewSortType );
property_copy( tTimeStamps , setTTimeStamps ,
TimeStampTrust );
property_copy( excludeDirectories , setExcludeDirectories , QString
);
+
+ ////////////////////////////////
+ //// File Version Detection ////
+ ////////////////////////////////
+
property_copy( detectModifiedFiles , setDetectModifiedFiles , bool );
property_copy( modifiedFileComponent , setModifiedFileComponent , QString
);
property_copy( originalFileComponent , setOriginalFileComponent , QString
);
--- trunk/extragear/graphics/kphotoalbum/Settings/SettingsDialog.cpp
#1082392:1082393
@@ -21,6 +21,7 @@
#include "ExifPage.h"
#include "PluginsPage.h"
#include "ViewerPage.h"
+#include "FileVersionDetectionPage.h"
#include "ThumbnailsPage.h"
#include "GeneralPage.h"
#include "SubCategoriesPage.h"
@@ -44,6 +45,7 @@
:KPageDialog( parent )
{
_generalPage = new Settings::GeneralPage( this );
+ _fileVersionDetectionPage = new Settings::FileVersionDetectionPage(this);
_thumbnailsPage = new Settings::ThumbnailsPage( this );
_categoryPage = new Settings::CategoryPage(this);
_subCategoriesPage = new Settings::SubCategoriesPage( this );
@@ -62,6 +64,7 @@
Data data[] = {
{ i18n("General"), "kphotoalbum", _generalPage },
+ { i18n("File Versions"), "system-search", _fileVersionDetectionPage },
{ i18n("Thumbnail View" ), "view-list-icons", _thumbnailsPage },
{ i18n("Categories"), "user-identity", _categoryPage },
{ i18n("Subcategories" ), "edit-copy", _subCategoriesPage },
@@ -102,6 +105,7 @@
Settings::SettingsData* opt = Settings::SettingsData::instance();
_generalPage->loadSettings( opt );
+ _fileVersionDetectionPage->loadSettings( opt );
_thumbnailsPage->loadSettings(opt);
_subCategoriesPage->loadSettings();
_databaseBackendPage->loadSettings(opt);
@@ -129,6 +133,7 @@
Utilities::ShowBusyCursor dummy;
Settings::SettingsData* opt = Settings::SettingsData::instance();
_generalPage->saveSettings( opt );
+ _fileVersionDetectionPage->saveSettings( opt );
_thumbnailsPage->saveSettings(opt);
_categoryPage->saveSettings( opt, _subCategoriesPage->memberMap() );
_subCategoriesPage->saveSettings();
--- trunk/extragear/graphics/kphotoalbum/Settings/SettingsDialog.h
#1082392:1082393
@@ -33,6 +33,7 @@
class GeneralPage;
class ThumbnailsPage;
class ViewerPage;
+class FileVersionDetectionPage;
class PluginsPage;
class ExifPage;
class DatabaseBackendPage;
@@ -55,6 +56,7 @@
private:
Settings::GeneralPage* _generalPage;
+ Settings::FileVersionDetectionPage* _fileVersionDetectionPage;
Settings::ThumbnailsPage* _thumbnailsPage;
Settings::CategoryPage* _categoryPage;
Settings::SubCategoriesPage* _subCategoriesPage;