Version: 0.1.2 (using KDE 3.4.3, Kubuntu Package 4:3.4.3-0ubuntu1 ) Compiler: Target: i486-linux-gnu OS: Linux (i686) release 2.6.12-10-686 Batch plugin dialogs are already quite big and on the other hand the tree widget for the target folder is by default only 4 item high. Much too less for orientation were on is in the directory tree. Therefore I would suggest to replace the treewidget with a simple input field for the target folder and replace 'new' dialog with a powerful KDE directory browser. [Rememberin last used target folder is also a good idea ;) ]. This has the addional effect that the list of images is the only widget that can varies in height. So one can make the default height of the imagelist smaller, because resizing the height makes now only imagelist bigger. Remember the size on close and one gets a dialog that fits into every display size. Achim
I agree and was about to open a bug report for two closely related issues: - "Target Folder" should default to the currently chosen folder in digikam. - If you create a "New" folder, it should automatically be selected in the list (maybe obsolete if you choose the directory browser).
SVN commit 607073 by gateau: Replaced UploadWidget with a KURLRequester BUG: 117399 BUG: 135408 M +22 -25 batchprocessimagesdialog.cpp M +3 -8 batchprocessimagesdialog.h --- trunk/extragear/libs/kipi-plugins/batchprocessimages/batchprocessimagesdialog.cpp #607072:607073 @@ -79,6 +79,8 @@ #include <kbuttonbox.h> #include <kdiroperator.h> #include <kdeversion.h> +#include <kurlrequester.h> +#include <klineedit.h> // KIPI includes @@ -116,7 +118,7 @@ KImageIO::registerFormats(); QWidget* box = plainPage(); - QVBoxLayout *dvlay = new QVBoxLayout( box, 6 ); + QVBoxLayout *dvlay = new QVBoxLayout(box, 0, KDialog::spacingHint()); //--------------------------------------------- @@ -201,22 +203,21 @@ groupBox3 = new QHGroupBox( i18n("Target Folder"), box ); - m_upload = new KIPI::UploadWidget( m_interface, groupBox3, "m_upload" ); - QWhatsThis::add( m_upload, i18n("<p>Here you can select the target folder which " + m_destinationURL = new KURLRequester(groupBox3); + m_destinationURL->setMode(KFile::Directory | KFile::LocalOnly); + KIPI::ImageCollection album = interface->currentAlbum(); + if (album.isValid()) { + QString url; + if (album.isDirectory()) { + url = album.uploadPath().path(); + } else { + url = QDir::homeDirPath(); + } + m_destinationURL->lineEdit()->setText(url); + } + QWhatsThis::add( m_destinationURL, i18n("<p>Here you can select the target folder which " "will used by the process.")); - m_upload->setMinimumHeight( 130 ); - QWidget* add = new QWidget( groupBox3 ); - QVBoxLayout* lay = new QVBoxLayout( add ); - - m_addNewAlbumButton = new QPushButton ( i18n( "&New..."), add, "PushButton_AddNewAlbum"); - QWhatsThis::add( m_addNewAlbumButton, i18n("<p>With this button, you can create a new folder.")); - lay->addWidget( m_addNewAlbumButton ); - lay->addStretch( 1 ); - - connect( m_addNewAlbumButton, SIGNAL( clicked() ), - m_upload, SLOT( mkdir() ) ); - dvlay->addWidget( groupBox3 ); //--------------------------------------------- @@ -465,8 +466,7 @@ m_overWriteMode->setEnabled(false); m_removeOriginal->setEnabled(false); - m_addNewAlbumButton->setEnabled(false); - m_upload->setEnabled(false); + m_destinationURL->setEnabled(false); m_addImagesButton->setEnabled(false); m_remImagesButton->setEnabled(false); @@ -485,8 +485,7 @@ return true; } - // PENDING(blackie) handle remote URL's - QString targetAlbum = m_upload->path().path(); + QString targetAlbum = m_destinationURL->url(); //TODO check if it is valid also for remote URL's // this is a workarond for bug 117397 @@ -697,7 +696,7 @@ // Save the comments for the converted image KURL src; src.setPath( item->pathSrc() ); - KURL dest = m_upload->path(); + KURL dest = m_destinationURL->url(); dest.addPath( item->nameDest() ); QString errmsg; @@ -818,9 +817,8 @@ m_labelOverWrite->setEnabled(false); m_overWriteMode->setEnabled(false); m_removeOriginal->setEnabled(false); - m_addNewAlbumButton->setEnabled(false); m_smallPreview->setEnabled(false); - m_upload->setEnabled(false); + m_destinationURL->setEnabled(false); m_addImagesButton->setEnabled(false); m_remImagesButton->setEnabled(false); @@ -1022,8 +1020,7 @@ m_previewButton->setEnabled(true); m_labelOverWrite->setEnabled(true); m_overWriteMode->setEnabled(true); - m_addNewAlbumButton->setEnabled(true); - m_upload->setEnabled(true); + m_destinationURL->setEnabled(true); m_addImagesButton->setEnabled(true); m_remImagesButton->setEnabled(true); m_smallPreview->setEnabled(true); @@ -1079,7 +1076,7 @@ if (removeFlag == true) // Try to delete de destination ! { - KURL deleteImage = m_upload->path(); + KURL deleteImage = m_destinationURL->url(); deleteImage.addPath(item->nameDest()); #if KDE_VERSION >= 0x30200 --- trunk/extragear/libs/kipi-plugins/batchprocessimages/batchprocessimagesdialog.h #607072:607073 @@ -72,13 +72,9 @@ class KConfig; class KProgress; class KURL; +class KURLRequester; class KFileItem; -namespace KIPI -{ - class UploadWidget; -} - namespace KIPIBatchProcessImagesPlugin { @@ -141,9 +137,9 @@ QComboBox *m_overWriteMode; QComboBox *m_Type; - - KIPI::UploadWidget *m_upload; + KURLRequester *m_destinationURL; + BatchProcessImagesList *m_listFiles; KProgress *m_progress; @@ -158,7 +154,6 @@ QPushButton *m_optionsButton; QPushButton *m_previewButton; - QPushButton *m_addNewAlbumButton; QPushButton *m_addImagesButton; QPushButton *m_remImagesButton; QPushButton *m_helpButton;