@ -572,7 +572,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime ;
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
datetime . setTime_t ( result - > last_index_time ) ;
if ( datetime . date ( ) . year ( ) > 1970 )
if ( datetime . date ( ) . year ( ) > 1970 )
description = description + i18n ( " Last viewed: %1 " ) . arg ( K Global: : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ;
description = description + i18n ( " Last viewed: %1 " ) . arg ( TDE Global: : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ;
}
}
item - > setDescriptionText ( description + i18n ( " URL: " ) + " " + * ( result - > uri ) + " </qt> " ) ;
item - > setDescriptionText ( description + i18n ( " URL: " ) + " " + * ( result - > uri ) + " </qt> " ) ;
@ -597,7 +597,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime ;
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
datetime . setTime_t ( result - > last_index_time ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Published: %1 " ) . arg ( K Global: : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Published: %1 " ) . arg ( TDE Global: : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ) ;
if ( result - > snippet )
if ( result - > snippet )
item - > setPropertiesText ( " <qt> " + * ( result - > snippet ) + " </qt> " ) ;
item - > setPropertiesText ( " <qt> " + * ( result - > snippet ) + " </qt> " ) ;
@ -625,7 +625,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime ;
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
datetime . setTime_t ( result - > last_index_time ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Last modified: %1 " ) . arg ( K Global: : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Last modified: %1 " ) . arg ( TDE Global: : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ) ;
if ( result - > snippet )
if ( result - > snippet )
item - > setPropertiesText ( " <qt> " + * ( result - > snippet ) + " </qt> " ) ;
item - > setPropertiesText ( " <qt> " + * ( result - > snippet ) + " </qt> " ) ;
@ -643,7 +643,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
item - > setIcon ( " contents2 " ) ;
item - > setIcon ( " contents2 " ) ;
TQDateTime datetime ;
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
datetime . setTime_t ( result - > last_index_time ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Last modified: %1 " ) . arg ( K Global: : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Last modified: %1 " ) . arg ( TDE Global: : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ) ;
if ( result - > snippet )
if ( result - > snippet )
@ -668,9 +668,9 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQString properties ;
TQString properties ;
TQDateTime datetime ;
TQDateTime datetime ;
datetime = datetimeFromString ( takeProperty ( " fixme:starttime " , _properties ) ) ;
datetime = datetimeFromString ( takeProperty ( " fixme:starttime " , _properties ) ) ;
properties = properties + i18n ( " Start time: %1 " ) . arg ( K Global: : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ;
properties = properties + i18n ( " Start time: %1 " ) . arg ( TDE Global: : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ;
datetime = datetimeFromString ( takeProperty ( " fixme:endtime " , _properties ) ) ;
datetime = datetimeFromString ( takeProperty ( " fixme:endtime " , _properties ) ) ;
properties = properties + i18n ( " End time: %1 " ) . arg ( K Global: : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ;
properties = properties + i18n ( " End time: %1 " ) . arg ( TDE Global: : locale ( ) - > formatDateTime ( datetime , false ) ) + " <br> " ;
BeagleSearch : : PropertyList : : iterator it ;
BeagleSearch : : PropertyList : : iterator it ;
for ( it = _properties . begin ( ) ; it ! = _properties . end ( ) ; + + it )
for ( it = _properties . begin ( ) ; it ! = _properties . end ( ) ; + + it )
@ -777,7 +777,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime received_datetime ;
TQDateTime received_datetime ;
received_datetime = datetimeFromString ( received ) ;
received_datetime = datetimeFromString ( received ) ;
if ( ! received . isEmpty ( ) )
if ( ! received . isEmpty ( ) )
item - > setDescriptionText ( " <qt> " + i18n ( " Received: %1 " ) . arg ( K Global: : locale ( ) - > formatDateTime ( received_datetime , false ) ) + " </qt> " ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Received: %1 " ) . arg ( TDE Global: : locale ( ) - > formatDateTime ( received_datetime , false ) ) + " </qt> " ) ;
TQString properties ;
TQString properties ;
BeagleSearch : : PropertyList : : iterator it ;
BeagleSearch : : PropertyList : : iterator it ;
@ -844,7 +844,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime ;
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
datetime . setTime_t ( result - > last_index_time ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Date: %1 " ) . arg ( K Global: : locale ( ) - > formatDateTime ( datetime , false ) + " </qt> " ) ) ;
item - > setDescriptionText ( " <qt> " + i18n ( " Date: %1 " ) . arg ( TDE Global: : locale ( ) - > formatDateTime ( datetime , false ) + " </qt> " ) ) ;
if ( result - > snippet )
if ( result - > snippet )
item - > setPropertiesText ( " <qt> " + * ( result - > snippet ) + " </qt> " ) ;
item - > setPropertiesText ( " <qt> " + * ( result - > snippet ) + " </qt> " ) ;
@ -898,7 +898,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQString install_time_str = takeProperty ( " fixme:install_time " , _properties ) ;
TQString install_time_str = takeProperty ( " fixme:install_time " , _properties ) ;
if ( ! install_time_str . isEmpty ( ) )
if ( ! install_time_str . isEmpty ( ) )
{
{
properties = properties + i18n ( " Installed on: %1 " ) . arg ( K Global: : locale ( ) - > formatDateTime ( datetimeFromString ( install_time_str ) , false ) ) + " <br> " ;
properties = properties + i18n ( " Installed on: %1 " ) . arg ( TDE Global: : locale ( ) - > formatDateTime ( datetimeFromString ( install_time_str ) , false ) ) + " <br> " ;
}
}
TQString install_size_str = takeProperty ( " fixme:contents_byte_count " , _properties ) ;
TQString install_size_str = takeProperty ( " fixme:contents_byte_count " , _properties ) ;
@ -982,7 +982,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
TQDateTime datetime ;
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
datetime . setTime_t ( result - > last_index_time ) ;
title = i18n ( " Last modified: %1 " ) . arg ( K Global: : locale ( ) - > formatDateTime ( datetime , false ) ) ;
title = i18n ( " Last modified: %1 " ) . arg ( TDE Global: : locale ( ) - > formatDateTime ( datetime , false ) ) ;
item - > setDescriptionText ( " <qt> " + title + " </qt> " ) ;
item - > setDescriptionText ( " <qt> " + title + " </qt> " ) ;
TQString properties ;
TQString properties ;
@ -1055,7 +1055,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
else {
else {
TQDateTime datetime ;
TQDateTime datetime ;
datetime . setTime_t ( result - > last_index_time ) ;
datetime . setTime_t ( result - > last_index_time ) ;
title = i18n ( " Last modified: %1 " ) . arg ( K Global: : locale ( ) - > formatDateTime ( datetime , false ) ) ;
title = i18n ( " Last modified: %1 " ) . arg ( TDE Global: : locale ( ) - > formatDateTime ( datetime , false ) ) ;
}
}
item - > setDescriptionText ( " <qt> " + title + " </qt> " ) ;
item - > setDescriptionText ( " <qt> " + title + " </qt> " ) ;
@ -1247,7 +1247,7 @@ void SearchDlg::slotOpen()
if ( item ) {
if ( item ) {
TQString mimetype = item - > mimetype ( ) ;
TQString mimetype = item - > mimetype ( ) ;
if ( mimetype = = " beagle/x-kopete-log " | | mimetype = = " beagle/x-gaim-log " ) {
if ( mimetype = = " beagle/x-kopete-log " | | mimetype = = " beagle/x-gaim-log " ) {
KProcess * proc = new K Process;
TDEProcess * proc = new TDE Process;
* proc < < " beagle-imlogviewer " ;
* proc < < " beagle-imlogviewer " ;
KURL kuri = KURL ( item - > uri ( ) ) ;
KURL kuri = KURL ( item - > uri ( ) ) ;
TQString uri = kuri . path ( ) ;
TQString uri = kuri . path ( ) ;
@ -1282,7 +1282,7 @@ void SearchDlg::slotOpen()
slotOpenKNotes ( item - > uri ( ) . mid ( 10 , 21 ) ) ;
slotOpenKNotes ( item - > uri ( ) . mid ( 10 , 21 ) ) ;
}
}
else if ( item - > uri ( ) . startsWith ( " note:/ " ) ) {
else if ( item - > uri ( ) . startsWith ( " note:/ " ) ) {
KProcess * proc = new K Process;
TDEProcess * proc = new TDE Process;
* proc < < " tomboy " ;
* proc < < " tomboy " ;
* proc < < " --open-note " < < item - > uri ( ) < < " --highligh-search " < < " \" " + current_query . get ( ) + " \" " ;
* proc < < " --open-note " < < item - > uri ( ) < < " --highligh-search " < < " \" " + current_query . get ( ) + " \" " ;
if ( ! proc - > start ( ) ) {
if ( ! proc - > start ( ) ) {
@ -1312,7 +1312,7 @@ void SearchDlg::slotMailTo(const TQString &address)
void SearchDlg : : slotOpenEvolution ( const TQString & address )
void SearchDlg : : slotOpenEvolution ( const TQString & address )
{
{
KProcess * proc = new K Process;
TDEProcess * proc = new TDE Process;
* proc < < " evolution " ;
* proc < < " evolution " ;
* proc < < address ;
* proc < < address ;
if ( ! proc - > start ( ) ) {
if ( ! proc - > start ( ) ) {
@ -1323,7 +1323,7 @@ void SearchDlg::slotOpenEvolution(const TQString &address)
void SearchDlg : : slotOpenThunderbird ( const TQString & address )
void SearchDlg : : slotOpenThunderbird ( const TQString & address )
{
{
KProcess * proc = new K Process;
TDEProcess * proc = new TDE Process;
* proc < < " thunderbird " ;
* proc < < " thunderbird " ;
* proc < < " -mail " ;
* proc < < " -mail " ;
* proc < < address ;
* proc < < address ;
@ -1335,7 +1335,7 @@ void SearchDlg::slotOpenThunderbird(const TQString &address)
void SearchDlg : : slotOpenKAddressBook ( const TQString & uid )
void SearchDlg : : slotOpenKAddressBook ( const TQString & uid )
{
{
KProcess * proc = new K Process;
TDEProcess * proc = new TDE Process;
* proc < < " kaddressbook " ;
* proc < < " kaddressbook " ;
* proc < < " --uid " < < uid ;
* proc < < " --uid " < < uid ;
if ( ! proc - > start ( ) ) {
if ( ! proc - > start ( ) ) {
@ -1363,23 +1363,23 @@ TQString SearchDlg::formatBytes(TQString& bytesStr) const
{
{
static double kilobyte = 1024.0 ;
static double kilobyte = 1024.0 ;
static double megabyte = 1024.0 * 1024.0 ;
static double megabyte = 1024.0 * 1024.0 ;
double bytes = K Global: : locale ( ) - > readNumber ( bytesStr ) ;
double bytes = TDE Global: : locale ( ) - > readNumber ( bytesStr ) ;
if ( bytes < megabyte )
if ( bytes < megabyte )
return K Global: : locale ( ) - > formatNumber ( bytes / kilobyte , 2 ) + " K " ;
return TDE Global: : locale ( ) - > formatNumber ( bytes / kilobyte , 2 ) + " K " ;
return K Global: : locale ( ) - > formatNumber ( bytes / megabyte , 2 ) + " M " ;
return TDE Global: : locale ( ) - > formatNumber ( bytes / megabyte , 2 ) + " M " ;
}
}
void SearchDlg : : slotStartBeagle ( )
void SearchDlg : : slotStartBeagle ( )
{
{
beagleJustStarted = true ;
beagleJustStarted = true ;
if ( cb_beagleStart - > isChecked ( ) ) {
if ( cb_beagleStart - > isChecked ( ) ) {
KConfig * config = K Global: : config ( ) ;
KConfig * config = TDE Global: : config ( ) ;
config - > setGroup ( " Beagle " ) ;
config - > setGroup ( " Beagle " ) ;
config - > writeEntry ( " AutoStart " , true ) ;
config - > writeEntry ( " AutoStart " , true ) ;
config - > sync ( ) ;
config - > sync ( ) ;
}
}
KProcess * proc = new K Process;
TDEProcess * proc = new TDE Process;
* proc < < " beagled " ;
* proc < < " beagled " ;
* proc < < " --indexing-delay 2 " ;
* proc < < " --indexing-delay 2 " ;
if ( ! proc - > start ( ) ) {
if ( ! proc - > start ( ) ) {
@ -1476,7 +1476,7 @@ void SearchDlg::searchError(const TQString& error)
bool SearchDlg : : canPreview ( KFileItem * item )
bool SearchDlg : : canPreview ( KFileItem * item )
{
{
if ( ! K GlobalSettings: : showFilePreview ( item - > url ( ) ) )
if ( ! TDE GlobalSettings: : showFilePreview ( item - > url ( ) ) )
return false ;
return false ;
if ( pPreviewMimeTypes = = 0L )
if ( pPreviewMimeTypes = = 0L )
@ -1520,7 +1520,7 @@ bool SearchDlg::mimeTypeMatch( const TQString& mimeType, const TQStringList& mim
void SearchDlg : : startPreview ( const KFileItemList & items )
void SearchDlg : : startPreview ( const KFileItemList & items )
{
{
stopPreview ( ) ; // just in case
stopPreview ( ) ; // just in case
int iconSize = K Global: : iconLoader ( ) - > currentSize ( KIcon : : Desktop ) ;
int iconSize = TDE Global: : iconLoader ( ) - > currentSize ( KIcon : : Desktop ) ;
pPreviewJob = KIO : : filePreview ( items , KIcon : : SizeHuge , KIcon : : SizeHuge , iconSize ,
pPreviewJob = KIO : : filePreview ( items , KIcon : : SizeHuge , KIcon : : SizeHuge , iconSize ,
true /*m_pSettings->textPreviewIconTransparency()*/ , true /* scale */ ,
true /*m_pSettings->textPreviewIconTransparency()*/ , true /* scale */ ,
@ -1630,7 +1630,7 @@ void SearchDlg::showSearchDialog()
void SearchDlg : : configChanged ( )
void SearchDlg : : configChanged ( )
{
{
KConfig * config = K Global: : config ( ) ;
KConfig * config = TDE Global: : config ( ) ;
config - > reparseConfiguration ( ) ;
config - > reparseConfiguration ( ) ;
config - > setGroup ( " General " ) ;
config - > setGroup ( " General " ) ;