--- gigedit/trunk/src/gigedit/scripteditor.cpp 2014/06/07 22:34:31 2604 +++ gigedit/trunk/src/gigedit/scripteditor.cpp 2015/09/20 10:18:22 2845 @@ -32,7 +32,8 @@ } ScriptEditor::ScriptEditor() : - m_applyButton(Gtk::Stock::APPLY), m_cancelButton(Gtk::Stock::CANCEL) + m_applyButton(_("_Apply"), true), + m_cancelButton(_("_Cancel"), true) { m_script = NULL; @@ -44,13 +45,18 @@ m_tagTable->add(m_keywordTag); m_eventTag = Gtk::TextBuffer::Tag::create(); m_eventTag->property_foreground() = "blue"; + m_eventTag->property_weight() = PANGO_WEIGHT_BOLD; m_tagTable->add(m_eventTag); m_textBuffer = Gtk::TextBuffer::create(m_tagTable); m_textView.set_buffer(m_textBuffer); { Pango::FontDescription fdesc; fdesc.set_family("monospace"); +#if defined(__APPLE__) + fdesc.set_size(12 * PANGO_SCALE); +#else fdesc.set_size(10 * PANGO_SCALE); +#endif #if GTKMM_MAJOR_VERSION < 3 m_textView.modify_font(fdesc); #else @@ -118,7 +124,7 @@ } void ScriptEditor::onTextInserted(const Gtk::TextBuffer::iterator& itEnd, const Glib::ustring& txt, int length) { - printf("inserted %d\n", length); + //printf("inserted %d\n", length); Gtk::TextBuffer::iterator itStart = itEnd; itStart.backward_chars(length); @@ -134,7 +140,7 @@ } Glib::ustring s = m_textBuffer->get_text(itWordStart, it, false); - printf("{%s}\n", s.c_str()); + //printf("{%s}\n", s.c_str()); if (isKeyword(s)) m_textBuffer->apply_tag(m_keywordTag, itWordStart, it); else if (isEvent(s)) { @@ -161,7 +167,7 @@ } void ScriptEditor::onTextErased(const Gtk::TextBuffer::iterator& itStart, const Gtk::TextBuffer::iterator& itEnd) { - printf("erased\n"); + //printf("erased\n"); Gtk::TextBuffer::iterator itStart2 = itStart; if (itStart2.inside_word() || itStart2.ends_word()) itStart2.backward_word_start();