mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:17:36 +00:00
IRCClient: Ignore empty strings from the toolbar action input boxes.
This commit is contained in:
parent
c151b0370d
commit
31bc42c530
1 changed files with 3 additions and 3 deletions
|
@ -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());
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue