diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-06-09 15:43:34 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-06-09 15:43:34 +0000 |
| commit | 3c3a754c162492932c8037100155a0cd7281e437 (patch) | |
| tree | e904cc141533d600e6beafd3bd4b87775daf638e /src/svg-view-widget.cpp | |
| parent | Fix build failure with old GtkAdjustment API (diff) | |
| download | inkscape-3c3a754c162492932c8037100155a0cd7281e437.tar.gz inkscape-3c3a754c162492932c8037100155a0cd7281e437.zip | |
Fix remaining size_request issues for Gtk+ build
(bzr r11475)
Diffstat (limited to 'src/svg-view-widget.cpp')
| -rw-r--r-- | src/svg-view-widget.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/svg-view-widget.cpp b/src/svg-view-widget.cpp index 402b65f53..955f1d8fa 100644 --- a/src/svg-view-widget.cpp +++ b/src/svg-view-widget.cpp @@ -147,9 +147,20 @@ static void sp_svg_view_widget_size_request(GtkWidget *widget, GtkRequisition *r SPSVGSPViewWidget *vw = SP_SVG_VIEW_WIDGET (widget); Inkscape::UI::View::View *v = SP_VIEW_WIDGET_VIEW (widget); +#if GTK_CHECK_VERSION(3,0,0) + if (((GtkWidgetClass *) (widget_parent_class))->get_preferred_width && ((GtkWidgetClass *) (widget_parent_class))->get_preferred_width) { + gint width_min, height_min, width_nat, height_nat; + + (* ((GtkWidgetClass *) (widget_parent_class))->get_preferred_width) (widget, &width_min, &width_nat); + (* ((GtkWidgetClass *) (widget_parent_class))->get_preferred_height) (widget, &height_min, &height_nat); + req->width=width_min; + req->height=height_min; + } +#else if (((GtkWidgetClass *) (widget_parent_class))->size_request) { (* ((GtkWidgetClass *) (widget_parent_class))->size_request) (widget, req); } +#endif if (v->doc()) { SPSVGView *svgv; |
