Hello, I've got a simple question: In gtkmm, when I want to set a boolean property of any object, like a widget, and I don't know it's current state, should I first check if the state isn't how I want it to be, or should I always call set? For example, in the case I want a widget to get insensitive, would I write:

    if(widget.get_sensitive()) widget.set_sensitive(false);

or only

    widget.set_sensitive(false);

And if it doesn't have a significant influence on the performance, which one would you consider the better style?

Thanks,
Jonas
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to