INTEGRATION: CWS fpicker4 (1.6.8); FILE MERGED
2005/07/11 09:40:50 cmc 1.6.8.2: leading slash 2005/06/01 11:05:21 cmc 1.6.8.1: #i44627# UnYield and lock variable
This commit is contained in:
parent
0aece7616a
commit
b3875328d4
1 changed files with 15 additions and 6 deletions
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: SalGtkPicker.cxx,v $
|
||||
*
|
||||
* $Revision: 1.6 $
|
||||
* $Revision: 1.7 $
|
||||
*
|
||||
* last change: $Author: obo $ $Date: 2005-05-03 13:48:23 $
|
||||
* last change: $Author: kz $ $Date: 2005-07-12 11:59:23 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -113,7 +113,7 @@ rtl::OUString SalGtkPicker::uritounicode(const gchar* pIn)
|
|||
{
|
||||
gchar *pEncodedFileName = g_filename_from_uri(pIn, NULL, NULL);
|
||||
rtl::OUString sEncoded(pEncodedFileName, strlen(pEncodedFileName), osl_getThreadTextEncoding());
|
||||
INetURLObject aCurrentURL(OUString::createFromAscii("file:///") + sEncoded);
|
||||
INetURLObject aCurrentURL(OUString::createFromAscii("file://") + sEncoded);
|
||||
aCurrentURL.SetHost(aURL.GetHost());
|
||||
sURL = aCurrentURL.getExternalURL();
|
||||
}
|
||||
|
@ -142,16 +142,25 @@ void RunDialog::run()
|
|||
{
|
||||
mnStatus = gtk_dialog_run( GTK_DIALOG( m_pDialog ) );
|
||||
gtk_widget_hide( m_pDialog );
|
||||
bFinished = true;
|
||||
|
||||
maLock.acquire();
|
||||
mbFinished = true;
|
||||
maLock.release();
|
||||
|
||||
Application::EndYield();
|
||||
}
|
||||
|
||||
gint RunDialog::runandwaitforresult()
|
||||
{
|
||||
g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, (GSourceFunc)rundialog, this, NULL);
|
||||
do {
|
||||
while (1)
|
||||
{
|
||||
maLock.acquire();
|
||||
if (mbFinished)
|
||||
break;
|
||||
maLock.release();
|
||||
Application::Yield();
|
||||
}
|
||||
while (!bFinished);
|
||||
return mnStatus;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue