+/* Converts a GNotificationPriority to an urgency level as defined by
+ * the freedesktop spec (0: low, 1: normal, 2: critical).
+ */
+static guchar
+urgency_from_priority (GNotificationPriority priority)
+{
+ switch (priority)
+ {
+ case G_NOTIFICATION_PRIORITY_LOW:
+ return 0;
+
+ default:
+ case G_NOTIFICATION_PRIORITY_NORMAL:
+ return 1;
+
+ case G_NOTIFICATION_PRIORITY_HIGH:
+ case G_NOTIFICATION_PRIORITY_URGENT:
+ return 2;
+ }
+}
+