62 |
#include "gfx/builtinpix.h" |
#include "gfx/builtinpix.h" |
63 |
#include "MacroEditor.h" |
#include "MacroEditor.h" |
64 |
#include "MacrosSetup.h" |
#include "MacrosSetup.h" |
65 |
|
#if defined(__APPLE__) |
66 |
|
# include "MacHelper.h" |
67 |
|
#endif |
68 |
|
|
69 |
MainWindow::MainWindow() : |
MainWindow::MainWindow() : |
70 |
m_DimRegionChooser(*this), |
m_DimRegionChooser(*this), |
81 |
loadBuiltInPix(); |
loadBuiltInPix(); |
82 |
|
|
83 |
// set_border_width(5); |
// set_border_width(5); |
84 |
// set_default_size(400, 200); |
|
85 |
|
if (!Settings::singleton()->autoRestoreWindowDimension) { |
86 |
|
set_default_size(800, 600); |
87 |
|
set_position(Gtk::WIN_POS_CENTER); |
88 |
|
} |
89 |
|
|
90 |
add(m_VBox); |
add(m_VBox); |
91 |
|
|
878 |
|
|
879 |
updateMacroMenu(); |
updateMacroMenu(); |
880 |
} |
} |
881 |
|
|
882 |
|
Glib::signal_idle().connect_once( |
883 |
|
sigc::mem_fun(*this, &MainWindow::bringToFront), |
884 |
|
200 |
885 |
|
); |
886 |
} |
} |
887 |
|
|
888 |
MainWindow::~MainWindow() |
MainWindow::~MainWindow() |
889 |
{ |
{ |
890 |
} |
} |
891 |
|
|
892 |
|
void MainWindow::bringToFront() { |
893 |
|
#if defined(__APPLE__) |
894 |
|
macRaiseAppWindow(); |
895 |
|
#endif |
896 |
|
raise(); |
897 |
|
present(); |
898 |
|
} |
899 |
|
|
900 |
void MainWindow::updateMacroMenu() { |
void MainWindow::updateMacroMenu() { |
901 |
Gtk::Menu* menuMacro = dynamic_cast<Gtk::MenuItem*>( |
Gtk::Menu* menuMacro = dynamic_cast<Gtk::MenuItem*>( |
902 |
uiManager->get_widget("/MenuBar/MenuMacro") |
uiManager->get_widget("/MenuBar/MenuMacro") |
1836 |
dialog.set_comments(sComment.c_str()); |
dialog.set_comments(sComment.c_str()); |
1837 |
dialog.set_website("http://www.linuxsampler.org"); |
dialog.set_website("http://www.linuxsampler.org"); |
1838 |
dialog.set_website_label("http://www.linuxsampler.org"); |
dialog.set_website_label("http://www.linuxsampler.org"); |
1839 |
|
dialog.set_position(Gtk::WIN_POS_CENTER); |
1840 |
dialog.run(); |
dialog.run(); |
1841 |
} |
} |
1842 |
|
|
1862 |
table(2, 1), |
table(2, 1), |
1863 |
m_file(NULL) |
m_file(NULL) |
1864 |
{ |
{ |
1865 |
|
if (!Settings::singleton()->autoRestoreWindowDimension) { |
1866 |
|
set_default_size(470, 390); |
1867 |
|
set_position(Gtk::WIN_POS_MOUSE); |
1868 |
|
} |
1869 |
|
|
1870 |
set_title(_("File Properties")); |
set_title(_("File Properties")); |
1871 |
eName.set_width_chars(50); |
eName.set_width_chars(50); |
1872 |
|
|
2001 |
eDimensionKeyRangeLow(_("Keyswitching range low")), |
eDimensionKeyRangeLow(_("Keyswitching range low")), |
2002 |
eDimensionKeyRangeHigh(_("Keyswitching range high")) |
eDimensionKeyRangeHigh(_("Keyswitching range high")) |
2003 |
{ |
{ |
2004 |
|
if (!Settings::singleton()->autoRestoreWindowDimension) { |
2005 |
|
//set_default_size(470, 390); |
2006 |
|
set_position(Gtk::WIN_POS_MOUSE); |
2007 |
|
} |
2008 |
|
|
2009 |
set_title(_("Instrument Properties")); |
set_title(_("Instrument Properties")); |
2010 |
|
|
2011 |
eDimensionKeyRangeLow.set_tip( |
eDimensionKeyRangeLow.set_tip( |
3589 |
void MainWindow::on_action_combine_instruments() { |
void MainWindow::on_action_combine_instruments() { |
3590 |
CombineInstrumentsDialog* d = new CombineInstrumentsDialog(*this, file); |
CombineInstrumentsDialog* d = new CombineInstrumentsDialog(*this, file); |
3591 |
d->show_all(); |
d->show_all(); |
|
d->resize(500, 400); |
|
3592 |
d->run(); |
d->run(); |
3593 |
if (d->fileWasChanged()) { |
if (d->fileWasChanged()) { |
3594 |
// update GUI with new instrument just created |
// update GUI with new instrument just created |