mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-28 18:32:50 +00:00
Merged branch 0.7.1 (release 0.7.2) to trunk.
This commit is contained in:
parent
b0c56578ca
commit
33baa4fd5c
@ -1,3 +1,10 @@
|
||||
2009-09-03 David Capello <davidcapello@gmail.com>
|
||||
|
||||
* Version 0.7.2 released.
|
||||
|
||||
* src/commands/cmd_close_file.cpp (close_current_sprite): Fixed
|
||||
bug #2847210: "Save" button when close a modified file was not working.
|
||||
|
||||
2009-08-10 David A. Capello <davidcapello@gmail.com>
|
||||
|
||||
* Version 0.7.1 released.
|
||||
|
6
NEWS.txt
6
NEWS.txt
@ -2,6 +2,12 @@
|
||||
NEWS
|
||||
===================================
|
||||
|
||||
0.7.2
|
||||
-----
|
||||
|
||||
+ Fixed bug #2847210: "Save" button when close a modified file was
|
||||
not working.
|
||||
|
||||
0.7.1
|
||||
-----
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
\palette ase.pcx
|
||||
\image ase.pcx
|
||||
|
||||
Welcome to ASE 0.7.1
|
||||
Welcome to ASE 0.7.2
|
||||
|
||||
READ THIS!
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
|
||||
dir="`pwd`"
|
||||
version=0.7.1
|
||||
version=0.7.2
|
||||
distdir=ase-$version
|
||||
|
||||
freetype_files="third_party/freetype/ChangeLog \
|
||||
|
@ -74,33 +74,51 @@ static void cmd_close_all_files_execute(const char *argument)
|
||||
*/
|
||||
static bool close_current_sprite()
|
||||
{
|
||||
CurrentSpriteWriter sprite;
|
||||
bool save_it;
|
||||
|
||||
/* see if the sprite has changes */
|
||||
while (sprite_is_modified(sprite)) {
|
||||
/* ask what want to do the user with the changes in the sprite */
|
||||
int ret = jalert("%s<<%s<<%s||%s||%s||%s",
|
||||
_("Warning"), _("Saving changes in:"),
|
||||
get_filename(sprite->filename),
|
||||
_("&Save"), _("&Discard"), _("&Cancel"));
|
||||
try_again:;
|
||||
// This flag indicates if we have to sabe the sprite before to destroy it
|
||||
save_it = false;
|
||||
{
|
||||
// The sprite is locked as reader temporaly
|
||||
CurrentSpriteReader sprite;
|
||||
|
||||
if (ret == 1) {
|
||||
/* "save": save the changes */
|
||||
// TODO we have to pass the sprite to the save file command
|
||||
command_execute(command_get_by_name(CMD_SAVE_FILE), NULL);
|
||||
}
|
||||
else if (ret != 2) {
|
||||
/* "cancel" or "ESC" */
|
||||
return false; /* we back doing nothing */
|
||||
}
|
||||
else {
|
||||
/* "discard" */
|
||||
break;
|
||||
/* see if the sprite has changes */
|
||||
while (sprite_is_modified(sprite)) {
|
||||
/* ask what want to do the user with the changes in the sprite */
|
||||
int ret = jalert("%s<<%s<<%s||%s||%s||%s",
|
||||
_("Warning"), _("Saving changes in:"),
|
||||
get_filename(sprite->filename),
|
||||
_("&Save"), _("&Discard"), _("&Cancel"));
|
||||
|
||||
if (ret == 1) {
|
||||
/* "save": save the changes */
|
||||
save_it = true;
|
||||
break;
|
||||
}
|
||||
else if (ret != 2) {
|
||||
/* "cancel" or "ESC" */
|
||||
return false; /* we back doing nothing */
|
||||
}
|
||||
else {
|
||||
/* "discard" */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* closes the sprite */
|
||||
sprite.destroy();
|
||||
// Does we need to save the sprite?
|
||||
if (save_it) {
|
||||
// TODO we have to pass the sprite to the save file command
|
||||
command_execute(command_get_by_name(CMD_SAVE_FILE), NULL);
|
||||
goto try_again;
|
||||
}
|
||||
|
||||
// Destroy the sprite (locking it as writer)
|
||||
{
|
||||
CurrentSpriteWriter sprite;
|
||||
sprite.destroy();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user