@@ -11,6 +11,7 @@ static gchar *summary = NULL;
1111static gchar * body = NULL ;
1212static NotifyUrgency urgency = NOTIFY_URGENCY_NORMAL ;
1313static gchar * urgency_str = NULL ;
14+ static gchar * category = NULL ;
1415static gchar * * hint_strs = NULL ;
1516static gchar * * action_strs = NULL ;
1617static gint timeout = NOTIFY_EXPIRES_DEFAULT ;
@@ -32,7 +33,8 @@ static GOptionEntry entries[] =
3233 { "timeout" , 't' , 0 , G_OPTION_ARG_INT , & timeout , "The time in milliseconds until the notification expires" , "TIMEOUT" },
3334 { "icon" , 'i' , 0 , G_OPTION_ARG_STRING , & icon , "An icon that should be displayed with the notification" , "ICON" },
3435 { "raw_icon" , 'I' , 0 , G_OPTION_ARG_STRING , & raw_icon_path , "Path to the icon to be sent as raw image data" , "RAW_ICON" },
35- { "capabilities" , 'c' , 0 , G_OPTION_ARG_NONE , & capabilities , "Print the server capabilities and exit" , NULL },
36+ { "category" , 'c' , 0 , G_OPTION_ARG_STRING , & category , "The category of this notification" , "TYPE" },
37+ { "capabilities" , 0 , 0 , G_OPTION_ARG_NONE , & capabilities , "Print the server capabilities and exit" , NULL },
3638 { "serverinfo" , 's' , 0 , G_OPTION_ARG_NONE , & serverinfo , "Print server information and exit" , NULL },
3739 { "printid" , 'p' , 0 , G_OPTION_ARG_NONE , & printid , "Print id, which can be used to update/replace this notification" , NULL },
3840 { "replace" , 'r' , 0 , G_OPTION_ARG_INT , & replace_id , "Set id of this notification." , "ID" },
@@ -212,7 +214,7 @@ void put_id(NotifyNotification *n, guint32 id)
212214{
213215 knickers * kn = n -> priv ;
214216
215- /* And know I'm putting stuff into
217+ /* And now I'm putting stuff into
216218 * your knickers. I'm sorry.
217219 * I'm so sorry.
218220 * */
@@ -302,6 +304,9 @@ int main(int argc, char *argv[])
302304 notify_notification_set_timeout (n , timeout );
303305 notify_notification_set_urgency (n , urgency );
304306
307+ if (category != NULL )
308+ notify_notification_set_category (n , category );
309+
305310 GError * err = NULL ;
306311
307312 if (raw_icon_path ) {
0 commit comments