| 601 break; |
604 break; |
| 602 case PROP_DRAFTING: |
605 case PROP_DRAFTING: |
| 603 purple_conversation_set_drafting(conversation, |
606 purple_conversation_set_drafting(conversation, |
| 604 g_value_get_boolean(value)); |
607 g_value_get_boolean(value)); |
| 605 break; |
608 break; |
| |
609 case PROP_URL: |
| |
610 purple_conversation_set_url(conversation, g_value_get_string(value)); |
| |
611 break; |
| 606 case PROP_ERROR: |
612 case PROP_ERROR: |
| 607 purple_conversation_set_error(conversation, g_value_get_boxed(value)); |
613 purple_conversation_set_error(conversation, g_value_get_boxed(value)); |
| 608 break; |
614 break; |
| 609 default: |
615 default: |
| 610 G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
616 G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
| 738 g_value_set_boolean(value, |
744 g_value_set_boolean(value, |
| 739 purple_conversation_get_drafting(conversation)); |
745 purple_conversation_get_drafting(conversation)); |
| 740 break; |
746 break; |
| 741 case PROP_ERROR: |
747 case PROP_ERROR: |
| 742 g_value_set_boxed(value, purple_conversation_get_error(conversation)); |
748 g_value_set_boxed(value, purple_conversation_get_error(conversation)); |
| |
749 break; |
| |
750 case PROP_URL: |
| |
751 g_value_set_string(value, purple_conversation_get_url(conversation)); |
| 743 break; |
752 break; |
| 744 default: |
753 default: |
| 745 G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
754 G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); |
| 746 break; |
755 break; |
| 747 } |
756 } |
| 815 g_clear_handle_id(&conversation->typing_state_source, g_source_remove); |
824 g_clear_handle_id(&conversation->typing_state_source, g_source_remove); |
| 816 g_clear_pointer(&conversation->last_typing, g_date_time_unref); |
825 g_clear_pointer(&conversation->last_typing, g_date_time_unref); |
| 817 |
826 |
| 818 g_clear_error(&conversation->error); |
827 g_clear_error(&conversation->error); |
| 819 |
828 |
| |
829 g_clear_pointer(&conversation->url, g_free); |
| |
830 |
| 820 G_OBJECT_CLASS(purple_conversation_parent_class)->finalize(object); |
831 G_OBJECT_CLASS(purple_conversation_parent_class)->finalize(object); |
| 821 } |
832 } |
| 822 |
833 |
| 823 static void |
834 static void |
| 824 purple_conversation_class_init(PurpleConversationClass *klass) { |
835 purple_conversation_class_init(PurpleConversationClass *klass) { |
| 1331 * Since: 3.0 |
1342 * Since: 3.0 |
| 1332 */ |
1343 */ |
| 1333 properties[PROP_ERROR] = g_param_spec_boxed( |
1344 properties[PROP_ERROR] = g_param_spec_boxed( |
| 1334 "error", NULL, NULL, |
1345 "error", NULL, NULL, |
| 1335 G_TYPE_ERROR, |
1346 G_TYPE_ERROR, |
| |
1347 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| |
1348 |
| |
1349 /** |
| |
1350 * PurpleConversation:url: |
| |
1351 * |
| |
1352 * A URL related to the conversation. |
| |
1353 * |
| |
1354 * Some networks, notably IRC, allow you to associate a URL with a |
| |
1355 * conversation. In that case, it is generally a URL to get more |
| |
1356 * information about the conversation and not a URL to the conversation |
| |
1357 * itself. |
| |
1358 * |
| |
1359 * Since: 3.0 |
| |
1360 */ |
| |
1361 properties[PROP_URL] = g_param_spec_string( |
| |
1362 "url", NULL, NULL, |
| |
1363 NULL, |
| 1336 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
1364 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
| 1337 |
1365 |
| 1338 g_object_class_install_properties(obj_class, N_PROPERTIES, properties); |
1366 g_object_class_install_properties(obj_class, N_PROPERTIES, properties); |
| 1339 |
1367 |
| 1340 /** |
1368 /** |