/*************************************************************************** * Copyright (C) 2009 by Mirko Lindner * * mirko@qi-hardware.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "config.h" #include "search_dialog.hh" #include "vido.hh" #include #include "main_window.hh" search_dialog::search_dialog(main_window* parent, const Glib::ustring& input) { Gtk::Dialog dialog("Search", parent, true); Gtk::Label label("Enter search Term:"); dialog.get_vbox()->pack_start(label, true, true); Gtk::Entry entry; entry.set_text(""); dialog.get_vbox()->pack_start(entry, true, true); dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK); dialog.show_all(); int result = dialog.run(); if (result == Gtk::RESPONSE_OK) { getArticleFromTitle(entry.get_text().c_str()); } }