a Gambas recent files Lister (TrayIcon)

So you have written that new, must have program. Let us see it here.
Post Reply
BruceSteers
Posts: 766
Joined: Thursday 23rd July 2020 5:20pm

a Gambas recent files Lister (TrayIcon)

Post by BruceSteers » Friday 23rd July 2021 8:42am

Here's something i just made.
I call it GLaunch

I have put in in my startup applications so it starts with my desktop. (Note: i HAD to put a 2 second delay)

It makes a tray icon and populates a list by reading the gambas recent files save file.

It gets the icons (for the projects) and displays them in either the right click popup menu or the left click gridview Form.

Click an item and it loads the IDE with the project.

(updated version below)
Last edited by BruceSteers on Saturday 24th July 2021 4:33pm, edited 4 times in total.

User avatar
PJBlack
Posts: 165
Joined: Tuesday 09th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: a Gambas recent files Lister (TrayIcon

Post by PJBlack » Friday 23rd July 2021 9:26am

my built-in mr monk is rotating right now ...
the arrangement of your desktop icons is ... "$%§&$/(&)/=(?)(TURESRXGCHJV

ok just took my psychotropic drugs ... now he is quiet :-)

again a very nice idea from you

User avatar
PJBlack
Posts: 165
Joined: Tuesday 09th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: a Gambas recent files Lister (TrayIcon

Post by PJBlack » Friday 23rd July 2021 9:37am

right click --> make launcher --> desktop or menu --> File or directory does not exist MakeIcon.MakeMe.21

MakeIcon 15
u = IIf(UseRoot, User.Name, Me.UserName())
u = User.Name
MakeIcon 36
dtf = "/home/" & u & "/Desktop/" & n & ".desktop"
dtf = "/home/" & u & "/Schreibtisch/" & n & ".desktop"

BruceSteers
Posts: 766
Joined: Thursday 23rd July 2020 5:20pm

Re: a Gambas recent files Lister (TrayIcon

Post by BruceSteers » Friday 23rd July 2021 1:35pm

Oops sorry. Its because the Form has no icon yet...
The make launcher command is looking for FMain.Icon.
Easily fixed.

Thanks Mike 😎

And that there Is what we call the desktop of a developer 😉🤣

Makeicon 15,
Why did you remove that line?
My command will use your user name even if run as root if asked to..
You broke it 😲

Re. Desktop...
Darn it why can't you Germans just speak English? 🤣🤣
I'll use the gb.desktop command instead.

Cheers again

User avatar
PJBlack
Posts: 165
Joined: Tuesday 09th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: a Gambas recent files Lister (TrayIcon

Post by PJBlack » Friday 23rd July 2021 6:04pm

BruceSteers wrote:
Friday 23rd July 2021 1:35pm
Thanks Mike 😎
micha or pj would be quite sufficient ... but mike is still ok
BruceSteers wrote:
Friday 23rd July 2021 1:35pm
Makeicon 15,
Why did you remove that line?
My command will use your user name even if run as root if asked to..
You broke it 😲
yeah ... thats what i can do best ... did you tried with a username longer than eight chars?
BruceSteers wrote:
Friday 23rd July 2021 1:35pm
Darn it why can't you Germans just speak English? 🤣🤣
i do speak english but it seems that xfce like german more :P 🤣

BruceSteers
Posts: 766
Joined: Thursday 23rd July 2020 5:20pm

Re: a Gambas recent files Lister (TrayIcon

Post by BruceSteers » Friday 23rd July 2021 7:48pm

PJBlack wrote:
Friday 23rd July 2021 9:37am

MakeIcon 36
dtf = "/home/" & u & "/Desktop/" & n & ".desktop"
dtf = "/home/" & u & "/Schreibtisch/" & n & ".desktop"
You (or rather "I") should use this.. (as it has the gb.desktop component)
dtf = Desktop.Path &/ n & ".desktop"
I've updated the above archive :) cheers again Micha :)

About the username with more than 8 chars..
Here is the function that gets the name.. i cannot see how a difference in number of chars will affect anything?
Public Sub UserName() As String

  Dim u As String

  Shell "w -h|awk '{print $1}'" Wait To u
  If InStr(u, "\n") Then u = Split(u, "\n")[0]  ' if more than one result get the first one.
   Return Trim(u)

End

User avatar
PJBlack
Posts: 165
Joined: Tuesday 09th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: a Gambas recent files Lister (TrayIcon

Post by PJBlack » Saturday 24th July 2021 5:45am

BruceSteers wrote:
Friday 23rd July 2021 7:48pm
About the username with more than 8 chars..
Here is the function that gets the name.. i cannot see how a difference in number of chars will affect anything?

User.Name = "mnaltrogge"
Me.UserName = "mnaltrog" because

Code: Select all

w -h
gives:

Code: Select all

mnaltrog tty7      07:29   11:40  36.84 s  0.99 s xfce4-session
mnaltrog pts/0     07:40    0.00 s  0.06 s  0.00 s w -h

Post Reply