Developers‎ > ‎

V44 Changes

Introduction

Release 3.0 of Snarl changes the way the user interacts with notifications.  This has been developed in such a way to be transparent to applications which integrate with Snarl, however the changes are documented here so that application developers can better understand what's changed, and why.

Invoking a Notification

Prior to release 3.0, clicking anywhere on a notification not occupied by a gadget would cause the notification to be "invoked" - that is, either the default callback is launched by Snarl, or a SNARL_NOTIFY_INVOKED signal is sent to the originating application.  Under release 3.0, invoking a notification involves the user clicking on a button which is displayed in the bottom right corner of the notification.

The reasoning behind this is that a user is more likely to want to digest the content of a notification and then dismiss it by clicking on it, rather than want to take action by clicking on it.  Taking principles from Fitts' Law, the more likely action should be easier to perform than a less likely action - consequently, the larger surface area now dismisses the notification.

Closing a Notification

Prior to release 3.0, a close gadget was displayed when the user moved the mouse pointer over the notification.  Clicking this gadget would generate a SNARL_NOTIFY_CLOSED signal and the notification would automatically be removed from the screen by Snarl.  Under 3.0, no close gadget is displayed and clicking anywhere on the notification not obscured by a gadget dismisses the notification (and sends a SNARL_NOTIFY_CLOSED signal).

Displaying the Invocation Button

In order to remain backwards compatible with earlier versions of Snarl, a default invocation button displayed if any of the following hold true:
  • A static default callback has been defined
  • A dynamic default callback has been defined
  • A valid reply-to window and valid reply-with message have been defined
The text in the button will always read "Open" unless it has been customised by the originating application, something only supported from V44 of the API.  See below for details on how to do this.

Customising the Invocation Button

When creating a notification, an application should include a callback-label parameter which should be set to the label to use.  Note that space is limited within the button and the button is not resized to fit the label.  Consequently, only short labels such as "Send", "Read", "More" should be used.