View Issue Details

IDProjectCategoryView StatusLast Update
0015349ScribusUser Interfacepublic2019-06-04 20:56
Reporterale Assigned Toale  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Version1.5.5.svn 
Fixed in Version1.5.5.svn 
Summary0015349: Image Manager: show images in the file manager
Descriptionin the "image manager" add a button to show the image's parent directory.
TagsNo tags attached.
PatchYes

Activities

ale

2018-06-05 14:14

manager   ~0045300

here a possible implementation...
file-manager.diff (3,508 bytes)   
diff --git a/scribus/ui/picstatus.cpp b/scribus/ui/picstatus.cpp
index 3a84887a9..6086de0eb 100644
--- a/scribus/ui/picstatus.cpp
+++ b/scribus/ui/picstatus.cpp
@@ -33,6 +33,7 @@ for which a new license (GPL+exception) is in place.
 #include <QPainter>
 #include <QAction>
 #include <QMenu>
+#include <QDesktopServices>
 #include <cstdio>
 
 #include "commonstrings.h"
@@ -75,6 +76,7 @@ PicStatus::PicStatus(QWidget* parent, ScribusDoc *docu) : QDialog( parent )
 	connect(goPageButton, SIGNAL(clicked()), this, SLOT(GotoPic()));
 	connect(selectButton, SIGNAL(clicked()), this, SLOT(SelectPic()));
 	connect(searchButton, SIGNAL(clicked()), this, SLOT(SearchPic()));
+	connect(fileManagerButton, SIGNAL(clicked()), this, SLOT(FileManager()));
 	connect(effectsButton, SIGNAL(clicked()), this, SLOT(doImageEffects()));
 	connect(buttonLayers, SIGNAL(clicked()), this, SLOT(doImageExtProp()));
 	connect(buttonEdit, SIGNAL(clicked()), this, SLOT(doEditImage()));
@@ -290,12 +292,14 @@ void PicStatus::imageSelected(QListWidgetItem *ite)
 				displayName->setText( tr("Embedded Image"));
 				displayPath->setText("");
 				searchButton->setEnabled(false);
+				fileManagerButton->setEnabled(false);
 			}
 			else
 			{
 				displayName->setText(fi.fileName());
 				displayPath->setText(QDir::toNativeSeparators(fi.path()));
 				searchButton->setEnabled(true);
+				fileManagerButton->setEnabled(true);
 			}
 			QString format = "";
 			switch (currItem->pixm.imgInfo.type)
@@ -352,12 +356,14 @@ void PicStatus::imageSelected(QListWidgetItem *ite)
 				displayName->setText(fi.fileName());
 				displayPath->setText(QDir::toNativeSeparators(fi.path()));
 				searchButton->setEnabled(true);
+				fileManagerButton->setEnabled(true);
 			}
 			else
 			{
 				displayName->setText(trNA);
 				displayPath->setText(trNA);
 				searchButton->setEnabled(false);
+				fileManagerButton->setEnabled(false);
 			}
 			displayFormat->setText(trNA);
 			displayColorspace->setText(trNA);
@@ -473,6 +479,12 @@ void PicStatus::SearchPic()
 	delete dia;
 }
 
+void PicStatus::FileManager()
+{
+	QFileInfo fi = QFileInfo(currItem->Pfile);
+	QDesktopServices::openUrl(QUrl::fromLocalFile(fi.dir().canonicalPath()));
+}
+
 void PicStatus::doImageEffects()
 {
 	if (currItem == nullptr)
diff --git a/scribus/ui/picstatus.h b/scribus/ui/picstatus.h
index 654263601..6976c7097 100644
--- a/scribus/ui/picstatus.h
+++ b/scribus/ui/picstatus.h
@@ -79,6 +79,7 @@ private slots:
 	\brief Searches for the given Picture. Displays a Dialog when more than one Picture is found.
 	*/
 	void SearchPic();
+    void FileManager();
 	void doImageEffects();
 	void doImageExtProp();
 	void doEditImage();
diff --git a/scribus/ui/picstatus.ui b/scribus/ui/picstatus.ui
index 2d8ec9bf0..1e5a0405b 100644
--- a/scribus/ui/picstatus.ui
+++ b/scribus/ui/picstatus.ui
@@ -198,6 +198,22 @@
            </property>
           </widget>
          </item>
+         <item>
+          <widget class="QPushButton" name="fileManagerButton">
+           <property name="toolTip">
+            <string>Show Image in the File Manager</string>
+           </property>
+           <property name="text">
+            <string>Show directory...</string>
+           </property>
+           <property name="autoDefault">
+            <bool>false</bool>
+           </property>
+           <property name="flat">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
         </layout>
        </item>
        <item>
file-manager.diff (3,508 bytes)   
file-manager.png (66,232 bytes)   
file-manager.png (66,232 bytes)   

enzogian

2018-06-06 06:55

reporter   ~0045305

Wonderful ale, this would be a great feature to implement, mainly for those needing to assemble very heavy projects in which clients send lots of files in different folders and sub-folders so when designer needs to look for the folder (in order to edit or add, duplicate files etc etc) it can get directly to the folder and in this way can keep the original order of the files as it has been sent for further work...
this would be a professional approach to the overall workflow making it far more efficient (and mainly FAST) ...would be a "detail" to ease things when clients send structures of files and documents you cannot, or don't have time enough, to rebuild ...
Thanks and well done (the screen seems a quite comprehensible interface ;) great job !

PeterBenedek

2018-06-07 05:48

developer   ~0045311

Last edited: 2018-06-07 05:54

Only a request ale.

Now if you resize the "Manage Images" window, the buttons is grow. This is unnecessary.
Let it be the buttons size is fixed, the "Path" field size (just like now) is auto scalable.
There will be more places to display "Path".

Regards.
PB

jghali

2018-06-30 14:35

administrator   ~0045328

No need for a change. If the Path label needs to grow it will do so automatically and the two buttons will shrink.

Issue History

Date Modified Username Field Change
2018-06-05 14:13 ale New Issue
2018-06-05 14:14 ale File Added: file-manager.diff
2018-06-05 14:14 ale File Added: file-manager.png
2018-06-05 14:14 ale Note Added: 0045300
2018-06-06 06:55 enzogian Note Added: 0045305
2018-06-06 10:23 jghali Category - => User Interface
2018-06-06 10:23 jghali Summary show images in the file manager => Image Manager: show images in the file manager
2018-06-06 10:27 jghali Assigned To => ale
2018-06-06 10:27 jghali Status new => resolved
2018-06-06 10:27 jghali Resolution open => fixed
2018-06-06 10:27 jghali Fixed in Version => 1.5.5.svn
2018-06-07 05:48 PeterBenedek Note Added: 0045311
2018-06-07 05:54 PeterBenedek Note Edited: 0045311
2018-06-24 03:44 PeterBenedek Status resolved => feedback
2018-06-24 03:44 PeterBenedek Resolution fixed => reopened
2018-06-30 14:35 jghali Status feedback => resolved
2018-06-30 14:35 jghali Resolution reopened => fixed
2018-06-30 14:35 jghali Note Added: 0045328
2019-06-04 20:56 cbradney Status resolved => closed