Skip to content

Commit

Permalink
resolves issue #10, #12 and #14
Browse files Browse the repository at this point in the history
  • Loading branch information
gcarmix committed Jun 30, 2023
1 parent 99f769c commit ed3bd2b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hexwalk/hexwalk.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ QMAKE_LFLAGS += -no-pie -lstdc++ -Bstatic -static-libgcc -static-libstdc++ -stat
#Only for Mac:
#ICON = images/hexwalk.icns
###############
VERSION = "1.3.1"
VERSION = "1.3.2"
QMAKE_TARGET_COPYRIGHT = "gcarmix"
QMAKE_TARGET_PRODUCT = "HexWalk"
HEADERS = \
Expand Down
14 changes: 10 additions & 4 deletions hexwalk/hexwalkmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ void HexWalkMain::createActions()
connect(findAct, SIGNAL(triggered()), this, SLOT(showSearchDialog()));

overwriteAct = new QAction(tr("&Overwrite/Insert mode"), this);
overwriteAct->setShortcut(QKeySequence(Qt::Key_O));
overwriteAct->setShortcut(QKeySequence(Qt::Key_Insert));
overwriteAct->setStatusTip(tr("Toggle overwrite/insert mode"));
connect(overwriteAct, SIGNAL(triggered()), this, SLOT(toggleOverwriteMode()));

Expand Down Expand Up @@ -290,9 +290,16 @@ void HexWalkMain::setCurrentFile(const QString &fileName)
isUntitled = fileName.isEmpty();
setWindowModified(false);
if (fileName.isEmpty())
{
setWindowFilePath("HexWalk");
this->setWindowTitle("HexWalk");
}
else
{
setWindowFilePath(curFile + " - HexWalk");
this->setWindowTitle("HexWalk [" + curFile + "]");
}

}

void HexWalkMain::loadFile(const QString &fileName)
Expand All @@ -315,7 +322,7 @@ void HexWalkMain::loadFile(const QString &fileName)
void HexWalkMain::about()
{
QMessageBox::about(this, tr("About HexWalk"),
tr("HexWalk v1.3.1 is an HEX editor/viewer/analyzer.\r\n"
tr("HexWalk v1.3.2 is an HEX editor/viewer/analyzer.\r\n"
"It is open source and it is based on QT, qhexedit2, binwalk\r\n"
"Sources at https://github.com/gcarmix/HexWalk\r\n"));
}
Expand Down Expand Up @@ -660,7 +667,6 @@ void HexWalkMain::readSettings()
hexEdit->setHighlighting(true);
hexEdit->setOverwriteMode(true);
int bytesperline = settings.value("BytesPerLine").toInt();
qInfo()<<bytesperline;
if( bytesperline > 0 && bytesperline < 64 )
{
hexEdit->setBytesPerLine(bytesperline);
Expand All @@ -669,7 +675,6 @@ void HexWalkMain::readSettings()
else{
bytesperline = 16;
hexEdit->setBytesPerLine(bytesperline);
qInfo()<<bytesperline;
widthText->setText(QString("%1").arg(bytesperline));
}
/*
Expand Down Expand Up @@ -722,6 +727,7 @@ void HexWalkMain::dropEvent(QDropEvent *event)
{
QList<QUrl> urls = event->mimeData()->urls();
QString filePath = urls.at(0).toLocalFile();
adjustForCurrentFile(filePath);
loadFile(filePath);
event->accept();
}
Expand Down

0 comments on commit ed3bd2b

Please sign in to comment.