*/
-#include <gdkmm/window.h>
+#include <gtkmm/stock.h>
#include "ardour_message.h"
#include "i18n.h"
using namespace std;
using namespace Gtk;
-
ArdourMessage::ArdourMessage (Gtk::Window* parent,
string name, string msg,
bool grab_focus, bool auto_run)
: ArdourDialog (name),
- ok_button (_("OK"))
+ label (msg)
{
- set_keyboard_input (true);
-
- label.set_text (msg);
- label.set_alignment (0.5, 0.5);
label.set_name (X_("PrompterLabel"));
+ label.set_justify (JUSTIFY_CENTER);
+ label.show ();
+
+ get_vbox()->pack_start (label);
- ok_button.set_name ("EditorGTKButton");
- ok_button.signal_clicked().connect (bind (mem_fun(*this, &ArdourDialog::stop), 1));
-
- packer.set_spacing (10);
- packer.set_border_width (10);
- packer.pack_start (label);
- packer.pack_start (ok_button);
+ Button* ok_button = add_button (Stock::OK, RESPONSE_ACCEPT);
set_name (X_("Prompter"));
set_position (Gtk::WIN_POS_MOUSE);
set_modal (true);
- add (packer);
- show_all ();
-
- realize();
- get_window()->set_decorations (Gdk::WMDecoration (GDK_DECOR_BORDER|GDK_DECOR_RESIZEH));
+ set_type_hint (Gdk::WINDOW_TYPE_HINT_MENU);
if (grab_focus) {
- ok_button.grab_focus ();
+ ok_button->grab_focus ();
}
if (parent) {