comparison src/applet.c @ 3286:51e55584b71e

[gaim-migrate @ 3304] A hack by Chris Blizzard to fix applet not showing up right when you start it up. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Fri, 31 May 2002 03:00:47 +0000
parents a7c241854218
children 56df4d1dcad5
comparison
equal deleted inserted replaced
3285:e71ade93b98f 3286:51e55584b71e
151 151
152 return TRUE; 152 return TRUE;
153 } 153 }
154 154
155 #ifdef HAVE_PANEL_PIXEL_SIZE 155 #ifdef HAVE_PANEL_PIXEL_SIZE
156
157 static gint applet_update_pixel_size(gpointer data)
158 {
159 update_applet();
160 return FALSE;
161 }
162
156 static void applet_change_pixel_size(GtkWidget *w, int size, gpointer data) 163 static void applet_change_pixel_size(GtkWidget *w, int size, gpointer data)
157 { 164 {
158 sizehint = size; 165 sizehint = size;
159 gtk_widget_set_usize(icon, sizehint, sizehint); 166 gtk_widget_set_usize(icon, sizehint, sizehint);
160 update_applet(); 167 /* we need to wait for the mainloop to finish updating the
168 background pixel size, otherwise we'll end up getting the
169 wrong background size when loading and drawing the new
170 icon */
171 gtk_timeout_add(100, applet_update_pixel_size,
172 NULL);
161 } 173 }
162 #endif 174 #endif
163 175
164 extern GtkWidget *mainwindow; 176 extern GtkWidget *mainwindow;
165 void applet_show_login(AppletWidget *widget, gpointer data) 177 void applet_show_login(AppletWidget *widget, gpointer data)