Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jeremypw
Copy link
Collaborator

Fixes #1306

  • Show details
  • Allow ignore
  • Use when check file status fails
  • Reduce scope

This is partly to assist in investigating #1305

Jeremy Wootten added 2 commits April 10, 2023 17:46
* Show details
* Allow ignore
* Use when check file status fails
* Reduce scope
@jeremypw jeremypw marked this pull request as ready for review April 10, 2023 17:14
@jeremypw jeremypw marked this pull request as draft April 10, 2023 17:14
// 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));
Copy link
Member

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call 👍

@jeremypw
Copy link
Collaborator Author

@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?

@jeremypw
Copy link
Collaborator Author

@danirabbit I have pushed a draft version of this PR using a dialog at #1308

@jeremypw
Copy link
Collaborator Author

Closing in favor of #1309

@jeremypw jeremypw closed this May 25, 2023
@jeremypw jeremypw deleted the ask-save-improvements branch June 23, 2023 11:47
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

Successfully merging this pull request may close these issues.

"Cannot save" infobar gives insufficient details and does not allow dismissal

3 participants