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. |
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(); |
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 |
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 |
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 |
} |
} |
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); |