Commit fef2dec3 authored by Travis Reitter's avatar Travis Reitter

Add 'dup' to the names of empathy_contact_from_folks_individual() and...

Add 'dup' to the names of empathy_contact_from_folks_individual() and folks_individual_from_empathy_contact() to make it clear that the return value has been referenced.
parent 571d3f81
......@@ -579,7 +579,7 @@ contact_widget_cell_toggled (GtkCellRendererToggle *cell,
if (group != NULL)
{
FolksIndividual *individual = folks_individual_from_empathy_contact (
FolksIndividual *individual = folks_individual_dup_from_empathy_contact (
information->contact);
if (individual != NULL)
......@@ -809,7 +809,7 @@ contact_widget_button_group_clicked_cb (GtkButton *button,
COL_ENABLED, TRUE,
-1);
individual = folks_individual_from_empathy_contact (information->contact);
individual = folks_individual_dup_from_empathy_contact (information->contact);
if (individual != NULL)
{
......@@ -1337,8 +1337,8 @@ contact_widget_entry_alias_focus_event_cb (GtkEditable *editable,
}
else
{
FolksIndividual *individual = folks_individual_from_empathy_contact (
information->contact);
FolksIndividual *individual =
folks_individual_dup_from_empathy_contact (information->contact);
if (individual != NULL)
{
......@@ -1535,8 +1535,8 @@ contact_widget_contact_update (EmpathyContactWidget *information)
if (information->flags & EMPATHY_CONTACT_WIDGET_EDIT_FAVOURITE)
{
FolksIndividual *individual = folks_individual_from_empathy_contact (
information->contact);
FolksIndividual *individual =
folks_individual_dup_from_empathy_contact (information->contact);
if (individual != NULL)
{
......@@ -1672,7 +1672,7 @@ static void
favourite_toggled_cb (GtkToggleButton *button,
EmpathyContactWidget *information)
{
FolksIndividual *individual = folks_individual_from_empathy_contact (
FolksIndividual *individual = folks_individual_dup_from_empathy_contact (
information->contact);
if (individual != NULL)
......
......@@ -125,7 +125,7 @@ empathy_new_individual_dialog_show_with_individual (GtkWindow *parent,
/* Contact info widget */
if (FOLKS_IS_INDIVIDUAL (individual))
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
contact_widget = empathy_contact_widget_new (contact,
EMPATHY_CONTACT_WIDGET_EDIT_ALIAS |
......
......@@ -191,7 +191,7 @@ empathy_individual_add_menu_item_new (FolksIndividual *individual)
}
manager = empathy_individual_manager_dup_singleton ();
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
connection = empathy_contact_get_connection (contact);
flags = empathy_individual_manager_get_flags_for_connection (manager,
......@@ -244,7 +244,7 @@ empathy_individual_chat_menu_item_activated (GtkMenuItem *item,
{
EmpathyContact *contact;
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_return_if_fail (EMPATHY_IS_CONTACT (contact));
......@@ -283,7 +283,7 @@ empathy_individual_audio_call_menu_item_activated (GtkMenuItem *item,
EmpathyContact *contact;
EmpathyCallFactory *factory;
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_return_if_fail (EMPATHY_IS_CONTACT (contact));
......@@ -302,7 +302,7 @@ empathy_individual_audio_call_menu_item_new (FolksIndividual *individual)
g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
......@@ -328,7 +328,7 @@ empathy_individual_video_call_menu_item_activated (GtkMenuItem *item,
EmpathyContact *contact;
EmpathyCallFactory *factory;
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_return_if_fail (EMPATHY_IS_CONTACT (contact));
......@@ -347,7 +347,7 @@ empathy_individual_video_call_menu_item_new (FolksIndividual *individual)
g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
......@@ -372,7 +372,7 @@ individual_log_menu_item_activate_cb (FolksIndividual *individual)
{
EmpathyContact *contact;
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_return_if_fail (EMPATHY_IS_CONTACT (contact));
......@@ -391,7 +391,7 @@ empathy_individual_log_menu_item_new (FolksIndividual *individual)
g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
......@@ -420,7 +420,7 @@ individual_file_transfer_menu_item_activate_cb (FolksIndividual *individual)
{
EmpathyContact *contact;
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_return_if_fail (EMPATHY_IS_CONTACT (contact));
......@@ -438,7 +438,7 @@ empathy_individual_file_transfer_menu_item_new (FolksIndividual *individual)
g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
......@@ -462,7 +462,7 @@ individual_share_my_desktop_menu_item_activate_cb (FolksIndividual *individual)
{
EmpathyContact *contact;
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_return_if_fail (EMPATHY_IS_CONTACT (contact));
......@@ -481,7 +481,7 @@ empathy_individual_share_my_desktop_menu_item_new (FolksIndividual *individual)
g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
......@@ -530,7 +530,7 @@ individual_info_menu_item_activate_cb (FolksIndividual *individual)
{
EmpathyContact *contact;
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
empathy_contact_information_dialog_show (contact, NULL);
}
......@@ -562,7 +562,7 @@ individual_edit_menu_item_activate_cb (FolksIndividual *individual)
{
EmpathyContact *contact;
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
empathy_contact_edit_dialog_show (contact, NULL);
}
......@@ -577,7 +577,7 @@ empathy_individual_edit_menu_item_new (FolksIndividual *individual)
g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
......@@ -653,7 +653,7 @@ room_sub_menu_activate_cb (GtkWidget *item,
return;
}
contact = empathy_contact_from_folks_individual (data->individual);
contact = empathy_contact_dup_from_folks_individual (data->individual);
g_return_if_fail (EMPATHY_IS_CONTACT (contact));
......@@ -693,7 +693,7 @@ empathy_individual_invite_menu_item_new (FolksIndividual *individual)
g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
......
......@@ -371,7 +371,7 @@ individual_store_add_individual (EmpathyIndividualStore *self,
}
manager = empathy_individual_manager_dup_singleton ();
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
connection = empathy_contact_get_connection (contact);
flags = empathy_individual_manager_get_flags_for_connection (manager,
connection);
......@@ -1799,7 +1799,7 @@ individual_store_get_individual_status_icon_with_icon_name (
show_protocols_here = priv->show_protocols && (contact_count == 1);
if (show_protocols_here)
{
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
protocol_name = empathy_protocol_name_for_contact (contact);
icon_name = g_strdup_printf ("%s-%s", status_icon_name, protocol_name);
}
......
......@@ -296,7 +296,7 @@ individual_view_query_tooltip_cb (EmpathyIndividualView *view,
goto OUT;
}
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
g_object_unref (individual);
if (contact == NULL)
......@@ -484,7 +484,7 @@ individual_view_file_drag_received (GtkWidget *view,
return FALSE;
}
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
empathy_send_file_from_uri_list (contact, sel_data);
g_object_unref (individual);
......@@ -897,7 +897,7 @@ individual_view_row_activated (GtkTreeView *view,
if (!individual)
return;
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
if (contact != NULL)
{
......
......@@ -597,7 +597,7 @@ empathy_folks_individual_contains_contact (FolksIndividual *individual)
* within the given Individual. Note that this is a temporary convenience. See
* the TODO above. */
EmpathyContact *
empathy_contact_from_folks_individual (FolksIndividual *individual)
empathy_contact_dup_from_folks_individual (FolksIndividual *individual)
{
GList *personas, *l;
EmpathyContact *contact = NULL;
......@@ -627,7 +627,7 @@ empathy_contact_from_folks_individual (FolksIndividual *individual)
* given EmpathyContact. Note that this is a temporary convenience. See
* the TODO above. */
FolksIndividual *
folks_individual_from_empathy_contact (EmpathyContact *contact)
folks_individual_dup_from_empathy_contact (EmpathyContact *contact)
{
EmpathyIndividualManager *manager;
FolksIndividual *individual = NULL;
......@@ -639,7 +639,7 @@ folks_individual_from_empathy_contact (EmpathyContact *contact)
for (l = individuals; (l != NULL) && (individual == NULL); l = l->next)
{
FolksIndividual *i = FOLKS_INDIVIDUAL (l->data);
EmpathyContact *c = empathy_contact_from_folks_individual (i);
EmpathyContact *c = empathy_contact_dup_from_folks_individual (i);
if (c == contact)
individual = g_object_ref (i);
......
......@@ -92,8 +92,8 @@ void empathy_connect_new_account (TpAccount *account,
TpConnectionPresenceType empathy_folks_presence_type_to_tp (FolksPresenceType type);
gboolean empathy_folks_individual_contains_contact (FolksIndividual *individual);
EmpathyContact * empathy_contact_from_folks_individual (FolksIndividual *individual);
FolksIndividual *folks_individual_from_empathy_contact (EmpathyContact *contact);
EmpathyContact * empathy_contact_dup_from_folks_individual (FolksIndividual *individual);
FolksIndividual *folks_individual_dup_from_empathy_contact (EmpathyContact *contact);
G_END_DECLS
......
......@@ -187,7 +187,7 @@ main_window_flash_foreach (GtkTreeModel *model,
if (individual == NULL)
return FALSE;
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
if (contact != data->event->contact) {
if (contact != NULL) {
g_object_unref (contact);
......@@ -329,7 +329,7 @@ main_window_row_activated_cb (EmpathyContactListView *view,
-1);
if (individual != NULL) {
contact = empathy_contact_from_folks_individual (individual);
contact = empathy_contact_dup_from_folks_individual (individual);
}
if (!contact) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment