From 448aa394b9e7cec855873ad888b9c1ac97a8c68a Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Thu, 15 Nov 2012 01:57:19 +0100 Subject: cleaned up command line updating: the interface is responsible for drawing the "*" (if it wants to) --- interface-gtk.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'interface-gtk.cpp') 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 -- cgit v1.2.3