Set list subtitles to App IDs

Set the main list flatpak rows to showing App IDs instead of refs.
Instead, refs will be shown in the subtitle when Show Runtimes toggle is enabled
This commit is contained in:
heliguy4599
2023-09-15 02:14:25 -04:00
parent db16853be8
commit 3e62e17db2

View File

@@ -511,11 +511,16 @@ class FlattoolGuiWindow(Adw.ApplicationWindow):
app_name = self.host_flatpaks[index][0]
app_id = self.host_flatpaks[index][2]
app_ref = self.host_flatpaks[index][8]
flatpak_row = Adw.ActionRow(title=GLib.markup_escape_text(app_name), subtitle=app_ref)
flatpak_row = Adw.ActionRow(title=GLib.markup_escape_text(app_name))
flatpak_row.add_prefix(self.find_app_icon(app_id))
if (not self.show_runtimes) and "runtime" in self.host_flatpaks[index][12]:
continue
if self.show_runtimes:
flatpak_row.set_subtitle(self.host_flatpaks[index][8])
else:
flatpak_row.set_subtitle(self.host_flatpaks[index][2])
properties_button = Gtk.Button(icon_name="info-symbolic", valign=Gtk.Align.CENTER, tooltip_text=_("View Properties"))
properties_button.add_css_class("flat")