~ubuntu-core-dev/update-notifier/ubuntu

« back to all changes in this revision

Viewing changes to src/update.c

  • Committer: Martin Pitt
  • Date: 2011-06-08 07:28:28 UTC
  • Revision ID: martin.pitt@canonical.com-20110608072828-g2ss8i57tz1waj6j
Port to current libnotify 0.7 API. Bump libnotify-dev build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
   if(!gtk_status_icon_get_visible(ta->tray_icon))
246
246
      return FALSE;
247
247
 
248
 
   GdkRectangle area;
249
 
   gtk_status_icon_get_geometry(ta->tray_icon, NULL, &area, NULL);
250
 
 
251
 
   // no usefull coordiante yet, do another timeout
252
 
   if(area.x <= 0 || area.y <= 0 || area.width <= 0 || area.height <= 0)
253
 
      return TRUE;
254
 
 
255
248
   // now show a notification handle 
256
249
   gchar *updates;
257
250
   updates = g_strdup_printf(ngettext("There is %i update available. "
264
257
                                      "available updates.",
265
258
                                      priv->num_upgrades), 
266
259
                             priv->num_upgrades);
267
 
   NotifyNotification *n = notify_notification_new_with_status_icon(
 
260
   NotifyNotification *n = notify_notification_new(
268
261
                              _("Software updates available"),
269
262
                              updates,
270
 
                              NULL, 
271
 
                              ta->tray_icon);
 
263
                              NULL);
272
264
 
273
265
   GdkPixbuf* pix= gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), 
274
266
                                            GTK_STOCK_DIALOG_INFO, 48,0,NULL);