Re: bug with Gtk::ScrolledWindow



Am 08.10.2012 09:55, schrieb Kjell Ahlstedt:
2012-10-07 21:42, Jonas Platte skrev:
Am 05.10.2012 06:06, schrieb Ian Martin:
On 05/10/12 03:04, Jonas Platte wrote:

Hello,
I recently found a bug in gtkmm. I filed a bug report on launchpad (I've got no bugzilla account and didn't really search much at first): https://bugs.launchpad.net/ubuntu/+source/gtkmm3.0/+bug/1055744
Now I want to try to debug it, but I have absolutely no experience in debugging that kind of code. After the second try, I succeeded to get the source from git, and I also looked trough the files, but the problem is that I don't really understand the structure there. I know that it's not a simple C++-Library, but a wrapper for the C-Library. I had problems too with the debugger to get to the include-files (I use Anjuta).

Is there anybody who could help me with that? :)

Hi,
You want to use jhbuild to get and build the source, as per the fine manual: there's a chapter on working with source code.  It gives a detailed description of how to wrap a class.

Ian.

Thanks for that link, I'll read it in the next days. I now know what the problem is, and I wanted to ask how to deal with it:

If you add some widget without native ability to scroll to a ScrolledWindow, it adds a Viewport to the ScrolledWindow in which it stores the widget. If you now use the remove() function on that ScrolledWindow, it removes the viewport from the ScrolledWindow, so you don't have any access to the Viewport anymore and can't re-add your widget to the ScrolledWindow.

To fix that, I would declare Gtk::Bin::remove() as virtual and override it in Gtk::ScrolledWindow. Is this a good idea or how would you deal with that problem?
Can you please file a bug in Bugzilla! This bug seems to have gone unnoticed by the gtkmm developers for a long time. (https://bugs.launchpad.net/ubuntu/+source/gtkmm2.4/+bug/30345 from 2006-02-02) That's probably what to expect when bug reports have been filed only in launchpad. If you don't have a Bugzilla account, you can get one very easily. Just go to https://bugzilla.gnome.org, click "Open a New Account" and follow the instructions.

Making Gtk::Bin::remove() virtual will break ABI, and that's not allowed now. Probably it will not be allowed before gtk+ 4 and gtkmm 4 are released. I don't know when that will be. Adding a virtual function will add an entry to the vfunc table.

You can add a non-virtual Gtk::ScrolledWindow::remove() without breaking ABI, but I suppose that's not as good.

Kjell
Okay I filed a bug on GNOME bugzilla now. It's available here: https://bugzilla.gnome.org/show_bug.cgi?id=685739

Who decides now how to deal with this?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]