Bug 135408 - Batch processing window does not fit on screen
Summary: Batch processing window does not fit on screen
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: BatchQueueManager-Plugins (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-10 21:09 UTC by Dik Takken
Modified: 2022-02-06 05:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.1.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dik Takken 2006-10-10 21:09:01 UTC
Version:           0.9.0-Beta1 (using KDE KDE 3.5.4)
OS:                Linux

The batch processing window is about 750 pixels high, which does not fit on the screen when you run 800x600 or when you have a kicker panel taking up space.
Comment 1 caulier.gilles 2006-10-10 21:11:58 UTC
Dik,

This report is relevant of kipi-plugins, not digiKam

Gilles
Comment 2 Dik Takken 2006-10-10 21:44:57 UTC
Sorry, I forgot about that... Thanks for correcting me
Comment 3 Aurelien Gateau 2006-11-23 00:21:58 UTC
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;