indicator when notification contains action/url
This commit is contained in:
		
							parent
							
								
									52f0f485bc
								
							
						
					
					
						commit
						3eebe366d6
					
				
							
								
								
									
										18
									
								
								dunst.c
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								dunst.c
									
									
									
									
									
								
							| @ -689,8 +689,17 @@ char *generate_final_text(notification *n) | |||||||
|         char *buf; |         char *buf; | ||||||
| 
 | 
 | ||||||
|         /* print dup_count and msg*/ |         /* print dup_count and msg*/ | ||||||
|         if (n->dup_count > 0) { |         if (n->dup_count > 0 && (n->actions || n->urls)) { | ||||||
|                 buf = g_strdup_printf("(%d) %s", n->dup_count, msg); |                 buf = g_strdup_printf("(%d%s%s) %s", | ||||||
|  |                                 n->dup_count, | ||||||
|  |                                 n->actions ? "A" : "", | ||||||
|  |                                 n->urls ? "U" : "", | ||||||
|  |                                 msg); | ||||||
|  |         } else if (n->actions || n->urls) { | ||||||
|  |                 buf = g_strdup_printf("(%s%s) %s", | ||||||
|  |                                 n->actions ? "A" : "", | ||||||
|  |                                 n->urls ? "U" : "", | ||||||
|  |                                 msg); | ||||||
|         } else { |         } else { | ||||||
|                 buf = g_strdup(msg); |                 buf = g_strdup(msg); | ||||||
|         } |         } | ||||||
| @ -2019,9 +2028,8 @@ int main(int argc, char *argv[]) | |||||||
|                 n->dbus_client = NULL; |                 n->dbus_client = NULL; | ||||||
|                 n->color_strings[0] = NULL; |                 n->color_strings[0] = NULL; | ||||||
|                 n->color_strings[1] = NULL; |                 n->color_strings[1] = NULL; | ||||||
|                 n->actions = malloc(sizeof(Actions)); |                 n->actions = NULL; | ||||||
|                 n->actions->count = 0; |                 n->urls = NULL; | ||||||
|                 n->actions->actions = NULL; |  | ||||||
|                 init_notification(n, 0); |                 init_notification(n, 0); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Sascha Kruse
						Sascha Kruse