/[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 2625 by schoenebeck, Wed Jun 11 21:22:24 2014 UTC revision 2644 by schoenebeck, Tue Jun 17 22:55:02 2014 UTC
# Line 53  Line 53 
53    
54    
55  MainWindow::MainWindow() :  MainWindow::MainWindow() :
56        m_DimRegionChooser(*this),
57      dimreg_label(_("Changes apply to:")),      dimreg_label(_("Changes apply to:")),
58      dimreg_all_regions(_("all regions")),      dimreg_all_regions(_("all regions")),
59      dimreg_all_dimregs(_("all dimension splits")),      dimreg_all_dimregs(_("all dimension splits")),
# Line 477  MainWindow::MainWindow() : Line 478  MainWindow::MainWindow() :
478      m_refScriptsTreeModel = ScriptsTreeStore::create(m_ScriptsModel);      m_refScriptsTreeModel = ScriptsTreeStore::create(m_ScriptsModel);
479      m_TreeViewScripts.set_model(m_refScriptsTreeModel);      m_TreeViewScripts.set_model(m_refScriptsTreeModel);
480      m_TreeViewScripts.set_tooltip_text(_(      m_TreeViewScripts.set_tooltip_text(_(
481            "Use CTRL + double click for editing a script."
482            "\n\n"
483          "Note: instrument scripts are a LinuxSampler extension of the gig "          "Note: instrument scripts are a LinuxSampler extension of the gig "
484          "format. This feature will not work with the GigaStudio software!"          "format. This feature will not work with the GigaStudio software!"
485      ));      ));
# Line 486  MainWindow::MainWindow() : Line 489  MainWindow::MainWindow() :
489      m_TreeViewScripts.signal_button_press_event().connect_notify(      m_TreeViewScripts.signal_button_press_event().connect_notify(
490          sigc::mem_fun(*this, &MainWindow::on_script_treeview_button_release)          sigc::mem_fun(*this, &MainWindow::on_script_treeview_button_release)
491      );      );
492        //FIXME: why the heck does this double click signal_row_activated() only fired while CTRL key is pressed ?
493        m_TreeViewScripts.signal_row_activated().connect(
494            sigc::mem_fun(*this, &MainWindow::script_double_clicked)
495        );
496      m_refScriptsTreeModel->signal_row_changed().connect(      m_refScriptsTreeModel->signal_row_changed().connect(
497          sigc::mem_fun(*this, &MainWindow::script_name_changed)          sigc::mem_fun(*this, &MainWindow::script_name_changed)
498      );      );
# Line 665  void MainWindow::dimreg_all_dimregs_togg Line 672  void MainWindow::dimreg_all_dimregs_togg
672  void MainWindow::dimreg_changed()  void MainWindow::dimreg_changed()
673  {  {
674      update_dimregs();      update_dimregs();
675      dimreg_edit.set_dim_region(m_DimRegionChooser.get_dimregion());      dimreg_edit.set_dim_region(m_DimRegionChooser.get_main_dimregion());
676  }  }
677    
678  void MainWindow::on_sel_change()  void MainWindow::on_sel_change()
# Line 1176  void MainWindow::on_action_help_about() Line 1183  void MainWindow::on_action_help_about()
1183          _(          _(
1184              "Gigedit is released under the GNU General Public License.\n"              "Gigedit is released under the GNU General Public License.\n"
1185              "\n"              "\n"
1186              "Please notice that this is still a very young instrument editor. "              "This program is distributed WITHOUT ANY WARRANTY; So better "
1187              "So better backup your Gigasampler files before editing them with "              "backup your Gigasampler/GigaStudio files before editing them with "
1188              "this application.\n"              "this application.\n"
1189              "\n"              "\n"
1190              "Please report bugs to: http://bugs.linuxsampler.org"              "Please report bugs to: http://bugs.linuxsampler.org"
# Line 2563  void MainWindow::script_name_changed(con Line 2570  void MainWindow::script_name_changed(con
2570      }      }
2571  }  }
2572    
2573    void MainWindow::script_double_clicked(const Gtk::TreeModel::Path& path,
2574                                           Gtk::TreeViewColumn* column)
2575    {
2576        Gtk::TreeModel::iterator iter = m_refScriptsTreeModel->get_iter(path);
2577        if (!iter) return;
2578        Gtk::TreeModel::Row row = *iter;
2579        gig::Script* script = row[m_ScriptsModel.m_col_script];
2580        if (!script) return;
2581    
2582        ScriptEditor* editor = new ScriptEditor;
2583        editor->setScript(script);
2584        //editor->reparent(*this);
2585        editor->show();
2586    }
2587    
2588  void MainWindow::instrument_name_changed(const Gtk::TreeModel::Path& path,  void MainWindow::instrument_name_changed(const Gtk::TreeModel::Path& path,
2589                                           const Gtk::TreeModel::iterator& iter) {                                           const Gtk::TreeModel::iterator& iter) {
2590      if (!iter) return;      if (!iter) return;

Legend:
Removed from v.2625  
changed lines
  Added in v.2644

  ViewVC Help
Powered by ViewVC