mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Improve the trip header
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									e34da61362
								
							
						
					
					
						commit
						788c513dd4
					
				
					 2 changed files with 5 additions and 6 deletions
				
			
		|  | @ -607,12 +607,11 @@ char *get_trip_date_string(timestamp_t when, int nr) | ||||||
| 		struct tm tm; | 		struct tm tm; | ||||||
| 		utc_mkdate(when, &tm); | 		utc_mkdate(when, &tm); | ||||||
| 		snprintf(buffer, MAX_DATE_STRING, | 		snprintf(buffer, MAX_DATE_STRING, | ||||||
| 			/*++GETTEXT 60 char buffer weekday, monthname, day of month, year, nr dives */ | 			/*++GETTEXT 60 char buffer monthname, year, nr dives */ | ||||||
| 			ngettext("Trip %1$s, %2$s %3$d, %4$d (%5$d dive)", | 			ngettext("%1$s %2$d (%3$d dive)", | ||||||
| 				"Trip %1$s, %2$s %3$d, %4$d (%5$d dives)", nr), | 				 "%1$s %2$d (%3$d dives)", nr), | ||||||
| 			weekday(tm.tm_wday), |  | ||||||
| 			monthname(tm.tm_mon), | 			monthname(tm.tm_mon), | ||||||
| 			tm.tm_mday, tm.tm_year + 1900, | 			tm.tm_year + 1900, | ||||||
| 			nr); | 			nr); | ||||||
| 	} | 	} | ||||||
| 	return buffer; | 	return buffer; | ||||||
|  |  | ||||||
|  | @ -786,7 +786,7 @@ QVariant TripItem::data(int column, int role) const | ||||||
| 	if (role == Qt::DisplayRole) { | 	if (role == Qt::DisplayRole) { | ||||||
| 		switch (column) { | 		switch (column) { | ||||||
| 		case NR: | 		case NR: | ||||||
| 			ret = QString(trip->location) + QString(get_trip_date_string(trip->when, trip->nrdives)); | 			ret = QString(trip->location) + ", " + QString(get_trip_date_string(trip->when, trip->nrdives)); | ||||||
| 			break; | 			break; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue