diff --git a/libs/ardour/ardour/operations.h b/libs/ardour/ardour/operations.h new file mode 100644 index 0000000000..945a5816a7 --- /dev/null +++ b/libs/ardour/ardour/operations.h @@ -0,0 +1,43 @@ +/* + Copyright (C) 2011 Paul Davis + Author: Carl Hetherington + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/** These are GQuarks for a subset of UI operations. We use these + * so that the undo system can be queried to find out what operations + * are currently in progress, by calling Session::current_operations(). + * + * It is only necessary to add a GQuark here if you subsequently want + * to be able to find out that a particular operation is in progress. + */ + +namespace Operations { + + extern GQuark capture; + extern GQuark paste; + extern GQuark duplicate_region; + extern GQuark insert_file; + extern GQuark insert_region; + extern GQuark drag_region_brush; + extern GQuark region_drag; + extern GQuark selection_grab; + extern GQuark region_fill; + extern GQuark fill_selection; + extern GQuark create_region; + +}; + diff --git a/libs/ardour/operations.cc b/libs/ardour/operations.cc new file mode 100644 index 0000000000..eddd36036c --- /dev/null +++ b/libs/ardour/operations.cc @@ -0,0 +1,34 @@ +/* + Copyright (C) 2011 Paul Davis + Author: Carl Hetherington + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include +#include "ardour/operations.h" +#include "i18n.h" + +GQuark Operations::capture = g_quark_from_static_string (_("capture")); +GQuark Operations::paste = g_quark_from_static_string (_("paste")); +GQuark Operations::duplicate_region = g_quark_from_static_string (_("duplicate region")); +GQuark Operations::insert_file = g_quark_from_static_string (_("insert file")); +GQuark Operations::insert_region = g_quark_from_static_string (_("insert region")); +GQuark Operations::drag_region_brush = g_quark_from_static_string (_("drag region brush")); +GQuark Operations::region_drag = g_quark_from_static_string (_("region drag")); +GQuark Operations::selection_grab = g_quark_from_static_string (_("selection grab")); +GQuark Operations::region_fill = g_quark_from_static_string (_("region fill")); +GQuark Operations::fill_selection = g_quark_from_static_string (_("fill selection")); +GQuark Operations::create_region = g_quark_from_static_string (_("create region"));