From 1d03169f6e06eae9d147e77cedb87344ed23b857 Mon Sep 17 00:00:00 2001 From: Mirko Lindner Date: Sat, 20 Feb 2010 21:10:20 +0100 Subject: [PATCH] updates to dialog classes Signed-off-by: Mirko Lindner --- src/message_dialog.cc | 14 ++++---------- src/message_dialog.hh | 1 + src/search_dialog.cc | 3 ++- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/message_dialog.cc b/src/message_dialog.cc index f20e856..93fdee8 100644 --- a/src/message_dialog.cc +++ b/src/message_dialog.cc @@ -25,18 +25,12 @@ message_dialog::message_dialog(main_window* parent, std::string title, std::string txt) { - Gtk::Dialog dialog(title, parent, true); Gtk::Label label(txt); - 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(); + this->get_vbox()->pack_start(label, true, true); + this->add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK); + this->show_all(); + int result = this->run(); if (result == Gtk::RESPONSE_OK) { } else { diff --git a/src/message_dialog.hh b/src/message_dialog.hh index 8ab5f67..d53183b 100644 --- a/src/message_dialog.hh +++ b/src/message_dialog.hh @@ -29,6 +29,7 @@ class message_dialog : public Gtk::Dialog{ public: message_dialog(main_window* parent, std::string, std::string); + message_dialog(main_window* parent, int cat); }; diff --git a/src/search_dialog.cc b/src/search_dialog.cc index be3f712..9e62834 100644 --- a/src/search_dialog.cc +++ b/src/search_dialog.cc @@ -22,10 +22,11 @@ #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:");