properties_view: Move expressions to UI files
Currently Loupe leaks expressions created in-code. This is because expressions need to be unwatched in order to be dropped. Since we'd need to hold a reference to the watch ourselves and unwatch them in dispose, our code would become more cumbersome if we were to try to handle this properly. This commit moves the expressions on LpPropertiesView to the UI file, as GTK handles cleaning up the expressions it creates, without any extra consideration on the app side.
This commit is contained in:
parent
34b3fb12de
commit
ae41a77521
2 changed files with 19 additions and 31 deletions
|
|
@ -2,6 +2,16 @@
|
|||
<interface>
|
||||
<template class="LpPropertiesView" parent="AdwBin">
|
||||
<property name="width-request">255</property>
|
||||
<binding name="metadata">
|
||||
<lookup type="LpImage" name="metadata">
|
||||
<lookup type="LpPropertiesView" name="image"/>
|
||||
</lookup>
|
||||
</binding>
|
||||
<binding name="file">
|
||||
<lookup type="LpImage" name="file">
|
||||
<lookup type="LpPropertiesView" name="image"/>
|
||||
</lookup>
|
||||
</binding>
|
||||
<property name="child">
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="child">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue