r22642 by jghali - #15406: Unusable button in the Picture Browser

scribus-commit scribus-commit at lists.scribus.net
Wed Aug 22 15:46:34 UTC 2018


Author: jghali
Date: Wed Aug 22 15:46:34 2018
New Revision: 22642

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22642
Log:
#15406: Unusable button in the Picture Browser

Modified:
    trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
    trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.ui

Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22642&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp	(original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp	Wed Aug 22 15:46:34 2018
@@ -1089,9 +1089,9 @@
 
 		currPath = searchDir;
 
-		if(!fit)
-		{
-			fit = new findImagesThread(currPath, nameFilters, QDir::Name, true);
+		if (!fit)
+		{
+			fit = new findImagesThread(currPath, nameFilters, QDir::Name, folderBrowserIncludeSubdirs);
 			connect(fit, SIGNAL(finished()), this, SLOT(findImagesThreadFinished()));
 			fit->start();
 		}
@@ -1459,17 +1459,19 @@
 
 void PictureBrowser::jumpToImageFolder()
 {
-	QString searchDir = informationFilepathLabel->text();
+	QString searchDir = informationFilePathLabel->text();
 	QDir dir(searchDir);
 
 	if (!dir.exists())
 		return;
 
 	currPath = searchDir;
+	folderView->setCurrentIndex(folderModel.index(currPath));
+	folderView->scrollTo(folderView->currentIndex(), QAbstractItemView::PositionAtTop);
 
 	if (!fit)
 	{
-		fit = new findImagesThread(currPath, nameFilters, QDir::Name, true);
+		fit = new findImagesThread(currPath, nameFilters, QDir::Name, folderBrowserIncludeSubdirs);
 		connect(fit, SIGNAL(finished()), this, SLOT(findImagesThreadFinished()));
 		fit->start();
 	}
@@ -1737,7 +1739,6 @@
 	QModelIndexList selection = selectionModel->selectedIndexes();
 	int tmpIndex;
 
-
 	selectedIndexes.clear();
 
 	for(int i = 0 ; i < selection.size() ; ++i)
@@ -1762,22 +1763,21 @@
 
 void PictureBrowser::updateInformationTab(int index)
 {
-	if(pbSettings.showMore &&(tabWidget->currentIndex() == 0))
-	{
-		if(( index >= 0)&&(index < pModel->modelItemsList.size()))
+	if (pbSettings.showMore &&(tabWidget->currentIndex() == 0))
+	{
+		if ((index >= 0) && (index < pModel->modelItemsList.size()))
 		{
 			previewImage *tmpImage;
 			tmpImage = pModel->modelItemsList.at(index);
 
-			informationFilenameLabel->setText(tmpImage->fileInformation.fileName());
-			informationFilepathLabel->setText(tmpImage->fileInformation.absolutePath());
-			informationFilesizeLabel->setText(QString("%1 Bytes").arg(tmpImage->fileInformation.size()));
-			informationFiledateLabel->setText(tmpImage->fileInformation.lastModified().toString("dd.MM.yyyy hh:mm:ss"));
-			informationFilepathLabel->setToolTip(tmpImage->fileInformation.absoluteFilePath());
-
+			informationFileNameLabel->setText(tmpImage->fileInformation.fileName());
+			informationFilePathLabel->setText(tmpImage->fileInformation.absolutePath());
+			informationFileSizeLabel->setText(QString("%1 Bytes").arg(tmpImage->fileInformation.size()));
+			informationFileDateLabel->setText(tmpImage->fileInformation.lastModified().toString("dd.MM.yyyy hh:mm:ss"));
+			informationFilePathLabel->setToolTip(tmpImage->fileInformation.absoluteFilePath());
 
 			if(tmpImage->previewImageLoading)
-				informationFilenameLabel->setText (tr("Image still loading"));
+				informationFileNameLabel->setText (tr("Image still loading"));
 			else if(tmpImage->imgInfo->valid)
 			{
 				QString format;
@@ -1837,12 +1837,12 @@
 					informationEmbeddedLabel->setText(QString("No"));
 				}
 
-				informationProfilenameLabel->setText(QString("%1").arg(tmpImage->imgInfo->profileName));
+				informationProfileNameLabel->setText(QString("%1").arg(tmpImage->imgInfo->profileName));
 			}
 		}
 		else
 		{
-			informationFilenameLabel->setText(tr("No image selected"));
+			informationFileNameLabel->setText(tr("No image selected"));
 		}
 	}
 }

Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22642&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.ui
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.ui	(original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.ui	Wed Aug 22 15:46:34 2018
@@ -895,34 +895,6 @@
            <string>File</string>
           </property>
           <layout class="QGridLayout">
-           <item row="0" column="1">
-            <widget class="QLabel" name="informationFilenameLabel">
-             <property name="text">
-              <string/>
-             </property>
-            </widget>
-           </item>
-           <item row="4" column="1">
-            <widget class="QLabel" name="informationFilesizeLabel">
-             <property name="text">
-              <string/>
-             </property>
-            </widget>
-           </item>
-           <item row="5" column="1">
-            <widget class="QLabel" name="informationFiledateLabel">
-             <property name="text">
-              <string/>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="0">
-            <widget class="QLabel" name="label_11">
-             <property name="text">
-              <string>Path:</string>
-             </property>
-            </widget>
-           </item>
            <item row="0" column="0">
             <widget class="QLabel" name="label_10">
              <property name="text">
@@ -930,47 +902,91 @@
              </property>
             </widget>
            </item>
+           <item row="0" column="1">
+            <widget class="QLabel" name="informationFileNameLabel">
+             <property name="text">
+              <string/>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="0">
+            <widget class="QLabel" name="label_11">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string>Path:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="1">
+            <layout class="QHBoxLayout" name="horizontalLayout_5">
+             <item>
+              <widget class="QLabel" name="informationFilePathLabel">
+               <property name="text">
+                <string/>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QPushButton" name="jumpToImageButton">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="text">
+                <string>Go</string>
+               </property>
+              </widget>
+             </item>
+            </layout>
+           </item>
+           <item row="2" column="0">
+            <widget class="QLabel" name="label_22">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string>Size:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="2" column="1">
+            <widget class="QLabel" name="informationFileSizeLabel">
+             <property name="text">
+              <string/>
+             </property>
+            </widget>
+           </item>
+           <item row="3" column="0">
+            <widget class="QLabel" name="label_23">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string>Date:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="3" column="1">
+            <widget class="QLabel" name="informationFileDateLabel">
+             <property name="text">
+              <string/>
+             </property>
+            </widget>
+           </item>
            <item row="4" column="0">
-            <widget class="QLabel" name="label_22">
-             <property name="text">
-              <string>Size:</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="1">
-            <widget class="QLabel" name="informationFilepathLabel">
-             <property name="text">
-              <string/>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="2">
-            <widget class="QPushButton" name="jumpToImageButton">
-             <property name="minimumSize">
-              <size>
-               <width>23</width>
-               <height>23</height>
-              </size>
-             </property>
-             <property name="maximumSize">
-              <size>
-               <width>23</width>
-               <height>23</height>
-              </size>
-             </property>
-             <property name="text">
-              <string>Go</string>
-             </property>
-            </widget>
-           </item>
-           <item row="5" column="0">
-            <widget class="QLabel" name="label_23">
-             <property name="text">
-              <string>Date:</string>
-             </property>
-            </widget>
-           </item>
-           <item row="6" column="0">
             <spacer name="verticalSpacer_2">
              <property name="orientation">
               <enum>Qt::Vertical</enum>
@@ -1044,7 +1060,7 @@
             </widget>
            </item>
            <item row="3" column="3">
-            <widget class="QLabel" name="informationProfilenameLabel">
+            <widget class="QLabel" name="informationProfileNameLabel">
              <property name="text">
               <string/>
              </property>




More information about the scribus-commit mailing list