From cb77d09be9e133f8179d36da0355b707ae3f9af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20H=C3=A4cker?= Date: Fri, 23 Sep 2016 20:23:46 +0200 Subject: [PATCH] fixed #72 --- po/gradio.pot | 2 +- src/Widgets/MainWindow.vala | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/po/gradio.pot b/po/gradio.pot index b05f062d..55ee8ded 100644 --- a/po/gradio.pot +++ b/po/gradio.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-23 20:16+0200\n" +"POT-Creation-Date: 2016-09-23 20:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/src/Widgets/MainWindow.vala b/src/Widgets/MainWindow.vala index 2764025f..efe3c410 100644 --- a/src/Widgets/MainWindow.vala +++ b/src/Widgets/MainWindow.vala @@ -191,14 +191,18 @@ namespace Gradio{ [GtkCallback] private void SearchButton_clicked(Gtk.Button button){ - discover_box.SearchButton_clicked(SearchEntry.get_text()); - DatabaseStack.set_visible_child_name("discover_box"); + if(!(SearchEntry.get_text() == "")){ + discover_box.SearchButton_clicked(SearchEntry.get_text()); + DatabaseStack.set_visible_child_name("discover_box"); + } } [GtkCallback] private void SearchEntry_activate(Gtk.Entry entry){ - discover_box.SearchButton_clicked(SearchEntry.get_text()); - DatabaseStack.set_visible_child_name("discover_box"); + if(!(SearchEntry.get_text() == "")){ + discover_box.SearchButton_clicked(SearchEntry.get_text()); + DatabaseStack.set_visible_child_name("discover_box"); + } } [GtkCallback]