summaryrefslogtreecommitdiff
path: root/gtk2_ardour/utils.cc
diff options
context:
space:
mode:
authorDoug McLain <doug@nostar.net>2006-03-12 15:46:29 +0000
committerDoug McLain <doug@nostar.net>2006-03-12 15:46:29 +0000
commit670641c3df89af73de36efa5b0a184c2430275b0 (patch)
treeae4104e88cb85102fad0462efcf1682c9db34863 /gtk2_ardour/utils.cc
parent1ed64a7842ac57d1fe9e0464690f961781ca4080 (diff)
create xpm files from hard coded pixmaps, added function get_xpm() to make sure any xpm only gets load from disk once
git-svn-id: svn://localhost/trunk/ardour2@379 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/utils.cc')
-rw-r--r--gtk2_ardour/utils.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc
index 19c280f646..19d896fd0d 100644
--- a/gtk2_ardour/utils.cc
+++ b/gtk2_ardour/utils.cc
@@ -28,6 +28,7 @@
#include <gtk/gtkpaned.h>
#include <gtkmm2ext/utils.h>
+#include <ardour/ardour.h>
#include "ardour_ui.h"
#include "keyboard.h"
@@ -563,3 +564,12 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
return true;
}
+Glib::RefPtr<Gdk::Pixbuf>
+get_xpm (std::string name)
+{
+ if (!xpm_map[name]) {
+ xpm_map[name] = Gdk::Pixbuf::create_from_file (ARDOUR::find_data_file(name, "pixmaps"));
+ }
+
+ return (xpm_map[name]);
+}