1 |
/* |
/* |
2 |
* Copyright (C) 2006-2015 Andreas Persson |
* Copyright (C) 2006-2016 Andreas Persson |
3 |
* |
* |
4 |
* This program is free software; you can redistribute it and/or |
* This program is free software; you can redistribute it and/or |
5 |
* modify it under the terms of the GNU General Public License as |
* modify it under the terms of the GNU General Public License as |
192 |
actionGroup->add(toggle_action, |
actionGroup->add(toggle_action, |
193 |
sigc::mem_fun( |
sigc::mem_fun( |
194 |
*this, &MainWindow::on_action_view_status_bar)); |
*this, &MainWindow::on_action_view_status_bar)); |
195 |
|
|
196 |
|
toggle_action = |
197 |
|
Gtk::ToggleAction::create("AutoRestoreWinDim", _("_Auto Restore Window Dimension")); |
198 |
|
toggle_action->set_active(Settings::singleton()->autoRestoreWindowDimension); |
199 |
|
actionGroup->add(toggle_action, |
200 |
|
sigc::mem_fun( |
201 |
|
*this, &MainWindow::on_auto_restore_win_dim)); |
202 |
|
|
203 |
actionGroup->add( |
actionGroup->add( |
204 |
Gtk::Action::create("RefreshAll", _("_Refresh All")), |
Gtk::Action::create("RefreshAll", _("_Refresh All")), |
205 |
sigc::mem_fun(*this, &MainWindow::on_action_refresh_all) |
sigc::mem_fun(*this, &MainWindow::on_action_refresh_all) |
372 |
" </menu>" |
" </menu>" |
373 |
" <menu action='MenuView'>" |
" <menu action='MenuView'>" |
374 |
" <menuitem action='Statusbar'/>" |
" <menuitem action='Statusbar'/>" |
375 |
|
" <menuitem action='AutoRestoreWinDim'/>" |
376 |
" <separator/>" |
" <separator/>" |
377 |
" <menuitem action='RefreshAll'/>" |
" <menuitem action='RefreshAll'/>" |
378 |
" </menu>" |
" </menu>" |
471 |
} |
} |
472 |
{ |
{ |
473 |
Gtk::MenuItem* item = dynamic_cast<Gtk::MenuItem*>( |
Gtk::MenuItem* item = dynamic_cast<Gtk::MenuItem*>( |
474 |
|
uiManager->get_widget("/MenuBar/MenuView/AutoRestoreWinDim")); |
475 |
|
item->set_tooltip_text(_("If checked, size and position of all windows will be saved and automatically restored next time.")); |
476 |
|
} |
477 |
|
{ |
478 |
|
Gtk::MenuItem* item = dynamic_cast<Gtk::MenuItem*>( |
479 |
uiManager->get_widget("/MenuBar/MenuTools/CombineInstruments")); |
uiManager->get_widget("/MenuBar/MenuTools/CombineInstruments")); |
480 |
item->set_tooltip_text(_("Create combi sounds out of individual sounds of this .gig file.")); |
item->set_tooltip_text(_("Create combi sounds out of individual sounds of this .gig file.")); |
481 |
} |
} |
1477 |
dialog.set_name("Gigedit"); |
dialog.set_name("Gigedit"); |
1478 |
#endif |
#endif |
1479 |
dialog.set_version(VERSION); |
dialog.set_version(VERSION); |
1480 |
dialog.set_copyright("Copyright (C) 2006-2015 Andreas Persson"); |
dialog.set_copyright("Copyright (C) 2006-2016 Andreas Persson"); |
1481 |
const std::string sComment = |
const std::string sComment = |
1482 |
_("Built " __DATE__ "\nUsing ") + |
_("Built " __DATE__ "\nUsing ") + |
1483 |
::gig::libraryName() + " " + ::gig::libraryVersion() + "\n\n" + |
::gig::libraryName() + " " + ::gig::libraryVersion() + "\n\n" + |
1932 |
else m_StatusBar.hide(); |
else m_StatusBar.hide(); |
1933 |
} |
} |
1934 |
|
|
1935 |
|
void MainWindow::on_auto_restore_win_dim() { |
1936 |
|
Gtk::CheckMenuItem* item = |
1937 |
|
dynamic_cast<Gtk::CheckMenuItem*>(uiManager->get_widget("/MenuBar/MenuView/AutoRestoreWinDim")); |
1938 |
|
if (!item) { |
1939 |
|
std::cerr << "/MenuBar/MenuView/AutoRestoreWinDim == NULL\n"; |
1940 |
|
return; |
1941 |
|
} |
1942 |
|
Settings::singleton()->autoRestoreWindowDimension = item->get_active(); |
1943 |
|
} |
1944 |
|
|
1945 |
bool MainWindow::is_copy_samples_unity_note_enabled() const { |
bool MainWindow::is_copy_samples_unity_note_enabled() const { |
1946 |
Gtk::CheckMenuItem* item = |
Gtk::CheckMenuItem* item = |
1947 |
dynamic_cast<Gtk::CheckMenuItem*>(uiManager->get_widget("/MenuBar/MenuEdit/CopySampleUnity")); |
dynamic_cast<Gtk::CheckMenuItem*>(uiManager->get_widget("/MenuBar/MenuEdit/CopySampleUnity")); |
2364 |
if (!script) return; |
if (!script) return; |
2365 |
|
|
2366 |
ScriptEditor* editor = new ScriptEditor; |
ScriptEditor* editor = new ScriptEditor; |
2367 |
|
editor->signal_script_to_be_changed.connect( |
2368 |
|
signal_script_to_be_changed.make_slot() |
2369 |
|
); |
2370 |
|
editor->signal_script_changed.connect( |
2371 |
|
signal_script_changed.make_slot() |
2372 |
|
); |
2373 |
editor->setScript(script); |
editor->setScript(script); |
2374 |
//editor->reparent(*this); |
//editor->reparent(*this); |
2375 |
editor->show(); |
editor->show(); |
3112 |
if (!script) return; |
if (!script) return; |
3113 |
|
|
3114 |
ScriptEditor* editor = new ScriptEditor; |
ScriptEditor* editor = new ScriptEditor; |
3115 |
|
editor->signal_script_to_be_changed.connect( |
3116 |
|
signal_script_to_be_changed.make_slot() |
3117 |
|
); |
3118 |
|
editor->signal_script_changed.connect( |
3119 |
|
signal_script_changed.make_slot() |
3120 |
|
); |
3121 |
editor->setScript(script); |
editor->setScript(script); |
3122 |
//editor->reparent(*this); |
//editor->reparent(*this); |
3123 |
editor->show(); |
editor->show(); |