From 7c3800228881f45049b29f491b9d7648c0a5ae5d Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Fri, 9 Oct 2015 13:56:27 -0700 Subject: Qt: Recent list context menu. Add a context menu to the main window recent list. Add items that let the user open each file's containing folder and copy the file path to the clipboard. When opening the folder on Windows and OS X try to highlight the file in Explorer or the Finder. Change-Id: I991e8df8ba9f1f8c6385d1a861eb40223cfdd047 Reviewed-on: https://code.wireshark.org/review/10915 Reviewed-by: Gerald Combs Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot --- ui/qt/qt_ui_utils.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ui/qt/qt_ui_utils.h') diff --git a/ui/qt/qt_ui_utils.h b/ui/qt/qt_ui_utils.h index c94e1f1900..401ddbe00f 100644 --- a/ui/qt/qt_ui_utils.h +++ b/ui/qt/qt_ui_utils.h @@ -185,6 +185,14 @@ bool qActionLessThan(const QAction *a1, const QAction *a2); */ bool qStringCaseLessThan(const QString &s1, const QString &s2); +/** + * Given the path to a file, open its containing folder in the desktop + * shell. Highlight the file if possible. + * + * @param file_path Path to the file. + */ +void desktop_show_in_folder(const QString file_path); + #endif /* __QT_UI_UTILS__H__ */ // XXX Add a routine to fetch the HWND corresponding to a widget using QPlatformIntegration -- cgit v1.2.3