summaryrefslogtreecommitdiffstats
path: root/src/ui/previewholder.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2006-03-05 05:41:33 +0000
committerjoncruz <joncruz@users.sourceforge.net>2006-03-05 05:41:33 +0000
commit8b59ce82450e6502ecab8eee773453989ebd337e (patch)
tree3a9734d2da078a228bec01218c7a1d82e090cb60 /src/ui/previewholder.cpp
parentChange command to remove CVS directories to .svn (diff)
downloadinkscape-8b59ce82450e6502ecab8eee773453989ebd337e.tar.gz
inkscape-8b59ce82450e6502ecab8eee773453989ebd337e.zip
Fixed problem for 2.4.x
(bzr r203)
Diffstat (limited to 'src/ui/previewholder.cpp')
-rw-r--r--src/ui/previewholder.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/previewholder.cpp b/src/ui/previewholder.cpp
index c2bc13327..f809ba44c 100644
--- a/src/ui/previewholder.cpp
+++ b/src/ui/previewholder.cpp
@@ -189,7 +189,8 @@ void PreviewHolder::calcGridSize( const Gtk::Widget* thing, int itemCount, int&
height = 1;
if ( _anchor == Gtk::ANCHOR_SOUTH || _anchor == Gtk::ANCHOR_NORTH ) {
- Gtk::Requisition req = _scroller->size_request();
+ Gtk::Requisition req;
+ _scroller->size_request(req);
int currW = _scroller->get_width();
if ( currW > req.width ) {
req.width = currW;
@@ -197,13 +198,15 @@ void PreviewHolder::calcGridSize( const Gtk::Widget* thing, int itemCount, int&
Gtk::HScrollbar* hs = dynamic_cast<Gtk::ScrolledWindow*>(_scroller)->get_hscrollbar();
if ( hs ) {
- Gtk::Requisition scrollReq = hs->size_request();
+ Gtk::Requisition scrollReq;
+ hs->size_request(scrollReq);
// the +8 is a temporary hack
req.height -= scrollReq.height + 8;
}
- Gtk::Requisition req2 = thing->size_request();
+ Gtk::Requisition req2;
+ thing->size_request(req2);
int h2 = req.height / req2.height;
int w2 = req.width / req2.width;