[PATCH] Missing sub-menu arrows with 3.5.x and GTK < 2.15

Michael Meeks michael.meeks at suse.com
Mon Mar 19 02:59:41 PDT 2012

Hi David,

On Sun, 2012-03-18 at 22:08 -0400, David Bolen wrote:
> Using LO 3.5.x on a system with GTK < 2.15.0 loses all the sub-menu
> icons, because there is no menu item arrow-scaling property until
> then, so the code introduced in commit 948c14ee appears to scale the
> arrows to 0%.  

	Ah - good catch; thanks for that ! :-)

> I realize that's a pretty old GTK version, but I ran into this on my
> Ubuntu 8.04 LTS system (GTK 2.12.9) and assume there are some others
> (like RHEL) that will have older versions for a while.  Plus, the
> requirements page on the LO web site still lists GTK 2.10 as the
> requirement.

	Right - lots of other people will hit this no doubt.

> Attached is a small patch that restores the arrow icons when running
> against GTK < 2.15.0, essentially by picking an arbitrary (but
> reasonable in my tests) default scaling.  I also check before
> attempting to retrieve the arrow-scaling style to avoid a bunch of GTK
> runtime warning messages, but it works fine too if only the default
> scaling line is changed since GTK doesn't change the variable contents
> for an unknown style.

	Sounds very sensible. Just one minor complaint: - I loathe the
implementation of gtk_check_version - its impl. is as clear as mud, it
returns an non-translated string not a boolean etc. etc. ;-)

	Any chance of a tweak to use:

gtk_widget_class_find_style_property (GtkWidgetClass *klass,
				      const gchar    *property_name)

	To see if that property is there by name ? which would make that
perhaps more readable in future ? We'd need to use GTK_WIDGET_GET_CLASS
to get the class. Hopefully with that we can get it into
libreoffice-3-5-2 :-)

	Many thanks !


michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot

More information about the LibreOffice mailing list