[GNC] Locking the side bar items

NoobAlice NoobAlice at airmail.cc
Thu Apr 13 14:00:36 EDT 2023


I can't help with the "pin tab" idea, but for those who want to keep the 
toolbar around, I've come up with an admittedly-hacky way to hide the 
"Close [tab]" toolbar button.  I also have a hide for the File menu 
item, but it still leaves a small, clickable area that will close a tab, 
unfortunately.

Remember that any errors in a .css file for GTK programs will cause the 
entire thing to be ignored.  :(

I've only tested on my own Linux computer.  The 6000 pixels measurements 
are just to be bigger than any monitor so you don't have a close button 
floating off to the side.  :)

If anyone has more elegant CSS for this, please do share!

In Linux, I add the following to my ~/.config/gnucash/gtk-3.0.css file, 
saved it, then restarted GnuCash.  Your file will be (or can be created) 
in the "GNC_USERCONFIG_DIR:" path shown in Help > About GnuCash.

For anyone wanting to play around further and using Linux, 
'GTK_DEBUG=interactive gnucash' entered in the terminal opens a handy 
little GTK Inspector program.


/* Remove close-tab button on toolbar - the hover text will still show 
up, but this seems to make the button unclickable */
#ToolbarClose *
{
margin-left: 6000px;
margin-right: -6000px;
}

/* Remove close-tab button in File menu and make close-program button 
bigger to cover up clickable close-tab space - THE INVISIBLE CLOSE 
BUTTON IS STILL CLICKABLE, though this hacky stuff makes the clickable 
space smaller... */
	
#FileClose,
#FileClose *
{
margin-left: 6000px;
margin-right: -6000px;
font-size: 0px;
padding: 0px;
}

#FileQuit,
#FileQuit *
{
margin-top: -20px;
margin-bottom: 0px;
}




On 2023-04-12 01:51 PM, gnucash-user-request at gnucash.org wrote:
> Message: 1
> Date: Wed, 12 Apr 2023 16:07:38 +0000
> From: Gyle McCollam <gmccollam at live.com>
> To: G R Hewitt <hewittgr at gmail.com>
> Cc: David T. <sunfish62 at yahoo.com>, "gnucash-user at lists.gnucash.org"
> 	<gnucash-user at lists.gnucash.org>, Adrien Monteleone
> 	<adrien.monteleone at lusfiber.net>
> Subject: Re: [GNC] Locking the side bar items
> Message-ID:
> 	<PH0PR10MB556172825A5972377FE4DBE2CA9B9 at PH0PR10MB5561.namprd10.prod.outlook.com>
> 	
> Content-Type: text/plain; charset="utf-8"
> 
> You're very welcome, but as Stan correctly pointed out that doesn't solve the "problem" of the toolbar icon closing a tab when a lot of people ass/u/me that it will close the program.
> 
> 
> 
> Thank You,
> 
> Gyle McCollam
> 
> Gyle McCollam
> 
> gmccollam at live.com<mailto:gmccollam at gyleshomes.com>           email
> 
> ________________________________
> From: G R Hewitt <hewittgr at gmail.com>
> Sent: Wednesday, April 12, 2023 11:51 AM
> To: Gyle McCollam <gmccollam at live.com>
> Cc: David T. <sunfish62 at yahoo.com>; gnucash-user at lists.gnucash.org <gnucash-user at lists.gnucash.org>; Adrien Monteleone <adrien.monteleone at lusfiber.net>
> Subject: Re: [GNC] Locking the side bar items
> 
> Gyles, sir, you win the cigar (or prize of preference).
> What's annoying is I looked there, but just didn't see it.
> Thank you so much.
> 
> On Wed, 12 Apr 2023 at 15:40, Gyle McCollam <gmccollam at live.com<mailto:gmccollam at live.com>> wrote:
> You can remove the "X" on the tabs to prevent accidental closing.  Under Edit/Preference/Windows and the section labeled Tabs.  Just click on box to remove the check on "Show close on notebook tabs".  Then you shouldn't be able to close accidentally.
> 
> 
> Thank You,
> 
> Gyle McCollam
> 
> Gyle McCollam
> 
> gmccollam at live.com<mailto:gmccollam at gyleshomes.com>           email
> 
> ________________________________




More information about the gnucash-user mailing list