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

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

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

revision 3735 by schoenebeck, Tue Oct 1 16:27:13 2019 UTC revision 3736 by schoenebeck, Sat Feb 1 19:39:06 2020 UTC
# Line 1  Line 1 
1  /*  /*
2      Copyright (c) 2014-2019 Christian Schoenebeck      Copyright (c) 2014-2020 Christian Schoenebeck
3            
4      This file is part of "gigedit" and released under the terms of the      This file is part of "gigedit" and released under the terms of the
5      GNU General Public License version 2.      GNU General Public License version 2.
# Line 139  ScriptEditor::ScriptEditor() : Line 139  ScriptEditor::ScriptEditor() :
139      m_stringTag->property_foreground() = "#c40c0c"; // red      m_stringTag->property_foreground() = "#c40c0c"; // red
140      m_tagTable->add(m_stringTag);      m_tagTable->add(m_stringTag);
141    
142        m_patchTag = Gtk::TextBuffer::Tag::create();
143        m_patchTag->property_foreground() = "#FF4FF3"; // pink
144        m_patchTag->property_weight() = PANGO_WEIGHT_BOLD;
145        m_tagTable->add(m_patchTag);
146    
147      m_commentTag = Gtk::TextBuffer::Tag::create();      m_commentTag = Gtk::TextBuffer::Tag::create();
148      m_commentTag->property_foreground() = "#9c9c9c"; // gray      m_commentTag->property_foreground() = "#9c9c9c"; // gray
149      m_tagTable->add(m_commentTag);      m_tagTable->add(m_commentTag);
# Line 605  void ScriptEditor::updateSyntaxHighlight Line 610  void ScriptEditor::updateSyntaxHighlight
610          const LinuxSampler::VMSourceToken& token = tokens[i];          const LinuxSampler::VMSourceToken& token = tokens[i];
611    
612          if (token.isKeyword()) {          if (token.isKeyword()) {
613              applyCodeTag(m_textBuffer, token, m_keywordTag);              if (token.text() == "patch")
614                    applyCodeTag(m_textBuffer, token, m_patchTag);
615                else
616                    applyCodeTag(m_textBuffer, token, m_keywordTag);
617          } else if (token.isVariableName()) {          } else if (token.isVariableName()) {
618              applyCodeTag(m_textBuffer, token, m_variableTag);              applyCodeTag(m_textBuffer, token, m_variableTag);
619          } else if (token.isIdentifier()) {          } else if (token.isIdentifier()) {

Legend:
Removed from v.3735  
changed lines
  Added in v.3736

  ViewVC Help
Powered by ViewVC