Fix tests compilation after Control API changes
[ardour.git] / libs / gtkmm2ext / choice.cc
index d00d75d38b758e1f796b6ee18fad0445c18c8f97..363942eab7d834d023b0657ea879599ed356a4fd 100644 (file)
@@ -26,7 +26,8 @@ using namespace Gtkmm2ext;
 using namespace sigc;
 using namespace Gtk;
 
-Choice::Choice (string prompt, vector<string> choices, bool center)
+Choice::Choice (string title, string prompt, vector<string> choices, bool center)
+       : Dialog (title)
 {
        int n;
        vector<string>::iterator i;
@@ -39,13 +40,19 @@ Choice::Choice (string prompt, vector<string> choices, bool center)
 
        set_name ("ChoiceWindow");
 
+       HBox* dhbox = manage (new HBox());
+       Image* dimage = manage (new Gtk::Image(Stock::DIALOG_QUESTION, Gtk::ICON_SIZE_DIALOG));
        Label* label = manage (new Label (prompt));
-       label->show ();
+
+       dhbox->pack_start (*dimage, true, false, 10);
+       dhbox->pack_start  (*label, true, false, 10);
 
        get_vbox()->set_border_width (12);
-       get_vbox()->pack_start (*label);
+       get_vbox()->pack_start (*dhbox,  true, false);
        
        set_has_separator (false);
+       set_resizable (false);
+       show_all_children ();
 
        for (n = 0, i = choices.begin(); i != choices.end(); ++i, ++n) {
                add_button (*i, n);