faderport: stick a nice little image of the faderport in the surface GUI

Ideally, the PNG file would be part of the surface GUI but for now just put the PNG into gtk2_ardour/icons
This commit is contained in:
Paul Davis 2015-12-01 09:03:16 -05:00
parent d6943a3406
commit 620f1caf23
3 changed files with 17 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View file

@ -23,6 +23,7 @@
#include "pbd/unwind.h" #include "pbd/unwind.h"
#include "pbd/strsplit.h" #include "pbd/strsplit.h"
#include "pbd/file_utils.h"
#include "gtkmm2ext/actions.h" #include "gtkmm2ext/actions.h"
#include "gtkmm2ext/gtk_ui.h" #include "gtkmm2ext/gtk_ui.h"
@ -30,6 +31,7 @@
#include "gtkmm2ext/utils.h" #include "gtkmm2ext/utils.h"
#include "ardour/audioengine.h" #include "ardour/audioengine.h"
#include "ardour/filesystem_paths.h"
#include "faderport.h" #include "faderport.h"
#include "gui.h" #include "gui.h"
@ -88,6 +90,16 @@ FPGUI::FPGUI (FaderPort& p)
table.set_border_width (12); table.set_border_width (12);
table.set_homogeneous (false); table.set_homogeneous (false);
std::string data_file_path;
string name = "faderport-small.png";
Searchpath spath(ARDOUR::ardour_data_search_path());
spath.add_subdirectory_to_paths ("icons");
find_file (spath, name, data_file_path);
if (!data_file_path.empty()) {
image.set (data_file_path);
hpacker.pack_start (image, false, false);
}
Gtk::Label* l; Gtk::Label* l;
Gtk::Alignment* align; Gtk::Alignment* align;
int row = 0; int row = 0;
@ -216,7 +228,8 @@ FPGUI::FPGUI (FaderPort& p)
table.attach (action_table, 0, 5, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0)); table.attach (action_table, 0, 5, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0));
row++; row++;
pack_start (table, false, false); hpacker.pack_start (table, true, true);
pack_start (hpacker, false, false);
/* update the port connection combos */ /* update the port connection combos */

View file

@ -25,6 +25,7 @@
#include <gtkmm/box.h> #include <gtkmm/box.h>
#include <gtkmm/combobox.h> #include <gtkmm/combobox.h>
#include <gtkmm/image.h>
#include <gtkmm/table.h> #include <gtkmm/table.h>
#include <gtkmm/treestore.h> #include <gtkmm/treestore.h>
@ -45,10 +46,12 @@ public:
private: private:
FaderPort& fp; FaderPort& fp;
Gtk::HBox hpacker;
Gtk::Table table; Gtk::Table table;
Gtk::Table action_table; Gtk::Table action_table;
Gtk::ComboBox input_combo; Gtk::ComboBox input_combo;
Gtk::ComboBox output_combo; Gtk::ComboBox output_combo;
Gtk::Image image;
/* the mix, proj, trns and user buttons have no obvious semantics for /* the mix, proj, trns and user buttons have no obvious semantics for
* ardour, mixbus etc., so we allow the user to define their * ardour, mixbus etc., so we allow the user to define their