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