summaryrefslogtreecommitdiff
path: root/gtk2_ardour/panner_ui.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/panner_ui.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/panner_ui.cc')
-rw-r--r--gtk2_ardour/panner_ui.cc42
1 files changed, 3 insertions, 39 deletions
diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc
index 74d50aa993..401d707b28 100644
--- a/gtk2_ardour/panner_ui.cc
+++ b/gtk2_ardour/panner_ui.cc
@@ -45,42 +45,6 @@ using namespace Gtkmm2ext;
using namespace Gtk;
using namespace sigc;
-/* XPM */
-static const gchar * forwdblarrow_xpm[] = {
-"20 11 3 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-" .. ",
-" .+. ",
-" .++. ",
-" ..............+++. ",
-" .+++++++++++++++++.",
-" ...................",
-" .+++++++++++++++++.",
-" ..............+++. ",
-" .++. ",
-" .+. ",
-" .. "};
-
-/* XPM */
-static const gchar * revdblarrow_xpm[] = {
-"20 11 3 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-" .. ",
-" .+. ",
-" .++. ",
-" ..............+++. ",
-" .+++++++++++++++++.",
-" ...................",
-" .+++++++++++++++++.",
-" .+++..............",
-" .++. ",
-" .+. ",
-" .. "};
-
PannerUI::PannerUI (IO& io, Session& s)
: _io (io),
@@ -117,7 +81,7 @@ PannerUI::PannerUI (IO& io, Session& s)
we need a pixmap in the button just to get started.
*/
- panning_link_direction_button.add (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data(forwdblarrow_xpm)))));
+ panning_link_direction_button.add (*(manage (new Image (get_xpm("forwardblarrow.xpm")))));
panning_link_direction_button.signal_clicked().connect
(mem_fun(*this, &PannerUI::panning_link_direction_clicked));
@@ -200,10 +164,10 @@ PannerUI::update_pan_linkage ()
switch (_io.panner().link_direction()) {
case Panner::SameDirection:
- panning_link_direction_button.set_image (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data (forwdblarrow_xpm)))));
+ panning_link_direction_button.set_image (*(manage (new Image (get_xpm ("forwardblarrow.xpm")))));
break;
default:
- panning_link_direction_button.set_image (*(manage (new Image (Gdk::Pixbuf::create_from_xpm_data (revdblarrow_xpm)))));
+ panning_link_direction_button.set_image (*(manage (new Image (get_xpm("revdblarrow.xpm")))));
break;
}
}