Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PackageRow: rm PackageRow.installed #2174

Merged
merged 6 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading