static void list_header_func (GtkListBoxRow *row, GtkListBoxRow *before, gpointer user_data) { GsApp *app = gs_app_row_get_app (GS_APP_ROW (row)); GsUpdateListSection before_section = GS_UPDATE_LIST_SECTION_LAST; GsUpdateListSection section; GsUpdateList *update_list = GS_UPDATE_LIST (user_data); GtkWidget *header; /* first entry */ gtk_list_box_row_set_header (row, NULL); if (before != NULL) { GsApp *before_app = gs_app_row_get_app (GS_APP_ROW (before)); before_section = gs_update_list_get_app_section (before_app); } /* section changed or forced to have headers */ section = gs_update_list_get_app_section (app); if (gs_update_list_has_headers (update_list) && before_section != section) { header = gs_update_list_get_section_header (update_list, section); } else { header = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL); } gtk_list_box_row_set_header (row, header); }
static void gs_update_list_dispose (GObject *object) { GsUpdateList *update_list = GS_UPDATE_LIST (object); GsUpdateListPrivate *priv = GET_PRIV (update_list); g_clear_object (&priv->sizegroup_image); g_clear_object (&priv->sizegroup_name); G_OBJECT_CLASS (gs_update_list_parent_class)->dispose (object); }
static void gs_update_list_dispose (GObject *object) { GsUpdateList *update_list = GS_UPDATE_LIST (object); GsUpdateListPrivate *priv = gs_update_list_get_instance_private (update_list); g_clear_object (&priv->sizegroup_image); g_clear_object (&priv->sizegroup_name); g_clear_object (&priv->sizegroup_button); g_clear_object (&priv->sizegroup_header); G_OBJECT_CLASS (gs_update_list_parent_class)->dispose (object); }