@@ -167,30 +167,26 @@ public class Feedback.MainWindow : Gtk.ApplicationWindow {
167167 placeholder_stack. visible_child = placeholder;
168168 });
169169
170- appstream_pool. get_components_by_id (" io.elementary.settings" ). as_array (). foreach ((component) = > {
171- component. get_addons (). foreach ((addon) = > {
172- var repo_row = new RepoRow (
173- addon. name,
174- get_extension_icon_from_appstream (addon. get_icons ()),
175- Category . SETTINGS ,
176- addon. get_url (AppStream . UrlKind . BUGTRACKER )
177- );
178-
179- listbox. append (repo_row);
180- });
170+ appstream_pool. get_components_by_extends (" io.elementary.settings" ). as_array (). foreach ((component) = > {
171+ var repo_row = new RepoRow (
172+ component. name,
173+ icon_from_appstream_component (component),
174+ Category . SETTINGS ,
175+ component. get_url (AppStream . UrlKind . BUGTRACKER )
176+ );
177+
178+ listbox. append (repo_row);
181179 });
182180
183- appstream_pool. get_components_by_id (" io.elementary.wingpanel" ). as_array (). foreach ((component) = > {
184- component. get_addons (). foreach ((addon) = > {
185- var repo_row = new RepoRow (
186- addon. name,
187- get_extension_icon_from_appstream (addon. get_icons ()),
188- Category . PANEL ,
189- addon. get_url (AppStream . UrlKind . BUGTRACKER )
190- );
181+ appstream_pool. get_components_by_extends (" io.elementary.wingpanel" ). as_array (). foreach ((component) = > {
182+ var repo_row = new RepoRow (
183+ component. name,
184+ icon_from_appstream_component (component),
185+ Category . PANEL ,
186+ component. get_url (AppStream . UrlKind . BUGTRACKER )
187+ );
191188
192- listbox. append (repo_row);
193- });
189+ listbox. append (repo_row);
194190 });
195191 } catch (Error e) {
196192 critical (e. message);
@@ -367,16 +363,6 @@ public class Feedback.MainWindow : Gtk.ApplicationWindow {
367363 return components;
368364 }
369365
370- private Icon get_extension_icon_from_appstream (GLib .GenericArray<AppStream . Icon > appstream_icons ) {
371- foreach (unowned AppStream . Icon appstream_icon in appstream_icons) {
372- if (appstream_icon. get_kind () == AppStream . IconKind . STOCK ) {
373- return new ThemedIcon (appstream_icon. get_name ());
374- }
375- }
376-
377- return new ThemedIcon (" extension" );
378- }
379-
380366 private Icon icon_from_appstream_component (AppStream .Component component ) {
381367 var as_icons = component. get_icons ();
382368 Icon icon;
0 commit comments