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-requ...@gnucash.org wrote:
Message: 1
Date: Wed, 12 Apr 2023 16:07:38 +0000
From: Gyle McCollam <gmccol...@live.com>
To: G R Hewitt <hewit...@gmail.com>
Cc: David T. <sunfis...@yahoo.com>, "gnucash-u...@lists.gnucash.org"
        <gnucash-u...@lists.gnucash.org>, Adrien Monteleone
        <adrien.montele...@lusfiber.net>
Subject: Re: [GNC] Locking the side bar items
Message-ID:
        
<ph0pr10mb556172825a5972377fe4dbe2ca...@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

gmccol...@live.com<mailto:gmccol...@gyleshomes.com>           email

________________________________
From: G R Hewitt <hewit...@gmail.com>
Sent: Wednesday, April 12, 2023 11:51 AM
To: Gyle McCollam <gmccol...@live.com>
Cc: David T. <sunfis...@yahoo.com>; gnucash-u...@lists.gnucash.org 
<gnucash-u...@lists.gnucash.org>; Adrien Monteleone <adrien.montele...@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 
<gmccol...@live.com<mailto:gmccol...@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

gmccol...@live.com<mailto:gmccol...@gyleshomes.com>           email

________________________________


_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to