[Gambas-user] Question: Wait-sign on start

Gianluigi bagonergi at gmail.com
Wed Feb 20 13:46:24 CET 2019


If you do not have the applications folder in .local/share, you must create
it manually or through the terminal as a normal user.
So, always through the terminal or manually, inside the folder you create
with the text editor an empty file where you copy this (changing the paths):

[Desktop Entry]
Version=1.6
Comment=Application
Encoding=UTF-8
Exec=/<the path where is the file>/gambas3.gambas
Icon=/<the path where is the file/logo-ide>.png
Name=Gambas3
StartupNotify=true
Terminal=false
NoDisplay=false
Type=Application
Categories=Development;

And save it as gambas3.desktop.
You'll see an new entry to Mate's menu, see attached image.
Note: StartupNotify=true otherwise you will not see the mouse wait icon.

Regards
Gianluigi

Il giorno mer 20 feb 2019 alle ore 12:03 Rolf-Werner Eilert <
rwe-sse at osnanet.de> ha scritto:

> Well, I right-clicked on the desktop and chose "Create a starter..." (or
> whatever it is in English). This makes an icon, and for most of the
> programs this runs with notification. Only Wine has a list of the
> desktop files in .local/share/applications.
>
> Regards
> Rolf
>
>
> Am 19.02.19 um 17:22 schrieb Gianluigi:
> > Here it seems to work properly, see attached image.
> > Have you created the desktop file correctly and entered it in
> > .local/share/applications?
> >
> > Regards
> > Gianluigi
> >
> > Il giorno mar 19 feb 2019 alle ore 15:45 Rolf-Werner Eilert
> > <rwe-sse at osnanet.de <mailto:rwe-sse at osnanet.de>> ha scritto:
> >
> >     Hi Gianluigi,
> >
> >     yes, I know this code, it's part of my Gambas programs.
> >
> >     But it has nothing to do with this problem here. Or do I oversee
> >     anything?
> >
> >     Regards
> >     Rolf
> >
> >
> >     Am 19.02.19 um 13:18 schrieb Gianluigi:
> >      > If you don't want to open a new instance of your project:
> >      >
> >      >  From a code by Jussi Lahtinen:
> >      > '-----------------------------------------------
> >      > Public Sub Form_Open()
> >      >
> >      >    Dim sOutput As String
> >      >    Dim s As String = Application.Name
> >      >
> >      >    Exec ["pgrep", "-f", "-l", s] Wait To sOutput
> >      >
> >      >    If Split(Trim$(sOutput), gb.NewLine).Count > 1 Then
> >      >      Me.Close
> >      >    Endif
> >      >
> >      > End
> >      > '-------------------------------------------------------
> >      >
> >      > Another solution from this discussion on the Gambas-it forum [0]:
> >      >
> >      >
> >
>  '----------------------------------------------------------------------
> >      > ' The gb.settings component must be activated
> >      > Private hSetting As Settings
> >      >
> >      > Public Sub Form_Open()
> >      >
> >      >    Dim iPid As Integer = Application.Id
> >      >    Dim sPid, sSysPid As String
> >      >
> >      >    hSetting = New Settings(User.Home &/ "myapp.conf")
> >      >    If (hSetting["Application/pid", 0] = 0) Then
> >      >      ' this is the first execution
> >      >      hSetting["Application/pid"] = iPid
> >      >      hSetting.Save
> >      >    Else
> >      >      sPid = hSetting["Application/pid"]
> >      >      Shell "ps aux | grep " & sPid & "  | grep -wv grep | wc -l"
> >     Wait To
> >      > sSysPid
> >      >      sSysPid = Replace(sSysPid, "\n", "")
> >      >      If (Val(sSysPid) > 0) Then
> >      >        Me.Close ' Application already active
> >      >      Else
> >      >        ' previous instance that probably has an abortion
> >      >        hSetting["Application/pid"] = iPid
> >      >        hSetting.Save
> >      >      Endif
> >      >    Endif
> >      >
> >      > End
> >      > '------------------------------------------------------------
> >      > Regards
> >      > Gianluigi
> >      >
> >      > [0] http://www.gambas-it.org/smf/index.php?topic=2056.0
> >      >
> >      > Il giorno mar 19 feb 2019 alle ore 10:10 Rolf-Werner Eilert
> >      > <rwe-sse at osnanet.de <mailto:rwe-sse at osnanet.de>
> >     <mailto:rwe-sse at osnanet.de <mailto:rwe-sse at osnanet.de>>> ha scritto:
> >      >
> >      >     Thank you Fabien,
> >      >
> >      >     good idea, but it doesn't help here. It is the time from
> >     clicking the
> >      >     icon to starting the program which gets no indicator.
> >      >
> >      >     Strangely, Mate seems to know that starting a binary needs
> some
> >      >     indication to the user like "This icon was clicked".
> >      >
> >      >     When there is a Gambas app behind, it seems not to know. So
> >     there is no
> >      >     reaction when double-clicking the icon, and the user wonders
> >     "has my
> >      >     double-click been accepted, or is Mate still waiting for
> >     something?"
> >      >
> >      >     Then, mostly, the program pops up and confirms that the
> >     double-click
> >      >     was
> >      >     seen. But prior to this, there is no loading indicator.
> >      >
> >      >     I just found, the Gambas IDE itself doesn't have a starting
> >     indicator.
> >      >
> >      >     Regards
> >      >     Rolf
> >      >
> >      >
> >      >     Am 13.02.19 um 05:24 schrieb Fabien Bodard:
> >      >      > Hi,
> >      >      >
> >      >      > At the start of your program do
> >      >      >
> >      >      > Inc application.Busy
> >      >      >
> >      >      >
> >      >      > Then when your application is loaded
> >      >      > For exemple at the end of form.open or form.show of your
> main
> >      >     form just do
> >      >      >
> >      >      > Dec Application.Busy
> >      >      >
> >      >      > When Application.Busy is >to 0 then then the wait cursor is
> >      >     displayed.
> >      >      >
> >      >      > This way allow to have imbricated call to the waiting state
> >      >      >
> >      >      > Regards,
> >      >      >
> >      >      > Fabien Bodard
> >      >      >
> >      >      > Le mar. 12 févr. 2019 18:37, Rolf-Werner Eilert
> >      >     <rwe-sse at osnanet.de <mailto:rwe-sse at osnanet.de>
> >     <mailto:rwe-sse at osnanet.de <mailto:rwe-sse at osnanet.de>>
> >      >      > <mailto:rwe-sse at osnanet.de <mailto:rwe-sse at osnanet.de>
> >     <mailto:rwe-sse at osnanet.de <mailto:rwe-sse at osnanet.de>>>> a écrit :
> >      >      >
> >      >      >     Under Ubuntu Mate I don't get a Wait mouse icon when I
> >     start
> >      >     a Gambas
> >      >      >     program. Sometimes I am too hasty and don't
> doubleclick at
> >      >     one spot, so
> >      >      >     it doesn't start the program. But sometimes it just
> >     starts a
> >      >     bit more
> >      >      >     slowly, so when I'm nervous I start it twice. You know
> >     what I
> >      >     mean... :)
> >      >      >
> >      >      >     Is it possible to get a Wait mouse icon on start, or
> >     is it a
> >      >      >     drawback of
> >      >      >     the interpreter which can't be changed?
> >      >      >
> >      >      >     I know KDE has an option to set a jumping mouse on any
> >      >     doubleclick of
> >      >      >     some icon on the desktop, but in Mate other programs
> >     (those
> >      >     which are
> >      >      >     binaries) have it too.
> >      >      >
> >      >      >     Regards
> >      >      >     Rolf
> >      >      >
> >      >      >     ----[ Gambas mailing-list is hosted by
> >      > https://www.hostsharing.net ]----
> >      >      >
> >      >      >
> >      >      >
> >      >      > ----[ Gambas mailing-list is hosted by
> >      > https://www.hostsharing.net ]----
> >      >      >
> >      >
> >      >
> >      >     ----[ Gambas mailing-list is hosted by
> >     https://www.hostsharing.net ]----
> >      >
> >      >
> >      >
> >      > ----[ Gambas mailing-list is hosted by
> >     https://www.hostsharing.net ]----
> >      >
> >
> >
> >     ----[ Gambas mailing-list is hosted by https://www.hostsharing.net
> ]----
> >
> >
> >
> > ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
> >
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190220/7040d03f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mate-menu.png
Type: image/png
Size: 44762 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190220/7040d03f/attachment-0001.png>


More information about the User mailing list