bugGNU Octave - Bugs: bug #44770, Order of uimenus

 
 

bug #44770: Order of uimenus

Submitter:  Guillaume <gyom>
Submitted:  Wed 08 Apr 2015 12:07:23 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  lostbard
Originator Name:  Guillaume Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 09 Apr 2015 03:50:45 PM UTC, comment #11: 

New bug created https://savannah.gnu.org/bugs/index.php?44791

Unless other issues, this bug can be closed.

John Donoghue <lostbard>
Group Member
Thu 09 Apr 2015 03:28:53 PM UTC, comment #10: 

I would create a new bug.  I find it hard to follow a thread that starts with one problem and migrates through several others.  It usually requires reading the entire bug history to figure out what the final reported problem is and what the current status is.  A new bug dedicated to each different issue is easier for us.

Rik <rik5>
Group administrator
Thu 09 Apr 2015 03:13:11 PM UTC, comment #9: 

Pushed http://hg.savannah.gnu.org/hgweb/octave/rev/ac59136f1f10
which updates positions of menus in fltk when visible

uimenu test checks for 0, which is not correct at the moment.

Should a new bug report be created for fltk position incorrect when invisible?

John Donoghue <lostbard>
Group Member
Thu 09 Apr 2015 01:47:16 PM UTC, comment #8: 

Matlab does assign valid values to positions of menus etc when figure is not visible.

Fltk toolkit does not create the window or menus unless they are visible as it currently replied on being able to map from fltk window to the figure properties.


John Donoghue <lostbard>
Group Member
Thu 09 Apr 2015 10:42:00 AM UTC, comment #7: 

WIth the figure not visible, the figure isnt creating any actual controls and so insnt enumerating the menus.

I will have to check what matlan does with a not visible figure.

John Donoghue <lostbard>
Group Member
Wed 08 Apr 2015 09:09:26 PM UTC, comment #6: 

Result should be position 3

Just have to make fltk update its position to actuals, and take notice of the input nonzero position.

John Donoghue <lostbard>
Group Member
Wed 08 Apr 2015 03:41:57 PM UTC, comment #5: 

In fact fltk ignores the position attribute  when inserting menus

John Donoghue <lostbard>
Group Member
Wed 08 Apr 2015 03:39:00 PM UTC, comment #4: 

Yes it will have to change - matlab returns 9 as that is the position it put the menu on the figure (ie: file, edit ....)

Which I guess leads to a new bug - fltk doesn't set the position it was inserted, so just shows the default value


John Donoghue <lostbard>
Group Member
Wed 08 Apr 2015 03:27:34 PM UTC, comment #3: 

I'm getting a failing test from 'make check' in uimenu.m


***** testif HAVE_FLTK
 toolkit = graphics_toolkit ("fltk");
 hf = figure ("visible", "off");
 unwind_protect
   ui = uimenu ("label", "mylabel");
   assert (findobj (hf, "type", "uimenu"), ui);
   assert (get (ui, "label"), "mylabel");
   assert (get (ui, "checked"), "off");
   assert (get (ui, "separator"), "off");
   assert (get (ui, "enable"), "on");
   assert (get (ui, "position"), 9);
 unwind_protect_cleanup
   close (hf);
   graphics_toolkit (toolkit);
 end_unwind_protect
!!!!! test failed
ASSERT errors for:  assert (get (ui, "position"),9)

  Location  |  Observed  |  Expected  |  Reason
     ()           0            9         Abs err 9 exceeds tol 0


Should the expected value of 9 be changed?

Rik <rik5>
Group administrator
Wed 08 Apr 2015 01:58:21 PM UTC, comment #2: 

Thanks once again John, it works great now!

Guillaume <gyom>
Wed 08 Apr 2015 01:38:41 PM UTC, comment #1: 
John Donoghue <lostbard>
Group Member
Wed 08 Apr 2015 12:07:23 PM UTC, original submission:  

Order of menus is not preserved (in a context menu or on the menu bar). 8 seems to be the threshold and their order appears to be:

   1 2 3 4 5 6 7 8 N N-1 N-2 ... N-7


F=figure;
H=uicontextmenu(F);
set(F,'uicontextmenu',H);
for i=1:16
  uimenu('parent',H,'Label',sprintf('Menu %d',i));
end



Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by lostbard (Updated the item)
  • -email is unavailable- added by gyom (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-04-09 rik5 Open/ClosedOpen Closed
    2015-04-09 lostbard Open/ClosedClosed Open
    2015-04-08 lostbard StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2015-04-08 lostbard StatusIn Progress Ready For Test
    2015-04-08 lostbard Item GroupNone Incorrect Result
        StatusNone In Progress
        Assigned toNone lostbard
        Operating SystemGNU/Linux Any

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code