Remove use of KDE_IS_VERSION

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/68/head
Michele Calgaro 2 weeks ago
parent b4a9a4a5a8
commit 068bbc2bcf
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -109,25 +109,15 @@ void Kig::setupActions()
KStdAction::open(this, TQ_SLOT(fileOpen()), actionCollection());
KStdAction::quit(this, TQ_SLOT(close()), actionCollection());
#ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
m_toolbarAction = KStdAction::showToolbar(this, TQ_SLOT(optionsShowToolbar()), actionCollection());
m_statusbarAction = KStdAction::showStatusbar(this, TQ_SLOT(optionsShowStatusbar()), actionCollection());
#else
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
#endif
// FIXME: this (recent files) should be app-wide, not specific to each window...
m_recentFilesAction = KStdAction::openRecent(this, TQ_SLOT(openURL(const KURL&)), actionCollection());
m_recentFilesAction->loadEntries(config);
#if KDE_IS_VERSION( 3, 2, 90 )
KStdAction::keyBindings( guiFactory(), TQ_SLOT( configureShortcuts() ), actionCollection() );
#else
KStdAction::keyBindings(this, TQ_SLOT(optionsConfigureKeys()), actionCollection());
#endif
KStdAction::configureToolbars(this, TQ_SLOT(optionsConfigureToolbars()), actionCollection());
KStdAction::tipOfDay( this, TQ_SLOT( tipOfDay() ), actionCollection(), "help_tipofday" );
}
@ -185,18 +175,6 @@ void Kig::openURL(const KURL& url)
};
}
void Kig::optionsConfigureKeys()
{
#if KDE_IS_VERSION( 3, 2, 90 )
assert( false );
#else
KKeyDialog dlg( true, this );
dlg.insert( actionCollection() );
dlg.insert( m_part->actionCollection() );
(void) dlg.configure( true );
#endif
}
void Kig::optionsConfigureToolbars()
{
saveMainWindowSettings(TDEGlobal::config(), "MainWindow");
@ -272,33 +250,6 @@ void Kig::fileOpen()
if (!file_name.isEmpty()) openURL(file_name);
}
// ifdef's disabled, cause TQt moc doesn't handle ifdef's..
// #ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
void Kig::optionsShowToolbar()
{
#ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
if (m_toolbarAction->isChecked())
toolBar()->show();
else
toolBar()->hide();
#else
assert( false );
#endif
}
void Kig::optionsShowStatusbar()
{
#ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
if (m_statusbarAction->isChecked())
statusBar()->show();
else
statusBar()->hide();
#else
assert( false );
#endif
}
// #endif
void Kig::tipOfDay() {
KTipDialog::showTip( "kig/tips", true );
}

@ -23,18 +23,6 @@
#include <config.h>
#endif
#include <tdeversion.h>
#ifdef KDE_IS_VERSION
#if KDE_IS_VERSION( 3, 1, 90 )
#undef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
#else
#define KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
#endif
#else
#define KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
#endif
#include <tdeapplication.h>
#include <tdeparts/mainwindow.h>
#include <dcopclient.h>
@ -115,16 +103,7 @@ class Kig : public KParts::MainWindow
private slots:
void fileNew();
void fileOpen();
// TQt moc doesn't handle ifdef's, so i'm disabling it..
// #ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
void optionsShowToolbar();
void optionsShowStatusbar();
// #endif
// #if KDE_IS_VERSION( 3, 2, 90 )
void optionsConfigureKeys();
// #endif
void optionsConfigureToolbars();
void applyNewToolbarConfig();
void tipOfDay();
@ -135,10 +114,6 @@ class Kig : public KParts::MainWindow
KParts::ReadWritePart *m_part;
//#ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES
TDEToggleAction *m_toolbarAction;
TDEToggleAction *m_statusbarAction;
//#endif
TDERecentFilesAction *m_recentFilesAction;
TDEConfig* config;

@ -275,20 +275,7 @@ void KigPart::setupActions()
a->setToolTip( i18n( "Recenter the screen on the document" ) );
a->setWhatsThis( i18n( "Recenter the screen on the document" ) );
#ifdef KDE_IS_VERSION
#if KDE_IS_VERSION(3,1,90)
#define KIG_PART_CPP_STD_FULLSCREEN_ACTION
#endif
#endif
#ifdef KIG_PART_CPP_STD_FULLSCREEN_ACTION
a = KStdAction::fullScreen( m_widget, TQ_SLOT( toggleFullScreen() ), actionCollection(), (TQWidget*)(widget()->parent()),"fullscreen" );
#else
tmp = l->loadIcon( "view-fullscreen", TDEIcon::Toolbar );
a = new TDEAction(
i18n( "Full Screen" ), tmp, CTRL+SHIFT+Key_F,
m_widget, TQ_SLOT( toggleFullScreen() ),
actionCollection(), "fullscreen" );
#endif
a->setToolTip( i18n( "View this document full-screen." ) );
a->setWhatsThis( i18n( "View this document full-screen." ) );

@ -28,11 +28,7 @@
#include <kdebug.h>
#include <knumvalidator.h>
#include <tdelocale.h>
#if KDE_IS_VERSION( 3, 1, 90 )
#include <kinputdialog.h>
#else
#include <klineeditdlg.h>
#endif
Coordinate calcPointOnPerpend( const LineData& l, const Coordinate& t )
{
@ -349,21 +345,10 @@ Coordinate calcCircleRadicalStartPoint( const Coordinate& ca, const Coordinate&
double getDoubleFromUser( const TQString& caption, const TQString& label, double value,
TQWidget* parent, bool* ok, double min, double max, int decimals )
{
#ifdef KIG_USE_KDOUBLEVALIDATOR
KDoubleValidator vtor( min, max, decimals, 0, 0 );
#else
KFloatValidator vtor( min, max, (TQWidget*) 0, 0 );
#endif
#if KDE_IS_VERSION( 3, 1, 90 )
TQString input = KInputDialog::getText(
caption, label, TDEGlobal::locale()->formatNumber( value, decimals ),
ok, parent, "getDoubleFromUserDialog", &vtor );
#else
TQString input =
KLineEditDlg::getText( caption, label,
TDEGlobal::locale()->formatNumber( value, decimals ),
ok, parent, &vtor );
#endif
bool myok = true;
double ret = TDEGlobal::locale()->readNumber( input, &myok );

@ -31,16 +31,6 @@
#include <vector>
#include <assert.h>
#ifdef KDE_IS_VERSION
#if KDE_IS_VERSION( 3, 1, 0 )
#define KIG_USE_KDOUBLEVALIDATOR
#else
#undef KIG_USE_KDOUBLEVALIDATOR
#endif
#else
#undef KIG_USE_KDOUBLEVALIDATOR
#endif
class ObjectImp;
class KigWidget;

@ -43,11 +43,7 @@ class CoordinateValidator
: public TQValidator
{
bool mpolar;
#ifdef KIG_USE_KDOUBLEVALIDATOR
KDoubleValidator mdv;
#else
KFloatValidator mdv;
#endif
mutable TQRegExp mre;
public:
CoordinateValidator( bool polar );

@ -57,11 +57,7 @@
#include <tdeglobal.h>
#include <kiconloader.h>
#include <tdelocale.h>
#if KDE_IS_VERSION( 3, 1, 90 )
#include <kinputdialog.h>
#else
#include <klineeditdlg.h>
#endif
#include <config.h>
@ -540,11 +536,7 @@ bool NameObjectActionsProvider::executeAction(
TQRegExpValidator* rev = new TQRegExpValidator( re, &doc );
TQString caption = i18n( "Set Object Name" );
TQString label = i18n( "Set Name of this Object:" );
#if KDE_IS_VERSION( 3, 1, 90 )
name = KInputDialog::getText( caption, label, name, &ok, &w, 0, rev );
#else
name = KLineEditDlg::getText( caption, label, name, &ok, &w, rev );
#endif
if ( ok )
{
bool justadded = false;

@ -15,9 +15,6 @@
* *
***************************************************************************/
#include <tdeversion.h>
#if KDE_IS_VERSION( 3, 2, 90 )
#include <tdeapplication.h>
#include <tdeaction.h>
#include <kdebug.h>
@ -170,4 +167,3 @@ void KSNewStuff::slotProcessEvents() { tdeApp->processEvents( 500 ); }
#include "ksnewstuff.moc"
#endif // KDE >= 3.2.90

@ -81,10 +81,7 @@
#include "telescopewizardprocess.h"
#include "telescopeprop.h"
#include "fitsviewer.h"
#if ( KDE_IS_VERSION( 3, 2, 90 ) )
#include "ksnewstuff.h"
#endif // KDE >= 3.2.90
#include "imagesequence.h"
//This file contains function definitions for Actions declared in kstars.h
@ -173,10 +170,8 @@ void KStars::slotWizard() {
}
void KStars::slotDownload() {
#if ( KDE_IS_VERSION( 3, 2, 90 ) )
if (!kns) kns = new KSNewStuff( this );
kns->download();
#endif //KDE >= 3.2.90
}
void KStars::slotLCGenerator() {

@ -40,11 +40,6 @@ KSWizard::KSWizard( TQWidget *parent, const char *name )
//Removing telescope page for now...
removePage( page(2) );
//Remove Download page if KDE < 3.2.90
#if ( ! KDE_IS_VERSION( 3, 2, 90 ) )
removePage( page(3) );
#endif
//each page should have a finish button
for ( unsigned int i=0; i<((unsigned int) pageCount()); ++i ) {
setFinishEnabled( page(i), true );
@ -76,14 +71,11 @@ KSWizard::KSWizard( TQWidget *parent, const char *name )
// }
// Banner3->setPixmap( im );
//Only load the download page banner if KDE >= 3.2.90
#if ( KDE_IS_VERSION( 3, 2, 90 ) )
if ( KSUtils::openDataFile( imFile, "wzdownload.png" ) ) {
imFile.close(); //Just need the filename...
im.load( imFile.name() );
}
Banner4->setPixmap( im );
#endif
//connect signals/slots
connect( CityListBox, TQ_SIGNAL( selectionChanged() ), this, TQ_SLOT( slotChangeCity() ) );
@ -92,9 +84,7 @@ KSWizard::KSWizard( TQWidget *parent, const char *name )
connect( CountryFilter, TQ_SIGNAL( textChanged( const TQString & ) ), this, TQ_SLOT( slotFilterCities() ) );
//Uncomment if we ever need the telescope page...
// connect( TelescopeWizardButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotTelescopeSetup() ) );
#if ( KDE_IS_VERSION( 3, 2, 90 ) )
connect( DownloadButton, TQ_SIGNAL( clicked() ), ksw, TQ_SLOT( slotDownload() ) );
#endif
//Initialize Geographic Location page
filteredCityList.setAutoDelete( false );

@ -112,9 +112,7 @@ void ThumbnailPicker::slotFillList() {
TQFile *tmpFile = ktf.file();
ktf.unlink(); //just need filename
JobList.append( TDEIO::copy( u, KURL( tmpFile->name() ), false ) ); //false = no progress window
#if KDE_IS_VERSION( 3, 3, 90 )
((TDEIO::CopyJob*)JobList.current())->setInteractive( false ); // suppress error dialogs
#endif
connect (JobList.current(), TQ_SIGNAL (result(TDEIO::Job *)), TQ_SLOT (downloadReady (TDEIO::Job *)));
}
@ -340,9 +338,7 @@ void ThumbnailPicker::slotSetFromURL() {
TQFile *tmpFile = ktf.file();
ktf.unlink(); //just need filename
JobList.append( TDEIO::copy( u, KURL( tmpFile->name() ), false ) ); //false = no progress window
#if KDE_IS_VERSION( 3, 3, 90 )
((TDEIO::CopyJob*)JobList.current())->setInteractive( false ); // suppress error dialogs
#endif
connect (JobList.current(), TQ_SIGNAL (result(TDEIO::Job *)), TQ_SLOT (downloadReady (TDEIO::Job *)));
//

Loading…
Cancel
Save