[haiku] Re: Missing menu items in Deskbar

  • From: "Alexander G. M. Smith" <agmsmith@xxxxxx>
  • To: "Mark Hellegers" <mark@xxxxxxxxxxxx>
  • Date: Sat, 16 Jan 2016 10:30:13 -0500 EST

Mark Hellegers wrote on Sat, 16 Jan 2016 14:53:50 +0100 CET:

I installed AGMSSCriptOCron by adding the FatElk repository and I will 
give it a try. One thing I noticed, is that there are multiple "Open" 
buttons for this package in HaikuDepot once it is installed. The first 
one being a button to open the source folder. This button is very wide 
(basically shows the complete path to the source) and makes my 
HaikuDepot window really wide, with no way to make it smaller (other 
than selecting a different package). Is there something that can be 
done about that?

That's a bug in HaikuDepot.  Guess I should file a report.  It scrounges
through all the deskbar menu entries a package exports and displays a button
for each one.  Normally they are symbolic links to executables, but I used a
link to a source code directory for one of them, and HaikuDepot displays the
whole path as the button title rather than just the final directory name.

Mark Hellegers wrote on Sat, 16 Jan 2016 15:14:41 +0100 CET:
Is there a way to run a command when the system is shutdown? I would 
rather shutdown postgresql gracefully instead of it getting terminated.

BApplications get a B_QUIT_REQUESTED message during shutdown, similar to the
one they get when you close the application.  However, the system shutdown
one has an additional boolean field called "_shutdown_" set to TRUE.  When
your program replies to it with a boolean "result" field of TRUE, the
shutdown continues, FALSE will terminate the system shutdown.  Haiku OS
requires an additional message field called "thread" with your App's thread
ID in your reply message.  Normally this is all hidden from you in the
BApplication class, you just see a call to your App's QuitRequested
callback.  Inside QuitRequested, you can call CurrentMessage() to check for
the "_shutdown_" field.

Anyway, thanks for the idea - I'll add a Shutdown trigger option to
AGMSScriptOCron to run commands on system shutdown.  Have to think about it,
should just quitting program be included too?

- Alex

Other related posts: