helloSystem / Filer

A file manager that can also render the desktop
GNU General Public License v2.0
33 stars 8 forks source link

Always trigger refresh before 'Get Info' #61

Open probonopd opened 3 years ago

probonopd commented 3 years ago

The information in 'Get Info' can be outdated if the folder was not refreshed with F5 before Pressing Command+I. We should do this for good measure automatically.

probonopd commented 3 years ago

Refreshing the window before invoking the FilePropsDialog seems like overkill:

diff --git a/filer/desktopwindow.cpp b/filer/desktopwindow.cpp
index ced614a..a11fac4 100644
--- a/filer/desktopwindow.cpp
+++ b/filer/desktopwindow.cpp
@@ -827,6 +827,7 @@ void DesktopWindow::onOpenActivated()

 void DesktopWindow::onFilePropertiesActivated() {
     if(FmFileInfoList* files = selectedFiles()) {
+        this->onReload();
         Fm::FilePropsDialog::showForFiles(files);
         fm_file_info_list_unref(files);
     }
diff --git a/filer/mainwindow.cpp b/filer/mainwindow.cpp
index e488832..b38f533 100644
--- a/filer/mainwindow.cpp
+++ b/filer/mainwindow.cpp
@@ -500,6 +500,7 @@ void MainWindow::on_actionFileProperties_triggered() {

   if(page) {
     FmFileInfoList* files = page->selectedFiles();
+    page->reload();

     if(files) {
       Fm::FilePropsDialog::showForFiles(files);
diff --git a/libfm-qt/filemenu.cpp b/libfm-qt/filemenu.cpp
index 87fa26c..4636f12 100644
--- a/libfm-qt/filemenu.cpp
+++ b/libfm-qt/filemenu.cpp
@@ -318,6 +318,7 @@ void FileMenu::onCustomActionTrigerred() {
 #endif

 void FileMenu::onFilePropertiesTriggered() {
+  // HOW TO TRIGGER A REFRESH HERE?
   FilePropsDialog::showForFiles(files_);
 }

The above does not seem to be the way to go:

So we should do somehting when FilePropsDialog is instantiated.

probonopd commented 3 years ago

Has this issue gone away now that https://github.com/helloSystem/Filer/issues/39 is closed?