don't display notifications with empty format
This commit is contained in:
		
							parent
							
								
									8d8834a8f3
								
							
						
					
					
						commit
						8a3970f223
					
				
							
								
								
									
										5
									
								
								dunst.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								dunst.c
									
									
									
									
									
								
							@ -966,7 +966,12 @@ int init_notification(notification * n, int id)
 | 
				
			|||||||
                close_notification_by_id(id, -1);
 | 
					                close_notification_by_id(id, -1);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if(strlen(n->msg) == 0) {
 | 
				
			||||||
 | 
					                close_notification(n, 2);
 | 
				
			||||||
 | 
					                printf("skipping notification: %s %s\n", n->body, n->summary);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
                l_push(notification_queue, n);
 | 
					                l_push(notification_queue, n);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return n->id;
 | 
					        return n->id;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										8
									
								
								dunstrc
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								dunstrc
									
									
									
									
									
								
							@ -120,6 +120,13 @@
 | 
				
			|||||||
# and you can override the 'timeout', 'urgency', 'foreground', 'background'
 | 
					# and you can override the 'timeout', 'urgency', 'foreground', 'background'
 | 
				
			||||||
# and 'format'.
 | 
					# and 'format'.
 | 
				
			||||||
# Shell-like globbing will get expanded.
 | 
					# Shell-like globbing will get expanded.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# NOTE: if you don't want a notification to be displayed, set the format to ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#[ignore]
 | 
				
			||||||
 | 
					## This notification will not be displayed
 | 
				
			||||||
 | 
					#    summary = "foobar"
 | 
				
			||||||
 | 
					#    format = ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[signed_on]
 | 
					#[signed_on]
 | 
				
			||||||
#    appname = Pidgin
 | 
					#    appname = Pidgin
 | 
				
			||||||
@ -140,3 +147,4 @@
 | 
				
			|||||||
#    appname = Pidgin
 | 
					#    appname = Pidgin
 | 
				
			||||||
#    summary = *twitter.com*
 | 
					#    summary = *twitter.com*
 | 
				
			||||||
#    urgency = normal
 | 
					#    urgency = normal
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user