diff options
| author | Marc Jeanmougin <mc@localhost.localdomain> | 2015-02-23 22:16:39 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <mc@localhost.localdomain> | 2015-02-23 22:16:39 +0000 |
| commit | edf52983916101c08cd2150c935ed2976832ddf0 (patch) | |
| tree | 552bb1fb32a634b40e1daa8b8e4c452f138752b3 /src/ui/widget | |
| parent | Removed eclipse files, added removed pot file (diff) | |
| parent | on a File->Open, set the viewBox if it did not previously exist, same as was ... (diff) | |
| download | inkscape-edf52983916101c08cd2150c935ed2976832ddf0.tar.gz inkscape-edf52983916101c08cd2150c935ed2976832ddf0.zip | |
Merge, resolved conflicts
(bzr r13922.1.8)
Diffstat (limited to 'src/ui/widget')
| -rw-r--r-- | src/ui/widget/addtoicon.cpp | 17 | ||||
| -rw-r--r-- | src/ui/widget/addtoicon.h | 2 | ||||
| -rw-r--r-- | src/ui/widget/licensor.cpp | 2 |
3 files changed, 15 insertions, 6 deletions
diff --git a/src/ui/widget/addtoicon.cpp b/src/ui/widget/addtoicon.cpp index 0798d1c98..f15d7abf7 100644 --- a/src/ui/widget/addtoicon.cpp +++ b/src/ui/widget/addtoicon.cpp @@ -23,6 +23,7 @@ #include "widgets/icon.h" #include "widgets/toolbox.h" #include "ui/icon-names.h" +#include "preferences.h" #include "layertypeicon.h" #include "addtoicon.h" @@ -39,6 +40,7 @@ AddToIcon::AddToIcon() : { property_mode() = Gtk::CELL_RENDERER_MODE_ACTIVATABLE; phys = sp_icon_get_phys_size((int)Inkscape::ICON_SIZE_BUTTON); + // Glib::RefPtr<Gtk::IconTheme> icon_theme = Gtk::IconTheme::get_default(); // // if (!icon_theme->has_icon(_pixAddName)) { @@ -50,7 +52,8 @@ AddToIcon::AddToIcon() : // // _property_pixbuf_add = Gtk::Widget:: - property_stock_id() = GTK_STOCK_ADD; + //property_stock_id() = GTK_STOCK_ADD; + set_pixbuf(); } @@ -118,7 +121,7 @@ void AddToIcon::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window, Gtk::CellRendererState flags ) #endif { - property_stock_id() = property_active().get_value() ? GTK_STOCK_ADD : GTK_STOCK_DELETE; + set_pixbuf(); #if WITH_GTKMM_3_0 Gtk::CellRendererPixbuf::render_vfunc( cr, widget, background_area, cell_area, flags ); @@ -137,6 +140,14 @@ bool AddToIcon::activate_vfunc(GdkEvent* /*event*/, return false; } +void AddToIcon::set_pixbuf() +{ + bool active = property_active().get_value(); + + GdkPixbuf *pixbuf = sp_pixbuf_new(Inkscape::ICON_SIZE_BUTTON, active ? INKSCAPE_ICON("list-add") : INKSCAPE_ICON("edit-delete")); + property_pixbuf() = Glib::wrap(pixbuf); +} + } // namespace Widget } // namespace UI @@ -152,5 +163,3 @@ bool AddToIcon::activate_vfunc(GdkEvent* /*event*/, End: */ // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : - - diff --git a/src/ui/widget/addtoicon.h b/src/ui/widget/addtoicon.h index 9c134d231..a8d900d1f 100644 --- a/src/ui/widget/addtoicon.h +++ b/src/ui/widget/addtoicon.h @@ -74,7 +74,7 @@ private: Glib::Property<bool> _property_active; // Glib::Property< Glib::RefPtr<Gdk::Pixbuf> > _property_pixbuf_add; - + void set_pixbuf(); }; diff --git a/src/ui/widget/licensor.cpp b/src/ui/widget/licensor.cpp index 7429bb07e..d21e848f2 100644 --- a/src/ui/widget/licensor.cpp +++ b/src/ui/widget/licensor.cpp @@ -69,7 +69,7 @@ void LicenseItem::on_toggled() SPDocument *doc = SP_ACTIVE_DOCUMENT; rdf_set_license (doc, _lic->details ? _lic : 0); if (doc->priv->sensitive) { - DocumentUndo::done(doc, SP_VERB_NONE, "Document license updated"); + DocumentUndo::done(doc, SP_VERB_NONE, _("Document license updated")); } _wr.setUpdating (false); static_cast<Gtk::Entry*>(_eep->_packable)->set_text (_lic->uri); |
