pidgin/libpidgin.c

changeset 40312
956745ff3ee8
parent 40222
40f2888f85c1
child 40336
4e766d681de5
equal deleted inserted replaced
40311:b28beec32e25 40312:956745ff3ee8
246 _pidgin_smiley_theme_init(); 246 _pidgin_smiley_theme_init();
247 pidgin_medias_init(); 247 pidgin_medias_init();
248 pidgin_notify_init(); 248 pidgin_notify_init();
249 } 249 }
250 250
251 static GHashTable *ui_info = NULL; 251 static PurpleUiInfo *ui_info = NULL;
252 252
253 static void 253 static void
254 pidgin_quit(void) 254 pidgin_quit(void)
255 { 255 {
256 /* Uninit */ 256 /* Uninit */
267 pidgin_xfers_uninit(); 267 pidgin_xfers_uninit();
268 ui = purple_debug_get_ui(); 268 ui = purple_debug_get_ui();
269 purple_debug_set_ui(NULL); 269 purple_debug_set_ui(NULL);
270 g_object_unref(ui); 270 g_object_unref(ui);
271 271
272 if(NULL != ui_info) 272 g_clear_object(&ui_info);
273 g_hash_table_destroy(ui_info);
274 273
275 /* and end it all... */ 274 /* and end it all... */
276 g_application_quit(g_application_get_default()); 275 g_application_quit(g_application_get_default());
277 } 276 }
278 277
279 static GHashTable *pidgin_ui_get_info(void) 278 static PurpleUiInfo *pidgin_ui_get_info(void)
280 { 279 {
281 if(NULL == ui_info) { 280 if(NULL == ui_info) {
282 ui_info = g_hash_table_new(g_str_hash, g_str_equal); 281 ui_info = purple_ui_info_new(PIDGIN_NAME, VERSION, "https://pidgin.im",
283 282 "https://developer.pidgin.im", "pc");
284 g_hash_table_insert(ui_info, "name", (char*)PIDGIN_NAME);
285 g_hash_table_insert(ui_info, "version", VERSION);
286 g_hash_table_insert(ui_info, "website", "https://pidgin.im");
287 g_hash_table_insert(ui_info, "dev_website", "https://developer.pidgin.im");
288 g_hash_table_insert(ui_info, "client_type", "pc");
289
290 /*
291 * prpl-aim-clientkey is a DevID (or "client key") for Pidgin, given to
292 * us by AOL in September 2016. prpl-icq-clientkey is also a client key
293 * for Pidgin, owned by the AIM account "markdoliner." Please don't use
294 * either for other applications. Instead, you can either not specify a
295 * client key, in which case the default "libpurple" key will be used,
296 * or you can try to register your own at the AIM or ICQ web sites
297 * (although this functionality was removed at some point, it's possible
298 * it has been re-added).
299 */
300 g_hash_table_insert(ui_info, "prpl-aim-clientkey", "do1UCeb5gNqxB1S1");
301 g_hash_table_insert(ui_info, "prpl-icq-clientkey", "ma1cSASNCKFtrdv9");
302
303 /*
304 * prpl-aim-distid is a distID for Pidgin, given to us by AOL in
305 * September 2016. prpl-icq-distid is also a distID for Pidgin, given
306 * to us by AOL. Please don't use either for other applications.
307 * Instead, you can just not specify a distID and libpurple will use a
308 * default.
309 */
310 g_hash_table_insert(ui_info, "prpl-aim-distid", GINT_TO_POINTER(1715));
311 g_hash_table_insert(ui_info, "prpl-icq-distid", GINT_TO_POINTER(1550));
312 } 283 }
313 284
314 return ui_info; 285 return ui_info;
315 } 286 }
316 287
319 pidgin_prefs_init, 290 pidgin_prefs_init,
320 debug_init, 291 debug_init,
321 pidgin_ui_init, 292 pidgin_ui_init,
322 pidgin_quit, 293 pidgin_quit,
323 pidgin_ui_get_info, 294 pidgin_ui_get_info,
324 NULL,
325 NULL,
326 NULL,
327 NULL
328 }; 295 };
329 296
330 static PurpleCoreUiOps * 297 static PurpleCoreUiOps *
331 pidgin_core_get_ui_ops(void) 298 pidgin_core_get_ui_ops(void)
332 { 299 {

mercurial