summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Use G_SOURCE_FUNC macro moreHEADmasterElliott Sales de Andrade2023-04-306-9/+16
| | | | | | | | | It was added in GLib 2.58 Testing Done: Compiled only. Reviewed at https://reviews.imfreedom.org/r/2446/
* Fix account request field in Pidgin when filteringElliott Sales de Andrade2023-04-251-3/+3
| | | | | | | | | | | | | The field is set to its default value first, filtered, then a notify signal is connected. If the filter excludes the default, then the notification is not fired at this point. So if there's a filter that excludes that default and you don't change the selection from the UI, then nothing will have told the field that the default is not the selection, and the field result will not match what the user thought they selected. Testing Done: Tried a few times in the I'dle Mak'er plugin. Previously, if accounts loaded such that a Demo account is before an XMPP account, then even though the XMPP account appeared in the selector initially, the idle would be attempted on the Demo account. Now it is always the XMPP account as expected from the UI. Reviewed at https://reviews.imfreedom.org/r/2443/
* Make PurpleRequestFieldAccount work like a GtkCustomFilterElliott Sales de Andrade2023-04-256-37/+81
| | | | | | | | | | | | | This makes the filtering better for introspection. Also, fixed an incorrect type check. Testing Done: Enabled Demo and XMPP accounts, then tried the I'dle Mak'er plugin and confirmed that only XMPP showed in its "Set Account Idle Time" action request. Bugs closed: PIDGIN-17780 Reviewed at https://reviews.imfreedom.org/r/2442/
* Create PurpleSavedPresence for saving the users presencesGary Kramlich2023-04-255-0/+687
| | | | | | | | | Testing Done: Ran the unit tests. Bugs closed: PIDGIN-17795 Reviewed at https://reviews.imfreedom.org/r/2440/
* Remove unused CSS fileElliott Sales de Andrade2023-04-182-20/+0
| | | | | | | | | I see no reference to the file, nor any of the classes it uses. Testing Done: Compile only. Reviewed at https://reviews.imfreedom.org/r/2438/
* Don't duplicate contacts in the demo protocol when reconnectingGary Kramlich2023-04-181-9/+49
| | | | | | | | | | | Previously, we were always creating new contacts and persons on connection. This ends up with duplicates when we run the connection error actions which is obviously not what we want. Testing Done: Ran the connection error actions and verified that we did not get duplicate contacts and persons. Reviewed at https://reviews.imfreedom.org/r/2436/
* Port the demo protocol's actions to the new status apiGary Kramlich2023-04-131-18/+42
| | | | | | | | | Testing Done: Trigger temporary and fatal connection errors and verified that my status message was updated for them. Bugs closed: PIDGIN-17790 Reviewed at https://reviews.imfreedom.org/r/2435/
* Port the demo protocol plugin to contactsGary Kramlich2023-04-113-205/+263
| | | | | | | Testing Done: Deleted the old `blist.xml` from my `XDG_CONFIG_HOME` and verified that I only got the new contacts and verified that they were not stored back to `blist.xml`. Reviewed at https://reviews.imfreedom.org/r/2432/
* Use gtk_widget_set_visible for everythingGary Kramlich2023-04-1120-70/+57
| | | | | | | | | | | | | | gtk_widget_show and gtk_widget_hide are deprecated in GTK 4.10. However, gtk_widget_set_visible has been around forever so we just need to move to that. I didn't test all of these and there are probably some that can still be removed, but most of those are in code that is going to get refreshed in the future so I didn't bother for now. Testing Done: I tested the join chat, add chat, and add buddy dialogs, as well as the contact added notification. Reviewed at https://reviews.imfreedom.org/r/2430/
* Fix the issue where the contact list would sometimes duplicate everyoneGary Kramlich2023-04-101-4/+3
| | | | | | | Testing Done: This was tested with another review request that was reproducing it 100% of the time. Reviewed at https://reviews.imfreedom.org/r/2431/
* Fix some issues where we were triggering GWarnings with presenceGary Kramlich2023-04-072-2/+9
| | | | | | | Testing Done: I ran into these while porting the Bonjour prpl to the new status API, so I verified they stopped happening against that code. Reviewed at https://reviews.imfreedom.org/r/2426/
* Convert PidginStatusBox to a GtkMenuButtonElliott Sales de Andrade2023-04-032-279/+217
| | | | | | | | | | | | | | | | | This moves to a menu system to populate the list of statuses, and the new `PidginStatusDisplay` to show them. I tried a `GtkDropDown` previously, but that was unable to show the separators that we previously had. Consequently, it uses actions a bit more then before. However, since menus don't support icons+text at the same time, and doesn't have a factory property, we do need to manually create custom widgets a bit, but it's mostly only a button + the `PidginStatusDisplay`. The main display is now centred, but there seems to be nothing we can do about that, as the box with that alignment is internal to the `GtkMenuButton`. If we don't want that, we could switch to managing a `GtkToggleButton` and `GtkPopoverMenu` ourselves. Testing Done: Opened status box and confirmed that all primitives and saved statuses were there as expected. Modified a status, and confirmed that the menu updated to match. Added/deleted statuses from the manager and confirmed they menu updated to match. Chose the New Status/Saved Statuses menu items and confirmed they opened the correct dialogs. Picked a bunch of statuses from the menu items and confirmed the main display updated, and some updates were sent out to protocols (e.g. Demo disconnecting when offline, etc.) Reviewed at https://reviews.imfreedom.org/r/2386/
* Add a widget for displaying statusesElliott Sales de Andrade2023-04-039-102/+484
| | | | | | | | | | | | It can display either primitives or saved statuses. Then use the widget in the status manager and the status editor. Testing Done: Edited a status, and confirmed that the list of status primitives were all shown Opened the status manager, and confirmed that the saved status' primitive in the manager changed as expected after editing the status. Reviewed at https://reviews.imfreedom.org/r/2417/
* Clean up Finch preferences pageElliott Sales de Andrade2023-04-032-93/+145
| | | | | | | | | | | | Instead of mixing two strings into a `GList`, use a `PurpleKeyValuePair`. Use struct initializers and `G_N_ELEMENTS`. Rename `lv` to `choices` for clarity. Change from `PurpleRequestFieldList` to `PurpleRequestFieldChoice` as we don't need multiple selection. Testing Done: Opened Finch, opened Preferences, saved them, and exited Finch. Re-opened Prefs and confirmed they were saved and as expected. Reviewed at https://reviews.imfreedom.org/r/2416/
* Simplify some button imagesElliott Sales de Andrade2023-03-314-20/+4
| | | | | | | Testing Done: Opened a few notifications from the Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2411/
* Migrate away from AdwActionRow:icon-nameElliott Sales de Andrade2023-03-317-11/+50
| | | | | | | | | This is deprecated in Adwaita 1.3 Testing Done: Triggered connection error and buddy request in Demo protocol; not sure how to check authorization. Reviewed at https://reviews.imfreedom.org/r/2410/
* Remove the facebook docs from the convey tasksGary Kramlich2023-03-301-2/+0
| | | | | | | Testing Done: ran `convey run docs` and verified it succeeded. Reviewed at https://reviews.imfreedom.org/r/2399/
* Add notifications when a saved plugin fails to loadGary Kramlich2023-03-302-4/+68
| | | | | | | | | | | I also did a first run at generic notifications. Testing Done: Forced some saved plugins to fail to load and verified in the notification list. Bugs closed: PIDGIN-17711 Reviewed at https://reviews.imfreedom.org/r/2401/
* Remove unused pref widget helpersElliott Sales de Andrade2023-03-303-351/+4
| | | | | | | | | | | They are no longer used now that the plugin prefs are gone and other main prefs stopped using them. Note, there are a couple references in the disabled-by-default plugins, but they need re-writing anyway. Testing Done: Compiled only. Reviewed at https://reviews.imfreedom.org/r/2406/
* Port VV preferences from GtkComboBox to AdwComboRowElliott Sales de Andrade2023-03-302-155/+130
| | | | | | | | | | | | | This removes another `GtkComboBox` and fixes the requested width of the row, so the label no longers gets squashed when you have a long device name. Testing Done: Opened Prefs, selected a different Audio Input, and confirmed it was saved/restored when re-opening. Ran Test Audio and confirmed input was coming from the right input. Disconnected an audio device and confirmed that the list re-populated correctly. Disconnected the *selected* audio device and confirmed that the selection dropped back to Default. Ran Test Audio, disconnected the selected audio device and confirmed the audio pipeline switched to Default device. Reviewed at https://reviews.imfreedom.org/r/2398/
* Remove GTK plugin prefsElliott Sales de Andrade2023-03-305-306/+0
| | | | | | | | | They are unused now that Pidgin uses GPlugin plugin settings. Testing Done: Compiled only. Reviewed at https://reviews.imfreedom.org/r/2397/
* Use Adwaita widgets in status editorElliott Sales de Andrade2023-03-295-124/+71
| | | | | | | | | | | The `PidginStatusChooser` is also changed from a `GtkDropDown` to a `AdwComboRow` as everything that uses it is now in an `AdwPreferencesGroup`. Also simplifies a bit of the status editor by using responses instead of widgets. Testing Done: Compiled and opened Statuses, modified an existing one and confirmed the dialog was reloaded correctly and appeared to work. Reviewed at https://reviews.imfreedom.org/r/2396/
* Fix transparency plugin for display list/pref changesElliott Sales de Andrade2023-03-292-219/+28
| | | | | | | | | | | | | | | | | | There is no longer a buddy list/conversation split, so remove the duplicate settings (half of which were not used any more), and rename them without the differentiating prefix. Also, now that there's only one thing, there's no need for a second "enabled" setting in the plugin that just duplicates the plugin's enabled setting itself, so I removed it. Instead of adding and removing a slider when the setting changes, I instead opted to always add it, and bind its visibility to the setting instead. We no longer need a `gtk-config-frame` now that Pidgin uses GPlugin's plugin settings, so remove that and correctly wire up the settings schema so that GPlugin automatically displays settings. Finally, the scale UI and alpha setting had different ranges. If the setting was moved below the scale's minimum, it would clamp it but not resend that value back to the setting, so things would appear inconsistent. To rectify this, I changed the setting's range up to match the scale. Testing Done: * Enabled Transparency plugin, changed around the transparency level and confirmed the main window became transparent. * Toggled the solid-on-focus setting and confirmed the window lost transparency when focused. * Toggled the slider setting and confirmed it was added/removed from the window. * When slider was enabled, changed the setting and confirmed the slider changed and vice versa. Reviewed at https://reviews.imfreedom.org/r/2394/
* Remove the Facebook pluginGary Kramlich2023-03-2928-12825/+0
| | | | | | | | | | | This hasn't been used in forever and is behind on patches from the purple2 version so this for sure is not going to work. This will also stop people from tryingt to update the purple2 version for this code as that's a horrible idea. Testing Done: had the turtles do their thing Reviewed at https://reviews.imfreedom.org/r/2393/
* Remove the original irc protocol pluginGary Kramlich2023-03-2916-5998/+0
| | | | | | | | | | | I was waiting to do this until IRCv3 was at feature parity, but now one is using this right now anyways which means having to keep updating it for changes is just a waste of effort. Testing Done: ran `ninja turtles` and opened the new account dialog without issue. Reviewed at https://reviews.imfreedom.org/r/2392/
* Add the presence primitive and idle time to the contact listGary Kramlich2023-03-292-8/+81
| | | | | | | | | | The idle time is getting overwritten by something right now which is unrelated and will be addressed separately. Testing Done: Connected the demo protocol plugin and looked at the contact list. Reviewed at https://reviews.imfreedom.org/r/2391/
* Fix several leaks in testsElliott Sales de Andrade2023-03-2323-37/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All of these are specific to tests, not the library code. For the moment, `protocol_xfer` still leaks connections (and anything they hold on to) because it is very difficult to disentangle them from the connection manager in the partially implemented state they are in. This fixes leaks of options in the account option test (these two leaks occur for every test since they all leak the option): ``` 61 (48 direct, 13 indirect) bytes in 1 blocks are definitely lost in loss record 133 of 276 at 0x4848464: calloc (vg_replace_malloc.c:1340) by 0x49F75F0: g_malloc0 (gmem.c:163) by 0x48C3B2E: purple_account_option_new (purpleaccountoption.c:78) by 0x4014AF: test_purple_account_option_copy_int (test_account_option.c:67) by 0x4A1CC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A1CC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1D181: g_test_run_suite (gtestutils.c:3115) by 0x4A156EC: UnknownInlinedFun (gtestutils.c:2234) by 0x4A156EC: g_test_run (gtestutils.c:2221) by 0x401721: main (test_account_option.c:157) 61 (48 direct, 13 indirect) bytes in 1 blocks are definitely lost in loss record 134 of 276 at 0x4848464: calloc (vg_replace_malloc.c:1340) by 0x49F75F0: g_malloc0 (gmem.c:163) by 0x48C3BC7: purple_account_option_copy (purpleaccountoption.c:93) by 0x4014BF: test_purple_account_option_copy_int (test_account_option.c:68) by 0x4A1CC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A1CC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1D181: g_test_run_suite (gtestutils.c:3115) by 0x4A156EC: UnknownInlinedFun (gtestutils.c:2234) by 0x4A156EC: g_test_run (gtestutils.c:2221) by 0x401721: main (test_account_option.c:157) ``` leaks in the credential manager test (times 3 for read/write/cancel tests): ``` 69 (16 direct, 53 indirect) bytes in 1 blocks are definitely lost in loss record 2,427 of 3,503 at 0x484386F: malloc (vg_replace_malloc.c:393) by 0x4A58168: g_malloc (gmem.c:130) by 0x4A6FAB5: g_slice_alloc (gslice.c:1074) by 0x4A700EC: g_slice_alloc0 (gslice.c:1100) by 0x4A3BECB: g_error_allocate (gerror.c:710) by 0x4A3C93F: UnknownInlinedFun (gerror.c:724) by 0x4A3C93F: g_error_new_valist (gerror.c:766) by 0x4BEE558: g_task_return_new_error (gtask.c:1941) by 0x48D82C0: purple_credential_manager_read_password_async (purplecredentialmanager.c:492) by 0x403634: test_purple_credential_manager_no_provider_read_password_idle (test_credential_manager.c:329) by 0x4A4ECB1: g_idle_dispatch (gmain.c:6124) by 0x4A4FCBE: UnknownInlinedFun (gmain.c:3444) by 0x4A4FCBE: g_main_context_dispatch (gmain.c:4162) by 0x4AA5597: g_main_context_iterate.constprop.0 (gmain.c:4238) by 0x4A4F28E: g_main_loop_run (gmain.c:4438) by 0x40369F: test_purple_credential_manager_no_provider_read_password_async (test_credential_manager.c:345) by 0x4A7DC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A7DC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A7D9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A7D9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A7E181: g_test_run_suite (gtestutils.c:3115) by 0x4A766EC: UnknownInlinedFun (gtestutils.c:2234) by 0x4A766EC: g_test_run (gtestutils.c:2221) by 0x4048F6: main (test_credential_manager.c:695) ``` a leak in the image test: ``` 161 bytes in 1 blocks are definitely lost in loss record 260 of 274 at 0x484386F: malloc (vg_replace_malloc.c:393) by 0x4A55363: g_try_malloc (gmem.c:286) by 0x4A3D630: UnknownInlinedFun (gfileutils.c:819) by 0x4A3D630: UnknownInlinedFun (gfileutils.c:924) by 0x4A3D630: g_file_get_contents (gfileutils.c:1027) by 0x401890: test_image_new_from_file (test_image.c:144) by 0x4A7DC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A7DC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A7D9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A7E181: g_test_run_suite (gtestutils.c:3115) by 0x4A766EC: UnknownInlinedFun (gtestutils.c:2234) by 0x4A766EC: g_test_run (gtestutils.c:2221) by 0x40195D: main (test_image.c:172) ``` a leak in queued output stream test: ``` 72 (40 direct, 32 indirect) bytes in 1 blocks are definitely lost in loss record 219 of 396 at 0x49D51EF: g_type_create_instance (gtype.c:1909) by 0x49BAC1F: g_object_new_internal (gobject.c:2228) by 0x49BC247: g_object_new_with_properties (gobject.c:2391) by 0x49BCFF0: g_object_new (gobject.c:2037) by 0x402003: test_queued_output_stream_push_bytes_async_error (test_queued_output_stream.c:219) by 0x4A7DC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A7DC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A7D9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A7E181: g_test_run_suite (gtestutils.c:3115) by 0x4A766EC: UnknownInlinedFun (gtestutils.c:2234) by 0x4A766EC: g_test_run (gtestutils.c:2221) by 0x402429: main (test_queued_output_stream.c:280) ``` and protocol xfer tests (times 3 for each test that creates a test protocol object): ``` 112 (48 direct, 64 indirect) bytes in 1 blocks are definitely lost in loss record 3,430 of 3,698 at 0x49D51EF: g_type_create_instance (gtype.c:1909) by 0x49BAC1F: g_object_new_internal (gobject.c:2228) by 0x49BC247: g_object_new_with_properties (gobject.c:2391) by 0x49BCFF0: g_object_new (gobject.c:2037) by 0x40291C: test_purple_protocol_xfer_send_file_func (test_protocol_xfer.c:146) by 0x4A7DC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A7DC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A7D9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A7E181: g_test_run_suite (gtestutils.c:3115) by 0x4A766EC: UnknownInlinedFun (gtestutils.c:2234) by 0x4A766EC: g_test_run (gtestutils.c:2221) by 0x402B64: main (test_protocol_xfer.c:195) ``` and util tests (times 3 for each call to `purple_text_strip_mnemonic` in the test): ``` 5 bytes in 1 blocks are definitely lost in loss record 5 of 247 at 0x484386F: malloc (vg_replace_malloc.c:393) by 0x49F7168: g_malloc (gmem.c:130) by 0x491975B: purple_text_strip_mnemonic (util.c:895) by 0x4015B0: test_util_text_strip_mnemonic (test_util.c:49) by 0x4A1CC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A1CC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1D181: g_test_run_suite (gtestutils.c:3115) by 0x4A156EC: UnknownInlinedFun (gtestutils.c:2234) by 0x4A156EC: g_test_run (gtestutils.c:2221) by 0x401901: main (test_util.c:224) ``` and these leaks in any test that initializes the test UI: ``` 4,104 bytes in 1 blocks are possibly lost in loss record 3,451 of 3,457 at 0x484386F: malloc (vg_replace_malloc.c:393) by 0x5235B67: sqlite3MemMalloc.lto_priv.0 (sqlite3.c:25493) by 0x5232797: UnknownInlinedFun (sqlite3.c:29181) by 0x5232797: UnknownInlinedFun (sqlite3.c:29227) by 0x5232797: sqlite3Malloc.lto_priv.0 (sqlite3.c:29221) by 0x523BD8B: pcache1Alloc.lto_priv.0 (sqlite3.c:53546) by 0x5249A8B: UnknownInlinedFun (sqlite3.c:53675) by 0x5249A8B: allocateTempSpace (sqlite3.c:70848) by 0x52625A6: sqlite3VdbeExec.lto_priv.0 (sqlite3.c:93857) by 0x525CBEE: UnknownInlinedFun (sqlite3.c:87995) by 0x525CBEE: UnknownInlinedFun (sqlite3.c:88056) by 0x525CBEE: sqlite3_step (sqlite3.c:88045) by 0x529B324: sqlite3_exec (sqlite3.c:131002) by 0x48FD558: purple_sqlite3_run_migration (purplesqlite3.c:37) by 0x48FDBB4: purple_sqlite3_run_migrations_from_resources (purplesqlite3.c:195) by 0x48FDED9: purple_sqlite_history_adapter_run_migrations (purplesqlitehistoryadapter.c:69) by 0x48FE7F0: purple_sqlite_history_adapter_activate (purplesqlitehistoryadapter.c:287) by 0x48DB656: purple_history_adapter_activate (purplehistoryadapter.c:181) by 0x48DC9BC: purple_history_manager_set_active (purplehistorymanager.c:308) by 0x402BA8: test_ui_init_history (test_ui.c:132) by 0x402C80: test_ui_purple_init (test_ui.c:167) by 0x4027BB: main (test_contact.c:88) 4,368 bytes in 1 blocks are possibly lost in loss record 3,453 of 3,457 at 0x484386F: malloc (vg_replace_malloc.c:393) by 0x5235B67: sqlite3MemMalloc.lto_priv.0 (sqlite3.c:25493) by 0x5232797: UnknownInlinedFun (sqlite3.c:29181) by 0x5232797: UnknownInlinedFun (sqlite3.c:29227) by 0x5232797: sqlite3Malloc.lto_priv.0 (sqlite3.c:29221) by 0x523BD8B: pcache1Alloc.lto_priv.0 (sqlite3.c:53546) by 0x5240077: UnknownInlinedFun (sqlite3.c:53634) by 0x5240077: pcache1FetchStage2 (sqlite3.c:54104) by 0x5243E9C: UnknownInlinedFun (sqlite3.c:52671) by 0x5243E9C: getPageNormal.lto_priv.0 (sqlite3.c:60628) by 0x524A510: UnknownInlinedFun (sqlite3.c:60805) by 0x524A510: btreeGetPage.lto_priv.0 (sqlite3.c:70289) by 0x524C2F6: UnknownInlinedFun (sqlite3.c:71257) by 0x524C2F6: sqlite3BtreeBeginTrans.lto_priv.0 (sqlite3.c:71647) by 0x5266B3A: sqlite3VdbeExec.lto_priv.0 (sqlite3.c:93532) by 0x525CBEE: UnknownInlinedFun (sqlite3.c:87995) by 0x525CBEE: UnknownInlinedFun (sqlite3.c:88056) by 0x525CBEE: sqlite3_step (sqlite3.c:88045) by 0x48FD715: purple_sqlite3_get_schema_version (purplesqlite3.c:79) by 0x48FD9DD: purple_sqlite3_run_migrations_from_resources (purplesqlite3.c:146) by 0x48FDED9: purple_sqlite_history_adapter_run_migrations (purplesqlitehistoryadapter.c:69) by 0x48FE7F0: purple_sqlite_history_adapter_activate (purplesqlitehistoryadapter.c:287) by 0x48DB656: purple_history_adapter_activate (purplehistoryadapter.c:181) by 0x48DC9BC: purple_history_manager_set_active (purplehistorymanager.c:308) by 0x402BA8: test_ui_init_history (test_ui.c:132) by 0x402C80: test_ui_purple_init (test_ui.c:167) by 0x4027BB: main (test_contact.c:88) 4,368 bytes in 1 blocks are possibly lost in loss record 3,454 of 3,457 at 0x484386F: malloc (vg_replace_malloc.c:393) by 0x5235B67: sqlite3MemMalloc.lto_priv.0 (sqlite3.c:25493) by 0x5232797: UnknownInlinedFun (sqlite3.c:29181) by 0x5232797: UnknownInlinedFun (sqlite3.c:29227) by 0x5232797: sqlite3Malloc.lto_priv.0 (sqlite3.c:29221) by 0x523BD8B: pcache1Alloc.lto_priv.0 (sqlite3.c:53546) by 0x5240077: UnknownInlinedFun (sqlite3.c:53634) by 0x5240077: pcache1FetchStage2 (sqlite3.c:54104) by 0x5243E9C: UnknownInlinedFun (sqlite3.c:52671) by 0x5243E9C: getPageNormal.lto_priv.0 (sqlite3.c:60628) by 0x52499BC: UnknownInlinedFun (sqlite3.c:60805) by 0x52499BC: UnknownInlinedFun (sqlite3.c:70289) by 0x52499BC: btreeGetUnusedPage (sqlite3.c:70432) by 0x524F504: allocateBtreePage.lto_priv.0 (sqlite3.c:74604) by 0x5256209: btreeCreateTable.lto_priv.0 (sqlite3.c:77830) by 0x5265EB2: UnknownInlinedFun (sqlite3.c:77849) by 0x5265EB2: sqlite3VdbeExec.lto_priv.0 (sqlite3.c:96382) by 0x525CBEE: UnknownInlinedFun (sqlite3.c:87995) by 0x525CBEE: UnknownInlinedFun (sqlite3.c:88056) by 0x525CBEE: sqlite3_step (sqlite3.c:88045) by 0x529B324: sqlite3_exec (sqlite3.c:131002) by 0x48FD558: purple_sqlite3_run_migration (purplesqlite3.c:37) by 0x48FDBB4: purple_sqlite3_run_migrations_from_resources (purplesqlite3.c:195) by 0x48FDED9: purple_sqlite_history_adapter_run_migrations (purplesqlitehistoryadapter.c:69) by 0x48FE7F0: purple_sqlite_history_adapter_activate (purplesqlitehistoryadapter.c:287) by 0x48DB656: purple_history_adapter_activate (purplehistoryadapter.c:181) by 0x48DC9BC: purple_history_manager_set_active (purplehistorymanager.c:308) by 0x402BA8: test_ui_init_history (test_ui.c:132) by 0x402C80: test_ui_purple_init (test_ui.c:167) by 0x4027BB: main (test_contact.c:88) ``` Testing Done: Ran tests in valgrind, and all above leaks were gone except for noted `protocol_xfer` issues, and a bunch of leaks of the `PurpleBuddy`-`PurpleContact` compatibility bindings, which will go away in their entirety eventually. Reviewed at https://reviews.imfreedom.org/r/2385/
* Add a custom target for running everything when landing a pull requestGary Kramlich2023-03-231-0/+5
| | | | | | | Testing Done: Ran `ninja clean` followed by `ninja turtles` and verified the pot file, all the code, and the docs were compiled. Reviewed at https://reviews.imfreedom.org/r/2387/
* Fix leaked errorsElliott Sales de Andrade2023-03-2312-24/+23
| | | | | | | | | And also simplify some cases with `g_clear_error`. Testing Done: Compiled and ran tests in valgrind, though it never noticed these anyway. Reviewed at https://reviews.imfreedom.org/r/2384/
* Fix leaks in purple markupElliott Sales de Andrade2023-03-222-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix leaks when running the markup tests. These are all from leaking `tags`: ``` 24 bytes in 1 blocks are definitely lost in loss record 101 of 251 at 0x4848464: calloc (vg_replace_malloc.c:1340) by 0x49F75F0: g_malloc0 (gmem.c:163) by 0x48E563C: purple_markup_html_to_xhtml (purplemarkup.c:437) by 0x401214: test_purple_markup_html_to_xhtml (test_markup.c:213) by 0x4A1CC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A1CC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1D181: g_test_run_suite (gtestutils.c:3115) by 0x4A156EC: UnknownInlinedFun (gtestutils.c:2234) by 0x4A156EC: g_test_run (gtestutils.c:2221) by 0x401575: main (test_markup.c:281) 24 bytes in 1 blocks are definitely lost in loss record 102 of 251 at 0x4848464: calloc (vg_replace_malloc.c:1340) by 0x49F75F0: g_malloc0 (gmem.c:163) by 0x48E0319: purple_markup_html_to_xhtml (purplemarkup.c:260) by 0x401214: test_purple_markup_html_to_xhtml (test_markup.c:213) by 0x4A1CC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A1CC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1D181: g_test_run_suite (gtestutils.c:3115) by 0x4A156EC: UnknownInlinedFun (gtestutils.c:2234) by 0x4A156EC: g_test_run (gtestutils.c:2221) by 0x401575: main (test_markup.c:281) 24 bytes in 1 blocks are definitely lost in loss record 103 of 251 at 0x4848464: calloc (vg_replace_malloc.c:1340) by 0x49F75F0: g_malloc0 (gmem.c:163) by 0x48E07B7: purple_markup_html_to_xhtml (purplemarkup.c:261) by 0x401214: test_purple_markup_html_to_xhtml (test_markup.c:213) by 0x4A1CC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A1CC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1D181: g_test_run_suite (gtestutils.c:3115) by 0x4A156EC: UnknownInlinedFun (gtestutils.c:2234) by 0x4A156EC: g_test_run (gtestutils.c:2221) by 0x401575: main (test_markup.c:281) 24 bytes in 1 blocks are definitely lost in loss record 104 of 251 at 0x4848464: calloc (vg_replace_malloc.c:1340) by 0x49F75F0: g_malloc0 (gmem.c:163) by 0x48E0C55: purple_markup_html_to_xhtml (purplemarkup.c:262) by 0x401214: test_purple_markup_html_to_xhtml (test_markup.c:213) by 0x4A1CC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A1CC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1D181: g_test_run_suite (gtestutils.c:3115) by 0x4A156EC: UnknownInlinedFun (gtestutils.c:2234) by 0x4A156EC: g_test_run (gtestutils.c:2221) by 0x401575: main (test_markup.c:281) 24 bytes in 1 blocks are definitely lost in loss record 105 of 251 at 0x4848464: calloc (vg_replace_malloc.c:1340) by 0x49F75F0: g_malloc0 (gmem.c:163) by 0x48E10F3: purple_markup_html_to_xhtml (purplemarkup.c:263) by 0x401214: test_purple_markup_html_to_xhtml (test_markup.c:213) by 0x4A1CC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A1CC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1D181: g_test_run_suite (gtestutils.c:3115) by 0x4A156EC: UnknownInlinedFun (gtestutils.c:2234) by 0x4A156EC: g_test_run (gtestutils.c:2221) by 0x401575: main (test_markup.c:281) ``` and these from not freeing the result from `purple_unescape_html`: ``` 256 bytes in 2 blocks are definitely lost in loss record 241 of 251 at 0x484378A: malloc (vg_replace_malloc.c:392) by 0x484870B: realloc (vg_replace_malloc.c:1451) by 0x49F771F: g_realloc (gmem.c:201) by 0x4A11343: g_string_maybe_expand (gstring.c:92) by 0x4A113BF: g_string_sized_new (gstring.c:116) by 0x48E7F74: purple_unescape_html (purplemarkup.c:1101) by 0x48DEBBA: purple_markup_html_to_xhtml (purplemarkup.c:224) by 0x401214: test_purple_markup_html_to_xhtml (test_markup.c:213) by 0x4A1CC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A1CC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1D181: g_test_run_suite (gtestutils.c:3115) 256 bytes in 2 blocks are definitely lost in loss record 242 of 251 at 0x484378A: malloc (vg_replace_malloc.c:392) by 0x484870B: realloc (vg_replace_malloc.c:1451) by 0x49F771F: g_realloc (gmem.c:201) by 0x4A11343: g_string_maybe_expand (gstring.c:92) by 0x4A113BF: g_string_sized_new (gstring.c:116) by 0x48E7F74: purple_unescape_html (purplemarkup.c:1101) by 0x48E534D: purple_markup_html_to_xhtml (purplemarkup.c:397) by 0x401214: test_purple_markup_html_to_xhtml (test_markup.c:213) by 0x4A1CC7D: UnknownInlinedFun (gtestutils.c:2933) by 0x4A1CC7D: g_test_run_suite_internal (gtestutils.c:3021) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1C9E4: g_test_run_suite_internal (gtestutils.c:3038) by 0x4A1D181: g_test_run_suite (gtestutils.c:3115) ``` Also modified the test to check not passing the optional arguments. Testing Done: Compiled and ran tests in valgrind and leaks were gone. Reviewed at https://reviews.imfreedom.org/r/2379/
* Move whiteboard clearing to AdwMessageDialogElliott Sales de Andrade2023-03-221-12/+23
| | | | | | | | | As `GtkMessageDialog` is being deprecated. Testing Done: Compiled only. Reviewed at https://reviews.imfreedom.org/r/2378/
* Fix leaks from g_list_model_get_itemElliott Sales de Andrade2023-03-227-11/+19
| | | | | | | | | It returns a new reference, which needs to be unref'd. Testing Done: Compiled only, and ran tests, though these issues didn't show up in valgrind anyway. Reviewed at https://reviews.imfreedom.org/r/2377/
* Use the new status api in the demo protocol pluginGary Kramlich2023-03-214-47/+62
| | | | | | | | | | We had to add the new properties to the compatibility layer in PurpleContactManager but everything seems to be fine. Testing Done: Connected a demo account and verified the display was right in the contact list. Note, we don't currently display the primitive nor the idle time. Reviewed at https://reviews.imfreedom.org/r/2376/
* Add "new-status" properties to PurplePresence with fallbacks were applicableGary Kramlich2023-03-213-67/+284
| | | | | | | | | This adds the new `emoji` and `mobile` properties to `PurplePresence`. It also makes `message` read/write and it fallsback to the active status's message if the internal message is false. Additionally the primitive property was moved `PurpleStatusPrimitive` to `PurplePresencePrimitive`. Testing Done: Ran the updated unit tests and connected a demo account and verified that the expected status messages were displayed. Reviewed at https://reviews.imfreedom.org/r/2372/
* Remove libsoup2 codeElliott Sales de Andrade2023-03-214-243/+1
| | | | | | | | | Soup 3 has been required since /r/2068. Testing Done: Compiled only. Reviewed at https://reviews.imfreedom.org/r/2375/
* Use g_clear_handle_id everywhereElliott Sales de Andrade2023-03-2130-209/+73
| | | | | | | Testing Done: Compiled and ran tests in valgrind. Reviewed at https://reviews.imfreedom.org/r/2374/
* Remove unused callback in account editorElliott Sales de Andrade2023-03-212-16/+1
| | | | | | | | | | | It is no longer a dialog, and has no reference to a response callback in the `.ui` any more. Also, fix the added CSS class. Testing Done: Compiled, and opened and closed the account editor. Reviewed at https://reviews.imfreedom.org/r/2373/
* Add purple_presence_primitive_to_string for easier displayGary Kramlich2023-03-212-0/+43
| | | | | | | Testing Done: Compiled Reviewed at https://reviews.imfreedom.org/r/2371/
* Use g_clear_* helpers where usefulElliott Sales de Andrade2023-03-2148-164/+82
| | | | | | | | | | | | | That is: * when the variable is set to `NULL` right after freeing * when the variable is checked for non-`NULL` before freeing * when the variable is a global (because they should be set to `NULL`, even if we don't really claim that things can be re-init'd) Testing Done: Compiled, and ran tests in valgrind. Reviewed at https://reviews.imfreedom.org/r/2369/
* Use Adwaita widgets for basic request entriesElliott Sales de Andrade2023-03-201-132/+81
| | | | | | | | | | | | | This uses `AdwEntryRow` and `AdwPasswordEntryRow` for text. Also, even though I kept it working in /r/2355, this drops username completion, as `GtkEntryCompletion` is not supported for `AdwEntryRow` and is also deprecated in GTK 4.10. For multiline entries, `AdwEntryRow` doesn't support it, but I managed to create a mostly similar look to the single line entries. I didn't bother with making the title large when the entry is empty and unfocused, as Adwaita does a whole animation thing that I don't want to copy from them. Integer fields did not really change, but we'll want to use [`AdwSpinRow`](https://gitlab.gnome.org/GNOME/libadwaita/-/merge_requests/612) when that's complete. Testing Done: Opened Request Fields from Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2365/
* Use GPtrArray internally to PurpleRequest{Group,Page}Elliott Sales de Andrade2023-03-202-14/+16
| | | | | | | | | Now that we don't export a `GList`, we can use these arrays internally. Testing Done: Opened Request Fields from Demo protocol, and confirmed all groups/fields were there. Reviewed at https://reviews.imfreedom.org/r/2364/
* Remove unused API from request fieldsElliott Sales de Andrade2023-03-207-96/+6
| | | | | | | | | | | The `GList` API is no longer used, as containers use the `GListModel` interface. Fetching the group-from-field or page-from-group is no longer needed as previous users now process the field along with the group they were already using. Testing Done: Compiled only. Reviewed at https://reviews.imfreedom.org/r/2363/
* Wrap Request Fields dialog in Adwaita widgetsElliott Sales de Andrade2023-03-201-288/+193
| | | | | | | | | | | This is the straightforward conversion of simply putting the existing widgets in corresponding `AdwActionRow`. All the different field types are not yet changed. As an example, I have converted the boolean field to a `GtkSwitch`. Testing Done: Compiled and opened Request Fields from the Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2355/
* Remove PurpleProtocolClient->tooltip_text as it is barely used and we're ↵Gary Kramlich2023-03-207-290/+0
| | | | | | | | | scaling back our tooltip usage Testing Done: Compiled Reviewed at https://reviews.imfreedom.org/r/2370/
* Use PidginAccountDisplay in the request dialogsElliott Sales de Andrade2023-03-201-26/+20
| | | | | | | | | | | I then moved this from the hbox to the vbox so that it wouldn't widen the dialog. This is not the best place yet, but the request dialogs need further work. Testing Done: Opened Request dialogs from the Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2361/
* Split account display from chooser into its own widgetElliott Sales de Andrade2023-03-207-69/+321
| | | | | | | | | This will allow re-using it elsewhere when we need to display the account. Testing Done: Compiled and opened Add a Buddy dialog, Room List, etc. that used the chooser. Reviewed at https://reviews.imfreedom.org/r/2360/
* Remove all of the tune apiGary Kramlich2023-03-2016-456/+4
| | | | | | | Testing Done: Compiled, built `pidgin-pot`, and ran the unit tests. Reviewed at https://reviews.imfreedom.org/r/2368/
* Remove all of the current Mood APIGary Kramlich2023-03-2042-971/+5
| | | | | | | | | | | The functionality of the mood api is being moved into PurplePresence via the soon to be added Emoji and Message properties. As such we have no need for the existing API which is why we are removing all of it. Testing Done: Ran `ninja pidgin-pot all tests` successfully and verified there were no new warnings. Reviewed at https://reviews.imfreedom.org/r/2366/
* Remove purple_protocol_client_status_text as it is no longer usedGary Kramlich2023-03-208-139/+1
| | | | | | | Testing Done: Compiled Reviewed at https://reviews.imfreedom.org/r/2367/
* Fix username autocompletionElliott Sales de Andrade2023-03-201-25/+10
| | | | | | | | | This code still assumed the account chooser was a combo box, but it's a drop down now. Testing Done: Opened New IM dialog, typed a few letters, and selected a username from the Demo account (while a different account was selected.) Reviewed at https://reviews.imfreedom.org/r/2362/