Mercurial > pidgin.yaz
comparison libpurple/status.c @ 22262:edca47ee06c5
Kill off gc->prpl in the core everywhere but connection.c (when the struct
is hidden, it will exist there and be accessible). While I was here I fixed
some other minor struct member usage along the way, including attention type
stuff I missed when I initially added its new API. I also fixed a couple
initializations that will warn on some strict non-gcc compilers.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Sun, 03 Feb 2008 19:43:41 +0000 |
parents | 944f7ada49e0 |
children | f9cdfdae0594 |
comparison
equal
deleted
inserted
replaced
22261:79b30c9e5937 | 22262:edca47ee06c5 |
---|---|
1308 old_idle, idle); | 1308 old_idle, idle); |
1309 } | 1309 } |
1310 else if (purple_presence_get_context(presence) == PURPLE_PRESENCE_CONTEXT_ACCOUNT) | 1310 else if (purple_presence_get_context(presence) == PURPLE_PRESENCE_CONTEXT_ACCOUNT) |
1311 { | 1311 { |
1312 PurpleAccount *account; | 1312 PurpleAccount *account; |
1313 PurpleConnection *gc; | 1313 PurpleConnection *gc = NULL; |
1314 PurplePlugin *prpl = NULL; | |
1314 PurplePluginProtocolInfo *prpl_info = NULL; | 1315 PurplePluginProtocolInfo *prpl_info = NULL; |
1315 | 1316 |
1316 account = purple_presence_get_account(presence); | 1317 account = purple_presence_get_account(presence); |
1317 | 1318 |
1318 if (purple_prefs_get_bool("/purple/logging/log_system")) | 1319 if (purple_prefs_get_bool("/purple/logging/log_system")) |
1337 } | 1338 } |
1338 } | 1339 } |
1339 | 1340 |
1340 gc = purple_account_get_connection(account); | 1341 gc = purple_account_get_connection(account); |
1341 | 1342 |
1342 if (gc != NULL && PURPLE_CONNECTION_IS_CONNECTED(gc) && | 1343 if(gc) |
1343 gc->prpl != NULL) | 1344 prpl = purple_connection_get_prpl(gc); |
1344 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl); | 1345 |
1346 if(PURPLE_CONNECTION_IS_CONNECTED(gc) && prpl != NULL) | |
1347 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); | |
1345 | 1348 |
1346 if (prpl_info && prpl_info->set_idle) | 1349 if (prpl_info && prpl_info->set_idle) |
1347 prpl_info->set_idle(gc, (idle ? (current_time - idle_time) : 0)); | 1350 prpl_info->set_idle(gc, (idle ? (current_time - idle_time) : 0)); |
1348 } | 1351 } |
1349 } | 1352 } |