X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=inline;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fdock_history.cpp;h=c8fc3da8bd49ef673ff6cdc802a7232620047e80;hb=56c8824c217f4d4bf3202f7100c8d582e63d3abe;hp=4887895d517c3d280de6cc957516330c4a8e2896;hpb=99140178a9fac20077b8b4498a6e8e4e8d060abc;p=synfig.git
diff --git a/synfig-studio/trunk/src/gtkmm/dock_history.cpp b/synfig-studio/trunk/src/gtkmm/dock_history.cpp
index 4887895..c8fc3da 100644
--- a/synfig-studio/trunk/src/gtkmm/dock_history.cpp
+++ b/synfig-studio/trunk/src/gtkmm/dock_history.cpp
@@ -95,6 +95,17 @@ Dock_History::Dock_History():
)
);
action_group->add(Gtk::Action::create(
+ "clear-undo-and-redo",
+ Gtk::Stock::CLEAR,
+ _("Clear Undo and Redo Stacks"),
+ _("Clear the undo and redo stacks")
+ ),
+ sigc::mem_fun(
+ *this,
+ &Dock_History::clear_undo_and_redo
+ )
+ );
+ action_group->add(Gtk::Action::create(
"undo",
Gtk::StockID("gtk-undo"),
_("Undo"),
@@ -121,6 +132,7 @@ Dock_History::Dock_History():
" "
" "
" "
+ " "
" "
""
;
@@ -260,17 +272,26 @@ Dock_History::create_action_tree()
void
Dock_History::clear_undo()
{
- if(selected_instance && App::dialog_yes_no(_("Clear History"), _("You will not be able to undo any changes that you have made!\nAre you sure you want to clear the undo stack?")))
- {
+ if(selected_instance && App::dialog_yes_no(_("Clear History"),
+ _("You will not be able to undo any changes that you have made!\nAre you sure you want to clear the undo stack?")))
selected_instance->clear_undo_stack();
- }
}
void
Dock_History::clear_redo()
{
- if(selected_instance && App::dialog_yes_no(_("Clear History"), _("You will not be able to redo any changes that you have made!\nAre you sure you want to clear the redo stack?")))
+ if(selected_instance && App::dialog_yes_no(_("Clear History"),
+ _("You will not be able to redo any changes that you have made!\nAre you sure you want to clear the redo stack?")))
+ selected_instance->clear_redo_stack();
+}
+
+void
+Dock_History::clear_undo_and_redo()
+{
+ if(selected_instance && App::dialog_yes_no(_("Clear History"),
+ _("You will not be able to undo or redo any changes that you have made!\nAre you sure you want to clear the undo and redo stacks?")))
{
+ selected_instance->clear_undo_stack();
selected_instance->clear_redo_stack();
}
}
@@ -285,6 +306,7 @@ Dock_History::update_undo_redo()
action_group->get_action("clear-undo")->set_sensitive(instance->get_undo_status());
action_group->get_action("redo")->set_sensitive(instance->get_redo_status());
action_group->get_action("clear-redo")->set_sensitive(instance->get_redo_status());
+ action_group->get_action("clear-undo-and-redo")->set_sensitive(instance->get_undo_status() || instance->get_redo_status());
}
}