provider: Use GListModel to track origins

And adapt to changes

It's easier to track changes if we are using GListModel than
a GList.  Also, eventually we shall have multiple providers,
and we can use GtkFlattenListModel to merge multiple origins
without manually managing pointers ourself.

Since several widgets has APIs to handle GListModels, it will
also help us create widgets from GListModels easily.
This commit is contained in:
Mohammed Sadiq
2021-02-15 11:04:34 +05:30
parent b5645c4cca
commit eda460ac15
16 changed files with 274 additions and 366 deletions

View File

@@ -21,26 +21,19 @@
<property name="orientation">vertical</property>
<property name="valign">center</property>
<property name="visible">True</property>
<child>
<object class="GtkComboBox" id="origin_box">
<property name="can_focus">False</property>
<property name="model">origin_store</property>
<property name="id_column">0</property>
<property name="margin_bottom">8</property>
<property name="no_show_all">True</property>
<object class="GtkListBox" id="origin_list_box">
<property name="visible">True</property>
<property name="selection-mode">none</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
<object class="HdyComboRow" id="origin_list">
<property name="visible">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>