Simplify PidginPrefCombo

Review Request #1451 — Created May 17, 2022 and submitted

Information

pidgin/pidgin
default

Reviewers

I'm not sure if GTK got better, or I just overengineered this, but there's a lot of stuff we don't need here.

See individual commit messages for more details of each change.

Opened prefs and checked proxy and VV device combos worked.

Summary ID
Inline pidgin_prefs_dropdown_from_list_cb
It's only used in one place and necessitates extra roundabout variables and such.
5ac1a8fc8182809d24f38a9a00ac6deaab134a29
Inline pidgin_prefs_bind_dropdown_from_list_cb
It's the only callback ever used for `bind_dropdown_set`, so just put it in there.
b2bfee6803b4799172712099fc3955583155bb4f
Remove active tracking in PidginPrefsCombo
The only thing that ever reads it is setting the previous to current.
1000eadff2672e86dd4b1daef2f205e7ebc255d6
Drop pref value tracking on PidginPrefsCombo
That only existed for the callbacks, which are now inlined.
a4ff7d0755da6789609eb2eb8bfef2dd325048fa
Inline pidgin_prefs_dropdown_from_list_with_cb
Now that there is no callback argument, and its only caller is `pidgin_prefs_dropdown_from_list`, there's not really any need for it to be a separate function.
74c0bc32b152febd713e0ca8423d884836bc374b
Use GtkListStore for populating VV device prefs
This is more in line with standard usage of combo boxes, instead of using an intermediary list of values.
e13065b303b60f181a04bf9c937dba405b045a64
Remove pidgin_prefs_bind_dropdown_from_list
It was only for the VV device dropdown, and is now unused.
3a034c725cfc19da3a5933eacd4b547bd8a0d5e7
Simplify active iter processing in PidginPrefCombo
9ab7f1cbacc13ebfcbb29b058c406ec8dc56f64a
Fix leak in PidginPrefCombo
f57d73615218f780963836120b87200d12b00ed3
Description From Last Updated

this leaks.

grimgrim

need to free value.

grimgrim

this should be gchar and freed

grimgrim
QuLogic
grim
  1. 
      
  2. pidgin/prefs/pidginprefs.c (Diff revision 2)
     
     
    Show all issues

    this leaks.

  3. pidgin/prefs/pidginprefs.c (Diff revision 2)
     
     
    Show all issues

    need to free value.

  4. pidgin/prefs/pidginprefs.c (Diff revision 2)
     
     
    Show all issues

    this should be gchar and freed

  5. 
      
QuLogic
grim
  1. Ship It!
  2. Awesome work, thank you very much!!!

  3. 
      
grim
Review request changed
Status:
Completed