From 73d38d090618112e0bede91df59b4387b1d35896 Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Tue, 26 Jan 2016 16:33:44 +0300 Subject: [PATCH] fix Show In File Manager function handling under Linux - close #151 --- src/dlangui/platforms/sdl/sdlapp.d | 3 ++- src/dlangui/widgets/grid.d | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dlangui/platforms/sdl/sdlapp.d b/src/dlangui/platforms/sdl/sdlapp.d index 1e08163b..db08a894 100644 --- a/src/dlangui/platforms/sdl/sdlapp.d +++ b/src/dlangui/platforms/sdl/sdlapp.d @@ -1218,11 +1218,12 @@ class SDLPlatform : Platform { } else { // TODO: implement for POSIX if (normalized.isFile) - normalized = normalized.baseName; + normalized = normalized.dirName; string exe = "xdg-open"; string[] args; args ~= exe; args ~= normalized; + Log.d("Executing ", args); auto pid = spawnProcess(args); wait(pid); return true; diff --git a/src/dlangui/widgets/grid.d b/src/dlangui/widgets/grid.d index 676bd2e7..565f0f54 100644 --- a/src/dlangui/widgets/grid.d +++ b/src/dlangui/widgets/grid.d @@ -727,7 +727,7 @@ class GridWidgetBase : ScrollWidgetBase, GridModelAdapter, MenuItemActionHandler x -= _clientRect.left; y -= _clientRect.top; pointToCell(x, y, col, row, rc); - MenuItem item = getCellPopupMenu(col, row); + MenuItem item = getCellPopupMenu(col - _headerCols, row - _headerRows); if (!item) return false; return true;