After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754077 - ListView: get rid of the store
ListView: get rid of the store
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-08-25 12:48 UTC by Adrien Plazas
Modified: 2016-09-20 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
list-view: Unbind view from store (3.43 KB, patch)
2015-08-25 12:48 UTC, Adrien Plazas
committed Details | Review
list-view: Remove store attribute (4.08 KB, patch)
2015-08-25 12:48 UTC, Adrien Plazas
committed Details | Review

Description Adrien Plazas 2015-08-25 12:48:02 UTC
We should get rid of the GListStore store attribute and simply use the GtkListBox directly: it creates more problems than it solves.
Comment 1 Adrien Plazas 2015-08-25 12:48:29 UTC
Created attachment 309957 [details] [review]
list-view: Unbind view from store

Removes the GtkListBox's binding to the store to add and remove the rows
manually.

This makes the ListView class simpler and gets rid of some workarounds
avoiding bugs in the binding.
Comment 2 Adrien Plazas 2015-08-25 12:48:35 UTC
Created attachment 309958 [details] [review]
list-view: Remove store attribute

Remove the useless store attribute.

This finishes getting rid of workarounds for bugs in the binding between
GtkListBox and GListModel and makes the ListView class simpler.
Comment 3 Zeeshan Ali 2015-08-25 17:24:48 UTC
Review of attachment 309957 [details] [review]:

I don't see the point of unbinding as a separate change itself. Just drop it in one patch.
Comment 4 Zeeshan Ali 2015-08-25 17:25:13 UTC
Review of attachment 309957 [details] [review]:

::: src/list-view.vala
@@ +421,3 @@
         App.app.notify_property ("selected-items");
     }
+}
 No newline at end of file

what's the change here?
Comment 5 Zeeshan Ali 2015-08-27 15:04:07 UTC
Patches squashed and pushed as:

commit: d0f19c46d975914d3123fa826c2bba938c36a303
Author: Adrien Plazas <kekun.plazas@laposte.net>

    list-view: Drop custom model
    
    We don't necessarily need a custom model and using a custom model only
    complicates the code, especially to workaround bug 752615.