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

« back to all changes in this revision

Viewing changes to src/hooks.c

  • Committer: Michael Vogt
  • Date: 2007-07-27 21:00:33 UTC
  • Revision ID: michael.vogt@ubuntu.com-20070727210033-bswe0d6tdsmx14x6
* fix crash in leftover from pre-GtkStatusIcon code (LP: #127965)
* consitently use notify_notification_new_with_status_icon()

Show diffs side-by-side

added added

removed removed

Lines of Context:
503
503
 
504
504
   GdkRectangle area;
505
505
   gtk_status_icon_get_geometry(ta->tray_icon, NULL, &area, NULL);
506
 
 
507
506
   // no usefull coordiante yet, do another timeout
508
507
   if(area.x <= 0 || area.y <= 0 || area.width <= 0 || area.height <= 0)
509
508
      return TRUE;
510
509
 
511
510
   NotifyNotification *n;
512
511
   GdkPixbuf* pix;
513
 
   n = notify_notification_new(_("Information available"),
 
512
   n = notify_notification_new_with_status_icon(
 
513
                               _("Information available"),
514
514
                               _("Click on the notification icon"
515
515
                                 " to show the available information.\n"),
516
516
                               NULL, 
517
 
                               GTK_WIDGET(ta->tray_icon));
 
517
                               ta->tray_icon);
518
518
   
519
519
   pix = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), 
520
520
                                  GTK_STOCK_DIALOG_INFO, 48,0,NULL);
630
630
   assert(button_next);
631
631
 
632
632
   // show a notification
633
 
   if(unseen_count > 0 && !GTK_WIDGET_VISIBLE(ta->tray_icon)) {
 
633
   if(unseen_count > 0 && !gtk_status_icon_get_visible (ta->tray_icon))
634
634
      g_timeout_add(5000, show_notification, ta);
635
 
   }
636
635
 
637
636
   switch(unseen_count) {
638
637
   case 0: