Merge lp:~gue5t/midori/appmenu-initial-visibility into lp:midori

Proposed by gue5t gue5t
Status: Merged
Approved by: Cris Dywan
Approved revision: 7017
Merged at revision: 7020
Proposed branch: lp:~gue5t/midori/appmenu-initial-visibility
Merge into: lp:midori
Diff against target: 15 lines (+4/-1)
1 file modified
midori/midori-window.vala (+4/-1)
To merge this branch: bzr merge lp:~gue5t/midori/appmenu-initial-visibility
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Review via email: mp+267600@code.launchpad.net

Commit message

Make sure that only one of appmenu and menubar are visible *initially* as well as when changed

Description of the change

The previous fix here didn't set the visibility of the appmenu action on browser creation but only on change to menubar visibility. This is easy to not notice since new configuration directories enable the appmenu and not the menubar, but if you enable the menubar and restart Midori the problem becomes apparent.

This fixes visibility from startup onward.

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

Can we unit test this? Given the non-obvious semantics (and I used to think it was a lot more straight-forward myself).

review: Needs Information
Revision history for this message
Cris Dywan (kalikiana) wrote :

Let's not block on tests for now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'midori/midori-window.vala'
2--- midori/midori-window.vala 2015-08-09 23:55:57 +0000
3+++ midori/midori-window.vala 2015-08-11 00:02:08 +0000
4@@ -91,8 +91,11 @@
5 toolitem.get_child ().button_press_event.connect ((event) => {
6 return event.button == 3 && context_menu (toolitem, action); });
7 if (action.name == "CompactMenu")
8+ {
9+ toolitem.visible = !show_menubar;
10 bind_property ("show-menubar", toolitem, "visible",
11- BindingFlags.DEFAULT|BindingFlags.INVERT_BOOLEAN);
12+ BindingFlags.DEFAULT | BindingFlags.INVERT_BOOLEAN);
13+ }
14 return toolitem;
15 }
16

Subscribers

People subscribed via source and target branches

to all changes: