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



commit 74fce190b080aeb9ce4d290b1dd1d4650eabfc48
Author: Milan Crha <mcrha redhat com>
Date:   Thu Oct 14 14:57:13 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 6e9c8de19..70dbf7f84 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)
 {
-       GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (app_row));
+       GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (listbox));
 
        if (!toplevel)
                return FALSE;
@@ -396,7 +396,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]