pidgin/pidgin

Fix incorrect types for xfer dialog check buttons

18 months ago, Elliott Sales de Andrade
9898678c8cbd
Parents c1b117cf84ce
Children e99a5581eb72
Fix incorrect types for xfer dialog check buttons

This is a missed change from the GTK4 conversion.

Testing Done:
Opened File Transfer dialog and toggled the options; no runtime type warnings were raised.

Reviewed at https://reviews.imfreedom.org/r/2042/
--- a/pidgin/gtkxfer.c Sun Nov 06 17:41:45 2022 -0600
+++ b/pidgin/gtkxfer.c Mon Nov 07 01:42:33 2022 -0600
@@ -382,7 +382,7 @@
{
purple_prefs_set_bool(
PIDGIN_PREFS_ROOT "/filetransfer/keep_open",
- !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
+ !gtk_check_button_get_active(GTK_CHECK_BUTTON(w)));
}
static void
@@ -390,7 +390,7 @@
{
purple_prefs_set_bool(
PIDGIN_PREFS_ROOT "/filetransfer/clear_finished",
- gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
+ gtk_check_button_get_active(GTK_CHECK_BUTTON(w)));
}
static void
@@ -541,14 +541,14 @@
gtk_widget_init_template(GTK_WIDGET(dialog));
/* "Close this window when all transfers finish" */
- gtk_toggle_button_set_active(
- GTK_TOGGLE_BUTTON(dialog->keep_open),
+ gtk_check_button_set_active(
+ GTK_CHECK_BUTTON(dialog->keep_open),
!purple_prefs_get_bool(PIDGIN_PREFS_ROOT
"/filetransfer/keep_open"));
/* "Clear finished transfers" */
- gtk_toggle_button_set_active(
- GTK_TOGGLE_BUTTON(dialog->auto_clear),
+ gtk_check_button_set_active(
+ GTK_CHECK_BUTTON(dialog->auto_clear),
purple_prefs_get_bool(PIDGIN_PREFS_ROOT
"/filetransfer/clear_finished"));
}
@@ -690,9 +690,9 @@
return;
}
- if (purple_xfer_get_status(xfer) == PURPLE_XFER_STATUS_CANCEL_LOCAL &&
- gtk_toggle_button_get_active(
- GTK_TOGGLE_BUTTON(dialog->auto_clear))) {
+ if(purple_xfer_get_status(xfer) == PURPLE_XFER_STATUS_CANCEL_LOCAL &&
+ gtk_check_button_get_active(GTK_CHECK_BUTTON(dialog->auto_clear)))
+ {
pidgin_xfer_dialog_remove_xfer(dialog, xfer);
return;
}
@@ -766,9 +766,9 @@
if (xfer == dialog->selected_xfer)
update_detailed_info(xfer_dialog, xfer);
- if (purple_xfer_is_completed(xfer) &&
- gtk_toggle_button_get_active(
- GTK_TOGGLE_BUTTON(dialog->auto_clear))) {
+ if(purple_xfer_is_completed(xfer) &&
+ gtk_check_button_get_active(GTK_CHECK_BUTTON(dialog->auto_clear)))
+ {
pidgin_xfer_dialog_remove_xfer(dialog, xfer);
} else {
update_buttons(dialog, xfer);
@@ -778,8 +778,7 @@
* If all transfers are finished, and the pref is set, then
* close the dialog. Otherwise just exit this function.
*/
- if (!gtk_toggle_button_get_active(
- GTK_TOGGLE_BUTTON(dialog->keep_open))) {
+ if(!gtk_check_button_get_active(GTK_CHECK_BUTTON(dialog->keep_open))) {
return;
}