/[svn]/gigedit/trunk/src/gigedit/mainwindow.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/mainwindow.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2877 by schoenebeck, Fri Apr 15 13:45:12 2016 UTC revision 2918 by schoenebeck, Wed May 18 10:10:25 2016 UTC
# Line 192  MainWindow::MainWindow() : Line 192  MainWindow::MainWindow() :
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)
# Line 364  MainWindow::MainWindow() : Line 372  MainWindow::MainWindow() :
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>"
# Line 462  MainWindow::MainWindow() : Line 471  MainWindow::MainWindow() :
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      }      }
# Line 1918  void MainWindow::on_action_view_status_b Line 1932  void MainWindow::on_action_view_status_b
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"));
# Line 2340  void MainWindow::on_action_edit_script() Line 2364  void MainWindow::on_action_edit_script()
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();
# Line 3082  void MainWindow::script_double_clicked(c Line 3112  void MainWindow::script_double_clicked(c
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();

Legend:
Removed from v.2877  
changed lines
  Added in v.2918

  ViewVC Help
Powered by ViewVC