summaryrefslogtreecommitdiff
path: root/padmin
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2010-01-14 19:11:13 +0100
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2010-01-14 19:11:13 +0100
commit0dc15d0bc9adb9dcd2a1a5deea3f952b8a4e6689 (patch)
tree1fe24b3ce25cdfece23f43d4663f1adff67b6a1d /padmin
parent64e8661d76db6b02396d82b7d1f28dd3088a334f (diff)
parent8765a3bf9f2926a50d0f644e4263782269abe023 (diff)
rebase to DEV300_m69
Diffstat (limited to 'padmin')
-rw-r--r--padmin/source/adddlg.cxx2
-rw-r--r--padmin/source/cmddlg.cxx54
-rw-r--r--padmin/source/padialog.cxx2
3 files changed, 31 insertions, 27 deletions
diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx
index 052de2cbb731..58c37dcffa83 100644
--- a/padmin/source/adddlg.cxx
+++ b/padmin/source/adddlg.cxx
@@ -807,7 +807,7 @@ AddPrinterDialog::~AddPrinterDialog()
void AddPrinterDialog::updateSettings()
{
- if( ! GetDisplayBackground().GetColor().IsDark() )
+ if( ! GetSettings().GetStyleSettings().GetHighContrastMode() )
m_aTitleImage.SetImage( Image( BitmapEx( PaResId( RID_BMP_PRINTER ) ) ) );
else
m_aTitleImage.SetImage( Image( BitmapEx( PaResId( RID_BMP_PRINTER_HC ) ) ) );
diff --git a/padmin/source/cmddlg.cxx b/padmin/source/cmddlg.cxx
index 9aa65c8ce204..c6daf547369c 100644
--- a/padmin/source/cmddlg.cxx
+++ b/padmin/source/cmddlg.cxx
@@ -79,20 +79,22 @@ void CommandStore::getSystemPdfCommands( ::std::list< String >& rCommands )
pPipe = popen( "which gs 2>/dev/null", "r" );
if( pPipe )
{
- fgets( pBuffer, sizeof( pBuffer ), pPipe );
- int nLen = strlen( pBuffer );
- if( pBuffer[nLen-1] == '\n' ) // strip newline
- pBuffer[--nLen] = 0;
- aCommand = String( ByteString( pBuffer ), aEncoding );
- if( ( ( aCommand.GetChar( 0 ) == '/' )
- || ( aCommand.GetChar( 0 ) == '.' && aCommand.GetChar( 1 ) == '/' )
- || ( aCommand.GetChar( 0 ) == '.' && aCommand.GetChar( 1 ) == '.' && aCommand.GetChar( 2 ) == '/' ) )
- && nLen > 2
- && aCommand.GetChar( nLen-2 ) == 'g'
- && aCommand.GetChar( nLen-1 ) == 's' )
+ if (fgets( pBuffer, sizeof( pBuffer ), pPipe ) != NULL)
{
- aCommand.AppendAscii( " -q -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=\"(OUTFILE)\" -" );
- aSysCommands.push_back( aCommand );
+ int nLen = strlen( pBuffer );
+ if( pBuffer[nLen-1] == '\n' ) // strip newline
+ pBuffer[--nLen] = 0;
+ aCommand = String( ByteString( pBuffer ), aEncoding );
+ if( ( ( aCommand.GetChar( 0 ) == '/' )
+ || ( aCommand.GetChar( 0 ) == '.' && aCommand.GetChar( 1 ) == '/' )
+ || ( aCommand.GetChar( 0 ) == '.' && aCommand.GetChar( 1 ) == '.' && aCommand.GetChar( 2 ) == '/' ) )
+ && nLen > 2
+ && aCommand.GetChar( nLen-2 ) == 'g'
+ && aCommand.GetChar( nLen-1 ) == 's' )
+ {
+ aCommand.AppendAscii( " -q -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=\"(OUTFILE)\" -" );
+ aSysCommands.push_back( aCommand );
+ }
}
pclose( pPipe );
}
@@ -100,19 +102,21 @@ void CommandStore::getSystemPdfCommands( ::std::list< String >& rCommands )
pPipe = popen( "which distill 2>/dev/null", "r" );
if( pPipe )
{
- fgets( pBuffer, sizeof( pBuffer ), pPipe );
- int nLen = strlen( pBuffer );
- if( pBuffer[nLen-1] == '\n' ) // strip newline
- pBuffer[--nLen] = 0;
- aCommand = String( ByteString( pBuffer ), aEncoding );
- if( ( ( aCommand.GetChar( 0 ) == '/' )
- || ( aCommand.GetChar( 0 ) == '.' && aCommand.GetChar( 1 ) == '/' )
- || ( aCommand.GetChar( 0 ) == '.' && aCommand.GetChar( 1 ) == '.' && aCommand.GetChar( 2 ) == '/' ) )
- && nLen > 7
- && aCommand.Copy( nLen - 8 ).EqualsAscii( "/distill" ) )
+ if (fgets( pBuffer, sizeof( pBuffer ), pPipe ) != NULL)
{
- aCommand.AppendAscii( " (TMP) ; mv `echo (TMP) | sed s/\\.ps\\$/.pdf/` \"(OUTFILE)\"" );
- aSysCommands.push_back( aCommand );
+ int nLen = strlen( pBuffer );
+ if( pBuffer[nLen-1] == '\n' ) // strip newline
+ pBuffer[--nLen] = 0;
+ aCommand = String( ByteString( pBuffer ), aEncoding );
+ if( ( ( aCommand.GetChar( 0 ) == '/' )
+ || ( aCommand.GetChar( 0 ) == '.' && aCommand.GetChar( 1 ) == '/' )
+ || ( aCommand.GetChar( 0 ) == '.' && aCommand.GetChar( 1 ) == '.' && aCommand.GetChar( 2 ) == '/' ) )
+ && nLen > 7
+ && aCommand.Copy( nLen - 8 ).EqualsAscii( "/distill" ) )
+ {
+ aCommand.AppendAscii( " (TMP) ; mv `echo (TMP) | sed s/\\.ps\\$/.pdf/` \"(OUTFILE)\"" );
+ aSysCommands.push_back( aCommand );
+ }
}
pclose( pPipe );
}
diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx
index d1d36fade717..5a6a1d0e319e 100644
--- a/padmin/source/padialog.cxx
+++ b/padmin/source/padialog.cxx
@@ -110,7 +110,7 @@ PADialog::PADialog( Window* pParent, BOOL /*bAdmin*/ ) :
void PADialog::updateSettings()
{
- if( ! GetDisplayBackground().GetColor().IsDark() )
+ if( ! GetSettings().GetStyleSettings().GetHighContrastMode() )
{
m_aPrinterImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_PRINTER ) ) );
m_aFaxImg = Image( BitmapEx( PaResId( RID_BMP_SMALL_FAX ) ) );