[gnome-software: 105/110] gs-app-addon-row: Update to GtkCheckButton API changes




commit 8d1867699f922883422650b59ab470333bbfa4fa
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Sep 28 19:39:56 2021 -0300

    gs-app-addon-row: Update to GtkCheckButton API changes
    
    It is not a GtkToggleButton subclass anymore, so adapt to that and use
    the checkbutton API specifically.

 src/gs-app-addon-row.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-app-addon-row.c b/src/gs-app-addon-row.c
index 31d5ebaf5..4c048fb6f 100644
--- a/src/gs-app-addon-row.c
+++ b/src/gs-app-addon-row.c
@@ -129,14 +129,14 @@ gs_app_addon_row_refresh (GsAppAddonRow *row)
        switch (gs_app_get_state (row->app)) {
        case GS_APP_STATE_QUEUED_FOR_INSTALL:
                gtk_widget_set_sensitive (row->checkbox, TRUE);
-               gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), TRUE);
+               gtk_check_button_set_active (GTK_CHECK_BUTTON (row->checkbox), TRUE);
                gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), TRUE);
                break;
        case GS_APP_STATE_AVAILABLE:
        case GS_APP_STATE_AVAILABLE_LOCAL:
                gtk_widget_set_visible (row->checkbox, TRUE);
                gtk_widget_set_sensitive (row->checkbox, TRUE);
-               gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), FALSE);
+               gtk_check_button_set_active (GTK_CHECK_BUTTON (row->checkbox), FALSE);
                gtk_widget_set_visible (row->button_remove, FALSE);
                gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), TRUE);
                break;
@@ -150,7 +150,7 @@ gs_app_addon_row_refresh (GsAppAddonRow *row)
                break;
        case GS_APP_STATE_INSTALLING:
                gtk_widget_set_sensitive (row->checkbox, FALSE);
-               gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), TRUE);
+               gtk_check_button_set_active (GTK_CHECK_BUTTON (row->checkbox), TRUE);
                gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
                break;
        case GS_APP_STATE_REMOVING:
@@ -161,7 +161,7 @@ gs_app_addon_row_refresh (GsAppAddonRow *row)
                break;
        default:
                gtk_widget_set_sensitive (row->checkbox, FALSE);
-               gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), FALSE);
+               gtk_check_button_set_active (GTK_CHECK_BUTTON (row->checkbox), FALSE);
                gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
                break;
        }
@@ -293,13 +293,13 @@ gs_app_addon_row_init (GsAppAddonRow *row)
 void
 gs_app_addon_row_set_selected (GsAppAddonRow *row, gboolean selected)
 {
-       gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (row->checkbox), selected);
+       gtk_check_button_set_active (GTK_CHECK_BUTTON (row->checkbox), selected);
 }
 
 gboolean
 gs_app_addon_row_get_selected (GsAppAddonRow *row)
 {
-       return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (row->checkbox));
+       return gtk_check_button_get_active (GTK_CHECK_BUTTON (row->checkbox));
 }
 
 GtkWidget *


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