summaryrefslogtreecommitdiff
path: root/gtk2_ardour/utils.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-07-03 23:51:58 +0000
committerCarl Hetherington <carl@carlh.net>2009-07-03 23:51:58 +0000
commit69a8c81c43b99d65ec456b210119411e021faaf9 (patch)
treec6769ba0b7219780761dd620ba6b374386ef61f1 /gtk2_ardour/utils.cc
parenta3f7f86d9b8cee4183e9da6c2f8f6cfd4ee26969 (diff)
Pull snapshots code out of Editor class.
git-svn-id: svn://localhost/ardour2/branches/3.0@5313 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/utils.cc')
-rw-r--r--gtk2_ardour/utils.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc
index 7f97e88471..213cc02d4a 100644
--- a/gtk2_ardour/utils.cc
+++ b/gtk2_ardour/utils.cc
@@ -149,6 +149,21 @@ fit_to_pixels (cairo_t* cr, std::string name, double avail)
}
+/** Add an element to a menu, settings its sensitivity.
+ * @param m Menu to add to.
+ * @param e Element to add.
+ * @param s true to make sensitive, false to make insensitive
+ */
+void
+add_item_with_sensitivity (Menu_Helpers::MenuList& m, Menu_Helpers::MenuElem e, bool s)
+{
+ m.push_back (e);
+ if (!s) {
+ m.back().set_sensitive (false);
+ }
+}
+
+
gint
just_hide_it (GdkEventAny *ev, Gtk::Window *win)
{