diff options
Diffstat (limited to 'src/ui/dialog/text-edit.cpp')
| -rw-r--r-- | src/ui/dialog/text-edit.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index 7575cc854..c01da8864 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -127,8 +127,8 @@ TextEdit::TextEdit() gtk_combo_box_text_append_text((GtkComboBoxText *) spacing_combo, spacings[i]); } - gtk_widget_set_tooltip_text (px, _("Spacing between lines (percent of font size)")); - gtk_widget_set_tooltip_text (spacing_combo, _("Spacing between lines (percent of font size)")); + gtk_widget_set_tooltip_text (px, _("Spacing between baselines (percent of font size)")); + gtk_widget_set_tooltip_text (spacing_combo, _("Spacing between baselines (percent of font size)")); layout_hbox.pack_start(*Gtk::manage(Glib::wrap(spacing_combo)), false, false); layout_frame.set_padding(4,4,4,4); layout_frame.add(layout_hbox); @@ -175,6 +175,19 @@ TextEdit::TextEdit() gtk_text_view_set_wrap_mode ((GtkTextView *) text_view, GTK_WRAP_WORD); #ifdef WITH_GTKSPELL +#ifdef WITH_GTKMM_3_0 +/* + TODO: Use computed xml:lang attribute of relevant element, if present, to specify the + language (either as 2nd arg of gtkspell_new_attach, or with explicit + gtkspell_set_language call in; see advanced.c example in gtkspell docs). + onReadSelection looks like a suitable place. +*/ + GtkSpellChecker * speller = gtk_spell_checker_new(); + + if (! gtk_spell_checker_attach(speller, GTK_TEXT_VIEW(text_view))) { + g_print("gtkspell error:\n"); + } +#else GError *error = NULL; /* @@ -188,6 +201,7 @@ TextEdit::TextEdit() g_error_free(error); } #endif +#endif gtk_widget_set_size_request (text_view, -1, 64); gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), TRUE); @@ -430,7 +444,7 @@ SPItem *TextEdit::getSelectedTextItem (void) return NULL; std::vector<SPItem*> tmp=SP_ACTIVE_DESKTOP->getSelection()->itemList(); - for(std::vector<SPItem*>::const_iterator i=tmp.begin();i!=tmp.end();i++) + for(std::vector<SPItem*>::const_iterator i=tmp.begin();i!=tmp.end();++i) { if (SP_IS_TEXT(*i) || SP_IS_FLOWTEXT(*i)) return *i; @@ -448,7 +462,7 @@ unsigned TextEdit::getSelectedTextCount (void) unsigned int items = 0; std::vector<SPItem*> tmp=SP_ACTIVE_DESKTOP->getSelection()->itemList(); - for(std::vector<SPItem*>::const_iterator i=tmp.begin();i!=tmp.end();i++) + for(std::vector<SPItem*>::const_iterator i=tmp.begin();i!=tmp.end();++i) { if (SP_IS_TEXT(*i) || SP_IS_FLOWTEXT(*i)) ++items; @@ -558,7 +572,7 @@ void TextEdit::onApply() SPCSSAttr *css = fillTextStyle (); sp_desktop_set_style(desktop, css, true); - for(std::vector<SPItem*>::const_iterator i=item_list.begin();i!=item_list.end();i++){ + for(std::vector<SPItem*>::const_iterator i=item_list.begin();i!=item_list.end();++i){ // apply style to the reprs of all text objects in the selection if (SP_IS_TEXT (*i)) { |
