diff options
| author | Martin Owens <doctormo@gmail.com> | 2014-03-27 01:33:44 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2014-03-27 01:33:44 +0000 |
| commit | 5a4fb2325f60d292b47330f540b26a3279341c90 (patch) | |
| tree | d2aa7967be25450b83e625025366c618101ae49f /src/ui/widget/dock-item.cpp | |
| parent | The Polar Arrange Tab of the Arrange Dialog now hides the parametric (diff) | |
| parent | Remove Snap menu item and improve grid menu item text (diff) | |
| download | inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.tar.gz inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.zip | |
Commit a merge to trunk, with probabal errors
(bzr r11073.1.36)
Diffstat (limited to 'src/ui/widget/dock-item.cpp')
| -rw-r--r-- | src/ui/widget/dock-item.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp index 238e93b0b..8d960ddc3 100644 --- a/src/ui/widget/dock-item.cpp +++ b/src/ui/widget/dock-item.cpp @@ -18,6 +18,7 @@ #include <gtkmm/icontheme.h> #include <gtkmm/stockitem.h> +#include <glibmm/exceptionhandler.h> namespace Inkscape { namespace UI { @@ -58,7 +59,11 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l Gtk::StockItem item; Gtk::StockID stockId(icon_name); if ( Gtk::StockItem::lookup(stockId, item) ) { +#if WITH_GTKMM_3_0 + _icon_pixbuf = _dock.getWidget().render_icon_pixbuf( stockId, Gtk::ICON_SIZE_MENU ); +#else _icon_pixbuf = _dock.getWidget().render_icon( stockId, Gtk::ICON_SIZE_MENU ); +#endif } } } @@ -168,10 +173,14 @@ DockItem::set_size_request(int width, int height) getWidget().set_size_request(width, height); } -void -DockItem::size_request(Gtk::Requisition& requisition) +void DockItem::size_request(Gtk::Requisition& requisition) { +#if WITH_GTKMM_3_0 + Gtk::Requisition req_natural; + getWidget().get_preferred_size(req_natural, requisition); +#else requisition = getWidget().size_request(); +#endif } void |
