summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorMilosz Derezynski <mderezynski@gmail.com>2006-05-18 18:58:55 +0000
committermderezynski <mderezynski@users.sourceforge.net>2006-05-18 18:58:55 +0000
commit271df93cb3f417955a3637ca7e170b897ae81c32 (patch)
tree65e2348d78c08302cf74a42ef7039c15efb6bbd2 /src/libnrtype
parent* Use query api for text toolbar (diff)
downloadinkscape-271df93cb3f417955a3637ca7e170b897ae81c32.tar.gz
inkscape-271df93cb3f417955a3637ca7e170b897ae81c32.zip
* Check for a valid font family in the text toolbox's selection_changed callback
* Throw an exception if no TreePath can be found in the map (as in "no such family exists") (bzr r879)
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/font-lister.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libnrtype/font-lister.h b/src/libnrtype/font-lister.h
index b43395912..fb0810254 100644
--- a/src/libnrtype/font-lister.h
+++ b/src/libnrtype/font-lister.h
@@ -28,6 +28,13 @@ namespace Inkscape
class FontLister
{
public:
+
+ enum Exceptions
+ {
+ FAMILY_NOT_FOUND
+ };
+
+
~FontLister ();
/** GtkTreeModelColumnRecord for the font list Gtk::ListStore
@@ -75,6 +82,7 @@ namespace Inkscape
get_row_for_font (std::string family)
{
IterMapType::iterator iter = font_list_store_iter_map.find (family);
+ if (iter == font_list_store_iter_map.end ()) throw FAMILY_NOT_FOUND;
return (*iter).second;
}