2009-10-30 13:17:56 +02:00
|
|
|
/***************************************************************************
|
|
|
|
* 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"
|
2009-12-28 00:37:18 +02:00
|
|
|
#include "vido.hh"
|
2009-10-30 13:17:56 +02:00
|
|
|
#include <gtkmm.h>
|
|
|
|
|
|
|
|
|
2009-12-28 00:37:18 +02:00
|
|
|
search_dialog::search_dialog(main_window* parent, const Glib::ustring& input)
|
2009-10-30 13:17:56 +02:00
|
|
|
{
|
|
|
|
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();
|
2009-12-28 00:37:18 +02:00
|
|
|
if (result == Gtk::RESPONSE_OK)
|
|
|
|
{
|
2009-10-30 15:13:07 +02:00
|
|
|
set_search(entry.get_text().c_str());
|
2009-10-30 13:17:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|