Mercurial > pidgin
comparison src/gtkimhtml.c @ 4903:872598a15968
[gaim-migrate @ 5237]
well that didn't fix it, and this is actually better
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 28 Mar 2003 07:48:17 +0000 |
parents | 0bbccc88bc67 |
children | 20c737bc03d7 |
comparison
equal
deleted
inserted
replaced
4902:0bbccc88bc67 | 4903:872598a15968 |
---|---|
1375 return FALSE; | 1375 return FALSE; |
1376 } | 1376 } |
1377 | 1377 |
1378 static gboolean gtk_size_allocate_cb(GtkWidget *widget, GtkAllocation *alloc, gpointer user_data) | 1378 static gboolean gtk_size_allocate_cb(GtkWidget *widget, GtkAllocation *alloc, gpointer user_data) |
1379 { | 1379 { |
1380 static int old_width = 0, old_height = 0; | 1380 static GdkRectangle old_rect = {0,0,0,0}; |
1381 | 1381 GdkRectangle rect; |
1382 if(old_width && (old_width != alloc->width || old_height != alloc->height)){ | 1382 |
1383 gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(widget), &rect); | |
1384 | |
1385 if(old_rect.width && (old_rect.width != rect.width || old_rect.height != rect.height)){ | |
1383 GList *iter = GTK_IMHTML(widget)->scalables; | 1386 GList *iter = GTK_IMHTML(widget)->scalables; |
1384 | 1387 |
1385 while(iter){ | 1388 while(iter){ |
1386 GtkIMHtmlScalable *scale = GTK_IMHTML_SCALABLE(iter->data); | 1389 GtkIMHtmlScalable *scale = GTK_IMHTML_SCALABLE(iter->data); |
1387 scale->scale(scale, alloc->width, alloc->height); | 1390 scale->scale(scale, rect.width, rect.height); |
1388 | 1391 |
1389 iter = iter->next; | 1392 iter = iter->next; |
1390 } | 1393 } |
1391 } | 1394 } |
1392 | 1395 |
1393 old_width = alloc->width; | 1396 old_rect = rect; |
1394 old_height = alloc->height; | |
1395 return FALSE; | 1397 return FALSE; |
1396 } | 1398 } |
1397 | 1399 |
1398 /* GtkIMHtmlScalable, gaim_im_image, gaim_hr */ | 1400 /* GtkIMHtmlScalable, gaim_im_image, gaim_hr */ |
1399 GtkIMHtmlScalable *gaim_im_image_new(GdkPixbuf *img) | 1401 GtkIMHtmlScalable *gaim_im_image_new(GdkPixbuf *img) |