summaryrefslogtreecommitdiff
path: root/pidgin
Commit message (Collapse)AuthorAgeFilesLines
* Use G_SOURCE_FUNC macro moreHEADmasterElliott Sales de Andrade2023-04-301-1/+1
| | | | | | | | | 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-251-13/+7
| | | | | | | | | | | | | 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/
* 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/
* 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 some issues where we were triggering GWarnings with presenceGary Kramlich2023-04-071-2/+5
| | | | | | | 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/
* 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/
* Add notifications when a saved plugin fails to loadGary Kramlich2023-03-301-0/+33
| | | | | | | | | | | 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-302-351/+0
| | | | | | | | | | | 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-304-305/+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/
* 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 leaked errorsElliott Sales de Andrade2023-03-233-2/+4
| | | | | | | | | 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/
* 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-224-9/+15
| | | | | | | | | 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-211-1/+1
| | | | | | | | | | 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/
* Use g_clear_handle_id everywhereElliott Sales de Andrade2023-03-214-22/+8
| | | | | | | 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/
* Use g_clear_* helpers where usefulElliott Sales de Andrade2023-03-217-20/+9
| | | | | | | | | | | | | 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/
* 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/
* 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-202-2/+0
| | | | | | | 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-2027-451/+1
| | | | | | | | | | | 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/
* 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/
* Use a single response callback for request field actionsElliott Sales de Andrade2023-03-191-72/+41
| | | | | | | | | ... instead of one for each button. Testing Done: Opened Request Fields from Demo and clicked Cancel/OK/Escape. No test for extra actions as I don't think anything currently uses it for Fields. Reviewed at https://reviews.imfreedom.org/r/2359/
* Fix new request warning in New IM dialogElliott Sales de Andrade2023-03-191-17/+22
| | | | | | | | | | | | | Setting the validator triggers the field's `valid` property notification, which triggers the group to refresh its validity, which fetches the `valid` property and runs the validator. But the validator depends on the account field which hasn't been created yet, which causes a type-check warning. So set the validator after all fields are made, and also change the data argument so the dependency is clearer. Testing Done: Compiled, and opened the New IM dialog. Reviewed at https://reviews.imfreedom.org/r/2358/
* Remove tracking of required fieldsElliott Sales de Andrade2023-03-171-30/+1
| | | | | | | | | | | The field required&filled status is now encapsulated in the valid property due to /r/2351. This means that UIs no longer need to check that all required fields are filled. So the page no longer needs to track required fields either. Testing Done: Compiled and ran `ninja test`. Also opened Request Fields from Demo protocol, removed the required string or entered an invalid email, and confirmed the OK button disabled correctly. Reviewed at https://reviews.imfreedom.org/r/2352/
* Add PurpleRequest{Group,Page}:valid propertiesElliott Sales de Andrade2023-03-161-2/+2
| | | | | | | | | This collects the validity of the fields/groups within the group/page into a single value. Testing Done: Compiled and ran `ninja test`. Reviewed at https://reviews.imfreedom.org/r/2348/
* Embed PidginAccountEditor into PidginAccountManagerGary Kramlich2023-03-167-306/+545
| | | | | | | | | | | | | | | | | The account manager now uses a stack to switch between a single editor instance and the list of accounts. The save button from the editor got moved next to the new back button, but we should probably prompt or throw up an info box when the user starts making changes or prompt before moving back. Also, the app.edit-account action now will lose any changes to an account that is currently being edited, which we should disallow from happening in the future as well. Testing Done: Opened the account manager and selected accounts and moved backed and saved accounts and made sure everything there worked. Opened the account editor from a connection error notification and verified that opened properly as well. Reviewed at https://reviews.imfreedom.org/r/2333/
* Add a PurpleRequestField:valid property and is_valid vfuncElliott Sales de Andrade2023-03-161-1/+2
| | | | | | | | | | | * Add a `PurpleRequestField:valid` property and `is_valid` vfunc. * Add a `GDestroyNotify` parameter for the validator data, and document the callback. * Correct the property notification in `purple_request_field_bool_set_value`. Testing Done: Compiled and ran `ninja test` Reviewed at https://reviews.imfreedom.org/r/2346/
* fix crash when opening preferencesMarkus Fischer2023-03-131-2/+7
| | | | | | | | | | Due to the stun_server preference being removed, pidgin crashed when opening the preferences. To reproduce this, make sure that there is no old stun_server pref in prefs.xml Testing Done: Opened preferences and experienced no crash. Reviewed at https://reviews.imfreedom.org/r/2347/
* Make PurpleRequestFieldDatasheet into a GObjectElliott Sales de Andrade2023-03-101-9/+7
| | | | | | | | | Not sure that we want to keep all of this, but probably we don't need this extra wrapper object long term, and `PurpleRequestDatasheet` (once made into a `GObject`) and `PurpleRequestFieldDatasheet` could merge. Testing Done: Compiled only. Reviewed at https://reviews.imfreedom.org/r/2340/
* Make PurpleRequestFieldImage into a GObjectElliott Sales de Andrade2023-03-101-6/+7
| | | | | | | | | I'm not sure taking a `char*` and `gsize` is the best constructor; we can probably move this to `GdkPixbuf` or something now. Plus the properties would be nicer, and then it could change images on the fly. But that can happen later. Testing Done: Compiled and opened Request Fields from the Demo protocol Reviewed at https://reviews.imfreedom.org/r/2339/
* Make PurpleRequestFieldLabel into a GObjectElliott Sales de Andrade2023-03-101-4/+3
| | | | | | | | | This also does an `hg cp`, though with this being so so short, maybe that wasn't as useful for tracking the diff. Testing Done: Compiled and opened Request Fields from the Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2337/
* Convert PurpleRequestFieldList into a GObjectElliott Sales de Andrade2023-03-102-37/+40
| | | | | | | | | | | This also does an `hg cp`, though with all the renaming of the parameter names, maybe that wasn't as useful for tracking the diff. Also could implement `GListModel`, but it takes arbitrary pointers too, so not right now. Testing Done: Compiled, and opened Request Fields from the Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2336/
* Make PurpleRequestFieldChoice into a GObjectElliott Sales de Andrade2023-03-101-6/+8
| | | | | | | | | | | This also does an `hg cp`, though with all the renaming of the parameter names, maybe that wasn't as useful for tracking the diff. I wonder if this should implement `GListModel`, but the values are currently arbitrary pointers, so it won't work right now. Testing Done: Compiled and opened Request Fields from Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2335/
* Make PurpleRequestFieldInt into a GObjectElliott Sales de Andrade2023-03-101-7/+9
| | | | | | | | | | | This also does an `hg cp`, though with all the renaming of the parameter names, maybe that wasn't as useful for tracking the diff. Note, I didn't bother re-indenting some of the blocks, because they'll all eventually be moved when everything is subclassed. Testing Done: Compiled and opened Request Fields from Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2334/
* Make PurpleRequestFieldBool into a GObjectElliott Sales de Andrade2023-03-101-10/+9
| | | | | | | | | | | This also does an `hg cp`, though with all the renaming of the parameter names, maybe that wasn't as useful for tracking the diff. Note, I didn't bother re-indenting some of the blocks, because they'll all eventually be moved when everything is subclassed. Testing Done: Compiled and opened Request Fields from Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2332/
* Add a PurpleRequestFieldString subclassElliott Sales de Andrade2023-03-102-29/+32
| | | | | | | | | | | This also does an `hg cp`, though with all the renaming of the parameter names, maybe that wasn't as useful for tracking the diff. Note, I didn't bother re-indenting some of the blocks, because they'll all eventually be moved when everything is subclassed. Testing Done: Compiled and opened Request Fields from the Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2324/
* Make PurpleRequestFieldAccount into a GObjectElliott Sales de Andrade2023-03-101-8/+11
| | | | | | | | | | | This also does an `hg cp`, though with all the renaming of the parameter names, maybe that wasn't as useful for tracking the diff, and I should just make these new files entirely? Note, I didn't bother re-indenting some of the blocks, because they'll all eventually be moved when everything is subclassed. Testing Done: Compiled, and opened Request Fields from the Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2331/
* Move the active cpws before retired developers in the about boxGary Kramlich2023-03-071-6/+6
| | | | | | | Testing Done: Opened the about box and verified the change. Reviewed at https://reviews.imfreedom.org/r/2328/
* Replace PurpleRequestPage UI data with GObject dataElliott Sales de Andrade2023-03-071-2/+2
| | | | | | | Testing Done: Compiled and opened Request Fields from the Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2327/
* Convert PurpleRequestPage into a GObjectElliott Sales de Andrade2023-03-073-51/+48
| | | | | | | | | | | And rename it from `PurpleRequestFields`. Also, implements `GListModel` for the groups, but nothing uses it that way get. Testing Done: Compiled, and opened Request Fields from Demo protocol. Reviewed at https://reviews.imfreedom.org/r/2323/