summaryrefslogtreecommitdiff
path: root/libpurple/idle.c
Commit message (Collapse)AuthorAgeFilesLines
* Use g_clear_handle_id everywhereElliott Sales de Andrade2023-03-211-9/+3
| | | | | | | Testing Done: Compiled and ran tests in valgrind. Reviewed at https://reviews.imfreedom.org/r/2374/
* Convert idle_time in PurplePresence to GDateTimeGary Kramlich2023-02-201-1/+10
| | | | | | | | | Testing Done: Ran the unit tests and checked a few things in the UI. Noticed that the status time in the buddy list has been broken for some time as well. Bugs closed: PIDGIN-17759 Reviewed at https://reviews.imfreedom.org/r/2235/
* Update libpurple for the deprecations in the account apiGary Kramlich2022-12-141-4/+9
| | | | | | | Testing Done: Compiled and ran the unit tests. Reviewed at https://reviews.imfreedom.org/r/2133/
* Bump C standard to C99 for libpurple files and fix warningsElliott Sales de Andrade2022-12-111-15/+22
| | | | | | | Testing Done: Touched all source files and compiled; saw no new warnings. Reviewed at https://reviews.imfreedom.org/r/2122/
* Add purple_account_manager_get_connected and port libpurple to itGary Kramlich2022-11-041-8/+13
| | | | | | | | | | | | | | | | | | Generally speaking, purple_connections_get_all is used to get a list of accounts that are currently connected and then act upon those accounts. Instead of having a connections API for that, we can just put it into the account manager which can query the accounts it knows about and check if they are connected or not making the account the source of truth for whether it is connected or not. This also has the benefit of treating the connection as just a data object that belongs to the account which feels a lot more natural than the existing API. Testing Done: Ran and let a bonjour account go idle and verified via another instance of pidgin. Reviewed at https://reviews.imfreedom.org/r/2031/
* Remove C99-obsoleted constructsElliott Sales de Andrade2022-10-261-3/+3
| | | | | | | | | See [this development thread for a future Fedora change](https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/CJXKTLXJUPZ4F2C2VQOTNMEA5JAUPMBD/) or [the proposed change page](https://fedoraproject.org/wiki/Changes/PortingToModernC). These may be made stronger errors in GCC 14. Testing Done: Configured with `-Dc_args='-Werror=implicit-int -Werror=implicit-function-declaration -Werror=int-conversion -Werror=strict-prototypes -Werror=old-style-definition'` and compiled. Reviewed at https://reviews.imfreedom.org/r/1974/
* Replace PURPLE_CALLBACK by G_CALLBACKElliott Sales de Andrade2022-03-251-3/+3
| | | | | | | | | Another straight search-and-replace for 'easy' review. Testing Done: Compile only. Reviewed at https://reviews.imfreedom.org/r/1371/
* Check that we have a PurpleIdleUi if we weren't passed nullGary Kramlich2021-11-021-0/+2
| | | | | | | Testing Done: Ran a simple python test program to verify that this was working properly. Reviewed at https://reviews.imfreedom.org/r/1120/
* Now that the History API is here, remove the purple logging apiGary Kramlich2021-10-231-1/+1
| | | | | | | Testing Done: Sent ims in both pidgin3 and finch3, also joined a chat in pidgin3 and verified that the preferences window is okay. Reviewed at https://reviews.imfreedom.org/r/1077/
* Replace PurpleIdleUiOps with the PurpleIdleUi InterfaceGary Kramlich2021-10-221-58/+37
| | | | | | | | | | | | | | | This continues our path down replacing the UiOps with Interfaces so that developers can write user interfaces in other languages using gobject introspection. Testing Done: Ran pidgin3 and set it to auto idle after 1 minute of system idle time. This attempted to query xscreen saver, but something didn't work there, but that's been happening before this change. Not sure if it's my system or the code just needs fixing. Ran finch3 set idle time to 1 minute and verified that it set me to away after that minute. I also used the libpurple idle time for both pidgin3 and finch3 and verified they continued to work as well. Reviewed at https://reviews.imfreedom.org/r/1091/
* Make sure that internal.h can only be included by libpurple and split out ↵Gary Kramlich2020-05-011-1/+0
| | | | some pieces to purpleprivate.h
* Remove purple_timeout_* function usageMike Ruprecht2017-06-151-6/+6
| | | | | | | | | | | | Now that the purple_timeout_* functions internally just use their GLib equivalents, we can just replace them with the GLib equivalents. This patch replaces purple_timeout_* functions with g_timeout_add{_seconds}() and g_source_remove() functions. There are probably places in this which could use g_timeout_add_full() or g_idle_add{_full}(), but this was a straight replacement to keep the functionality identical for now. Further patches can update to use these instead if desired.
* Switch sent-im-msg to PurpleMessageTomasz Wasilczyk2014-05-221-2/+1
|
* Use g_free as UiOps structures GBoxed free functionAnkit Vani2014-02-231-9/+1
|
* Box the *UiOps structuresAnkit Vani2014-02-151-0/+35
|
* Merged default branchAnkit Vani2014-02-081-2/+1
|\
| * Fix some clang static analysis warningsTomasz Wasilczyk2014-02-081-2/+1
| |
* | Fix some gtk-doc warnings till proxy.cAnkit Vani2014-02-051-1/+1
|/
* Adjust some idle handling code to fix "wedging" idle reporting into neverPaul Aurich2009-04-281-2/+1
| | | | | | | reporting idle properly until restarting Pidgin. Fixes #2002. committer: John Bailey <rekkanoryo@rekkanoryo.org>
* Remove trailing whitespaceMark Doliner2009-01-261-1/+1
|
* Patch from Paul Aurich to add purple_strequal to help readability and ↵Paul Aurich2009-01-061-2/+2
| | | | | | | | | | simplicity of code. Ie, don't need to negate the value of strcmp, since this does a strcmp and does the negation for us closes #7790 committer: Gary Kramlich <grim@reaperworld.com>
* applied changes from 7f7111ed9e5924db9e740ad354fce8fb82445b1eStu Tomlinson2008-06-261-1/+1
| | | | through 7d9bc7a7d232a2b83e7923d0d5d20be09ed1fc5c
* Don't try to tell the IM network that we're not idle when we disconnect.Mark Doliner2008-05-021-1/+1
| | | | | | | | This was causing a crash for me in silc when I got disconnected while idle. I'm not really sure why we would want to do this... the commit message was "A patch from Kevin Stange that should fix some idleness problems with MSN and Yahoo" but I couldn't find any more info about that.
* Change some g_idle_add(...) calls in libpurple to purple_timeout_add(0, ...)Mark Doliner2008-01-271-1/+2
| | | | | | We need to use the purple functions here so we can hook into mainloops other than gtk, which is important for Adium. Felipe pointed out the call in msnp9 and grep found the others.
* Squash some compiler warnings, some from my -Wstrict-prototypes fixing.Richard Laager2008-01-051-3/+3
|
* Probe for -Wstrict-prototypes to get some more warnings. I then cleaned upRichard Laager2008-01-031-2/+2
| | | | | the existing warnings. I removed a handful of dead code and cleaned up a couple of things that I stumbled across.
* The FSF changed its address a while ago; our files were out of date.John Bailey2007-09-081-1/+1
| | | | This is a quick update done with a for loop, find, and sed.
* Prevent recursive idle handling loop. Patch from 'Gambit'Sean Egan2007-08-231-1/+1
|
* Fix idle reporting as discussed on devel@. Poll as needed when we're not ↵Sean Egan2007-07-271-13/+11
| | | | idle, and poll frequently (once every three seconds) when we are. Fixes #1357
* propagate from branch 'im.pidgin.pidgin.2.1.0' (head ↵Richard Laager2007-06-161-1/+12
|\ | | | | | | | | | | bcf28ef7e8ff6bb7068d4f7f8f99127f0584b1c8) to branch 'im.pidgin.pidgin' (head 96acb4938782ddaddd8adb0a53d40606a935350b)
| * propagate from branch 'im.pidgin.pidgin.2.1.0' (head ↵Sean Egan2007-06-151-4/+10
| |\ | | | | | | | | | | | | | | | 6733196cafc60146d92a26565e0d90bd8b43a9ef) to branch 'im.pidgin.pidgin' (head ed70e92f7c284be8ef382ca84a3b1a8780566bc3)
| * | I think this will fix the problem that elb had where bonjour (and probably ↵Daniel Atallah2007-06-141-1/+12
| | | | | | | | | | | | other accounts too) were signing on initially when -n was specified.
* | | disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'Richard Laager2007-06-161-1/+1
| |/ |/|
* | Mark the return type const for the following functions. I noticed thisRichard Laager2007-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | while fixing some DBus stuff which I'll commit shortly. * purple_accounts_get_all * purple_connections_get_all * purple_connections_get_connecting * purple_conv_chat_get_ignored * purple_conv_chat_get_users * purple_get_chats * purple_get_conversations * purple_get_ims * purple_notify_user_info_get_entries References #1344
* | propagate from branch 'im.pidgin.pidgin' (head ↵Sean Egan2007-06-061-15/+10
|\ \ | |/ | | | | | | | | 89da87084d2f27221621342ad69d332928ca9776) to branch 'im.pidgin.pidgin.2.1.0' (head 93a1d66584460b25bf821e672da3a701475b0257)
| * Clean up the idle checking callback slightly.Daniel Atallah2007-06-041-15/+10
| |
* | propagate from branch 'im.pidgin.pidgin' (head ↵Sadrul Habib Chowdhury2007-06-041-1/+1
|\ \ | |/ | | | | | | | | 1b4384bff09a39fca58692fb6c929d4fe1276022) to branch 'im.pidgin.pidgin.2.1.0' (head 87d9a86cb4772b40899a0ff82641fb2a902d95d7)
| * Compiler be quiet! Fixes this compile warning:Stu Tomlinson2007-06-031-1/+1
| | | | | | | | | | idle.c: In function 'check_idleness': idle.c:124: warning: 'idle_recheck_interval' may be used uninitialized in this function
* | propagate from branch 'im.pidgin.rlaager.merging.for_2_1_0' (head ↵Richard Laager2007-05-281-3/+2
|\ \ | |/ | | | | | | | | af151ffded48eeaac25f2a2d53905e047a0ab976) to branch 'im.pidgin.pidgin.2.1.0' (head 5e73968467e0f7dccee54579a2c5f01828d1baaf)
| * Update a comment: We don't check idle status every 5 seconds any more.v2.0.1Richard Laager2007-05-251-3/+2
| | | | | | | | Fixes #1113
* | propagate from branch 'im.pidgin.pidgin' (head ↵Richard Laager2007-05-201-3/+9
|\ \ | |/ |/| | | | | | | 3ab33b0a5f5b9e8e9a33c7b3a2a08caa1e23991f) to branch 'im.pidgin.rlaager.merging.for_2_1_0' (head 19445f54b52e03ebb431e3b21764471df88b6db2)
| * Raise the timeouts one second so they'll work every time (for certain) withRichard Laager2007-05-201-3/+9
| | | | | | | | | | | | g_timeout_add_seconds(), which is documented as, "To allow this grouping, the interval to the first timer is rounded and can deviate up to one second from the specified interval."
| * merge of '1442df274a24edc9a31194327bd00dfbcf478720'Richard Laager2007-05-191-2/+2
| | | | | | | | and 'ce02548a6b6a545d97fb3f371506bcf1b5cc5131'
* | Fix an infinite loop at startup for finch. Thanks to Bleeter for noticing this.Sadrul Habib Chowdhury2007-05-201-1/+1
|/
* Add a missing semi-colon so this will compile.Richard Laager2007-05-191-1/+1
|
* When using Purple idle, don't run a timer at all when idleaway. When usingRichard Laager2007-05-191-9/+55
| | | | system idle, check every 60 seconds.
* Move the time_until_next_idle_event < 0 check to clarify.Richard Laager2007-05-191-4/+6
|
* Remove dead code.Richard Laager2007-05-191-3/+1
|
* Run the first timer at IDLEMARK + 1, to ensure we don't hit it right on ↵Richard Laager2007-05-141-1/+1
| | | | IDLEMARK.
* Fix a typo.Richard Laager2007-05-141-1/+1
|