@ -222,40 +222,40 @@ CreateChecksumDlg::CreateChecksumDlg(const TQStringList& files, bool containFold
return ;
return ;
}
}
TQGridLayout * tq layout = new TQGridLayout ( plainPage ( ) , 1 , 1 ,
TQGridLayout * layout = new TQGridLayout ( plainPage ( ) , 1 , 1 ,
KDialogBase : : marginHint ( ) , KDialogBase : : spacingHint ( ) ) ;
KDialogBase : : marginHint ( ) , KDialogBase : : spacingHint ( ) ) ;
int row = 0 ;
int row = 0 ;
// title (icon+text)
// title (icon+text)
TQHBoxLayout * h tq layout = new TQHBoxLayout ( tq layout, KDialogBase : : spacingHint ( ) ) ;
TQHBoxLayout * h layout = new TQHBoxLayout ( layout, KDialogBase : : spacingHint ( ) ) ;
TQLabel * p = new TQLabel ( plainPage ( ) ) ;
TQLabel * p = new TQLabel ( plainPage ( ) ) ;
p - > setPixmap ( krLoader - > loadIcon ( " binary " , KIcon : : Desktop , 32 ) ) ;
p - > setPixmap ( krLoader - > loadIcon ( " binary " , KIcon : : Desktop , 32 ) ) ;
h tq layout- > addWidget ( p ) ;
h layout- > addWidget ( p ) ;
TQLabel * l1 = new TQLabel ( i18n ( " About to calculate checksum for the following files " ) +
TQLabel * l1 = new TQLabel ( i18n ( " About to calculate checksum for the following files " ) +
( containFolders ? i18n ( " and folders: " ) : " : " ) , plainPage ( ) ) ;
( containFolders ? i18n ( " and folders: " ) : " : " ) , plainPage ( ) ) ;
h tq layout- > addWidget ( l1 ) ;
h layout- > addWidget ( l1 ) ;
tq layout- > addMultiCellLayout ( h tq layout, row , row , 0 , 1 , TQt : : AlignLeft ) ;
layout- > addMultiCellLayout ( h layout, row , row , 0 , 1 , TQt : : AlignLeft ) ;
+ + row ;
+ + row ;
// file list
// file list
KListBox * lb = new KListBox ( plainPage ( ) ) ;
KListBox * lb = new KListBox ( plainPage ( ) ) ;
lb - > insertStringList ( files ) ;
lb - > insertStringList ( files ) ;
tq layout- > addMultiCellWidget ( lb , row , row , 0 , 1 ) ;
layout- > addMultiCellWidget ( lb , row , row , 0 , 1 ) ;
+ + row ;
+ + row ;
// checksum method
// checksum method
TQHBoxLayout * h tq layout2 = new TQHBoxLayout ( tq layout, KDialogBase : : spacingHint ( ) ) ;
TQHBoxLayout * h layout2 = new TQHBoxLayout ( layout, KDialogBase : : spacingHint ( ) ) ;
TQLabel * l2 = new TQLabel ( i18n ( " Select the checksum method: " ) , plainPage ( ) ) ;
TQLabel * l2 = new TQLabel ( i18n ( " Select the checksum method: " ) , plainPage ( ) ) ;
h tq layout2- > addWidget ( l2 ) ;
h layout2- > addWidget ( l2 ) ;
KComboBox * method = new KComboBox ( plainPage ( ) ) ;
KComboBox * method = new KComboBox ( plainPage ( ) ) ;
// -- fill the combo with available methods
// -- fill the combo with available methods
uint i ;
uint i ;
for ( i = 0 ; i < tools . count ( ) ; + + i )
for ( i = 0 ; i < tools . count ( ) ; + + i )
method - > insertItem ( cs_typeToText [ tools . at ( i ) - > type ] , i ) ;
method - > insertItem ( cs_typeToText [ tools . at ( i ) - > type ] , i ) ;
method - > setFocus ( ) ;
method - > setFocus ( ) ;
h tq layout2- > addWidget ( method ) ;
h layout2- > addWidget ( method ) ;
tq layout- > addMultiCellLayout ( h tq layout2, row , row , 0 , 1 , TQt : : AlignLeft ) ;
layout- > addMultiCellLayout ( h layout2, row , row , 0 , 1 , TQt : : AlignLeft ) ;
+ + row ;
+ + row ;
if ( exec ( ) ! = Accepted ) return ;
if ( exec ( ) ! = Accepted ) return ;
@ -323,39 +323,39 @@ MatchChecksumDlg::MatchChecksumDlg(const TQStringList& files, bool containFolder
return ;
return ;
}
}
TQGridLayout * tq layout = new TQGridLayout ( plainPage ( ) , 1 , 1 ,
TQGridLayout * layout = new TQGridLayout ( plainPage ( ) , 1 , 1 ,
KDialogBase : : marginHint ( ) , KDialogBase : : spacingHint ( ) ) ;
KDialogBase : : marginHint ( ) , KDialogBase : : spacingHint ( ) ) ;
int row = 0 ;
int row = 0 ;
// title (icon+text)
// title (icon+text)
TQHBoxLayout * h tq layout = new TQHBoxLayout ( tq layout, KDialogBase : : spacingHint ( ) ) ;
TQHBoxLayout * h layout = new TQHBoxLayout ( layout, KDialogBase : : spacingHint ( ) ) ;
TQLabel * p = new TQLabel ( plainPage ( ) ) ;
TQLabel * p = new TQLabel ( plainPage ( ) ) ;
p - > setPixmap ( krLoader - > loadIcon ( " binary " , KIcon : : Desktop , 32 ) ) ;
p - > setPixmap ( krLoader - > loadIcon ( " binary " , KIcon : : Desktop , 32 ) ) ;
h tq layout- > addWidget ( p ) ;
h layout- > addWidget ( p ) ;
TQLabel * l1 = new TQLabel ( i18n ( " About to verify checksum for the following files " ) +
TQLabel * l1 = new TQLabel ( i18n ( " About to verify checksum for the following files " ) +
( containFolders ? i18n ( " and folders: " ) : " : " ) , plainPage ( ) ) ;
( containFolders ? i18n ( " and folders: " ) : " : " ) , plainPage ( ) ) ;
h tq layout- > addWidget ( l1 ) ;
h layout- > addWidget ( l1 ) ;
tq layout- > addMultiCellLayout ( h tq layout, row , row , 0 , 1 , TQt : : AlignLeft ) ;
layout- > addMultiCellLayout ( h layout, row , row , 0 , 1 , TQt : : AlignLeft ) ;
+ + row ;
+ + row ;
// file list
// file list
KListBox * lb = new KListBox ( plainPage ( ) ) ;
KListBox * lb = new KListBox ( plainPage ( ) ) ;
lb - > insertStringList ( files ) ;
lb - > insertStringList ( files ) ;
tq layout- > addMultiCellWidget ( lb , row , row , 0 , 1 ) ;
layout- > addMultiCellWidget ( lb , row , row , 0 , 1 ) ;
+ + row ;
+ + row ;
// checksum file
// checksum file
TQHBoxLayout * h tq layout2 = new TQHBoxLayout ( tq layout, KDialogBase : : spacingHint ( ) ) ;
TQHBoxLayout * h layout2 = new TQHBoxLayout ( layout, KDialogBase : : spacingHint ( ) ) ;
TQLabel * l2 = new TQLabel ( i18n ( " Checksum file: " ) , plainPage ( ) ) ;
TQLabel * l2 = new TQLabel ( i18n ( " Checksum file: " ) , plainPage ( ) ) ;
h tq layout2- > addWidget ( l2 ) ;
h layout2- > addWidget ( l2 ) ;
KURLRequester * checksumFileReq = new KURLRequester ( plainPage ( ) ) ;
KURLRequester * checksumFileReq = new KURLRequester ( plainPage ( ) ) ;
if ( ! checksumFile . isEmpty ( ) )
if ( ! checksumFile . isEmpty ( ) )
checksumFileReq - > setURL ( checksumFile ) ;
checksumFileReq - > setURL ( checksumFile ) ;
checksumFileReq - > fileDialog ( ) - > setURL ( path ) ;
checksumFileReq - > fileDialog ( ) - > setURL ( path ) ;
checksumFileReq - > setFocus ( ) ;
checksumFileReq - > setFocus ( ) ;
h tq layout2- > addWidget ( checksumFileReq ) ;
h layout2- > addWidget ( checksumFileReq ) ;
tq layout- > addMultiCellLayout ( h tq layout2, row , row , 0 , 1 , TQt : : AlignLeft ) ;
layout- > addMultiCellLayout ( h layout2, row , row , 0 , 1 , TQt : : AlignLeft ) ;
if ( exec ( ) ! = Accepted ) return ;
if ( exec ( ) ! = Accepted ) return ;
TQString file = checksumFileReq - > url ( ) ;
TQString file = checksumFileReq - > url ( ) ;
@ -428,31 +428,31 @@ bool MatchChecksumDlg::verifyChecksumFile(TQString path, TQString& extension) {
// ------------- VerifyResultDlg
// ------------- VerifyResultDlg
VerifyResultDlg : : VerifyResultDlg ( const TQStringList & failed ) :
VerifyResultDlg : : VerifyResultDlg ( const TQStringList & failed ) :
KDialogBase ( Plain , i18n ( " Verify Checksum " ) , Close , Close , krApp ) {
KDialogBase ( Plain , i18n ( " Verify Checksum " ) , Close , Close , krApp ) {
TQGridLayout * tq layout = new TQGridLayout ( plainPage ( ) , 1 , 1 ,
TQGridLayout * layout = new TQGridLayout ( plainPage ( ) , 1 , 1 ,
KDialogBase : : marginHint ( ) , KDialogBase : : spacingHint ( ) ) ;
KDialogBase : : marginHint ( ) , KDialogBase : : spacingHint ( ) ) ;
bool errors = failed . size ( ) > 0 ;
bool errors = failed . size ( ) > 0 ;
int row = 0 ;
int row = 0 ;
// create the icon and title
// create the icon and title
TQHBoxLayout * h tq layout = new TQHBoxLayout ( tq layout, KDialogBase : : spacingHint ( ) ) ;
TQHBoxLayout * h layout = new TQHBoxLayout ( layout, KDialogBase : : spacingHint ( ) ) ;
TQLabel p ( plainPage ( ) ) ;
TQLabel p ( plainPage ( ) ) ;
p . setPixmap ( krLoader - > loadIcon ( errors ? " messagebox_critical " : " messagebox_info " , KIcon : : Desktop , 32 ) ) ;
p . setPixmap ( krLoader - > loadIcon ( errors ? " messagebox_critical " : " messagebox_info " , KIcon : : Desktop , 32 ) ) ;
h tq layout- > addWidget ( & p ) ;
h layout- > addWidget ( & p ) ;
TQLabel * l1 = new TQLabel ( ( errors ? i18n ( " Errors were detected while verifying the checksums " ) :
TQLabel * l1 = new TQLabel ( ( errors ? i18n ( " Errors were detected while verifying the checksums " ) :
i18n ( " Checksums were verified successfully " ) ) , plainPage ( ) ) ;
i18n ( " Checksums were verified successfully " ) ) , plainPage ( ) ) ;
h tq layout- > addWidget ( l1 ) ;
h layout- > addWidget ( l1 ) ;
tq layout- > addMultiCellLayout ( h tq layout, row , row , 0 , 1 , TQt : : AlignLeft ) ;
layout- > addMultiCellLayout ( h layout, row , row , 0 , 1 , TQt : : AlignLeft ) ;
+ + row ;
+ + row ;
if ( errors ) {
if ( errors ) {
TQLabel * l3 = new TQLabel ( i18n ( " The following files have failed: " ) , plainPage ( ) ) ;
TQLabel * l3 = new TQLabel ( i18n ( " The following files have failed: " ) , plainPage ( ) ) ;
tq layout- > addMultiCellWidget ( l3 , row , row , 0 , 1 ) ;
layout- > addMultiCellWidget ( l3 , row , row , 0 , 1 ) ;
+ + row ;
+ + row ;
KListBox * lb2 = new KListBox ( plainPage ( ) ) ;
KListBox * lb2 = new KListBox ( plainPage ( ) ) ;
lb2 - > insertStringList ( failed ) ;
lb2 - > insertStringList ( failed ) ;
tq layout- > addMultiCellWidget ( lb2 , row , row , 0 , 1 ) ;
layout- > addMultiCellWidget ( lb2 , row , row , 0 , 1 ) ;
+ + row ;
+ + row ;
}
}
@ -464,7 +464,7 @@ VerifyResultDlg::VerifyResultDlg(const TQStringList& failed):
ChecksumResultsDlg : : ChecksumResultsDlg ( const TQStringList & stdOut , const TQStringList & stdErr ,
ChecksumResultsDlg : : ChecksumResultsDlg ( const TQStringList & stdOut , const TQStringList & stdErr ,
const TQString & suggestedFilename , const TQString & binary , const TQString & /* type */ , bool standardFormat ) :
const TQString & suggestedFilename , const TQString & binary , const TQString & /* type */ , bool standardFormat ) :
KDialogBase ( Plain , i18n ( " Create Checksum " ) , Ok | Cancel , Ok , krApp ) , _binary ( binary ) {
KDialogBase ( Plain , i18n ( " Create Checksum " ) , Ok | Cancel , Ok , krApp ) , _binary ( binary ) {
TQGridLayout * tq layout = new TQGridLayout ( plainPage ( ) , 1 , 1 ,
TQGridLayout * layout = new TQGridLayout ( plainPage ( ) , 1 , 1 ,
KDialogBase : : marginHint ( ) , KDialogBase : : spacingHint ( ) ) ;
KDialogBase : : marginHint ( ) , KDialogBase : : spacingHint ( ) ) ;
// md5 tools display errors into stderr, so we'll use that to determine the result of the job
// md5 tools display errors into stderr, so we'll use that to determine the result of the job
@ -473,21 +473,21 @@ ChecksumResultsDlg::ChecksumResultsDlg(const TQStringList& stdOut, const TQStrin
int row = 0 ;
int row = 0 ;
// create the icon and title
// create the icon and title
TQHBoxLayout * h tq layout = new TQHBoxLayout ( tq layout, KDialogBase : : spacingHint ( ) ) ;
TQHBoxLayout * h layout = new TQHBoxLayout ( layout, KDialogBase : : spacingHint ( ) ) ;
TQLabel p ( plainPage ( ) ) ;
TQLabel p ( plainPage ( ) ) ;
p . setPixmap ( krLoader - > loadIcon ( errors ? " messagebox_critical " : " messagebox_info " , KIcon : : Desktop , 32 ) ) ;
p . setPixmap ( krLoader - > loadIcon ( errors ? " messagebox_critical " : " messagebox_info " , KIcon : : Desktop , 32 ) ) ;
h tq layout- > addWidget ( & p ) ;
h layout- > addWidget ( & p ) ;
TQLabel * l1 = new TQLabel ( ( errors ? i18n ( " Errors were detected while creating the checksums " ) :
TQLabel * l1 = new TQLabel ( ( errors ? i18n ( " Errors were detected while creating the checksums " ) :
i18n ( " Checksums were created successfully " ) ) , plainPage ( ) ) ;
i18n ( " Checksums were created successfully " ) ) , plainPage ( ) ) ;
h tq layout- > addWidget ( l1 ) ;
h layout- > addWidget ( l1 ) ;
tq layout- > addMultiCellLayout ( h tq layout, row , row , 0 , 1 , TQt : : AlignLeft ) ;
layout- > addMultiCellLayout ( h layout, row , row , 0 , 1 , TQt : : AlignLeft ) ;
+ + row ;
+ + row ;
if ( successes ) {
if ( successes ) {
if ( errors ) {
if ( errors ) {
TQLabel * l2 = new TQLabel ( i18n ( " Here are the calculated checksums: " ) , plainPage ( ) ) ;
TQLabel * l2 = new TQLabel ( i18n ( " Here are the calculated checksums: " ) , plainPage ( ) ) ;
tq layout- > addMultiCellWidget ( l2 , row , row , 0 , 1 ) ;
layout- > addMultiCellWidget ( l2 , row , row , 0 , 1 ) ;
+ + row ;
+ + row ;
}
}
KListView * lv = new KListView ( plainPage ( ) ) ;
KListView * lv = new KListView ( plainPage ( ) ) ;
@ -507,7 +507,7 @@ ChecksumResultsDlg::ChecksumResultsDlg(const TQStringList& stdOut, const TQStrin
new KListViewItem ( lv , line ) ;
new KListViewItem ( lv , line ) ;
}
}
}
}
tq layout- > addMultiCellWidget ( lv , row , row , 0 , 1 ) ;
layout- > addMultiCellWidget ( lv , row , row , 0 , 1 ) ;
+ + row ;
+ + row ;
}
}
@ -516,15 +516,15 @@ ChecksumResultsDlg::ChecksumResultsDlg(const TQStringList& stdOut, const TQStrin
line1 - > setGeometry ( TQRect ( 60 , 210 , 501 , 20 ) ) ;
line1 - > setGeometry ( TQRect ( 60 , 210 , 501 , 20 ) ) ;
line1 - > setFrameShape ( TQFrame : : HLine ) ;
line1 - > setFrameShape ( TQFrame : : HLine ) ;
line1 - > setFrameShadow ( TQFrame : : Sunken ) ;
line1 - > setFrameShadow ( TQFrame : : Sunken ) ;
tq layout- > addMultiCellWidget ( line1 , row , row , 0 , 1 ) ;
layout- > addMultiCellWidget ( line1 , row , row , 0 , 1 ) ;
+ + row ;
+ + row ;
TQLabel * l3 = new TQLabel ( i18n ( " Here are the errors received: " ) , plainPage ( ) ) ;
TQLabel * l3 = new TQLabel ( i18n ( " Here are the errors received: " ) , plainPage ( ) ) ;
tq layout- > addMultiCellWidget ( l3 , row , row , 0 , 1 ) ;
layout- > addMultiCellWidget ( l3 , row , row , 0 , 1 ) ;
+ + row ;
+ + row ;
KListBox * lb = new KListBox ( plainPage ( ) ) ;
KListBox * lb = new KListBox ( plainPage ( ) ) ;
lb - > insertStringList ( stdErr ) ;
lb - > insertStringList ( stdErr ) ;
tq layout- > addMultiCellWidget ( lb , row , row , 0 , 1 ) ;
layout- > addMultiCellWidget ( lb , row , row , 0 , 1 ) ;
+ + row ;
+ + row ;
}
}
@ -532,14 +532,14 @@ ChecksumResultsDlg::ChecksumResultsDlg(const TQStringList& stdOut, const TQStrin
KURLRequester * checksumFile = 0 ;
KURLRequester * checksumFile = 0 ;
TQCheckBox * saveFileCb = 0 ;
TQCheckBox * saveFileCb = 0 ;
if ( successes ) {
if ( successes ) {
TQHBoxLayout * h tq layout2 = new TQHBoxLayout ( tq layout, KDialogBase : : spacingHint ( ) ) ;
TQHBoxLayout * h layout2 = new TQHBoxLayout ( layout, KDialogBase : : spacingHint ( ) ) ;
saveFileCb = new TQCheckBox ( i18n ( " Save checksum to file: " ) , plainPage ( ) ) ;
saveFileCb = new TQCheckBox ( i18n ( " Save checksum to file: " ) , plainPage ( ) ) ;
saveFileCb - > setChecked ( true ) ;
saveFileCb - > setChecked ( true ) ;
h tq layout2- > addWidget ( saveFileCb ) ;
h layout2- > addWidget ( saveFileCb ) ;
checksumFile = new KURLRequester ( suggestedFilename , plainPage ( ) ) ;
checksumFile = new KURLRequester ( suggestedFilename , plainPage ( ) ) ;
h tq layout2- > addWidget ( checksumFile , TQt : : AlignLeft ) ;
h layout2- > addWidget ( checksumFile , TQt : : AlignLeft ) ;
tq layout- > addMultiCellLayout ( h tq layout2, row , row , 0 , 1 , TQt : : AlignLeft ) ;
layout- > addMultiCellLayout ( h layout2, row , row , 0 , 1 , TQt : : AlignLeft ) ;
+ + row ;
+ + row ;
connect ( saveFileCb , TQT_SIGNAL ( toggled ( bool ) ) , checksumFile , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( saveFileCb , TQT_SIGNAL ( toggled ( bool ) ) , checksumFile , TQT_SLOT ( setEnabled ( bool ) ) ) ;
checksumFile - > setFocus ( ) ;
checksumFile - > setFocus ( ) ;
@ -553,7 +553,7 @@ ChecksumResultsDlg::ChecksumResultsDlg(const TQStringList& stdOut, const TQStrin
connect ( onePerFile , TQT_SIGNAL ( toggled ( bool ) ) , saveFileCb , TQT_SLOT ( toggle ( ) ) ) ;
connect ( onePerFile , TQT_SIGNAL ( toggled ( bool ) ) , saveFileCb , TQT_SLOT ( toggle ( ) ) ) ;
connect ( onePerFile , TQT_SIGNAL ( toggled ( bool ) ) , saveFileCb , TQT_SLOT ( setDisabled ( bool ) ) ) ;
connect ( onePerFile , TQT_SIGNAL ( toggled ( bool ) ) , saveFileCb , TQT_SLOT ( setDisabled ( bool ) ) ) ;
connect ( onePerFile , TQT_SIGNAL ( toggled ( bool ) ) , checksumFile , TQT_SLOT ( setDisabled ( bool ) ) ) ;
connect ( onePerFile , TQT_SIGNAL ( toggled ( bool ) ) , checksumFile , TQT_SLOT ( setDisabled ( bool ) ) ) ;
tq layout- > addMultiCellWidget ( onePerFile , row , row , 0 , 1 , TQt : : AlignLeft ) ;
layout- > addMultiCellWidget ( onePerFile , row , row , 0 , 1 , TQt : : AlignLeft ) ;
+ + row ;
+ + row ;
}
}