summaryrefslogtreecommitdiffstats
path: root/kig
diff options
context:
space:
mode:
Diffstat (limited to 'kig')
-rw-r--r--kig/kig/kig.cpp49
-rw-r--r--kig/kig/kig.h25
-rw-r--r--kig/kig/kig_part.cpp13
-rw-r--r--kig/misc/common.cpp15
-rw-r--r--kig/misc/common.h10
-rw-r--r--kig/misc/coordinate_system.cpp4
-rw-r--r--kig/modes/popup.cpp8
7 files changed, 0 insertions, 124 deletions
diff --git a/kig/kig/kig.cpp b/kig/kig/kig.cpp
index 4dd41cc3..9f63636c 100644
--- a/kig/kig/kig.cpp
+++ b/kig/kig/kig.cpp
@@ -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 );
}
diff --git a/kig/kig/kig.h b/kig/kig/kig.h
index d6681570..95d7eef4 100644
--- a/kig/kig/kig.h
+++ b/kig/kig/kig.h
@@ -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;
diff --git a/kig/kig/kig_part.cpp b/kig/kig/kig_part.cpp
index be58e391..c5b59b8d 100644
--- a/kig/kig/kig_part.cpp
+++ b/kig/kig/kig_part.cpp
@@ -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." ) );
diff --git a/kig/misc/common.cpp b/kig/misc/common.cpp
index 5e82d564..9553b14f 100644
--- a/kig/misc/common.cpp
+++ b/kig/misc/common.cpp
@@ -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 );
diff --git a/kig/misc/common.h b/kig/misc/common.h
index e06bccef..8581326b 100644
--- a/kig/misc/common.h
+++ b/kig/misc/common.h
@@ -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;
diff --git a/kig/misc/coordinate_system.cpp b/kig/misc/coordinate_system.cpp
index 194a008f..bdd3f1da 100644
--- a/kig/misc/coordinate_system.cpp
+++ b/kig/misc/coordinate_system.cpp
@@ -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 );
diff --git a/kig/modes/popup.cpp b/kig/modes/popup.cpp
index 0a7e0265..21ba7626 100644
--- a/kig/modes/popup.cpp
+++ b/kig/modes/popup.cpp
@@ -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;