No option to go back or even close the window after Linux Mint upgrade #74

Closed
opened 2 years ago by onryo · 9 comments
onryo commented 2 years ago
Collaborator

I have recently upgraded my Linux Mint to the latest Una version that is using Qt 5.12.8.

I am on dev, after creating the seed I have no option to go back or even close the window!

Can someone verify it happened only to me?

I have recently upgraded my Linux Mint to the latest Una version that is using Qt 5.12.8. I am on `dev`, after creating the seed I have no option to go back or even close the window! Can someone verify it happened only to me?
onryo added the
medium priority
label 2 years ago
Poster
Collaborator

I am checking different branches, let's see if it is even a Qt related bug.

UPDATE: no it is not, it is related to Linux Mint theme settings.

I am checking different branches, let's see if it is even a Qt related bug. UPDATE: no it is not, it is related to Linux Mint theme settings.
Poster
Collaborator

on a master branch it works fine, there is a close button.

Also fine on a dev branch! But the reason for that is that before checking other branches I've changed a theme in settings, and now I have a close button at least.

The inability to click on back and cancel buttons are not related to this issue, I think it was this way in the past.

on a `master` branch it works fine, there is a close button. Also fine on a `dev` branch! But the reason for that is that before checking other branches I've changed a theme in settings, and now I have a close button at least. The inability to click on back and cancel buttons are not related to this issue, I think it was this way in the past.
Poster
Collaborator

To be honest, I would rather remove a "back" button and maybe even "cancel" one as well, do we need them?

To be honest, I would rather remove a "back" button and maybe even "cancel" one as well, do we need them?
Owner

@onryo just to clarify, you are saying that once we render a seed, that there should only be a single button "Finish" and no "Back" or "Cancel", is that correct? I think that is doable.

@onryo just to clarify, you are saying that once we render a seed, that there should only be a single button "Finish" and no "Back" or "Cancel", is that correct? I think that is doable.
Poster
Collaborator

@onryo just to clarify, you are saying that once we render a seed, that there should only be a single button "Finish" and no "Back" or "Cancel", is that correct? I think that is doable.

Yes, I can do that, but I need an advise if it is a good idea. The "cancel" button is not needed since we have a "close" button that closes the wizard window, and I am not sure what "back" option can accomplish, what is the point to go back?

> @onryo just to clarify, you are saying that once we render a seed, that there should only be a single button "Finish" and no "Back" or "Cancel", is that correct? I think that is doable. Yes, I can do that, but I need an advise if it is a good idea. The "cancel" button is not needed since we have a "close" button that closes the wizard window, and I am not sure what "back" option can accomplish, what is the point to go back?
Owner

@onryo yes I think it's a good idea. I don't think there is a valid reason to "go back", it probably confuses users. The "back" button is there because all "screens" of the wizard render all the buttons unless we write code that specifically prevents it. We likely should have a "help" button on the last screen too, but that is a different issue.

@onryo yes I think it's a good idea. I don't think there is a valid reason to "go back", it probably confuses users. The "back" button is there because all "screens" of the wizard render all the buttons unless we write code that specifically prevents it. We likely should have a "help" button on the last screen too, but that is a different issue.
Collaborator

I was looking into some other issues related to this. All of those bottom buttons are not in any form to simply change in designer. They are all controlled and automatically added by QWizard class. There is some code in various areas that disables some of these buttons and tries changing slots/signals that doesn't seem to be working.
https://doc.qt.io/qt-5/qwizard.html

All of these other issues are related to QWizard: #28, #65, #66, #67

If you close or cancel the wizard, I feel it should just close the app. There is code that is supposed to display an alert confirming you want to close, but it does not work. Some bugs may be QT version specific. When I was researching some people suggested the code that is already here:
https://git.hush.is/hush/SilentDragonLite/src/branch/dev/src/firsttimewizard.cpp#L303
https://git.hush.is/hush/SilentDragonLite/src/branch/dev/src/firsttimewizard.cpp#L309

Others suggested removing or hiding the cancel button and using a standard QPushButton instead, but all of the methods for trying to hide or change visibility did not seem to work for the cancel button in QWizard. It is weird because I can disable the button from being clicked, but can't hide it. The code for firsttimewizard.cpp needs a deeper review to fix these issues.

I was looking into some other issues related to this. All of those bottom buttons are not in any form to simply change in designer. They are all controlled and automatically added by QWizard class. There is some code in various areas that disables some of these buttons and tries changing slots/signals that doesn't seem to be working. https://doc.qt.io/qt-5/qwizard.html All of these other issues are related to QWizard: #28, #65, #66, #67 If you close or cancel the wizard, I feel it should just close the app. There is code that is supposed to display an alert confirming you want to close, but it does not work. Some bugs may be QT version specific. When I was researching some people suggested the code that is already here: https://git.hush.is/hush/SilentDragonLite/src/branch/dev/src/firsttimewizard.cpp#L303 https://git.hush.is/hush/SilentDragonLite/src/branch/dev/src/firsttimewizard.cpp#L309 Others suggested removing or hiding the cancel button and using a standard QPushButton instead, but all of the methods for trying to hide or change visibility did not seem to work for the cancel button in QWizard. It is weird because I can disable the button from being clicked, but can't hide it. The code for firsttimewizard.cpp needs a deeper review to fix these issues.
Collaborator

For reference, the cancel and other buttons can be removed with setOption:
Cancel button
parent->setOption(QWizard::NoCancelButton);

Back buttons

parent->setOption(QWizard::NoBackButtonOnStartPage);
parent->setOption(QWizard::NoBackButtonOnLastPage);

I ended up removing back button, keeping cancel, and hiding the "X" close since the cancel button had existing code and works now. It was easiest to do it this way but open to suggestions if others think the "X" close shouldn't be removed. If keeping, it would need to be handled to close the GUI.

One thing I noticed is that on new wallet creation, if you cancel before confirming seed, wallet is still created, but without encryption and starts syncing on restart. Probably don't want to get into trying to prevent that. User can still export seed phrase and set encryption from GUI.

For reference, the cancel and other buttons can be removed with setOption: Cancel button `parent->setOption(QWizard::NoCancelButton);` Back buttons ``` parent->setOption(QWizard::NoBackButtonOnStartPage); parent->setOption(QWizard::NoBackButtonOnLastPage); ``` I ended up removing back button, keeping cancel, and hiding the "X" close since the cancel button had existing code and works now. It was easiest to do it this way but open to suggestions if others think the "X" close shouldn't be removed. If keeping, it would need to be handled to close the GUI. One thing I noticed is that on new wallet creation, if you cancel before confirming seed, wallet is still created, but without encryption and starts syncing on restart. Probably don't want to get into trying to prevent that. User can still export seed phrase and set encryption from GUI.
Owner

@fekt thanks for your work on this. I think the last thing you mentioned warranted it's own issue, so I created #93. I think that if a user does not confirm the seed, we should not create an unencrypted wallet. Closing this issue.

@fekt thanks for your work on this. I think the last thing you mentioned warranted it's own issue, so I created #93. I think that if a user does not confirm the seed, we should not create an unencrypted wallet. Closing this issue.
duke closed this issue 2 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.