+
+#include "key_dialog.h"
+
+
+KeyDialog::KeyDialog(const Glib::ustring& title, bool dato):
+ Gtk::Dialog(title + " Clave", true, true),
+ label_key("Clave"), label_val("Dato")
+{
+ hbox_key.add(label_key);
+ hbox_key.add(entry_key);
+ get_vbox()->add(hbox_key);
+ if (dato)
+ {
+ hbox_val.add(label_val);
+ hbox_val.add(entry_val);
+ get_vbox()->add(hbox_val);
+ }
+ add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL);
+ add_button(Gtk::StockID("gtk-ok"), Gtk::RESPONSE_OK);
+ show_all ();
+}
+
+Glib::ustring KeyDialog::key()
+{
+ return entry_key.get_text();
+}
+
+Glib::ustring KeyDialog::val()
+{
+ return entry_val.get_text();
+}
+