Commit 8b1f1d3f authored by Michael Reeves's avatar Michael Reeves

*kdialog, kmenu auto port.

parent f58e8260
......@@ -38,7 +38,7 @@
#include <QPushButton>
#include <algorithm>
#include <kmenu.h>
#include <QMenu>
#include <QAction>
#include <kmessagebox.h>
#include <kfiledialog.h>
......@@ -2003,7 +2003,7 @@ void DirectoryMergeWindow::mousePressEvent( QMouseEvent* e )
{
bool bThreeDirs = d->m_dirC.isValid();
KMenu m(this);
QMenu m(this);
if ( bThreeDirs )
{
m.addAction( d->m_pDirCurrentDoNothing );
......@@ -2076,7 +2076,7 @@ void DirectoryMergeWindow::contextMenuEvent(QContextMenuEvent* e)
if (!itemPath.isEmpty())
{
d->selectItemAndColumn(mi, true);
KMenu m(this);
QMenu m(this);
m.addAction( d->m_pDirCompareExplicit );
m.addAction( d->m_pDirMergeExplicit );
......
......@@ -54,6 +54,7 @@
#include <ktoolbar.h>
#include <kiconloader.h>
#include <kactioncollection.h>
#include <KConfigGroup>
// application specific includes
#include "kdiff3.h"
......@@ -734,7 +735,7 @@ void KDiff3App::slotFileSaveAs()
if ( m_bDirCompare )
m_pDirectoryMergeWindow->mergeResultSaved( m_outputFilename );
}
//setCaption(url.fileName(),doc->isModified());
//setWindowTitle(url.fileName(),doc->isModified());
m_bDefaultFilename = false;
}
......
......@@ -54,6 +54,9 @@
#ifndef KREPLACEMENTS_H
#include <kglobalsettings.h>
#include <KConfigGroup>
#include <QDialogButtonBox>
#include <QPushButton>
#endif
#define KDIFF3_CONFIG_GROUP "KDiff3 Options"
......@@ -486,11 +489,21 @@ OptionDialog::OptionDialog( bool bShowDirMergeSettings, QWidget *parent, char *n
{
setFaceType( List );
setWindowTitle( i18n("Configure") );
setButtons( Help|Default|Apply|Ok|Cancel );
setDefaultButton( Ok );
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::RestoreDefaults|QDialogButtonBox::Apply);
QWidget *mainWidget = new QWidget(this);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
mainLayout->addWidget(mainWidget);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
//PORTING SCRIPT: WARNING mainLayout->addWidget(buttonBox) must be last item in layout. Please move it.
mainLayout->addWidget(buttonBox);
okButton->setDefault(true);
setObjectName( name );
setModal( true );
showButtonSeparator( true );
setHelp( "kdiff3/index.html", QString::null );
setupFontPage();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment