diff options
author | Doug McLain <doug@nostar.net> | 2006-03-10 07:16:45 +0000 |
---|---|---|
committer | Doug McLain <doug@nostar.net> | 2006-03-10 07:16:45 +0000 |
commit | 276d290a422f3c13a3e72d907eb4882e9db53105 (patch) | |
tree | 87298f5b550eb45f32c4eb1d5355380750ba649c /gtk2_ardour | |
parent | 58bd9bff8db593dab69188199632aeabbcf8be8d (diff) |
Example code to load the x and <-> xpms for the mixer strip from files instead of from hard coded xpm data.
git-svn-id: svn://localhost/trunk/ardour2@370 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/about.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 25 | ||||
-rw-r--r-- | gtk2_ardour/pixmaps/lr.xpm | 16 | ||||
-rw-r--r-- | gtk2_ardour/pixmaps/small_x.xpm | 16 |
4 files changed, 38 insertions, 21 deletions
diff --git a/gtk2_ardour/about.cc b/gtk2_ardour/about.cc index 94284f58d4..4c4b79041c 100644 --- a/gtk2_ardour/about.cc +++ b/gtk2_ardour/about.cc @@ -164,7 +164,7 @@ About::About () string path; string t; - path = find_data_file ("splash.ppm"); + path = find_data_file ("splash.ppm", "pixmaps"); Glib::RefPtr<Pixbuf> pixbuf = Gdk::Pixbuf::create_from_file (path); diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 391ff0a820..d168c421cd 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -66,27 +66,10 @@ using namespace Gtk; using namespace Gtkmm2ext; /* XPM */ -static const gchar * small_x_xpm[] = { -"11 11 2 1", -" c None", -". c #cccc99", -" ", -" ", -" . . ", -" . . ", -" . . ", -" . ", -" . . ", -" . . ", -" . . ", -" ", -" "}; - -/* XPM */ static const gchar * lr_xpm[] = { "11 11 2 1", " c None", -". c #cccc99", +". c #cccccc", " ", " ", " . . ", @@ -145,8 +128,10 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, Route& rt, bool in_mixer) comment_window = 0; comment_area = 0; - width_button.add (*(manage (new Gtk::Image (Gdk::Pixbuf::create_from_xpm_data(lr_xpm))))); - hide_button.add (*(manage (new Gtk::Image (Gdk::Pixbuf::create_from_xpm_data(small_x_xpm))))); + std::string small_x_xpm_file = find_data_file("small_x.xpm", "pixmaps"); + std::string lr_xpm_file = find_data_file("lr.xpm", "pixmaps"); + width_button.add (*(manage (new Gtk::Image (Gdk::Pixbuf::create_from_file(lr_xpm_file))))); + hide_button.add (*(manage (new Gtk::Image (Gdk::Pixbuf::create_from_file(small_x_xpm_file))))); input_label.set_text (_("INPUT")); diff --git a/gtk2_ardour/pixmaps/lr.xpm b/gtk2_ardour/pixmaps/lr.xpm new file mode 100644 index 0000000000..b045c94883 --- /dev/null +++ b/gtk2_ardour/pixmaps/lr.xpm @@ -0,0 +1,16 @@ +/* XPM */ +static const gchar * lr_xpm[] = { +"11 11 2 1", +" c None", +". c #cccccc", +" ", +" ", +" . . ", +" . . ", +" . . ", +"...........", +" . . ", +" . . ", +" . . ", +" ", +" "}; diff --git a/gtk2_ardour/pixmaps/small_x.xpm b/gtk2_ardour/pixmaps/small_x.xpm new file mode 100644 index 0000000000..ee8e930761 --- /dev/null +++ b/gtk2_ardour/pixmaps/small_x.xpm @@ -0,0 +1,16 @@ +/* XPM */ +static const gchar * small_x_xpm[] = { +"11 11 2 1", +" c None", +". c #cccccc", +" ", +" ", +" . . ", +" . . ", +" . . ", +" . ", +" . . ", +" . . ", +" . . ", +" ", +" "}; |