comparison src/gtkpounce.c @ 13090:0aa231ebbfd5

[gaim-migrate @ 15452] Changes to some pixbuf stuff. I added a 'gaim_gtk_create_gaim_icon_with_status()' function to util.c, and changed 'gaim_gtk_create_prpl_icon_with_status()' to accept a scale factor because almost everywhere this function was used we would scale the pixbuf to a smaller size as soon as we got it. So there's a bit less code duplication. Also, I think I added some g_object_unref()'s in one or two places where it was missing. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 01 Feb 2006 22:38:34 +0000
parents 69b3d5cbd2b1
children e1e5462b7d81
comparison
equal deleted inserted replaced
13089:b553326bc468 13090:0aa231ebbfd5
183 GaimAccount *account; 183 GaimAccount *account;
184 GaimPounceEvent events; 184 GaimPounceEvent events;
185 gboolean recurring; 185 gboolean recurring;
186 const char *pouncer; 186 const char *pouncer;
187 const char *pouncee; 187 const char *pouncee;
188 GdkPixbuf *pixbuf, *scale = NULL; 188 GdkPixbuf *pixbuf;
189 189
190 account = gaim_pounce_get_pouncer(pounce); 190 account = gaim_pounce_get_pouncer(pounce);
191 191
192 if (gaim_account_is_disconnected(account)) 192 if (gaim_account_is_disconnected(account))
193 return; 193 return;
194 194
195 events = gaim_pounce_get_events(pounce); 195 events = gaim_pounce_get_events(pounce);
196 196
197 pixbuf = gaim_gtk_create_prpl_icon(account); 197 pixbuf = gaim_gtk_create_prpl_icon(account, 0.5);
198
199 if (pixbuf != NULL)
200 scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16,
201 GDK_INTERP_BILINEAR);
202 198
203 pouncer = gaim_account_get_username(account); 199 pouncer = gaim_account_get_username(account);
204 pouncee = gaim_pounce_get_pouncee(pounce); 200 pouncee = gaim_pounce_get_pouncee(pounce);
205 recurring = gaim_pounce_get_save(pounce); 201 recurring = gaim_pounce_get_save(pounce);
206 202
207 gtk_list_store_append(model, &iter); 203 gtk_list_store_append(model, &iter);
208 gtk_list_store_set(model, &iter, 204 gtk_list_store_set(model, &iter,
209 POUNCES_MANAGER_COLUMN_POUNCE, pounce, 205 POUNCES_MANAGER_COLUMN_POUNCE, pounce,
210 POUNCES_MANAGER_COLUMN_ICON, scale, 206 POUNCES_MANAGER_COLUMN_ICON, pixbuf,
211 POUNCES_MANAGER_COLUMN_TARGET, pouncee, 207 POUNCES_MANAGER_COLUMN_TARGET, pouncee,
212 POUNCES_MANAGER_COLUMN_ACCOUNT, pouncer, 208 POUNCES_MANAGER_COLUMN_ACCOUNT, pouncer,
213 POUNCES_MANAGER_COLUMN_RECURRING, recurring, 209 POUNCES_MANAGER_COLUMN_RECURRING, recurring,
214 -1); 210 -1);
211
212 if (pixbuf != NULL)
213 g_object_unref(pixbuf);
215 } 214 }
216 215
217 static void 216 static void
218 populate_pounces_list(PouncesManager *dialog) 217 populate_pounces_list(PouncesManager *dialog)
219 { 218 {