зеркало из https://github.com/mozilla/pjs.git
real fix for bug #7468 from Tomi Leppikangas <tomilepp@ousrvr2.oulu.fi>
This commit is contained in:
Родитель
3db78cc9b8
Коммит
562eebf4c7
|
@ -119,11 +119,10 @@ NS_METHOD nsListBox::SetMultipleSelection(PRBool aMultipleSelections)
|
|||
|
||||
NS_METHOD nsListBox::AddItemAt(nsString &aItem, PRInt32 aPosition)
|
||||
{
|
||||
gchar *buf = aItem.ToNewCString();
|
||||
|
||||
if (mCList) {
|
||||
gchar *text[2];
|
||||
text[0] = buf;
|
||||
const nsAutoCString tempStr(aItem);
|
||||
text[0] = (gchar*)(const char *)tempStr;
|
||||
text[1] = (gchar*)NULL;
|
||||
gtk_clist_insert(GTK_CLIST(mCList), (int)aPosition, text);
|
||||
|
||||
|
@ -131,8 +130,6 @@ NS_METHOD nsListBox::AddItemAt(nsString &aItem, PRInt32 aPosition)
|
|||
// store in the row data.
|
||||
gtk_clist_set_row_data(GTK_CLIST(mCList), aPosition, (gpointer)&aItem);
|
||||
}
|
||||
|
||||
delete [] buf;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче