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

Silence some minor compile warnings #2211

Merged
merged 4 commits into from
Sep 16, 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
4 changes: 4 additions & 0 deletions src/Core/Package.vala
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,10 @@ public class AppCenterCore.Package : Object {
case AppStream.IconKind.UNKNOWN:
warning ("'%s' is an unknown kind of AppStream icon", _icon.get_name ());
break;

case AppStream.IconKind.REMOTE:
warning ("'%s' is a remote AppStream icon", _icon.get_name ());
break;
}
}

Expand Down
7 changes: 5 additions & 2 deletions src/Core/UpdateManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ public class AppCenterCore.UpdateManager : Object {
runtime_updates.update_state ();

if (AppCenter.App.settings.get_boolean ("automatic-updates")) {
yield update_all (cancellable);
try {
yield update_all (cancellable);
} catch (Error e) {} // update_all () already logs error message
//TODO Should we send a notification that automatic-updates had an error?
} else {
var application = Application.get_default ();
if (updates_number > 0) {
Expand Down Expand Up @@ -293,7 +296,7 @@ public class AppCenterCore.UpdateManager : Object {
return GLib.Source.REMOVE;
});

get_updates (cancellable);
get_updates.begin (cancellable);
}

private int compare_package_func (Object object1, Object object2) {
Expand Down
6 changes: 3 additions & 3 deletions src/Widgets/Banner.vala
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ public class AppCenter.Widgets.Banner : Gtk.Button {
public Icon icon { get; construct; }
public string brand_color { get; construct; }
public string description { get; construct; }
public string name { get; construct; }
public string app_name { get; construct; }
public string summary { get; construct; }

public Banner (string name, string summary, string description, Icon icon, string brand_color) {
Object (
brand_color: brand_color,
description: description,
icon: icon,
name: name,
app_name: name,
summary: summary
);
}
Expand All @@ -58,7 +58,7 @@ public class AppCenter.Widgets.Banner : Gtk.Button {


construct {
var name_label = new Gtk.Label (name) {
var name_label = new Gtk.Label (app_name) {
max_width_chars = 50,
use_markup = true,
wrap = true,
Expand Down
Loading