# HG changeset patch # User Elliott Sales de Andrade # Date 1728971262 18000 # Node ID ce3144e2bc33f29edac385c64182db4a42806075 # Parent 9a3485b096c873efb98065c4d048e781fbe1fcd1 Port prefs to AdwSwitchRow Now that we depend on Adwaita 1.4, we can flip the switch on using these (pun intended). This also simplifies some extra tracking we needed to do for activations and focus, since the Adwaita widgets do that for us. Testing Done: Opened prefs, confirmed all the switches were there, and toggled them all without any warnings. Also used the mnemonics to toggle the switches from the keyboard. Reviewed at https://reviews.imfreedom.org/r/3582/ diff -r 9a3485b096c8 -r ce3144e2bc33 pidgin/prefs/pidginconversationprefs.c --- a/pidgin/prefs/pidginconversationprefs.c Tue Oct 15 00:03:58 2024 -0500 +++ b/pidgin/prefs/pidginconversationprefs.c Tue Oct 15 00:47:42 2024 -0500 @@ -38,7 +38,6 @@ GtkWidget *send_typing; } im; struct { - GtkWidget *blink_im_row; GtkWidget *blink_im; } win32; GtkWidget *minimum_entry_lines; @@ -68,9 +67,6 @@ im.send_typing); gtk_widget_class_bind_template_child( widget_class, PidginConversationPrefs, - win32.blink_im_row); - gtk_widget_class_bind_template_child( - widget_class, PidginConversationPrefs, win32.blink_im); gtk_widget_class_bind_template_child( widget_class, PidginConversationPrefs, @@ -100,7 +96,7 @@ pidgin_prefs_bind_switch(PIDGIN_PREFS_ROOT "/win32/blink_im", prefs->win32.blink_im); #else - gtk_widget_set_visible(prefs->win32.blink_im_row, FALSE); + gtk_widget_set_visible(prefs->win32.blink_im, FALSE); #endif pidgin_prefs_bind_spin_button( diff -r 9a3485b096c8 -r ce3144e2bc33 pidgin/prefs/pidginnetworkprefs.c --- a/pidgin/prefs/pidginnetworkprefs.c Tue Oct 15 00:03:58 2024 -0500 +++ b/pidgin/prefs/pidginnetworkprefs.c Tue Oct 15 00:47:42 2024 -0500 @@ -33,7 +33,6 @@ AdwPreferencesPage parent; GtkWidget *stun_server; - GtkWidget *auto_ip_row; GtkWidget *auto_ip; GtkWidget *public_ip; GtkWidget *map_ports; @@ -91,7 +90,7 @@ } auto_ip_text = g_strdup_printf(_("Use _automatically detected IP address: %s"), ip); - adw_preferences_row_set_title(ADW_PREFERENCES_ROW(prefs->auto_ip_row), + adw_preferences_row_set_title(ADW_PREFERENCES_ROW(prefs->auto_ip), auto_ip_text); g_free(auto_ip_text); g_list_free_full(list, g_free); @@ -114,8 +113,6 @@ gtk_widget_class_bind_template_child(widget_class, PidginNetworkPrefs, stun_server); gtk_widget_class_bind_template_child(widget_class, PidginNetworkPrefs, - auto_ip_row); - gtk_widget_class_bind_template_child(widget_class, PidginNetworkPrefs, auto_ip); gtk_widget_class_bind_template_child(widget_class, PidginNetworkPrefs, public_ip); diff -r 9a3485b096c8 -r ce3144e2bc33 pidgin/resources/Prefs/away.ui --- a/pidgin/resources/Prefs/away.ui Tue Oct 15 00:03:58 2024 -0500 +++ b/pidgin/resources/Prefs/away.ui Tue Oct 15 00:47:42 2024 -0500 @@ -127,16 +127,9 @@ Status at Startup - - startup_current_status + Use status from last _exit at startup 1 - - - 1 - center - - diff -r 9a3485b096c8 -r ce3144e2bc33 pidgin/resources/Prefs/conversation.ui --- a/pidgin/resources/Prefs/conversation.ui Tue Oct 15 00:03:58 2024 -0500 +++ b/pidgin/resources/Prefs/conversation.ui Tue Oct 15 00:47:42 2024 -0500 @@ -36,42 +36,21 @@ Conversations - - show_incoming_formatting + Show _formatting on incoming messages 1 - - - 1 - center - - - - im.send_typing + _Notify buddies that you are typing to them 1 - - - 1 - center - - - - win32.blink_im + F_lash window when IMs are received 1 - - - 1 - center - - diff -r 9a3485b096c8 -r ce3144e2bc33 pidgin/resources/Prefs/network.ui --- a/pidgin/resources/Prefs/network.ui Tue Oct 15 00:03:58 2024 -0500 +++ b/pidgin/resources/Prefs/network.ui Tue Oct 15 00:47:42 2024 -0500 @@ -45,18 +45,10 @@ - - auto_ip + Use _automatically detected IP address 1 - 0 - - - 1 - center - - - + @@ -73,17 +65,9 @@ Ports - - map_ports + _Enable automatic router port forwarding 1 - 0 - - - 1 - center - -