Skip to content

Commit

Permalink
bit cleanup and connect dialog directly to menu
Browse files Browse the repository at this point in the history
  • Loading branch information
mharj authored and amorilia committed Nov 4, 2012
1 parent 750483c commit faa4991
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
6 changes: 3 additions & 3 deletions NifSkope.pro
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ SOURCES += \
RESOURCES += \
nifskope.qrc

FORMS += \
ui/about_dialog.ui

fsengine {
DEFINES += FSENGINE
HEADERS += \
Expand Down Expand Up @@ -256,6 +259,3 @@ console {
TRANSLATIONS += lang/NifSkope_de.ts lang/NifSkope_fr.ts

# vim: set filetype=config :

FORMS += \
ui/about_dialog.ui
8 changes: 1 addition & 7 deletions nifskope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,6 @@ void NifSkope::migrateSettings() const
/*
* main GUI window
*/

void NifSkope::about()
{
aboutDialog->show();
}

void NifSkope::sltResetBlockDetails()
{
if (tree)
Expand Down Expand Up @@ -325,7 +319,7 @@ NifSkope::NifSkope()
connect( aNifToolsDownloads, SIGNAL( triggered() ), this, SLOT( openURL() ) );

aNifSkope = new QAction( tr("About &NifSkope"), this );
connect( aNifSkope, SIGNAL( triggered() ), this, SLOT( about() ) );
connect( aNifSkope, SIGNAL( triggered() ), aboutDialog, SLOT( open() ) );

aAboutQt = new QAction( tr("About &Qt"), this );
connect( aAboutQt, SIGNAL( triggered() ), qApp, SLOT( aboutQt() ) );
Expand Down
4 changes: 1 addition & 3 deletions nifskope.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ public slots:
//! A slot for starting the XML checker.
void sltShredder();

//! Display the "About NifSkope" window.
void about();

//! Reset "block details"
void sltResetBlockDetails();

Expand Down Expand Up @@ -186,6 +183,7 @@ protected slots:
void initToolBars();
void initMenu();

//! "About NifSkope" dialog.
QWidget *aboutDialog;

void setViewFont( const QFont & );
Expand Down
1 change: 0 additions & 1 deletion ui/about_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
AboutDialog::AboutDialog(QWidget *parent)
: QDialog(parent) {
ui.setupUi(this);
this->setFixedSize(600,400);
this->setWindowTitle( tr("About NifSkope %1 (revision %2)").arg(NIFSKOPE_VERSION).arg(NIFSKOPE_REVISION) );
QString text = tr(
"<p style='white-space:pre'>NifSkope is a tool for analyzing and editing NetImmerse/Gamebryo '.nif' files.</p>"
Expand Down
12 changes: 12 additions & 0 deletions ui/about_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>600</width>
<height>400</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>600</width>
<height>400</height>
</size>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
Expand Down

0 comments on commit faa4991

Please sign in to comment.