Mercurial > pidgin.yaz
comparison src/gtkimhtml.c @ 5105:4cfc49e31c2e
[gaim-migrate @ 5468]
David Brigada (jsi) writes:
" This patch changes GTK_WRAP_WORD to GTK_WRAP_WORD_CHAR
throughout the sources. That fixes a bug where long
single-word input into GtkTextViews and similar would
cause the textview to expand, causing the window to
expand. This fix depends on a patch to GTK+ that is in
current CVS but not yet released. To address the
backwards-compatibility issue, GTK_WRAP_WORD_CHAR is
#defined to GTK_WRAP_WORD when not defined by GTK+'s
header files.
The only problem I can forsee is binary compatibility;
if Gaim is compiled under a GTK+ CVS (or a future
release) environment, and then run under a GTK+ 2.2.1
or earlier environment, behavior is undefined; the text
area will probably not wrap at all. However, source
compatibility is maintained."
basically, gaim will start wrapping text in any version of gtk2 that supports it,
and should work exactly the same in any version that still has the bug.
many thanks to David for his hard work.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 11 Apr 2003 04:23:55 +0000 |
parents | a20a644e0da4 |
children | be43e51c523c |
comparison
equal
deleted
inserted
replaced
5104:a20a644e0da4 | 5105:4cfc49e31c2e |
---|---|
49 # define _(x) (x) | 49 # define _(x) (x) |
50 #endif | 50 #endif |
51 | 51 |
52 #include <pango/pango-font.h> | 52 #include <pango/pango-font.h> |
53 | 53 |
54 /* GTK+ < 2.2.2 hack, see ui.h for details. */ | |
55 #ifndef GTK_WRAP_WORD_CHAR | |
56 #define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD | |
57 #endif | |
58 | |
54 #define TOOLTIP_TIMEOUT 500 | 59 #define TOOLTIP_TIMEOUT 500 |
55 | 60 |
56 static gboolean gtk_motion_event_notify(GtkWidget *imhtml, GdkEventMotion *event, gpointer user_data); | 61 static gboolean gtk_motion_event_notify(GtkWidget *imhtml, GdkEventMotion *event, gpointer user_data); |
57 static gboolean gtk_leave_event_notify(GtkWidget *imhtml, GdkEventCrossing *event, gpointer user_data); | 62 static gboolean gtk_leave_event_notify(GtkWidget *imhtml, GdkEventCrossing *event, gpointer user_data); |
58 | 63 |
205 GtkTextIter iter; | 210 GtkTextIter iter; |
206 imhtml->text_buffer = gtk_text_buffer_new(NULL); | 211 imhtml->text_buffer = gtk_text_buffer_new(NULL); |
207 gtk_text_buffer_get_end_iter (imhtml->text_buffer, &iter); | 212 gtk_text_buffer_get_end_iter (imhtml->text_buffer, &iter); |
208 imhtml->end = gtk_text_buffer_create_mark(imhtml->text_buffer, NULL, &iter, FALSE); | 213 imhtml->end = gtk_text_buffer_create_mark(imhtml->text_buffer, NULL, &iter, FALSE); |
209 gtk_text_view_set_buffer(GTK_TEXT_VIEW(imhtml), imhtml->text_buffer); | 214 gtk_text_view_set_buffer(GTK_TEXT_VIEW(imhtml), imhtml->text_buffer); |
210 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(imhtml), GTK_WRAP_WORD); | 215 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(imhtml), GTK_WRAP_WORD_CHAR); |
211 gtk_text_view_set_editable(GTK_TEXT_VIEW(imhtml), FALSE); | 216 gtk_text_view_set_editable(GTK_TEXT_VIEW(imhtml), FALSE); |
212 gtk_text_view_set_pixels_below_lines(GTK_TEXT_VIEW(imhtml), 5); | 217 gtk_text_view_set_pixels_below_lines(GTK_TEXT_VIEW(imhtml), 5); |
213 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(imhtml), FALSE); | 218 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(imhtml), FALSE); |
214 /*gtk_text_view_set_justification(GTK_TEXT_VIEW(imhtml), GTK_JUSTIFY_FILL);*/ | 219 /*gtk_text_view_set_justification(GTK_TEXT_VIEW(imhtml), GTK_JUSTIFY_FILL);*/ |
215 | 220 |