GNOME Bugzilla – Bug 317309
ScrolledWindow::get_hscrollbar_visible() and get_vscrollbar_visible() return wrong state
Last modified: 2005-10-10 06:46:06 UTC
Distribution/Version: Gentoo ~x86 on a 2005.1 base I think in the implementation of ScrolledWindow get_hscrollbar_visible() and get_vscrollbar_visible() the methods return the wrong value (ie: they return eachother's value rather than their own...) see the attached screenshot for output: std::cout << "HScrollbar: " << ImageScroller.get_hscrollbar_visible() << std::endl; std::cout << "VScrollbar: " << ImageScroller.get_vscrollbar_visible() << std::endl; In the screenshot it is clearly the HScrollbar visible but the output is in reverse, or am I missing something? http://www.tschew.e7even.com/scrollbar.jpg -Bartek
I've checked scrolledwindow.ccg and scrolledwindow.hg in the source distribution but I don't understand the _MEMBER_GET bit: _MEMBER_GET(vscrollbar_visible,hscrollbar_visible,bool,guint) _MEMBER_GET(hscrollbar_visible,vscrollbar_visible,bool,guint) Is my assumption correct that this works as follows: arg1 = get_* method name arg2 = get_* object property arg3 = return type arg4 = implementation of return type (e.g. bool = guint) if so then I think I've found the problem.. I'm going to try to reverse the second arguments, recompile and see what happens.
Ok, I now modified the correct files or maybe I don't understand the build system or whatever... anyway, I went into the source distribution gtk/gtkmm/scrolledwindow.cc ... I know it says do not modify but since the other tweak didn't do it... and here indeed, get_hscrollbar_visible() returns gobj->vscrollbar_visible() which seems fishy... and changing it made it behave as it should Maybe there was some error in gtk and this was implemented like this as a hotfix and then forgotten? http://www.tschew.e7even.com/scrollbar2.jpg
Hehe, after lookng through this, mozilla firefox now has rather strange scrollbar behaviour, so firefox uses gtkmm for widgets. But what I don't understand is whether this behaviour was intentional (e.g. reporting eachother's visibility) or whether so many projects used it without bothering to file a bug and just implemented it the other way around... please someone enlighten me...
oops, nope, just the qt engine acting up
> _MEMBER_GET(vscrollbar_visible,hscrollbar_visible,bool,guint) > _MEMBER_GET(hscrollbar_visible,vscrollbar_visible,bool,guint) That does look very wrong. Well done. Fixed. > so firefox uses gtkmm for widgets. firefox uses GTK+, not gtkmm.
*** Bug 318332 has been marked as a duplicate of this bug. ***