moved gain rail and sliders to files. The previously unused 'from_files' portion of Pix::generate () had to ported to gtk2 as well.

git-svn-id: svn://localhost/trunk/ardour2@389 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Doug McLain
2006-03-14 05:44:35 +00:00
parent af70789773
commit 191f323957
5 changed files with 14 additions and 58 deletions

View File

@@ -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]);