mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 18:27:35 +00:00
fix build
This commit is contained in:
parent
582c184279
commit
b6c9d7555c
@ -124,9 +124,11 @@ 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] = (gchar*)nsAutoCString(aItem);
|
||||
text[0] = buf;
|
||||
text[1] = (gchar*)NULL;
|
||||
gtk_clist_insert(GTK_CLIST(mCList), (int)aPosition, text);
|
||||
|
||||
@ -134,6 +136,9 @@ 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user