buggnubg - Bugs: bug #40757, When built using GtkUIManager,...


bug #40757: When built using GtkUIManager, some toolbar buttons are too narrow

Submitted by:  Philippe Michel <plm>
Submitted on:  Sat 30 Nov 2013 08:20:56 PM UTC  
Originator Name:  Philippe Michel Item Group:  Other bug
Category:  Graphical User Interface Release:  1.01-Release
Privacy:  Public Operating System:  FreeBSD
OS Type:  64Bit Processor Type:  Intel
Severity:  3 - Normal Open/Closed:  Closed
Assigned to:  Michael Petch <mdpetch> Priority:  5 - Normal
Status:  Fixed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Mon 09 Dec 2013 07:53:05 PM UTC, comment #4:

I have committed a change in CVS to gtktoolbar.c - make the buttons (with USE_GTKUIMANAGER defined) appear closer in size to the original toolbars.

Michael Petch <mdpetch>
Project AdministratorIn charge of this item.
Sat 30 Nov 2013 11:46:32 PM UTC, comment #3:

I will add comments here on the buttons width issue only.

I really think buttons of varying widths are ugly, especially if they are narrower.

The original setup, with only Direction and End game different (and wider, not narrower) is ok but the newer one really feels weird. In real life, buttons, keys, etc... tend to be square or wider.

What is the minimal resolution that should be supported ? At 1024, there is still spare room on the toolbar. 800 may well be too small but there aren't many PCs with such small screens any more. Even then, I think we should try to find another solution (group drop and resign ? group marked and cmarked arrows on the right ?)

Philippe Michel <plm>
Project Member
Sat 30 Nov 2013 10:40:18 PM UTC, comment #2:

Correction: Where I listed my command line parameters, they were actually:

Both GDK and GTK deprecated functions were disabled. However I didn't use GTK_COMPILATION. It is the first I have heard about this define. What was the reason for its usage?

The warnings I get at the default GCC checking/warning level are:

gtkcolour3d.c: In function 'TextureChange':
gtkcolour3d.c:207:21: warning: initialization makes pointer from integer without a cast [enabled by default]
gtkcolour3d.c: In function 'AddWidgets':
gtkcolour3d.c:343:21: warning: assignment makes pointer from integer without a cast [enabled by default]
gtkcolour3d.c: In function 'DialogClose':
gtkcolour3d.c:367:20: warning: assignment makes pointer from integer without a cast [enabled by default]
gtkmovelistctrl.c: In function 'custom_cell_renderer_movelist_render':
gtkmovelistctrl.c:368:8: warning: assignment makes pointer from integer without a cast [enabled by default]

Without GTK_COMPILATION things seem to work. However, if I add GTK_COMPILATION the story is different. I discovered a bus error (crash) when clicking on a previous position in the movelist. If I play a match without clicking on a previous position I didn't see the crash. Of course I'll look into these warnings.

It could well be the pointer conversion warning (in the gtkmovelistctrl.c) is the culprit. Just interesting things seem to change with GTK_COMPILATION used/not used.

I'd be curious if you have crashed without GTK_COMPILATION defined.

Michael Petch <mdpetch>
Project AdministratorIn charge of this item.
Sat 30 Nov 2013 09:16:23 PM UTC, comment #1:

The GTK_UI_MANAGER code was a work in progress and hadn't been made mainstream. The issue regarding icon size is one that I put in deliberately. At the time I was working on a display that was lower resolution and I thought that making the tool bar buttons relative to the size of the icon and text allowed for more buttons to be shown across.

It can be changed, as the older mechanism effectively uses a minimum width for each button.

If they truly are too narrow and cause problems, it can with relative ease be changed to behave as it did before.

With regards to the GTK_UI_MANAGER flag by itself, there is one serious thing that needs to be done to go main stream. If you change the language, you will find most buttons lack translations (where they were translated previously).

The problem arises because the way in which the localization strings are associated with buttons is significantly different using the uimanager way. So what really needs to be done (and I hadn't got around to it) is to create some scripts with some smart parsing to create a set of localization files where the strings can be properly matched up. The fuzzy processing of gettext is not sufficient.

I also noticed the comment added to the Changelog about suggesting that -DGTK_DISABLE_DEPRECATED -DGTK_COMPILATION -DGSEAL_ENABLE throws a lot of warnings. Without any special flags being passed to GCC (4.7.2) to extend the warnings, I see 5 warning messages. Now I know you must build with a greater number of checks. What would help is knowing what gcc arguments you use when compiling (related to warning generation etc.)

On a Debian 7.0 system I did pull out the latest code as an experiment and compiled with the flags above. Got 5 warning with CPPFLAGS="-O3 -DGTK_DISABLE_DEPRECATED -DGTK_COMPILATION -DGSEAL_ENABLE" When run it seems to be functioning here and didn't crash. I was able to play a match without a problem. The issue may be differences between GTK versions etc. Was there something in particular that made yours crash?

What OS are you using (And version)? I could always try building in a similar environment to look at it. I haven't touched the UIMANAGER code in a couple years. There was significant effort to get the UIManager integrated as well as having the GSEAL_ENABLE so it is possible something was overlooked or missed, or some interaction does cause an issue (It wouldn't be surprising).

Michael Petch <mdpetch>
Project AdministratorIn charge of this item.
Sat 30 Nov 2013 08:20:56 PM UTC, original submission:

When gnubg is built using GtkUIManager (with flags -DGTK_DISABLE_DEPRECATED -DGTK_COMPILATION -DGSEAL_ENABLE), some toolbar buttons are too narrow.

In the attached screen dump, the top toolbar is from a gnubg built with the above flags, the bottom bar is from one build with default flags.

Philippe Michel <plm>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #29742:  d.png added by plm (60KiB - image/png)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mdpetch (Posted a comment)
  • -email is unavailable- added by plm (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-03-07 mdpetch Open/ClosedOpen => Closed
    2013-12-09 mdpetch Assigned toNone => mdpetch
        StatusNone => Fixed
    2013-11-30 plm Attached File- => Added d.png, #29742

    Back to the top

    Powered by Savane 3.3