5 |
GNU General Public License version 2. |
GNU General Public License version 2. |
6 |
*/ |
*/ |
7 |
|
|
8 |
|
#include "global.h" |
9 |
#include "CombineInstrumentsDialog.h" |
#include "CombineInstrumentsDialog.h" |
10 |
|
|
11 |
// enable this for debug messages being printed while combining the instruments |
// enable this for debug messages being printed while combining the instruments |
12 |
#define DEBUG_COMBINE_INSTRUMENTS 0 |
#define DEBUG_COMBINE_INSTRUMENTS 0 |
13 |
|
|
|
#include "global.h" |
|
14 |
#include "compat.h" |
#include "compat.h" |
15 |
|
|
16 |
#include <set> |
#include <set> |
20 |
#include <string.h> |
#include <string.h> |
21 |
|
|
22 |
#include <glibmm/ustring.h> |
#include <glibmm/ustring.h> |
23 |
|
#include <gtkmm/stock.h> |
24 |
#include <gtkmm/messagedialog.h> |
#include <gtkmm/messagedialog.h> |
25 |
#include <gtkmm/label.h> |
#include <gtkmm/label.h> |
26 |
|
|
|
Glib::ustring gig_to_utf8(const gig::String& gig_string); |
|
27 |
Glib::ustring dimTypeAsString(gig::dimension_t d); |
Glib::ustring dimTypeAsString(gig::dimension_t d); |
28 |
|
|
29 |
typedef std::vector< std::pair<gig::Instrument*, gig::Region*> > OrderedRegionGroup; |
typedef std::vector< std::pair<gig::Instrument*, gig::Region*> > OrderedRegionGroup; |
781 |
CombineInstrumentsDialog::CombineInstrumentsDialog(Gtk::Window& parent, gig::File* gig) |
CombineInstrumentsDialog::CombineInstrumentsDialog(Gtk::Window& parent, gig::File* gig) |
782 |
: ManagedDialog(_("Combine Instruments"), parent, true), |
: ManagedDialog(_("Combine Instruments"), parent, true), |
783 |
m_gig(gig), m_fileWasChanged(false), m_newCombinedInstrument(NULL), |
m_gig(gig), m_fileWasChanged(false), m_newCombinedInstrument(NULL), |
784 |
m_cancelButton(_("_Cancel"), true), m_OKButton(_("_OK"), true), |
m_cancelButton(Gtk::Stock::CANCEL), m_OKButton(Gtk::Stock::OK), |
785 |
m_descriptionLabel(), m_tableDimCombo(2, 2), m_comboDimType(), |
m_descriptionLabel(), m_tableDimCombo(2, 2), m_comboDimType(), |
786 |
m_labelDimType(Glib::ustring(_("Combine by Dimension:")) + " ", Gtk::ALIGN_END) |
m_labelDimType(Glib::ustring(_("Combine by Dimension:")) + " ", Gtk::ALIGN_END) |
787 |
{ |
{ |
788 |
|
if (!Settings::singleton()->autoRestoreWindowDimension) { |
789 |
|
set_default_size(500, 600); |
790 |
|
set_position(Gtk::WIN_POS_MOUSE); |
791 |
|
} |
792 |
|
|
793 |
m_scrolledWindow.add(m_treeView); |
m_scrolledWindow.add(m_treeView); |
794 |
m_scrolledWindow.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); |
m_scrolledWindow.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); |
795 |
|
|