Add 'Open file location' on file tab menu

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

Add 'Open file location' on file tab menu

Post by Maitre_Kanter »

Hello,

when I right-click on a tab in PB, is it possible to add an 'Open Directory in explorer' or equivalent feature ?

Arnaud
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: Add 'Open file location' on file tab menu

Post by AZJIO »

You can add a tool:
explorer.exe
Select,"%FILE"
Maitre_Kanter
User
User
Posts: 84
Joined: Mon Sep 06, 2010 3:05 pm

Re: Add 'Open file location' on file tab menu

Post by Maitre_Kanter »

Thank you for the tips.
For me it is a workaround, not a feature.
User avatar
kenmo
Addict
Addict
Posts: 2032
Joined: Tue Dec 23, 2003 3:54 am

Re: Add 'Open file location' on file tab menu

Post by kenmo »

+1 agree

I have this feature in my custom IDE build on Windows:
Image

But I have not submitted it, because I know the team wants submissions implemented and tested on all the OS.
BarryG
Addict
Addict
Posts: 4122
Joined: Thu Apr 18, 2019 8:17 am

Re: Add 'Open file location' on file tab menu

Post by BarryG »

Kenmo, can your custom tweak be added to the official IDE somehow?
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: Add 'Open file location' on file tab menu

Post by AZJIO »

Maitre_Kanter
You can also add a button to the toolbar. Maybe you don't know that.
screenshot
BarryG
Addict
Addict
Posts: 4122
Joined: Thu Apr 18, 2019 8:17 am

Re: Add 'Open file location' on file tab menu

Post by BarryG »

I didn't know you could add tools as buttons on the toolbar! Thanks for telling us.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: Add 'Open file location' on file tab menu

Post by freak »

kenmo wrote: Sat Mar 12, 2022 5:04 am +1 agree

I have this feature in my custom IDE build on Windows:
Image

But I have not submitted it, because I know the team wants submissions implemented and tested on all the OS.
This functionality is actually already implemented for each platform (see here for Windows): https://github.com/fantaisie-software/p ... ns.pb#L379

So all you need is to add the menu entry to submit a PR.
quidquid Latine dictum sit altum videtur
User avatar
kenmo
Addict
Addict
Posts: 2032
Joined: Tue Dec 23, 2003 3:54 am

Re: Add 'Open file location' on file tab menu

Post by kenmo »

@freak OK, I looked back at how I added it. (This was apparently Oct 2020! Time flies!)

The main difference is I wanted the specific file to be auto-selected in the explorer. So I added ShowExplorerFile() like ShowExplorerFolder().
For Windows and Mac, I have simple working functions from the forums.
For Linux (I guess this is the only problem) it falls back to ShowExplorerFolder(GetPathPart(File)) because I don't know how to jump to a specific file.

It looks like it would merge into devel OK, I will submit a PR for people to pull and test.
User avatar
kenmo
Addict
Addict
Posts: 2032
Joined: Tue Dec 23, 2003 3:54 am

Re: Add 'Open file location' on file tab menu

Post by kenmo »

I've submitted PR #205 for review
(or anybody can pull in my show-in-folder git branch)
https://github.com/fantaisie-software/p ... c/pull/205
User avatar
oreopa
Enthusiast
Enthusiast
Posts: 283
Joined: Sat Jun 24, 2006 3:29 am
Location: Edinburgh, Scotland.

Re: Add 'Open file location' on file tab menu

Post by oreopa »

Not sure how long this has been in the ide, but it was always one of my wants... so just a thanks to all involved in implementing ;)
Proud supporter of PB! * Musician * C64/6502 Freak
User avatar
Kiffi
Addict
Addict
Posts: 1484
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Add 'Open file location' on file tab menu

Post by Kiffi »

oreopa wrote: Sun Jul 21, 2024 5:18 pm Not sure how long this has been in the ide, but it was always one of my wants... so just a thanks to all involved in implementing ;)
+1 :D
Hygge
Post Reply