Fixing some compile errors due to changes in nsString

PHOTON ONLY
r=michael.kedl
This commit is contained in:
Jerry.Kirk%Nexwarecorp.com 2000-05-04 00:59:14 +00:00
Родитель e760a6c370
Коммит 4c44433f39
5 изменённых файлов: 22 добавлений и 17 удалений

Просмотреть файл

@ -104,7 +104,7 @@ PRBool nsFileWidget::Show()
for(i=0; i<(mNumberOfFilters-1); i++)
{
mFilterList.Append(mFilters[i]);
mFilterList.Append(";");
mFilterList.AppendWithConversion(";");
}
mFilterList.Append(mFilters[i]); /* Add the last one */
@ -123,7 +123,7 @@ PRBool nsFileWidget::Show()
if (info.ret == Pt_FSDIALOG_BTN1)
{
mSelectedFile.SetLength(0);
mSelectedFile.Append(info.path);
mSelectedFile.AppendWithConversion(info.path);
char *str = mSelectedFile.ToNewCString();
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsFileWidget::Create Success from PtFileSelection str=<%s>\n", str));
@ -221,7 +221,7 @@ NS_METHOD nsFileWidget::SetDisplayDirectory(const nsFileSpec & aDirectory)
{
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsFileWidget::SetDisplayDirectory to <%s> - Not Implemented\n", aDirectory.GetCString()));
mDisplayDirectory = aDirectory;
mDisplayDirectory = (const PRUnichar *) aDirectory.GetCString(); /* LEAK? */
return NS_OK;
}

Просмотреть файл

@ -166,7 +166,7 @@ static FontInfo * GetFontInfo(nsVoidArray * aFontList, char * aName)
{
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsFontRetrieverService::GetFontInfo\n"));
nsAutoString name(aName);
nsAutoString name((const PRUnichar *) aName, strlen(aName) );
PRInt32 i;
PRInt32 cnt = aFontList->Count();
for (i=0;i<cnt;i++) {
@ -177,7 +177,7 @@ static FontInfo * GetFontInfo(nsVoidArray * aFontList, char * aName)
}
FontInfo * fontInfo = new FontInfo();
fontInfo->mName = aName;
fontInfo->mName = nsString( (const PRUnichar *) aName, strlen(aName));
printf("nsFontRetrieverService::GetFontInfo Adding [%s]\n", aName);fflush(stdout);
fontInfo->mIsScalable = PR_FALSE; // X fonts aren't scalable right??
fontInfo->mSizes = nsnull;

Просмотреть файл

@ -74,7 +74,7 @@ NS_METHOD nsTextHelper::GetText(nsString& aTextBuffer, PRUint32 aBufferSize, PR
PtGetResources(mWidget, 1, arg);
aTextBuffer.SetLength(0);
aTextBuffer.Append(string);
aTextBuffer.AppendWithConversion(string);
aActualSize = aTextBuffer.Length();
}

Просмотреть файл

@ -1464,9 +1464,11 @@ PRBool nsWidget::DispatchStandardEvent(PRUint32 aMsg)
NS_IMETHODIMP nsWidget::DispatchEvent(nsGUIEvent *aEvent,
nsEventStatus &aStatus)
{
#if 0
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWidget::DispatchEvent this=<%p> widget=<%p> eventType=<%d> message=<%d> <%s>\n",
this, aEvent->widget, aEvent->eventStructType, aEvent->message,
(const char *) nsCAutoString(GuiEventToString(aEvent)) ));
#endif
/* Stolen from GTK */
@ -1965,9 +1967,11 @@ PRBool nsWidget::HandleEvent( PtCallbackInfo_t* aCbInfo )
//printf("nsWidget::HandleEvent entering this=<%p> mWidget=<%p> Event Consumed=<%d> Event=<%s>\n",
// this, mWidget, (event->processing_flags & Ph_CONSUMED), (const char *) nsCAutoString(PhotonEventToString(event)) );
#if 0
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWidget::HandleEvent entering this=<%p> mWidget=<%p> Event Consumed=<%d> Event=<%s>\n",
this, mWidget, (event->processing_flags & Ph_CONSUMED), (const char *) nsCAutoString(PhotonEventToString(event)) ));
this, mWidget, (event->processing_flags & Ph_CONSUMED), (const char *) nsCAutoString( (const PRUnichar *) PhotonEventToString(event)) ));
#endif
/* Photon 2 added a Consumed flag which indicates a previous receiver of the */
/* event has processed it */
@ -2655,10 +2659,10 @@ nsAutoString nsWidget::GuiEventToString(nsGUIEvent * aGuiEvent)
{
NS_ASSERTION(nsnull != aGuiEvent,"cmon, null gui event.");
nsAutoString eventName = "UNKNOWN";
nsAutoString eventName = (const PRUnichar *) "UNKNOWN";
#define _ASSIGN_eventName(_value,_name)\
case _value: eventName = _name ; break
case _value: eventName = (const PRUnichar *) _name ; break
switch(aGuiEvent->message)
{
@ -2725,7 +2729,7 @@ case _value: eventName = _name ; break
sprintf(buf,"UNKNOWN: %d",aGuiEvent->message);
eventName = buf;
eventName = (const PRUnichar *) buf;
}
break;
}
@ -2739,10 +2743,10 @@ nsAutoString nsWidget::PhotonEventToString(PhEvent_t * aPhEvent)
{
NS_ASSERTION(nsnull != aPhEvent,"cmon, null photon gui event.");
nsAutoString eventName = "UNKNOWN";
nsAutoString eventName = (const PRUnichar *) "UNKNOWN";
#define _ASSIGN_eventName(_value,_name)\
case _value: eventName = _name ; break
case _value: eventName = (const PRUnichar *) _name ; break
switch ( aPhEvent->type )
{
@ -2764,7 +2768,7 @@ case _value: eventName = _name ; break
sprintf(buf,"UNKNOWN: %d",aPhEvent->type);
eventName = buf;
eventName = (const PRUnichar *) buf;
}
break;
}

Просмотреть файл

@ -2682,7 +2682,7 @@ int nsWindow::MenuRegionCallback( PtWidget_t *widget, void *data, PtCallbackInfo
widget = widget, data = data, cbinfo = cbinfo;
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWindow::MenuRegionCallback this=<%p> widget=<%p> apinfo=<%p> mMenuRegion=<%p>\n", pWin, widget, data, pWin->mMenuRegion));
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWindow::MenuRegionCallback this=<%p> widget=<%p> apinfo=<%p> pWin2=<%p> EventName=<%s>\n", pWin, widget, data, pWin2, (const char *) nsCAutoString(PhotonEventToString(event)) ));
// PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWindow::MenuRegionCallback this=<%p> widget=<%p> apinfo=<%p> pWin2=<%p> EventName=<%s>\n", pWin, widget, data, pWin2, (const char *) nsCAutoString(PhotonEventToString(event), strlen(PhotonEventToString(event)) ) ));
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWindow::MenuRegionCallback cbinfo->reason=<%d>\n", cbinfo->reason));
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWindow::MenuRegionCallback cbinfo->subtype=<%d>\n", cbinfo->reason_subtype));
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWindow::MenuRegionCallback cbinfo->cbdata=<%d>\n", cbinfo->cbdata));
@ -2786,9 +2786,10 @@ int nsWindow::PopupMenuRegionCallback( PtWidget_t *widget, void *data, PtCallbac
widget = widget, data = data, cbinfo = cbinfo;
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWindow::PopupMenuRegionCallback this=<%p> widget=<%p> data=<%p> mMenuRegion=<%p>\n", pWin, widget, data, pWin->mMenuRegion));
printf("nsWindow::PopupMenuRegionCallback this=<%p> widget=<%p> data=<%p> mMenuRegion=<%p> EventName=<%s>\n", pWin, widget, data, pWin->mMenuRegion, (const char *) nsCAutoString(PhotonEventToString(event)) );
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWindow::PMenuRegionCallback this=<%p> widget=<%p> data=<%p> pWin2=<%p> EventName=<%s>\n", pWin, widget, data, pWin2, (const char *) nsCAutoString(PhotonEventToString(event)) ));
// printf("nsWindow::PopupMenuRegionCallback this=<%p> widget=<%p> data=<%p> mMenuRegion=<%p> EventName=<%s>\n", pWin, widget, data, pWin->mMenuRegion, (const char *) nsCAutoString(PhotonEventToString(event), strlen(PhotonEventToString(event) ));
// PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWindow::PMenuRegionCallback this=<%p> widget=<%p> data=<%p> pWin2=<%p> EventName=<%s>\n", pWin, widget, data, pWin2, (const char *) nsCAutoString(PhotonEventToString(event)) ));
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWindow::PMenuRegionCallback cbinfo->reason=<%d>\n", cbinfo->reason));
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWindow::PMenuRegionCallback cbinfo->subtype=<%d>\n", cbinfo->reason_subtype));
PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsWindow::PMenuRegionCallback cbinfo->cbdata=<%d>\n", cbinfo->cbdata));