Initialise default icon before checking for duplicates
Since we are also comparing the icons, the icon path should be set before the duplicate check is done
This commit is contained in:
		
							parent
							
								
									f0ca0c8e6b
								
							
						
					
					
						commit
						c4a002bc79
					
				| @ -389,6 +389,15 @@ int notification_init(notification * n, int id) | ||||
| 
 | ||||
|         n->msg = g_strchomp(n->msg); | ||||
| 
 | ||||
|         if (n->icon != NULL && strlen(n->icon) <= 0) { | ||||
|                 free(n->icon); | ||||
|                 n->icon = NULL; | ||||
|         } | ||||
| 
 | ||||
|         if (n->raw_icon == NULL && n->icon == NULL) { | ||||
|                 n->icon = strdup(settings.icons[n->urgency]); | ||||
|         } | ||||
| 
 | ||||
|         if (id == 0) { | ||||
|                 n->id = ++next_notification_id; | ||||
|         } else { | ||||
| @ -467,15 +476,6 @@ int notification_init(notification * n, int id) | ||||
|             n->timeout == -1 ? settings.timeouts[n->urgency] : n->timeout; | ||||
|         n->start = 0; | ||||
| 
 | ||||
|         if (n->icon != NULL && strlen(n->icon) <= 0) { | ||||
|                 free(n->icon); | ||||
|                 n->icon = NULL; | ||||
|         } | ||||
| 
 | ||||
|         if (n->raw_icon == NULL && n->icon == NULL) { | ||||
|                 n->icon = strdup(settings.icons[n->urgency]); | ||||
|         } | ||||
| 
 | ||||
|         n->timestamp = time(NULL); | ||||
| 
 | ||||
|         n->redisplayed = false; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Nikos Tsipinakis
						Nikos Tsipinakis