Thu 10 Nov 2016 05:32:56 AM UTC, comment #14:
I pushed your patch here http://hg.savannah.gnu.org/hgweb/octave/rev/2df51376f587.
|
Wed 09 Nov 2016 12:42:33 PM UTC, comment #13:
I attached the new patch.
I used both the scripts from comment #10 and comment #9 for testing but feel free to play again with the order in which custom menus are added/set visible/... This resizing mechanism is surprisingly complicated: sort of a state machine which can't really track its state.
(file #38913)
|
Wed 09 Nov 2016 07:01:24 AM UTC, comment #12:
I think I have a working solution but didn't write the log yet.
|
Tue 08 Nov 2016 11:28:49 PM UTC, comment #11:
@Pantxo: Do you want me to go ahead and apply the patch, even though there is the outstanding issue in comment #10? Or do you see a solution and I should wait until a full changeset is available?
|
Fri 04 Nov 2016 05:51:44 PM UTC, comment #10:
The patch works much better, but I found another obscure case where the window size shrinks.
The commands need to be run one by one, so that Octave returns to the prompt after each command and updates the window. The "keyboard" call is there just because I put this in a file tst_mbar2.m.
(file #38888)
|
Fri 04 Nov 2016 03:45:43 PM UTC, comment #9:
I attached an updated patch please. I used the following sequence for tests:
(file #38886)
|
Fri 04 Nov 2016 03:27:25 PM UTC, comment #8:
Here's a tiny script that I used to test.
It is attached to this bug report as tst_mbar.m
The window definitely grows each time a hide/show cycle is done.
(file #38885)
|
Fri 04 Nov 2016 09:30:43 AM UTC, comment #7:
I spoke too soon. With the patch applied, adding custom menus to the main menubar now makes the figure larger than it should ... looks like this was the intent of the if block. I'll have a look (seriously this time) ASAP. Reopening the report.
|
Thu 03 Nov 2016 11:58:38 PM UTC, comment #6:
I pushed your cset here (http://hg.savannah.gnu.org/hgweb/octave/rev/0cd8a1c22f23). Thanks for that quick response. Closing report.
|
Thu 03 Nov 2016 10:52:41 PM UTC, comment #5:
There is an if block that prevents hidden menubar from being restored. I really don't know what was the intent but the attached patch fixes the issue.
(file #38878)
|
Thu 03 Nov 2016 09:43:14 PM UTC, comment #4:
Okay, I'm seeing it now.
For reference, this is with the qt toolkit.
With FLTK, the menubar can be hidden and restored, but nothing affects the toolbar. That's a separate issue.
|
Thu 03 Nov 2016 09:35:55 PM UTC, comment #3:
I can confirm comment #2 here.
|
Thu 03 Nov 2016 09:24:02 PM UTC, comment #2:
set (gcf, 'menubar', 'none') hides both the menu and toolbar in matlab so that part works the same in octave as for matlab.
In matlab (and octave 4.0.3) set (gcf, 'menubar', 'figure') reshows the default figure menu and toolbar.
In the 4.2.0rc3, it only adds back the toolbar.
|
Thu 03 Nov 2016 09:00:53 PM UTC, comment #1:
Do you have code that reproduces the problem? This works for me
Note also that user-created uimenus are not affected by the 'menubar' property.
|
Thu 03 Nov 2016 06:27:23 PM UTC, original submission:
It seems switching uimenu on/off is broken in the 4.2-rc (which was working before).
The command:
turns off both the menubar and toolbar (should only affect the menubar). Even worse
does not return the menubar at all.
|