[gnome-software/wip/mcrha/gs-updates-section-update-cancel-crash] gs-updates-section: Correct callback prototypes



commit b9533ecdb526084440c0904fbc1eb4bd137181a1
Author: Milan Crha <mcrha redhat com>
Date:   Wed Oct 13 16:05:26 2021 +0200

    gs-updates-section: Correct callback prototypes
    
    The .ui file declares the arguments swapped, but it was not reflected
    in the code, thus the Software could crash when cancelling an update
    download due to using a different object instance.

 src/gs-updates-section.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-updates-section.c b/src/gs-updates-section.c
index c9b42f742..8be9da1fb 100644
--- a/src/gs-updates-section.c
+++ b/src/gs-updates-section.c
@@ -64,9 +64,9 @@ gs_updates_section_get_list (GsUpdatesSection *self)
 }
 
 static gboolean
-_listbox_keynav_failed_cb (GsAppRow *app_row, GtkDirectionType direction)
+_listbox_keynav_failed_cb (GsUpdatesSection *self, GtkDirectionType direction, GtkListBox *listbox)
 {
-       GtkRoot *root = gtk_widget_get_root (GTK_WIDGET (app_row));
+       GtkRoot *root = gtk_widget_get_root (GTK_WIDGET (listbox));
 
        if (!root)
                return FALSE;
@@ -390,7 +390,7 @@ out:
 }
 
 static void
-_button_cancel_clicked_cb (GtkButton *button, GsUpdatesSection *self)
+_button_cancel_clicked_cb (GsUpdatesSection *self)
 {
        g_cancellable_cancel (self->cancellable);
        _update_buttons (self);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]