minor enhancement
This commit is contained in:
parent
bae7211fb8
commit
cb04535d05
|
@ -14,12 +14,12 @@ AttachDialog::AttachDialog(QWidget* parent) : QDialog(parent), ui(new Ui::Attach
|
|||
// Setup actions/shortcuts
|
||||
//
|
||||
// Enter key as shortcut for "Attach"
|
||||
mAttachAction = new QAction(tr("Attach"), this);
|
||||
mAttachAction = new QAction(DIcon("attach.png"), tr("Attach"), this);
|
||||
mAttachAction->setShortcut(QKeySequence("enter"));
|
||||
connect(mAttachAction, SIGNAL(triggered()), this, SLOT(on_btnAttach_clicked()));
|
||||
|
||||
// F5 as shortcut to refresh view
|
||||
mRefreshAction = new QAction(tr("Refresh"), this);
|
||||
mRefreshAction = new QAction(DIcon("arrow-restart.png"), tr("Refresh"), this);
|
||||
mRefreshAction->setShortcut(ConfigShortcut("ActionRefresh"));
|
||||
ui->btnRefresh->setText(tr("Refresh") + QString(" (%1)").arg(mRefreshAction->shortcut().toString()));
|
||||
connect(mRefreshAction, SIGNAL(triggered()), this, SLOT(refresh()));
|
||||
|
|
|
@ -345,28 +345,39 @@
|
|||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QListWidget" name="listType">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>20</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="editCode">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>80</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="handleWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="childrenCollapsible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QListWidget" name="listType">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>20</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPlainTextEdit" name="editCode">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>80</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
|
|
|
@ -1786,6 +1786,11 @@ void MainWindow::changeCommandLine()
|
|||
}
|
||||
}
|
||||
|
||||
static void onlineManual()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("http://help.x64dbg.com"));
|
||||
}
|
||||
|
||||
void MainWindow::displayManual()
|
||||
{
|
||||
duint setting = 0;
|
||||
|
@ -1793,10 +1798,17 @@ void MainWindow::displayManual()
|
|||
{
|
||||
// Open the Windows CHM in the upper directory
|
||||
if(!QDesktopServices::openUrl(QUrl(QUrl::fromLocalFile(QString("%1/../x64dbg.chm").arg(QCoreApplication::applicationDirPath())))))
|
||||
SimpleErrorBox(this, tr("Error"), tr("Manual cannot be opened. Please check if x64dbg.chm exists and ensure there is no other problems with your system."));
|
||||
{
|
||||
QMessageBox messagebox(QMessageBox::Critical, tr("Error"),
|
||||
tr("Manual cannot be opened. Please check if x64dbg.chm exists and ensure there is no other problems with your system.") + '\n'
|
||||
+ tr("Do you want to open online manual at http://help.x64dbg.com ?"),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if(messagebox.exec() == QMessageBox::Yes)
|
||||
onlineManual();
|
||||
}
|
||||
}
|
||||
else
|
||||
QDesktopServices::openUrl(QUrl("http://help.x64dbg.com"));
|
||||
onlineManual();
|
||||
}
|
||||
|
||||
void MainWindow::canClose()
|
||||
|
@ -1948,10 +1960,13 @@ void MainWindow::updateFavouriteTools()
|
|||
if(BridgeSettingGet("Favourite", QString("ToolShortcut%1").arg(i).toUtf8().constData(), buffer))
|
||||
if(*buffer && strcmp(buffer, "NOT_SET") != 0)
|
||||
setGlobalShortcut(newAction, QKeySequence(QString(buffer)));
|
||||
QString description;
|
||||
if(BridgeSettingGet("Favourite", QString("ToolDescription%1").arg(i).toUtf8().constData(), buffer))
|
||||
newAction->setText(QString(buffer));
|
||||
description = QString(buffer);
|
||||
else
|
||||
newAction->setText(toolPath);
|
||||
description = toolPath;
|
||||
newAction->setText(description);
|
||||
newAction->setStatusTip(description);
|
||||
// Get the icon of the executable
|
||||
QString file, cmd;
|
||||
QIcon icon;
|
||||
|
@ -1980,10 +1995,13 @@ void MainWindow::updateFavouriteTools()
|
|||
if(BridgeSettingGet("Favourite", QString("ScriptShortcut%1").arg(i).toUtf8().constData(), buffer))
|
||||
if(*buffer && strcmp(buffer, "NOT_SET") != 0)
|
||||
setGlobalShortcut(newAction, QKeySequence(QString(buffer)));
|
||||
QString description;
|
||||
if(BridgeSettingGet("Favourite", QString("ScriptDescription%1").arg(i).toUtf8().constData(), buffer))
|
||||
newAction->setText(QString(buffer));
|
||||
description = QString(buffer);
|
||||
else
|
||||
newAction->setText(scriptPath);
|
||||
description = scriptPath;
|
||||
newAction->setText(description);
|
||||
newAction->setStatusTip(description);
|
||||
connect(newAction, SIGNAL(triggered()), this, SLOT(clickFavouriteTool()));
|
||||
newAction->setIcon(DIcon("script-code.png"));
|
||||
ui->menuFavourites->addAction(newAction);
|
||||
|
@ -1999,6 +2017,7 @@ void MainWindow::updateFavouriteTools()
|
|||
for(unsigned int i = 1; BridgeSettingGet("Favourite", QString("Command%1").arg(i).toUtf8().constData(), buffer); i++)
|
||||
{
|
||||
QAction* newAction = new QAction(QString(buffer), actionManageFavourites);
|
||||
newAction->setStatusTip(QString(buffer));
|
||||
// Set up user data to be used in clickFavouriteTool()
|
||||
newAction->setData(QVariant(QString("Command")));
|
||||
if(BridgeSettingGet("Favourite", QString("CommandShortcut%1").arg(i).toUtf8().constData(), buffer))
|
||||
|
|
|
@ -18,6 +18,7 @@ UpdateChecker::UpdateChecker(QWidget* parent)
|
|||
|
||||
void UpdateChecker::checkForUpdates()
|
||||
{
|
||||
GuiAddStatusBarMessage(tr("Checking for updates...\n").toUtf8().constData());
|
||||
get(QNetworkRequest(QUrl("https://api.github.com/repos/x64dbg/x64dbg/releases/latest")));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue