diff --git a/src/ui/desktop/menubar.cpp b/src/ui/desktop/menubar.cpp index 51893685f0ed855dafc5b5757d2cb19df42ea786..4520e633a485dfa02485b837b7f433ae7f3c04cc 100644 --- a/src/ui/desktop/menubar.cpp +++ b/src/ui/desktop/menubar.cpp @@ -161,8 +161,7 @@ build_menu() #endif ; - // this is potentially expensive: local FS access (remote files are not checked) - valid_file = valid_file && recent_file->exists(); + // Note: Do not check if the file exists, to avoid long delays. See https://gitlab.com/inkscape/inkscape/-/issues/2348 . if (!valid_file) { continue; diff --git a/src/ui/dialog/command-palette.cpp b/src/ui/dialog/command-palette.cpp index 357b3bb5c9f3538450780b41a092fe9cefeaeda5..dbbef1a83e09967cc0b889fef7b352b0f95eb801 100644 --- a/src/ui/dialog/command-palette.cpp +++ b/src/ui/dialog/command-palette.cpp @@ -119,7 +119,7 @@ CommandPalette::CommandPalette() recent_file->has_application("inkscape") or recent_file->has_application("inkscape.exe"); - valid_file = valid_file and recent_file->exists(); + // Note: Do not check if the file exists, to avoid long delays. See https://gitlab.com/inkscape/inkscape/-/issues/2348 . if (not valid_file) { continue; @@ -213,43 +213,31 @@ void CommandPalette::append_recent_file_operation(const Glib::ustring &path, boo auto &CPDescription (get_widget (operation_builder, "CPDescription")); const auto file = Gio::File::create_for_path(path); - if (file->query_exists()) { - const Glib::ustring file_name = file->get_basename(); + const Glib::ustring file_name = file->get_basename(); - if (is_import) { - // Used for Activate row signal of listbox and not - CPGroup.set_text("import"); - CPActionFullLabel.set_text("import"); // For filtering only + if (is_import) { + // Used for Activate row signal of listbox and not + CPGroup.set_text("import"); + CPActionFullLabel.set_text("import"); // For filtering only - } else { - CPGroup.set_text("open"); - CPActionFullLabel.set_text("open"); // For filtering only - } + } else { + CPGroup.set_text("open"); + CPActionFullLabel.set_text("open"); // For filtering only + } - // Hide for recent_file, not required - CPActionFullButton.set_visible(false); + // Hide for recent_file, not required + CPActionFullButton.set_visible(false); - CPName.set_text((is_import ? _("Import") : _("Open")) + (": " + file_name)); - CPName.set_tooltip_text((is_import ? ("Import") : ("Open")) + (": " + file_name)); // Tooltip_text are not translatable - CPDescription.set_text(path); - CPDescription.set_tooltip_text(path); + CPName.set_text((is_import ? _("Import") : _("Open")) + (": " + file_name)); + CPName.set_tooltip_text((is_import ? ("Import") : ("Open")) + (": " + file_name)); // Tooltip_text are not translatable + CPDescription.set_text(path); + CPDescription.set_tooltip_text(path); - { - Glib::DateTime mod_time; -#if GLIBMM_CHECK_VERSION(2, 62, 0) - mod_time = file->query_info()->get_modification_date_time(); - // Using this to reduce instead of ActionFullName widget because fullname is searched -#else - mod_time.create_now_local(file->query_info()->modification_time()); -#endif - CPShortcut.set_text(mod_time.format("%d %b %R")); - } - // Add to suggestions - if (is_suggestion) { - _CPSuggestions.append(CPOperation); - } else { - _CPHistory.append(CPOperation); - } + // Add to suggestions + if (is_suggestion) { + _CPSuggestions.append(CPOperation); + } else { + _CPHistory.append(CPOperation); } } diff --git a/src/ui/dialog/startup.cpp b/src/ui/dialog/startup.cpp index cb39918cc3a18999559045d8f01e76aa1e302bac..7fad62ca77e0639e26552006327edd0535f6307a 100644 --- a/src/ui/dialog/startup.cpp +++ b/src/ui/dialog/startup.cpp @@ -341,8 +341,8 @@ StartScreen::enlist_recent_files() // This uri is a GVFS uri, so parse it with that or it will fail. auto file = Gio::File::create_for_uri(item->get_uri()); std::string path = file->get_path(); - if (!path.empty() && Glib::file_test(path, Glib::FileTest::IS_REGULAR) - && item->get_mime_type() == "image/svg+xml") { + // Note: Do not check if the file exists, to avoid long delays. See https://gitlab.com/inkscape/inkscape/-/issues/2348 . + if (!path.empty() && item->get_mime_type() == "image/svg+xml") { Gtk::TreeModel::Row row = *(store->append()); row[cols.col_name] = item->get_display_name(); row[cols.col_id] = item->get_uri();