Set window's edited = true
when there are unsaved changes
This commit is contained in:
parent
a6262b97ff
commit
ca8ddcdeec
5 changed files with 38 additions and 0 deletions
|
@ -397,6 +397,17 @@ impl platform::Window for Window {
|
|||
msg_send![app, changeWindowsItem:window title:title filename:false]
|
||||
}
|
||||
}
|
||||
|
||||
fn set_edited(&mut self, edited: bool) {
|
||||
unsafe {
|
||||
let window = self.0.borrow().native_window;
|
||||
msg_send![window, setDocumentEdited: edited as BOOL]
|
||||
}
|
||||
|
||||
// Changing the document edited state resets the traffic light position,
|
||||
// so we have to move it again.
|
||||
self.0.borrow().move_traffic_light();
|
||||
}
|
||||
}
|
||||
|
||||
impl platform::WindowContext for Window {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue