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

Disable Save prompt (No/Cancel/Yes) for non-host clients closing file with "X" on tab #24

Open
GoogleCodeExporter opened this issue Apr 18, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Host shares file
2. Non-host opens file
3. Non-host closes file, and is prompted to save
4. Non-host selects 'Yes'

What is the expected output? What do you see instead?
Expected: Save dialog
Getting: Nothing.  File does not get saved.

Original issue reported on code.google.com by [email protected] on 13 Apr 2011 at 7:48

@GoogleCodeExporter
Copy link
Author

I have an idea on how to fix this

Original comment by [email protected] on 13 Apr 2011 at 9:29

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 14 Apr 2011 at 5:25

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Workaround for Build 2 demo

Future versions will need some improvement

Original comment by [email protected] on 15 Apr 2011 at 1:12

  • Added labels: Milestone-Build3, Priority-Medium
  • Removed labels: Milestone-Build2, Priority-High

@GoogleCodeExporter
Copy link
Author

Azfar - I'm going to assign this to you so I can get started on packaging the 
plugin...

I've found it easier for the editor to prompt with a editor.doSaveAs() when 
it's closing.

The problem is that those editor tabs have a default way of prompting to save 
when they're being closed...

Two solutions that I found that you can explore:

(1) Override the isSaveOnCloseNeeded() method in ISaveablePart (which is a 
subclass of IEditorPart, returned when the editor is opened)

Problem: I don't know how to override this method when the openEditor() call 
returns an instance of IEditorPart.

(2) Do a editor.save(null) immediately when the user hits the "X" on the tab.  
It will not actually save anywhere, but will prevent the default dialog from 
coming up.

Problem:  I could not find a listener that responds immediately when the "X" is 
clicked.  Only when the part is closed.

Original comment by [email protected] on 18 Apr 2011 at 6:55

  • Changed title: Disable Save prompt (No/Cancel/Yes) for non-host clients closing file with "X" on tab
  • Changed state: New
  • Added labels: Priority-High
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 18 Apr 2011 at 8:35

  • Changed state: Started

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

1 participant