aboutsummaryrefslogtreecommitdiff
path: root/core/file_io.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-02-25 04:50:42 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2010-02-25 04:50:42 -0500
commit97852faead603a90219639e238587a2414f1c1e4 (patch)
tree95fe9b75d3853b985c704e468d1b29ba781f26f1 /core/file_io.lua
parent6dd0afaca2398bd36ff48c9a2f7799608bafcace (diff)
downloadtextadept-97852faead603a90219639e238587a2414f1c1e4.tar.gz
textadept-97852faead603a90219639e238587a2414f1c1e4.zip
Modified quit and close dialogs to be more readable.
Submitted by rgieseke.
Diffstat (limited to 'core/file_io.lua')
-rw-r--r--core/file_io.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/file_io.lua b/core/file_io.lua
index fa878c39..ced71eb8 100644
--- a/core/file_io.lua
+++ b/core/file_io.lua
@@ -323,10 +323,14 @@ end
function close(buffer)
textadept.check_focused_buffer(buffer)
if buffer.dirty and
- textadept.dialog('yesno-msgbox',
+ textadept.dialog('msgbox',
'--title', locale.IO_CLOSE_TITLE,
'--text', locale.IO_CLOSE_TEXT,
- '--informative-text', locale.IO_CLOSE_MSG,
+ '--informative-text',
+ string.format('%s', (buffer.filename or
+ buffer._type or locale.UNTITLED)),
+ '--button1', 'gtk-cancel',
+ '--button2', locale.IO_CLOSE_BUTTON2,
'--no-newline') ~= '2' then
return false
end