menu tests: keep mirror of proxy
authorRyan Lortie <desrt@desrt.ca>
Tue, 29 Nov 2011 13:16:19 +0000 (08:16 -0500)
committerRyan Lortie <desrt@desrt.ca>
Thu, 8 Dec 2011 23:05:13 +0000 (18:05 -0500)
commita0a94cd6c68e339bc36a998ea7ce9f5b5b87d586
tree8a9670d6107db9acdf9c1e31aa747d34b831921c
parentd6f2281329ca6b70e63537d41b2b6cf0b9aa94ef
menu tests: keep mirror of proxy

Create a 'mirror' model of the proxy for the testcase.  In addition to
testing that the proxy model emits the proper signals this also keeps
the proxy alive (by holding references to it from the mirror).

The previous code would create the submenu proxies and destroy them
right away (from the recursive step in the equality comparison
functions).  This means that the subscription would go out over D-Bus
and the proxy would be destroyed before it returned.  Keeping the model
alive allows it to be actually updated.
gio/tests/gmenumodel.c