-
-
Notifications
You must be signed in to change notification settings - Fork 113
Ask save improvements #1307
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
Ask save improvements #1307
Conversation
* Show details * Allow ignore * Use when check file status fails * Reduce scope
| // If called by `save_as ()` then that function will show infobar | ||
| if (!saving_as) { | ||
| ask_save_location (false); | ||
| ask_save_location (_("Save operation failed - %s").printf (e.message)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we get an error message that's probably too long for an info bar. I think we should throw a dialog, yeah?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danirabbit Do you mean replace the infobar with a dialog entirely for the purposes of "ask_save_location"? As this function does really require a user response before they can proceed you are right that a dialog is more appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throwing dialog causes the document to focus out and in which results in some complications as that causes save and check status actions normally and this throws errors during a "Save as" operation. Working on a fix.
| Gtk.MessageType.WARNING, | ||
| message, | ||
| message + "\n" + details, | ||
| _("Ignore"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call 👍
|
@danirabbit I think switching to a dialog is going to require more far-reaching changes to way Code works because it causes focus in/out events that cause problems at the moment. Would it be acceptable to use an infobar for now and move to a dialog later if it causes width problems? Maybe the text could be shortened? |
|
@danirabbit I have pushed a draft version of this PR using a dialog at #1308 |
|
Closing in favor of #1309 |
Fixes #1306
This is partly to assist in investigating #1305