diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-07-30 10:56:10 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-07-30 10:56:10 +0000 |
| commit | 1723f7a2cc084d5fbe35ad3f9e00cb17506d3a4a (patch) | |
| tree | 703165983f1df0a965bb380b2b3aa3f7b65c1e8a /src/ui | |
| parent | fix invisible selection in the list; remove stripes; fix undo comment (diff) | |
| download | inkscape-1723f7a2cc084d5fbe35ad3f9e00cb17506d3a4a.tar.gz inkscape-1723f7a2cc084d5fbe35ad3f9e00cb17506d3a4a.zip | |
Make text widget for TextParams work and re-enable it
(bzr r6469)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/widget/registered-widget.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/text.cpp | 6 | ||||
| -rw-r--r-- | src/ui/widget/text.h | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp index b91e5d998..2cc6e3c62 100644 --- a/src/ui/widget/registered-widget.cpp +++ b/src/ui/widget/registered-widget.cpp @@ -273,6 +273,8 @@ RegisteredText::on_activate() write_to_xml(os.str().c_str()); set_sensitive(true); + setText(os.str().c_str()); + _wr->setUpdating (false); } diff --git a/src/ui/widget/text.cpp b/src/ui/widget/text.cpp index 974e85054..3284af54a 100644 --- a/src/ui/widget/text.cpp +++ b/src/ui/widget/text.cpp @@ -39,7 +39,6 @@ Text::Text(Glib::ustring const &label, Glib::ustring const &tooltip, : Labelled(label, tooltip, new Gtk::Entry(), suffix, icon, mnemonic), setProgrammatically(false) { - //static_cast<Gtk::Entry*>(_widget)->set_numeric(); } /** Get the text in the entry */ @@ -47,17 +46,15 @@ const char * Text::getText() const { g_assert(_widget != NULL); - //return g_strdup_printf("%f", static_cast<Gtk::SpinButton*>(_widget)->get_value()); return static_cast<Gtk::Entry*>(_widget)->get_text().c_str(); } /** Sets the text of the text entry */ void -Text::setText(char* text) +Text::setText(const char* text) { g_assert(_widget != NULL); setProgrammatically = true; // callback is supposed to reset back, if it cares - //static_cast<Gtk::SpinButton*>(_widget)->set_value(42.43); // FIXME: set correctly static_cast<Gtk::Entry*>(_widget)->set_text(text); // FIXME: set correctly } @@ -65,7 +62,6 @@ Text::setText(char* text) Glib::SignalProxy0<void> Text::signal_activate() { - //return static_cast<Gtk::SpinButton*>(_widget)->signal_value_changed(); return static_cast<Gtk::Entry*>(_widget)->signal_activate(); } diff --git a/src/ui/widget/text.h b/src/ui/widget/text.h index a1ec03355..038e6e5dd 100644 --- a/src/ui/widget/text.h +++ b/src/ui/widget/text.h @@ -34,7 +34,7 @@ public: const char* getText() const; - void setText(char* text); + void setText(const char* text); void update(); |
