diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-16 21:32:16 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-16 21:32:16 +0000 |
| commit | dc4161332ffa97e75b5d2deecf2a47eb62e38c8f (patch) | |
| tree | 2ad76f2101e86efeaf07f4aea62c84c3e70e45da /src/ui/widget/imagetoggler.cpp | |
| parent | Some improvements to redraw (diff) | |
| parent | Add label (diff) | |
| download | inkscape-dc4161332ffa97e75b5d2deecf2a47eb62e38c8f.tar.gz inkscape-dc4161332ffa97e75b5d2deecf2a47eb62e38c8f.zip | |
Merge branch 'master' into powerpencilII
Diffstat (limited to 'src/ui/widget/imagetoggler.cpp')
| -rw-r--r-- | src/ui/widget/imagetoggler.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ui/widget/imagetoggler.cpp b/src/ui/widget/imagetoggler.cpp index a2783ecb1..38c84ca51 100644 --- a/src/ui/widget/imagetoggler.cpp +++ b/src/ui/widget/imagetoggler.cpp @@ -16,6 +16,8 @@ #include "widgets/toolbox.h" #include "ui/icon-names.h" +#include <iostream> + namespace Inkscape { namespace UI { namespace Widget { @@ -37,8 +39,13 @@ ImageToggler::ImageToggler( char const* on, char const* off) : int phys = width; Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default(); - _property_pixbuf_on = icon_theme->load_icon(_pixOnName, phys, (Gtk::IconLookupFlags)0); - _property_pixbuf_off = icon_theme->load_icon(_pixOffName, phys, (Gtk::IconLookupFlags)0); + try { + _property_pixbuf_on = icon_theme->load_icon(_pixOnName, phys, (Gtk::IconLookupFlags)0); + _property_pixbuf_off = icon_theme->load_icon(_pixOffName, phys, (Gtk::IconLookupFlags)0); + } + catch (const Gtk::IconThemeError& e) { + std::cerr << "ImageToggler::ImageToggler(): " << e.what() << std::endl; + } property_pixbuf() = _property_pixbuf_off.get_value(); } |
