Revision: 2153 http://geany.svn.sourceforge.net/geany/?rev=2153&view=rev Author: eht16 Date: 2008-01-09 05:36:22 -0800 (Wed, 09 Jan 2008)
Log Message: ----------- Add workaround for display problem in Message window: Truncate displayed string at 1024 bytes if it is longer.
Modified Paths: -------------- trunk/ChangeLog trunk/src/msgwindow.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-01-09 13:24:36 UTC (rev 2152) +++ trunk/ChangeLog 2008-01-09 13:36:22 UTC (rev 2153) @@ -6,6 +6,9 @@ Add GeanyWrapLabel (subclass of GtkLabel) to wrap text at any width. Use GeanyWrapLabel in preferences dialog and plugin manager dialog to save a lot of space and improve layout of descriptive texts. + * src/msgwindow.c: + Add workaround for display problem in Message window: + Truncate displayed string at 1024 bytes if it is longer.
2008-01-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/msgwindow.c =================================================================== --- trunk/src/msgwindow.c 2008-01-09 13:24:36 UTC (rev 2152) +++ trunk/src/msgwindow.c 2008-01-09 13:36:22 UTC (rev 2153) @@ -275,13 +275,24 @@ { GtkTreeIter iter; const GdkColor *color = get_color(msg_color); + gchar *tmp;
if (! ui_prefs.msgwindow_visible) msgwin_show_hide(TRUE);
+ // work around a strange problem when adding very long lines(greater than 4000 bytes) + // cut the string to a maximum of 1024 bytes and discard the rest + /// TODO find the real cause for the display problem / if it is GtkTreeView file a bug report + if (strlen(string) > 1024) + tmp = g_strndup(string, 1024); + else + tmp = g_strdup(string); + gtk_list_store_append(msgwindow.store_msg, &iter); - gtk_list_store_set(msgwindow.store_msg, &iter, 0, line, 1, idx, 2, color, 3, string, -1); + gtk_list_store_set(msgwindow.store_msg, &iter, 0, line, 1, idx, 2, color, 3, tmp, -1);
gtk_widget_set_sensitive(lookup_widget(app->window, "next_message1"), TRUE); + + g_free(tmp); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.