permit initial contents of a FloatingTextEntry
This commit is contained in:
parent
f018f3d37a
commit
8641dcdb0c
@ -25,7 +25,7 @@
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
FloatingTextEntry::FloatingTextEntry ()
|
||||
FloatingTextEntry::FloatingTextEntry (const std::string& initial_contents)
|
||||
: ArdourWindow ("")
|
||||
, entry_changed (false)
|
||||
{
|
||||
@ -33,6 +33,10 @@ FloatingTextEntry::FloatingTextEntry ()
|
||||
set_position (Gtk::WIN_POS_MOUSE);
|
||||
set_border_width (0);
|
||||
|
||||
if (!initial_contents.empty()) {
|
||||
entry.set_text (initial_contents);
|
||||
}
|
||||
|
||||
entry.show ();
|
||||
entry.signal_changed().connect (sigc::mem_fun (*this, &FloatingTextEntry::changed));
|
||||
entry.signal_activate().connect (sigc::mem_fun (*this, &FloatingTextEntry::activated));
|
||||
|
@ -27,7 +27,7 @@
|
||||
class FloatingTextEntry : public ArdourWindow
|
||||
{
|
||||
public:
|
||||
FloatingTextEntry ();
|
||||
FloatingTextEntry (const std::string& initial_contents);
|
||||
|
||||
sigc::signal1<void,std::string> use_text;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user