projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove .gitignore do nothing is ignored.
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
synfigapp
/
action_system.cpp
diff --git
a/synfig-studio/trunk/src/synfigapp/action_system.cpp
b/synfig-studio/trunk/src/synfigapp/action_system.cpp
index
cc20a2b
..
7aef925
100644
(file)
--- a/
synfig-studio/trunk/src/synfigapp/action_system.cpp
+++ b/
synfig-studio/trunk/src/synfigapp/action_system.cpp
@@
-68,13
+68,16
@@
Action::System::~System()
bool
Action::System::perform_action(etl::handle<Action::Base> action)
{
bool
Action::System::perform_action(etl::handle<Action::Base> action)
{
+ //// debug actions
+ // synfig::info("%s:%d perform_action: '%s'", __FILE__, __LINE__, action->get_name().c_str());
+
handle<UIInterface> uim(get_ui_interface());
assert(action);
if(!action->is_ready())
{
handle<UIInterface> uim(get_ui_interface());
assert(action);
if(!action->is_ready())
{
- uim->error(action->get_name()+": "+_("Action is not ready."));
+ uim->error(action->get_
local_
name()+": "+_("Action is not ready."));
return false;
}
return false;
}
@@
-105,7
+108,7
@@
Action::System::perform_action(etl::handle<Action::Base> action)
if(!undoable_action)
{
if(uim->yes_no(
if(!undoable_action)
{
if(uim->yes_no(
- action->get_name(),
+ action->get_
local_
name(),
_("This action cannot be undone! Are you sure you want to continue?"),
UIInterface::RESPONSE_NO
) == UIInterface::RESPONSE_NO
_("This action cannot be undone! Are you sure you want to continue?"),
UIInterface::RESPONSE_NO
) == UIInterface::RESPONSE_NO
@@
-125,15
+128,15
@@
Action::System::perform_action(etl::handle<Action::Base> action)
try { action->perform(); }
catch(Action::Error err)
{
try { action->perform(); }
catch(Action::Error err)
{
- uim->task(action->get_name()+' '+_("Failed"));
+ uim->task(action->get_
local_
name()+' '+_("Failed"));
inuse=false;
if(err.get_type()!=Action::Error::TYPE_UNABLE)
{
if(err.get_desc().empty())
inuse=false;
if(err.get_type()!=Action::Error::TYPE_UNABLE)
{
if(err.get_desc().empty())
- uim->error(action->get_name()+": "+strprintf("%d",err.get_type()));
+ uim->error(action->get_
local_
name()+": "+strprintf("%d",err.get_type()));
else
else
- uim->error(action->get_name()+": "+err.get_desc());
+ uim->error(action->get_
local_
name()+": "+err.get_desc());
}
// If action failed for whatever reason, just return false and do
}
// If action failed for whatever reason, just return false and do
@@
-142,10
+145,10
@@
Action::System::perform_action(etl::handle<Action::Base> action)
}
catch(std::exception err)
{
}
catch(std::exception err)
{
- uim->task(action->get_name()+' '+_("Failed"));
+ uim->task(action->get_
local_
name()+' '+_("Failed"));
inuse=false;
inuse=false;
- uim->error(action->get_name()+": "+err.what());
+ uim->error(action->get_
local_
name()+": "+err.what());
// If action failed for whatever reason, just return false and do
// not add the action onto the list
// If action failed for whatever reason, just return false and do
// not add the action onto the list
@@
-153,7
+156,7
@@
Action::System::perform_action(etl::handle<Action::Base> action)
}
catch(...)
{
}
catch(...)
{
- uim->task(action->get_name()+' '+_("Failed"));
+ uim->task(action->get_
local_
name()+' '+_("Failed"));
inuse=false;
// If action failed for whatever reason, just return false and do
inuse=false;
// If action failed for whatever reason, just return false and do
@@
-186,7
+189,7
@@
Action::System::perform_action(etl::handle<Action::Base> action)
inuse=false;
inuse=false;
- uim->task(action->get_name()+' '+_("Successful"));
+ uim->task(action->get_
local_
name()+' '+_("Successful"));
// If the action has "dirtied" the preview, signal it.
if(0)if(canvas_specific && canvas_specific->is_dirty())
// If the action has "dirtied" the preview, signal it.
if(0)if(canvas_specific && canvas_specific->is_dirty())
@@
-219,9
+222,9
@@
synfigapp::Action::System::undo_(etl::handle<UIInterface> uim)
if(err.get_type()!=Action::Error::TYPE_UNABLE)
{
if(err.get_desc().empty())
if(err.get_type()!=Action::Error::TYPE_UNABLE)
{
if(err.get_desc().empty())
- uim->error(action->get_name()+_(" (Undo): ")+strprintf("%d",err.get_type()));
+ uim->error(action->get_
local_
name()+_(" (Undo): ")+strprintf("%d",err.get_type()));
else
else
- uim->error(action->get_name()+_(" (Undo): ")+err.get_desc());
+ uim->error(action->get_
local_
name()+_(" (Undo): ")+err.get_desc());
}
return false;
}
return false;
@@
-281,7
+284,7
@@
synfigapp::Action::System::undo()
if(!undo_(uim))
{
if(!undo_(uim))
{
- uim->error(undo_action_stack_.front()->get_name()+": "+_("Failed to undo."));
+ uim->error(undo_action_stack_.front()->get_
local_
name()+": "+_("Failed to undo."));
inuse=false;
return false;
}
inuse=false;
return false;
}
@@
-317,9
+320,9
@@
Action::System::redo_(etl::handle<UIInterface> uim)
if(err.get_type()!=Action::Error::TYPE_UNABLE)
{
if(err.get_desc().empty())
if(err.get_type()!=Action::Error::TYPE_UNABLE)
{
if(err.get_desc().empty())
- uim->error(action->get_name()+_(" (Redo): ")+strprintf("%d",err.get_type()));
+ uim->error(action->get_
local_
name()+_(" (Redo): ")+strprintf("%d",err.get_type()));
else
else
- uim->error(action->get_name()+_(" (Redo): ")+err.get_desc());
+ uim->error(action->get_
local_
name()+_(" (Redo): ")+err.get_desc());
}
return false;
}
return false;
@@
-379,7
+382,7
@@
Action::System::redo()
if(!redo_(uim))
{
if(!redo_(uim))
{
- uim->error(redo_action_stack_.front()->get_name()+": "+_("Failed to redo."));
+ uim->error(redo_action_stack_.front()->get_
local_
name()+": "+_("Failed to redo."));
inuse=false;
return false;
}
inuse=false;
return false;
}