/** * @file libsexymm/spell-entry.ccg Spell checked entry widget * * @Copyright (C) 2005 Christian Hammond. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include namespace Sexy { Glib::ustring SpellEntry::get_language_name(const Glib::ustring& lang) const { Glib::ustring name; gchar *temp; temp = sexy_spell_entry_get_language_name(gobj(), lang.c_str()); name = temp; g_free(temp); return name; } bool SpellEntry::activate_language(const Glib::ustring& lang) { GError *error = NULL; bool retval = sexy_spell_entry_activate_language(gobj(), lang.c_str(), &error); if (error != NULL) ::Glib::Error::throw_exception(error); return retval; } bool SpellEntry::set_active_languages(const Glib::SListHandle& langs) { GError *error = NULL; bool retval = sexy_spell_entry_set_active_languages(gobj(), langs.data(), &error); if (error != NULL) ::Glib::Error::throw_exception(error); return retval; } } /* namespace Sexy */ // vim: syntax=cpp