bulia byak schrieb:
On Jan 10, 2008 3:19 PM, <J.B.C.Engelen@...1578...> wrote:
- can we disable the remove button when there's nothing to
remove in Grids?
Tried it, but the code that is there now does not work for some reason.
Incredibly, you are right: I tried to hide it but also failed :( That's GTK for you.
Strangely, when using hide()/show() instead of set_sensitive(), the button is in fact correctly hidden, _but only after a grid is created and removed again_. For example, try the following with Johan's old code (i.e., before revision 17189):
- start Inkscape and open Document Preferences - press "New" to create a new grid - press "Remove" to delete it again
As soon as the grid is deleted, the "Remove" button becomes invisible as intended. Also, when creating and deleting new grids or using undo/redo, hiding and showing the button works as it should. It's only the very first hide() that fails. Any ideas what it could be that causes this? Is this a GTK bug? After all, the call to hide() happens at all times. Or must anything be initialized before hide() can work? (Doesn't sound very likely to me but then I'm far from being a GTK expert.)
Max