]> Pileus Git - ~andy/gtk/commit
filechooserentry: Reorganize function
authorBenjamin Otte <otte@redhat.com>
Fri, 28 Oct 2011 12:38:11 +0000 (05:38 -0700)
committerBenjamin Otte <otte@redhat.com>
Fri, 16 Dec 2011 19:09:11 +0000 (20:09 +0100)
commitd5e5ca3e2a035005f34551c2c6ed647d2e952e1b
tree8063fe04522f11b00e35e6c3c91ee7b4cf4fba29
parent7b51ca9a4749ce74671f2f903bf65304df786076
filechooserentry: Reorganize function

Setter functions the way I code it look like this (in order):
1) Figure out if the value changed. If not, exit early.
2) Clear the old value (ie unref stuff, disconnect signals
3) Copy the new value
4) Set up things about the new value

This reorganization does that.

And by doing that, it even reduces the amount of code and the amount of
branches (and with it, nesting) needed.
gtk/gtkfilechooserentry.c