Fixed setting the phone number when writing a message

This commit is contained in:
Pierre Pronchery 2010-09-15 01:43:35 +00:00
parent 7907bd919d
commit ff8b5f77bd

View File

@ -2344,12 +2344,14 @@ void phone_show_write(Phone * phone, gboolean show, ...)
phone_write_count_buffer(phone);
}
if(number != NULL)
gtk_label_set_text(GTK_LABEL(phone->wr_entry), number);
gtk_entry_set_text(GTK_ENTRY(phone->wr_entry), number);
if(content != NULL)
{
tbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(phone->wr_view));
gtk_text_buffer_set_text(tbuf, content, -1);
}
gtk_widget_grab_focus((number == NULL || number[0] == '\0')
? phone->wr_entry : phone->wr_view);
gtk_window_present(GTK_WINDOW(phone->wr_window));
}