Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout is not saved on any Mumble version or platform #2003

Closed
falkreon opened this issue Dec 21, 2015 · 4 comments
Closed

Layout is not saved on any Mumble version or platform #2003

falkreon opened this issue Dec 21, 2015 · 4 comments
Assignees

Comments

@falkreon
Copy link

Reproduction instructions:

  • Select "Settings" from the "Configure" menu
  • Select the "User Interface" tab (depending on your platform, that'll be the third item on the left)
  • From the top panel called "Layout", make any selection except "Custom" (my preference is "Classic")
  • Click any combination of "Apply" and/or "OK"
  • Quit and restart Mumble

Expected behavior:

  • On OSX, the client behavior is expected to change and be saved the very instant the option is selected.
  • On Windows and *nix, Apply is expected to enable the behavior but may or may not save it.
  • OK is expected to save the settings so that they'll be usable in both this session and all following sessions.

Observed behavior:
Clicking "OK" enables the behavior, but makes no changes to the underlying settings file(s). In fact, even if you don't restart the client, consecutive visits to the "Settings" window show the setting reverted!

Observing and refreshing the registry from Windows reveals that no change is made to the relevant key under any combination of OK or Apply.

This may be related to #1185

Implementing #1940 would aid substantially in eliminating bugs like this for good.

@mkrautz
Copy link
Contributor

mkrautz commented Dec 21, 2015

You don't specify your Mumble version. I assume this is for snapshots?

@mkrautz mkrautz self-assigned this Dec 21, 2015
@mkrautz
Copy link
Contributor

mkrautz commented Dec 21, 2015

I apologize. I see you are stating that this happens on all versions.

@mkrautz
Copy link
Contributor

mkrautz commented Dec 21, 2015

Debug branch at https://github.com/mkrautz/mumble/tree/layout-debug

The issue is that our slots at https://github.com/mumble-voip/mumble/blob/master/src/mumble/MainWindow.cpp#L3021-L3035 get called more agressively than previously.

Just before we save on exit, the value is reset by the slots:

2015-12-21 02:43:18.818 after wlWindowLayout = 0
2015-12-21 02:43:18.928 way after wlWindowLayout = 0
2015-12-21 02:43:21.978 log visibility dockLocationChanged!
2015-12-21 02:43:21.979 chat dockLocationChanged!
2015-12-21 02:43:21.988 SAVE wlWindowLayout 3

mkrautz added a commit to mkrautz/mumble that referenced this issue Dec 26, 2015
This simplifies our handling of our UI layout setting in
MainWindow.

Previously, we had slots that detected visibility and position
changes for dock elements. And if any of them fired, we would
revert back to the 'custom' layout.

However, changing the layout behind the user's back meant we
had to keep track of the original layout setting when we
performed a re-layout of the MainWindow, such as when we apply
new settings from the ConfigDialog.

In Qt 5 (we think!), things changed, and the slots are called
more frequently.

Currently, that means that Mumble *always* resets to the 'custom'
layout when applying settings. That's no good.

This commit removes the slots that listen for layout and visibility
changes for dock elements. It also removes MainWindow's 'dock widget'
context menu when not in the 'custom' layout. The result is that you
are now locked into the layout that you choose in the ConfigDialog.

We already have code in Mumble that I wrote a while back that disables
dragging of dock elements when you are not in the 'custom' layout.

This is a natural extension of that: you can no longer modify the
layout of the UI unless you choose 'custom'.

Fixes mumble-voip#2003
mkrautz added a commit to mkrautz/mumble that referenced this issue Dec 26, 2015
This simplifies our handling of our UI layout setting in
MainWindow.

Previously, we had slots that detected visibility and position
changes for dock elements. And if any of them fired, we would
revert back to the 'custom' layout.

However, changing the layout behind the user's back meant we
had to keep track of the original layout setting when we
performed a re-layout of the MainWindow, such as when we apply
new settings from the ConfigDialog.

In Qt 5 (we think!), things changed, and the slots are called
more frequently.

Currently, that means that Mumble *always* resets to the 'custom'
layout when applying settings. That's no good.

This commit removes the slots that listen for layout and visibility
changes for dock elements. It also removes MainWindow's 'dock widget'
context menu when not in the 'custom' layout. The result is that you
are now locked into the layout that you choose in the ConfigDialog.

We already have code in Mumble that I wrote a while back that disables
dragging of dock elements when you are not in the 'custom' layout.

This is a natural extension of that: you can no longer modify the
layout of the UI unless you choose 'custom'.

Fixes mumble-voip#2003
@falkreon
Copy link
Author

Confirmed fixed on 1.3.0 build 918 :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants