Skip to content

Commit

Permalink
Merge branch 'main' into danirabbit/appinfoview-headerbuttons
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit authored Jun 24, 2024
2 parents a5a1330 + e651c4b commit 79fc256
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
16 changes: 8 additions & 8 deletions src/Views/AppListUpdateView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ namespace AppCenter.Views {
});

list_box.row_activated.connect ((row) => {
if (row is Widgets.PackageRow) {
show_app (((Widgets.PackageRow) row).get_package ());
if (row.get_child () is Widgets.InstalledPackageRowGrid) {
show_app (((Widgets.InstalledPackageRowGrid) row.get_child ()).package);
}
});

Expand Down Expand Up @@ -309,7 +309,7 @@ namespace AppCenter.Views {

private Gtk.Widget create_row_from_package (Object object) {
unowned var package = (AppCenterCore.Package) object;
return new Widgets.PackageRow.installed (package, action_button_group);
return new Widgets.InstalledPackageRowGrid (package, action_button_group);
}

private Gtk.Widget create_installed_from_package (Object object) {
Expand All @@ -329,13 +329,13 @@ namespace AppCenter.Views {
update_all_button.sensitive = false;
updating_all_apps = true;

var child = list_box.get_first_child ();
while (child != null) {
if (child is Widgets.PackageRow) {
((Widgets.PackageRow) child).set_action_sensitive (false);
var row = list_box.get_first_child ();
while (row != null) {
if (row is Gtk.ListBoxRow) {
((Widgets.InstalledPackageRowGrid) row.get_child ()).action_sensitive = false;
}

child = child.get_next_sibling ();
row = row.get_next_sibling ();
}

unowned var update_manager = AppCenterCore.UpdateManager.get_default ();
Expand Down
8 changes: 0 additions & 8 deletions src/Widgets/PackageRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ namespace AppCenter.Widgets {
public class PackageRow : Gtk.ListBoxRow {
AbstractPackageRowGrid grid;

public PackageRow.installed (AppCenterCore.Package package, Gtk.SizeGroup? action_size_group) {
grid = new InstalledPackageRowGrid (package, action_size_group);
child = grid;
((InstalledPackageRowGrid) grid).changed.connect (() => {
changed ();
});
}

public PackageRow.list (AppCenterCore.Package package) {
grid = new ListPackageRowGrid (package);
child = grid;
Expand Down

0 comments on commit 79fc256

Please sign in to comment.