Logo Search packages:      
Sourcecode: libnotify version File versions  Download package

gboolean notify_notification_update ( NotifyNotification *  notification,
const gchar *  summary,
const gchar *  body,
const gchar *  icon 
)

notify_notification_update: : The notification to update. : The new required summary text. : The optional body text. : The optional icon theme icon name or filename.

Updates the notification text and icon. This won't send the update out and display it on the screen. For that, you will need to call notify_notification_show().

Returns: TRUE, unless an invalid parameter was passed.

Definition at line 531 of file notification.c.

{
      g_return_val_if_fail(notification != NULL,                 FALSE);
      g_return_val_if_fail(NOTIFY_IS_NOTIFICATION(notification), FALSE);
      g_return_val_if_fail(summary != NULL && *summary != '\0',  FALSE);

      if (notification->priv->summary != summary)
      {
            g_free(notification->priv->summary);
            notification->priv->summary = g_strdup(summary);
            g_object_notify(G_OBJECT(notification), "summary");
      }

      if (notification->priv->body != body)
      {
            g_free(notification->priv->body);
            notification->priv->body =
                  (body != NULL && *body != '\0' ? g_strdup(body) : NULL);
            g_object_notify(G_OBJECT(notification), "body");
      }

      if (notification->priv->icon_name != icon)
      {
            g_free(notification->priv->icon_name);
            notification->priv->icon_name =
                  (icon != NULL && *icon != '\0' ? g_strdup(icon) : NULL);
            g_object_notify(G_OBJECT(notification), "icon-name");
      }

      notification->priv->updates_pending = TRUE;

      return TRUE;
}


Generated by  Doxygen 1.6.0   Back to index