Skip to content

Commit

Permalink
add help message
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelzhouisnotwhite committed Jun 6, 2024
1 parent 1feb3bb commit 53bdb97
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/tools/capturetool.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class CaptureTool : public QObject
{}

// TODO unused
virtual void setCapture(const QPixmap& pixmap){};
virtual void setCapture(const QPixmap& pixmap) {};

// Returns false when the tool is in an inconsistent state and shouldn't
// be included in the tool undo/redo stack.
Expand Down
9 changes: 4 additions & 5 deletions src/utils/confighandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,12 @@ bool verifyLaunchFile()
* misbehave.
*/
#define OPTION(KEY, TYPE) \
{ \
QStringLiteral(KEY), QSharedPointer<ValueHandler>(new TYPE) \
}
{ QStringLiteral(KEY), QSharedPointer<ValueHandler>(new TYPE) }

#define SHORTCUT(NAME, DEFAULT_VALUE) \
{ \
QStringLiteral(NAME), QSharedPointer<KeySequence>(new KeySequence(QKeySequence(QLatin1String(DEFAULT_VALUE)))) }
{ QStringLiteral(NAME), \
QSharedPointer<KeySequence>( \
new KeySequence(QKeySequence(QLatin1String(DEFAULT_VALUE)))) }

/**
* This map contains all the information that is needed to parse, verify and
Expand Down
6 changes: 5 additions & 1 deletion src/widgets/capture/capturewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ CaptureWidget::~CaptureWidget()
m_context.origScreenshot, geometry);
}
} else {
emit Flameshot::instance()->captureFailed();
emit Flameshot::instance() -> captureFailed();
}
}

Expand Down Expand Up @@ -441,6 +441,10 @@ void CaptureWidget::initHelpMessage()
keyMap << QPair(ConfigHandler().shortcut("TYPE_TOGGLE_PANEL"),
tr("Open side panel"));
keyMap << QPair(tr("Esc"), tr("Exit"));
if (ConfigHandler().backtrackingEnable()) {
keyMap << QPair(tr("Comma"), tr("Show screen history backward"));
keyMap << QPair(tr("Period"), tr("Show screen history forward"));

This comment has been minimized.

Copy link
@mmahmoudian

mmahmoudian Jun 6, 2024

Member

I suggest being consistent with the naming. This would help the user to not get lost while using a feature. You have named the feature "back-tracking" and in this help message it is called "history". For example I can suggest "back-tracking forward" and "back-tracking backward".

}

m_helpMessage = OverlayMessage::compileFromKeyMap(keyMap);
}
Expand Down

0 comments on commit 53bdb97

Please sign in to comment.