/[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 3391 by schoenebeck, Sun Dec 3 16:03:34 2017 UTC revision 3566 by schoenebeck, Sat Aug 24 13:42:17 2019 UTC
# Line 1  Line 1 
1  /*  /*
2      Copyright (c) 2014-2017 Christian Schoenebeck      Copyright (c) 2014-2019 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 166  ScriptEditor::ScriptEditor() : Line 166  ScriptEditor::ScriptEditor() :
166      m_lineNrTag->property_foreground() = "#CCCCCC";      m_lineNrTag->property_foreground() = "#CCCCCC";
167      m_tagTable->add(m_lineNrTag);      m_tagTable->add(m_lineNrTag);
168    
169        m_metricTag = Gtk::TextBuffer::Tag::create();
170        m_metricTag->property_foreground() = "#000000"; // black
171        m_tagTable->add(m_metricTag);
172    
173        m_stdUnitTag = Gtk::TextBuffer::Tag::create();
174        m_stdUnitTag->property_foreground() = "#50BC00"; // greenish
175        m_tagTable->add(m_stdUnitTag);
176    
177      // create menu      // create menu
178  #if USE_GTKMM_BUILDER  #if USE_GTKMM_BUILDER
179      m_actionGroup = Gio::SimpleActionGroup::create();      m_actionGroup = Gio::SimpleActionGroup::create();
# Line 265  ScriptEditor::ScriptEditor() : Line 273  ScriptEditor::ScriptEditor() :
273  #endif  #endif
274          color.set("#F5F5F5");          color.set("#F5F5F5");
275          GtkWidget* widget = (GtkWidget*) m_lineNrView.gobj();          GtkWidget* widget = (GtkWidget*) m_lineNrView.gobj();
276  #if GTK_MAJOR_VERSION < 3 || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION <= 22)  #if GTK_MAJOR_VERSION < 3 || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION <= 24)
277          gtk_widget_modify_base(widget, GTK_STATE_NORMAL, color.gobj());          gtk_widget_modify_base(widget, GTK_STATE_NORMAL, color.gobj());
278          gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, color.gobj());          gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, color.gobj());
279  #endif  #endif
# Line 278  ScriptEditor::ScriptEditor() : Line 286  ScriptEditor::ScriptEditor() :
286  #endif  #endif
287          color.set("#EEEEEE");          color.set("#EEEEEE");
288          GtkWidget* widget = (GtkWidget*) m_lineNrTextViewSpacer.gobj();          GtkWidget* widget = (GtkWidget*) m_lineNrTextViewSpacer.gobj();
289  #if GTK_MAJOR_VERSION < 3 || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION <= 22)  #if GTK_MAJOR_VERSION < 3 || (GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION <= 24)
290          gtk_widget_modify_base(widget, GTK_STATE_NORMAL, color.gobj());          gtk_widget_modify_base(widget, GTK_STATE_NORMAL, color.gobj());
291          gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, color.gobj());          gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, color.gobj());
292  #endif  #endif
# Line 608  void ScriptEditor::updateSyntaxHighlight Line 616  void ScriptEditor::updateSyntaxHighlight
616              applyCodeTag(m_textBuffer, token, m_commentTag);              applyCodeTag(m_textBuffer, token, m_commentTag);
617          } else if (token.isPreprocessor()) {          } else if (token.isPreprocessor()) {
618              applyCodeTag(m_textBuffer, token, m_preprocTag);              applyCodeTag(m_textBuffer, token, m_preprocTag);
619            } else if (token.isMetricPrefix()) {
620                applyCodeTag(m_textBuffer, token, m_metricTag);
621            } else if (token.isStdUnit()) {
622                applyCodeTag(m_textBuffer, token, m_stdUnitTag);
623          } else if (token.isNewLine()) {          } else if (token.isNewLine()) {
624          }          }
625      }      }
# Line 759  bool ScriptEditor::on_motion_notify_even Line 771  bool ScriptEditor::on_motion_notify_even
771      //TODO: event throttling would be a good idea here      //TODO: event throttling would be a good idea here
772      updateIssueTooltip(e);      updateIssueTooltip(e);
773  #endif  #endif
774  #if GTKMM_MAJOR_VERSION < 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION <= 22)  #if GTKMM_MAJOR_VERSION < 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION <= 24)
775      return ManagedWindow::on_motion_notify_event(e);      return ManagedWindow::on_motion_notify_event(e);
776  #else  #else
777      Gdk::EventMotion em = Glib::wrap(e, true);      Gdk::EventMotion em = Glib::wrap(e, true);

Legend:
Removed from v.3391  
changed lines
  Added in v.3566

  ViewVC Help
Powered by ViewVC