gtk+ toolbar style setting ignored in bionic?

Bug #1765401 reported by Jonathan Kamens
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gtk+2.0 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I like big buttons with text labels below them in GnuCash toolbars.

Fortunately, that's exactly what I had in Ubuntu 17.10.

However, having upgraded to 18.04 this morning, suddenly the GnuCash toolbars are back to being small buttons with no text labels.

There are SO MANY PLACES to set this preference, and yet, it's not working:

$ gconftool-2 --search-key-regex toolbar
 /desktop/gnome/interface/toolbar_style = both
 /desktop/gnome/interface/toolbar_detachable = false
 /desktop/gnome/interface/toolbar_icons_size = large-toolbar
$ gconftool --search-key-regex toolbar
 /desktop/gnome/interface/toolbar_style = both
 /desktop/gnome/interface/toolbar_detachable = false
 /desktop/gnome/interface/toolbar_icons_size = large-toolbar
$ dconf dump /org/gnome/desktop/interface/ | grep toolbar
toolbar-style='both'
$ gtk-query-settings | grep toolbar
! gtk-toolbar-style: GTK_TOOLBAR_BOTH_HORIZ
! gtk-toolbar-icon-size: GTK_ICON_SIZE_LARGE_TOOLBAR

I have no idea why that last one says "both-horiz" rather than "both". I honestly have no idea where that setting is coming from and can't find any way to find out. (I even tried running strace on gtk-query-settings to see what it was reading, and that didn't help.)

I can't find any way to change this setting in gnome-tweaks.

Is the ability to have large icons with text below them simply gone in 18.04, or has the setting migrated to yet another location that I have to set it in now (it seems like Ubuntu and/or GNOME decides to move settings to a completely new backend just for the heck of it every few releases).

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: libgtk2.0-bin 2.24.32-1ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-15.16-generic 4.15.15
Uname: Linux 4.15.0-15-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu5
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Apr 19 08:46:15 2018
InstallationDate: Installed on 2016-01-16 (824 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: gtk+2.0
UpgradeStatus: Upgraded to bionic on 2018-04-19 (0 days ago)

Revision history for this message
Jonathan Kamens (jik) wrote :
Revision history for this message
Jonathan Kamens (jik) wrote :

Also tried putting `gtk-toolbar-style = GTK_TOOLBAR_BOTH` in ~/.gtkrc-2.0 and `[Settings]\ngtk-toolbar-style = GTK_TOOLBAR_BOTH` in ~/.config/gtk-3.0/settings.ini. The latter causes the output of gtk-query-settings to change, but neither of these settings causes GnuCash to behave differently.

Also tried creating ~/.gtkrc-2.0.gnucash and putting the same contents as for ~/.gtkrc-2.0. Didn't help.

When I run strace on gnucash, it shows that it is reading both ~/.gtkrc-2.0.gnucash and ~/.gtkrc-2.0.

Revision history for this message
Jonathan Kamens (jik) wrote :

Two additional notes:

1) This is not GnuCash-specific. You can see the same behavior in the gtk-demo app included in gtk2.0-examples.

2) If I SSH into my Bionic box from a computer that's still on 17.10 and run GnuCash on my 17.10 display over the X connection forwarded by SSH, the toolbar are large and have labels.

Revision history for this message
Jonathan Kamens (jik) wrote :

More info... I've confirmed that on 17.10, the toolbar style is controlled by /org/gnome/desktop/interface/toolbar-style. When I edit that setting in dconf-editor in 17.10, the change is reflected in the open GnuCash window, but when I edit that exact same setting in dconf-editor in 18.04, it has no effect on the open GnuCash window.

Revision history for this message
Jonathan Kamens (jik) wrote :

Note: GnuCash 3.0, when built from source, does not display the toolbar correctly either.

When I run GtkInspector on GnuCash 3.0 (can't do it on Gnucash 2.7.19 because it's only available in gtk3) and examine the GtkSettings object, it says that gtk-toolbar-style is set to both, as expected.

However, when I examine the toolbar-style setting on the GtkToolbar object itself within GtkInspector, it has the wrong value, i.e., it's value doesn't match what's in the GtkSettings object _on the same process_.

Honestly, I have no idea WTF is going on here. I'm totally mystified, and I've wasted most of a day trying to get to the bottom of this.

Revision history for this message
Geert Janssens (gjanssens) wrote :

I don't have the solution for your issue unfortunately. But I can eliminate a few elements:
Gnucash has switched to gsettings/dconf starting with 2.6.0. That means gconftool and gconftool2 changes are ignored by gnucash. As you discovered making the change in dconf is seen by gnucash 2.6.x.

As I mentioned on the gnucash mailing list, gtk as of 3.10 has completely removed user control over the tool bar style. It is up to the developers to handle it (which hasn't happened for gnucash so far). That means unfortunately I don't know of any way to reliably control this setting in gnucash 3.x.

From the test result I infer gtk-query-settings only queries settings for gtk3, so any result you get from that will not help.

The list of files you have tried didn't include
$HOME/.config/gtkrc-2.0
My own experimentation shows settings in this file take precedence over
$HOME/.gtkrc-2.0

In addition you may check for the presence of
/etc/gtk-2.0/gtkrc
Which may also set this as well as the gtkrc file for the current gtk theme Bionic is using.

Perhaps with the switch back to gnome shell Ubuntu has chosen to make a very strict theme to enforce their style. But I have no idea about this as I'm not on Ubuntu.

Revision history for this message
Jonathan Kamens (jik) wrote :

Thanks for your suggestions.

>The list of files you have tried didn't include
>$HOME/.config/gtkrc-2.0
>My own experimentation shows settings in this file take precedence over
>$HOME/.gtkrc-2.0

1) Just tried it, doesn't make any difference.

2) I actually tried running GnuCash under a debugger, and I observed it in the debugger opening and parsing both ~/.gtkrc-2.0 and ~/.gtkrc-2.0.gnucash, so I don't think the issue is that my config files are in the wrong place (and that shouldn't even matter, because the setting in dconf is correct and GnuCash should be obeying that setting even if there are no config files at all).

>In addition you may check for the presence of
>/etc/gtk-2.0/gtkrc
>Which may also set this as well as the gtkrc file for the current gtk theme Bionic is using.

Doesn't exist.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gtk+2.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
Steve Dodd (anarchetic) wrote :

Linking Jonathan's mailing list thread for reference: https://lists.gnucash.org/pipermail/gnucash-user/2018-April/076587.html

Revision history for this message
Steve Dodd (anarchetic) wrote :

Another thread relevant, at least for the gnucash aspect of this bug:
https://lists.gnucash.org/pipermail/gnucash-user/2018-March/075769.html

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.