Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2000:
[Freeciv-Dev] Re: Small bug in chat window (PR#328)
Home

[Freeciv-Dev] Re: Small bug in chat window (PR#328)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mueller@xxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Small bug in chat window (PR#328)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sat, 1 Apr 2000 14:18:57 +1000 (EST)

On Sun, 26 Mar 2000, mueller@xxxxxxxx wrote:

> In the chat window there is always an unnecessary empty line between
> the displayed text and the entry field. Thats certainly because all
> output is made with a newline at the end. Well, this empty line just
> takes up screen space, it would be nice if one could omit the last
> newline until new output is made.

(This problem only affects the Gtk+ client, the Xaw client is ok.)

At the (small) cost of introducing a spurious blank line at the
start, the following patch seems to work.

-- David

--- freeciv-cvs/client/gui-gtk/chatline.c       Sun Jan  2 22:51:56 2000
+++ freeciv-mod/client/gui-gtk/chatline.c       Sat Apr  1 14:13:43 2000
@@ -51,8 +51,8 @@
 void append_output_window(char *astring)
 {
   gtk_text_freeze(GTK_TEXT(main_message_area));
-  gtk_text_insert(GTK_TEXT(main_message_area), NULL, NULL, NULL, astring, -1);
   gtk_text_insert(GTK_TEXT(main_message_area), NULL, NULL, NULL, "\n", -1);
+  gtk_text_insert(GTK_TEXT(main_message_area), NULL, NULL, NULL, astring, -1);
   gtk_text_thaw(GTK_TEXT(main_message_area));
 
   /* move the scrollbar forward by a ridiculous amount */

[Prev in Thread] Current Thread [Next in Thread]