summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/editor_xpms44
-rw-r--r--gtk2_ardour/gain_meter.cc7
-rw-r--r--gtk2_ardour/pixmaps/vslider02_rail.xpm (renamed from gtk2_ardour/pixmaps/vslider_rail.xpm)2
-rw-r--r--gtk2_ardour/pixmaps/vslider02_slider.xpm (renamed from gtk2_ardour/pixmaps/vslider_slider.xpm)2
-rw-r--r--libs/gtkmm2ext/pix.cc17
5 files changed, 14 insertions, 58 deletions
diff --git a/gtk2_ardour/editor_xpms b/gtk2_ardour/editor_xpms
index 9d501efc3e..cb63e2403a 100644
--- a/gtk2_ardour/editor_xpms
+++ b/gtk2_ardour/editor_xpms
@@ -63,47 +63,3 @@ static const gchar speaker_cursor_mask_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0x3f, 0xff,
0xff, 0xff, 0xff, 0xff, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xf0, 0x00, 0xf0,
0x00, 0xc0, 0x00, 0xc0 };
-
-/* XPM */
-static const gchar * right_arrow_xpm[] = {
-"12 15 3 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-" .+.. ",
-" .++.. ",
-" .+++.. ",
-" ..+++.. ",
-" ..+++.. ",
-" ..+++.. ",
-" ..+++.. ",
-" ..+++. ",
-" ..+++.. ",
-" ..+++.. ",
-" ..+++.. ",
-" ..+++.. ",
-" .+++.. ",
-" .++.. ",
-" .+.. "};
-
-/* XPM */
-static const gchar * left_arrow_xpm[] = {
-"12 15 3 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-" ..+. ",
-" ..++. ",
-" ..+++. ",
-" ..+++.. ",
-" ..+++.. ",
-" ..+++.. ",
-" ..+++.. ",
-" .+++.. ",
-" ..+++.. ",
-" ..+++.. ",
-" ..+++.. ",
-" ..+++.. ",
-" ..+++. ",
-" ..++. ",
-" ..+. "};
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc
index 549620a1c8..9ef9cd5da9 100644
--- a/gtk2_ardour/gain_meter.cc
+++ b/gtk2_ardour/gain_meter.cc
@@ -62,12 +62,7 @@ map<string,Glib::RefPtr<Gdk::Pixmap> > GainMeter::metric_pixmaps;
int
GainMeter::setup_slider_pix ()
{
- vector<const char **> xpms;
-
- xpms.push_back (vslider_rail_xpm);
- xpms.push_back (vslider_slider_xpm);
-
- if ((slider_pix = get_pix ("sliders", xpms, false)) == 0) {
+ if ((slider_pix = get_pix (ARDOUR::find_data_file("pixmaps"), "vslider02", false)) == 0) {
error << _("Cannot create slider pixmaps") << endmsg;
return -1;
}
diff --git a/gtk2_ardour/pixmaps/vslider_rail.xpm b/gtk2_ardour/pixmaps/vslider02_rail.xpm
index bb6bc46ca8..6a550019e3 100644
--- a/gtk2_ardour/pixmaps/vslider_rail.xpm
+++ b/gtk2_ardour/pixmaps/vslider02_rail.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static const char * vslider_rail_xpm[] = {
+static char * vslider_rail_xpm[] = {
"3 200 4 1",
" c None",
". c #000000",
diff --git a/gtk2_ardour/pixmaps/vslider_slider.xpm b/gtk2_ardour/pixmaps/vslider02_slider.xpm
index dc0cf4cb94..b84b00d393 100644
--- a/gtk2_ardour/pixmaps/vslider_slider.xpm
+++ b/gtk2_ardour/pixmaps/vslider02_slider.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static const char * vslider_slider_xpm[] = {
+static char * vslider02_slider_xpm[] = {
"15 32 176 2",
" c None",
". c #999991",
diff --git a/libs/gtkmm2ext/pix.cc b/libs/gtkmm2ext/pix.cc
index c9f759b321..ee7503b1c7 100644
--- a/libs/gtkmm2ext/pix.cc
+++ b/libs/gtkmm2ext/pix.cc
@@ -19,7 +19,8 @@
*/
#include <algorithm>
-
+#include <iostream>
+#include <gtkmm/window.h>
#include <gdkmm.h>
#include <gdkmm/pixmap.h>
@@ -140,12 +141,16 @@ Pix::generate ()
for (int i = 0; i < pixmap_count; i++) {
if (from_files) {
- string *strp;
- strp = (*files)[i];
- const char* str(strp->c_str());
+ static Gtk::Button* button = 0;
+ static const Gdk::Color color;
- pixmaps[i] = Gdk::Pixmap::create_from_xpm (Gdk::Colormap::get_system(),
- bitmaps[i], &str);
+ if (button == 0) {
+ button = new Gtk::Button ("blah"); //bogus button to extract a Gdk::Drawable from
+ }
+ const Glib::RefPtr<const Gdk::Drawable> drawable = button->get_window();
+
+ pixmaps[i] = Gdk::Pixmap::create_from_xpm (drawable, Gdk::Colormap::get_system(),
+ bitmaps[i], color, *(*files)[i]);
} else {
gchar **xpm;
xpm = const_cast<gchar **> (data[i]);