GNOME Bugzilla – Bug 755763
[PATCH] Remove gs_app_row_set_app() and gs_app_addon_row_set_addon()
Last modified: 2015-10-07 12:04:50 UTC
In bug 755664 comment 6 Kalev has written that gs_app_row_set_app() is supposed to be called only once. This can be ensured by an assert which of course may fail only at run time. To ensure at compile time that this function is not called now nor ever in future it is better to remove this function (or make it private) and set the app only by the gs_app_row_new(). The same applies to gs_app_addon_row_set_addon().
Created attachment 312330 [details] [review] Fixes the problem The solution for GsAppRow turned out to be a little tricky because gs_app_row_set_app() also calls gs_app_row_refresh(). This had to be added to some gs_app_row_set_***() implementations to ensure that the appearance of an app row reflects its internal state.
Review of attachment 312330 [details] [review]: Looks good to me, thanks!