summaryrefslogtreecommitdiff
path: root/Applications/IRCClient
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-19 02:30:16 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-19 02:30:16 +0100
commit31bc42c530c11491c68692a00ad7ce04e97e9d20 (patch)
tree8018766a78d18aba0d5845a6551002deb517804c /Applications/IRCClient
parentc151b0370d15a3be0c27925491873cb0a44a9662 (diff)
downloadserenity-31bc42c530c11491c68692a00ad7ce04e97e9d20.zip
IRCClient: Ignore empty strings from the toolbar action input boxes.
Diffstat (limited to 'Applications/IRCClient')
-rw-r--r--Applications/IRCClient/IRCAppWindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Applications/IRCClient/IRCAppWindow.cpp b/Applications/IRCClient/IRCAppWindow.cpp
index 30889f670a..abc6a16897 100644
--- a/Applications/IRCClient/IRCAppWindow.cpp
+++ b/Applications/IRCClient/IRCAppWindow.cpp
@@ -51,7 +51,7 @@ void IRCAppWindow::setup_actions()
{
m_join_action = GAction::create("Join channel", GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/16x16/irc-join.rgb", { 16, 16 }), [&] (auto&) {
GInputBox input_box("Enter nickname:", "Join channel", this);
- if (input_box.exec() == GInputBox::ExecOK)
+ if (input_box.exec() == GInputBox::ExecOK && !input_box.text_value().is_empty())
m_client.handle_join_action(input_box.text_value());
});
@@ -61,13 +61,13 @@ void IRCAppWindow::setup_actions()
m_whois_action = GAction::create("Whois user", GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/16x16/irc-whois.rgb", { 16, 16 }), [&] (auto&) {
GInputBox input_box("Enter nickname:", "IRC WHOIS lookup", this);
- if (input_box.exec() == GInputBox::ExecOK)
+ if (input_box.exec() == GInputBox::ExecOK && !input_box.text_value().is_empty())
m_client.handle_whois_action(input_box.text_value());
});
m_open_query_action = GAction::create("Open query", GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/16x16/irc-open-query.rgb", { 16, 16 }), [&] (auto&) {
GInputBox input_box("Enter nickname:", "Open IRC query with...", this);
- if (input_box.exec() == GInputBox::ExecOK)
+ if (input_box.exec() == GInputBox::ExecOK && !input_box.text_value().is_empty())
m_client.handle_open_query_action(input_box.text_value());
});