diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-15 01:57:19 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-15 01:57:19 +0100 |
commit | 448aa394b9e7cec855873ad888b9c1ac97a8c68a (patch) | |
tree | 051a5bde8b4789013c50d723608929ff3307e935 /interface-gtk.cpp | |
parent | 905e69b74fe6e822e0d00245e2c210e9aadb6437 (diff) | |
download | sciteco-448aa394b9e7cec855873ad888b9c1ac97a8c68a.tar.gz |
cleaned up command line updating: the interface is responsible for drawing the "*" (if it wants to)
Diffstat (limited to 'interface-gtk.cpp')
-rw-r--r-- | interface-gtk.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/interface-gtk.cpp b/interface-gtk.cpp index 55e546e..7fc645e 100644 --- a/interface-gtk.cpp +++ b/interface-gtk.cpp @@ -106,10 +106,14 @@ InterfaceGtk::msg(MessageType type, const gchar *fmt, ...) } void -InterfaceGtk::cmdline_update(const gchar *cmdline_str) +InterfaceGtk::cmdline_update(const gchar *cmdline) { - gtk_entry_set_text(GTK_ENTRY(cmdline_widget), cmdline_str); - gtk_editable_set_position(GTK_EDITABLE(cmdline_widget), -1); + gint pos = 1; + + gtk_entry_set_text(GTK_ENTRY(cmdline_widget), "*"); + gtk_editable_insert_text(GTK_EDITABLE(cmdline_widget), + cmdline, -1, &pos); + gtk_editable_set_position(GTK_EDITABLE(cmdline_widget), pos); } void |