Easy browse to session location

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Easy browse to session location

Post by MachineCode »

In the IDE's preferences, we can see the database folder location for sessions. It would be handy if a little "Open" icon or something was there, so that we can click it to open that folder without having to navigate manually through our C drive.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Easy browse to session location

Post by Danilo »

MachineCode wrote:In the IDE's preferences, we can see the database folder location for sessions. It would be handy if a little "Open" icon or something was there, so that we can click it to open that folder without having to navigate manually through our C drive.
It is in the same location as your PB preference files, no?

Just add a new tool "Open Preferences Directory":

Code: Select all

pref$ = GetEnvironmentVariable("PB_TOOL_Preferences")
If pref$ <> ""
    ;
    ; default, does not work with Directory Opus (Explorer replacement)
    ;
    ;RunProgram(GetPathPart(pref$))

    ;
    ; explore
    ;
    ShellExecute_(0, "explore", GetPathPart(pref$), 0, 0, #SW_SHOWNORMAL)

    ;
    ; open
    ;
    ;ShellExecute_(0, "open", GetPathPart(pref$), 0, 0, #SW_SHOWNORMAL)
EndIf
EDIT: After adding the tool, you can add it to toolbar in IDE preferences -> toolbar -> Add -> "Run Tool"
Last edited by Danilo on Mon Mar 04, 2013 8:44 pm, edited 1 time in total.
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Easy browse to session location

Post by skywalk »

I was going to suggest adding a Favorites to the Built-in Explorer Tool, but it doesn't allow you to edit text files or Right-Mouse click any entries :?:
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Easy browse to session location

Post by MachineCode »

Danilo wrote:It is in the same location as your PB preference files, no?
Yes, but we shouldn't have to create a tool to do it. A little button would be nicer.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Easy browse to session location

Post by Danilo »

MachineCode wrote:
Danilo wrote:It is in the same location as your PB preference files, no?
Yes, but we shouldn't have to create a tool to do it. A little button would be nicer.
Of course you can just wait until they add it... or not. Nobody knows. They add it or not. Next version or 5 years later. It is just a wish/request.
(...and they just can't add all wishes from more than 8,000 customers)

If there is an easy solution for a problem, I think we use that in the meantime, no? That's the reason why I posted the lines,
to help you getting your feature now, 5 minutes of work. The Tools menu is there for such little things, in my opinion.

Anyway: Your request still stands as it is and maybe they will add it one day! ;)
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Easy browse to session location

Post by skywalk »

Danilo, your tools are very helpful. I love the hiliter 8)
MachineCode - thinking more on this request...you can't really edit the preferences while the IDE is open.
So do you plan to hit the browse button and then close the IDE?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Easy browse to session location

Post by MachineCode »

It's so I can backup my prefs and history from time to time. I like to copy the files to another location.
As for making a tool to do it, yes, it can be done, but why clutter the IDE's tool menu for such things?
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Easy browse to session location

Post by Danilo »

MachineCode wrote:[...], but why clutter the IDE's tool menu for such things?
It must be made available in a menu anyway :) (not tools menu, but any menu), as a toolbar is only shortcuts for fast menu access for mouse users generally.
You can hide the IDE toolbar to save screen space (mine is hidden), so all users with hidden toolbar access everything with menus and keys.

Your general idea is good. You can also use the tool to open another folder, for example your PB sources folder. TEMP folder,
PureBasic's home folder, PB's examples folder. Other users prefer other folders, and with a small tool you can modify the IDE
a little bit to your liking.
Should the PB team really add menus and toolbar buttons for all of the above mentioned folders, now that I want it? :wink:
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Easy browse to session location

Post by ts-soft »

You can add a tool, hide the tool from menu and add a button to toolbar:
Image
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Post Reply