Mercurial > pidgin.yaz
changeset 4947:24c9a23df63b
[gaim-migrate @ 5281]
You'd think faceprint would have learned the dangers of static variables after
playing with normalize() ;)
This fixes scaling. The problem was that the size of the widget was being
stored in a static variable. Of course, there's more than one gtkimhtml, so
this managed to screw things up a bit.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 01 Apr 2003 08:43:51 +0000 |
parents | 154eb3188788 |
children | 8896e0894112 |
files | src/buddy.c src/gtkimhtml.c src/gtkimhtml.h |
diffstat | 3 files changed, 6 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buddy.c Tue Apr 01 08:25:37 2003 +0000 +++ b/src/buddy.c Tue Apr 01 08:43:51 2003 +0000 @@ -1137,7 +1137,7 @@ gtkblist->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_role(GTK_WINDOW(gtkblist->window), "buddy_list"); - gtk_window_set_title(GTK_WINDOW(gtkblist->window), _("Buddy List")); + gtk_window_set_title(GTK_WINDOW(gtkblist->window), _("Biatches List")); gtk_widget_realize(gtkblist->window); gtkblist->vbox = gtk_vbox_new(FALSE, 0);
--- a/src/gtkimhtml.c Tue Apr 01 08:25:37 2003 +0000 +++ b/src/gtkimhtml.c Tue Apr 01 08:43:51 2003 +0000 @@ -56,7 +56,7 @@ static gboolean gtk_motion_event_notify(GtkWidget *imhtml, GdkEventMotion *event, gpointer user_data); static gboolean gtk_leave_event_notify(GtkWidget *imhtml, GdkEventCrossing *event, gpointer user_data); -static gboolean gtk_size_allocate_cb(GtkWidget *widget, GtkAllocation *alloc, gpointer user_data); +static gboolean gtk_size_allocate_cb(GtkIMHtml *widget, GtkAllocation *alloc, gpointer user_data); static gint gtk_imhtml_tip (gpointer data); @@ -1395,14 +1395,12 @@ return FALSE; } -static gboolean gtk_size_allocate_cb(GtkWidget *widget, GtkAllocation *alloc, gpointer user_data) +static gboolean gtk_size_allocate_cb(GtkIMHtml *widget, GtkAllocation *alloc, gpointer user_data) { - static GdkRectangle old_rect = {0,0,0,0}; GdkRectangle rect; gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(widget), &rect); - - if(old_rect.width && (old_rect.width != rect.width || old_rect.height != rect.height)){ + if(widget->old_rect.width != rect.width || widget->old_rect.height != rect.height){ GList *iter = GTK_IMHTML(widget)->scalables; while(iter){ @@ -1413,7 +1411,7 @@ } } - old_rect = rect; + widget->old_rect = rect; return FALSE; } @@ -1502,9 +1500,7 @@ void gaim_hr_scale(GtkIMHtmlScalable *scale, int width, int height) { - /* FIXME: we need to figure out why this causes infinite looping gtk_widget_set_size_request(((gaim_hr *)scale)->sep, width, 2); - */ } void gaim_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter)