diff options
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 5 | ||||
-rw-r--r-- | src/gui/widgets/browserbox.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index c20eb4622..1419e213c 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -256,6 +256,11 @@ void BrowserBox::addRow(const std::string &row, bool atTop) updateHeight(); } +void BrowserBox::addRow(const std::string &cmd, char *text) +{ + addRow(strprintf("@@%s|%s@@", cmd.c_str(), text)); +} + void BrowserBox::addImage(const std::string &path) { if (!mEnableImages) diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h index cd69ce56f..e86f0288e 100644 --- a/src/gui/widgets/browserbox.h +++ b/src/gui/widgets/browserbox.h @@ -112,6 +112,11 @@ class BrowserBox : public gcn::Widget, */ void addRow(const std::string &row, bool atTop = false); + /** + * Adds a menu line to the browser. + */ + void addRow(const std::string &cmd, char *text); + void addImage(const std::string &path); /** |