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

Recover file dialog buttons mismatch #2518

Closed
Umcaruje opened this issue Jan 26, 2016 · 17 comments
Closed

Recover file dialog buttons mismatch #2518

Umcaruje opened this issue Jan 26, 2016 · 17 comments
Milestone

Comments

@Umcaruje
Copy link
Member

LMMS master branch, built yesterday (d30a7df).

OS: Elementary OS Freya x64, Ubuntu based distro.

When I crash LMMS and an recovery is attempted, the dialog looks like this:
screenshot from 2016-01-25 21 27 39

Instead of this (Picture from #2176)
image

So the 'discard' button became 'Close without saving' and also the actual order of the buttons changed.

On the other hand, I think the order of the buttons should be the same as the order of the columns (recover, ignore, discard, exit rather than recover, discard, ignore, exit).

I also think that 'Quit' should be renamed to 'Exit' in the text.

I'm sorry for pointing out these issues now, but I never got around testing #2176

Tagging @zonkmachine since he's the author of the mentioned PR.

@Umcaruje Umcaruje added this to the 1.2.0 milestone Jan 26, 2016
@zonkmachine
Copy link
Member

  • 'Close without saving' and order of buttons
    Are you on Qt5?
  • Quit and Exit should be one and the same
    I change to 'Exit' in the text.
  • Ignore button icon gone.

@Umcaruje
Copy link
Member Author

Are you on Qt5?

I didn't build with qt5, though I do have it installed on my system.

@zonkmachine
Copy link
Member

And the icon on the Ignore button is gone. 😢

@Umcaruje
Copy link
Member Author

If its of any help, when I run qmake -v I get

QMake version 3.0
Using Qt version 5.2.1 in /usr/lib/x86_64-linux-gnu

But I do not run my builds with -DWANT_QT5=ON. That should mean that cmake should use qt4, right?

@zonkmachine
Copy link
Member

Mine reads:

QMake version 2.01a
Using Qt version 4.8.6 in /usr/lib/x86_64-linux-gnu

But I do not run my builds with -DWANT_QT5=ON. That should mean that cmake should use qt4, right?

One would assume so. I haven't tried Qt5.
The order of the buttons are defined by button roles, apparently, and I thought I had this one figured out. I'll dive into it once more. The "Close without Saving" button text is a mystery.

@zonkmachine
Copy link
Member

@Umcaruje Trying some fixes now. What theme are you using? Are those button icons from a system or an LMMS theme?

@Umcaruje
Copy link
Member Author

Actually, they seem to be a mix of both. The recover and close without saving buttons use icons from my system theme (numix-icon-circle), while the exit button is from the LMMS theme. Even when I revert to the default theme, there is no icon next to the Ignore button.

@zonkmachine
Copy link
Member

Even when I revert to the default theme, there is no icon next to the Ignore button.

Do you run it directly from the build directory with ./lmmsor do you make install first? I have to install for the Ignore icon to show up.

@Umcaruje
Copy link
Member Author

Doing make install doesn't make the icon show up.

<offtopic> I'm on IRC right now, and for the sake of not spamming this thread back and forth, you could perhaps hop on to #lmms over on freenode.net, that might make it easier.</offtopic>

@tresf
Copy link
Member

tresf commented Mar 3, 2016

Is there a way for us to update the html table/GUI with the text from the buttons?

@Umcaruje
Copy link
Member Author

@zonkmachine this is how it looks over on qt5:

screenshot from 2016-03-20 12 52 11

No icons, and button height varies, but the text seems to be there.

@mikobuntu
Copy link
Contributor

gui_buttons

This is how the recovery window looks in current Master branch using QT5 also ( unsure if QT related )

@zonkmachine
Copy link
Member

unsure if QT related

I think it's rather "zonkmachine related" I'm afraid...

@zonkmachine
Copy link
Member

The message "Close without Saving" is called in qt with the following line:

else if (layoutPolicy == QDialogButtonBox::GnomeLayout)
            buttonText = QT_TRANSLATE_NOOP("QDialogButtonBox", "Close without Saving");

@zonkmachine
Copy link
Member

The differences seem to stem from the desktops using different orders for the button roles as explicitly defined in qdialogbuttonbox.cpp

    // Qt::Horizontal
    {
        // WinLayout
        { ResetRole, Stretch, YesRole, AcceptRole, AlternateRole, DestructiveRole, NoRole, ActionRole, RejectRole, ApplyRole,
           HelpRole, EOL, EOL, EOL },

        // MacLayout
        { HelpRole, ResetRole, ApplyRole, ActionRole, Stretch, DestructiveRole | Reverse,
          AlternateRole | Reverse, RejectRole | Reverse, AcceptRole | Reverse, NoRole | Reverse, YesRole | Reverse, EOL, EOL },

        // KdeLayout
        { HelpRole, ResetRole, Stretch, YesRole, NoRole, ActionRole, AcceptRole, AlternateRole,
          ApplyRole, DestructiveRole, RejectRole, EOL },

        // GnomeLayout
        { HelpRole, ResetRole, Stretch, ActionRole, ApplyRole | Reverse, DestructiveRole | Reverse,
          AlternateRole | Reverse, RejectRole | Reverse, AcceptRole | Reverse, NoRole | Reverse, YesRole | Reverse, EOL },

        // Mac modeless
        { ResetRole, ApplyRole, ActionRole, Stretch, HelpRole, EOL, EOL, EOL, EOL, EOL, EOL, EOL, EOL, EOL }
    },

@follower
Copy link
Contributor

FWIW, in case this is useful (and, you know, I actually took a screenshot, so might as well use it :) ) with 1.1.91 from #2890 on Mac OS X 10.8.x the dialog looked like this:
recover-file-dialog-bug

I haven't tested with master to test the fix in #2908.

@zonkmachine
Copy link
Member

I haven't tested with master to test the fix in #2908.

Which is the information we need. Test the next RC build when it's out (not done cooking yet).

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

No branches or pull requests

5 participants