Update to v098r10 release.

byuu says:

Changelog:
- synchronized tomoko, loki, icarus with extensive changes to nall
  (118KiB diff)
This commit is contained in:
Tim Allen
2016-05-16 19:51:12 +10:00
parent 6ae0abe3d3
commit 3ebc77c148
105 changed files with 1281 additions and 824 deletions

View File

@@ -26,8 +26,8 @@ auto pBrowserWindow::open(BrowserWindow::State& state) -> string {
@autoreleasepool {
NSMutableArray* filters = [[NSMutableArray alloc] init];
for(auto& rule : state.filters) {
string pattern = rule.split("(", 1L)(1).rtrim(")", 1L);
if(!pattern.empty()) [filters addObject:[NSString stringWithUTF8String:pattern]];
string pattern = rule.split("(", 1L)(1).trimRight(")", 1L);
if(pattern) [filters addObject:[NSString stringWithUTF8String:pattern]];
}
NSOpenPanel* panel = [NSOpenPanel openPanel];
if(state.title) [panel setTitle:[NSString stringWithUTF8String:state.title]];
@@ -51,8 +51,8 @@ auto pBrowserWindow::save(BrowserWindow::State& state) -> string {
@autoreleasepool {
NSMutableArray* filters = [[NSMutableArray alloc] init];
for(auto& rule : state.filters) {
string pattern = rule.split("(", 1L)(1).rtrim(")", 1L);
if(!pattern.empty()) [filters addObject:[NSString stringWithUTF8String:pattern]];
string pattern = rule.split("(", 1L)(1).trimRight(")", 1L);
if(pattern) [filters addObject:[NSString stringWithUTF8String:pattern]];
}
NSSavePanel* panel = [NSSavePanel savePanel];
if(state.title) [panel setTitle:[NSString stringWithUTF8String:state.title]];

View File

@@ -425,7 +425,7 @@ auto pTableView::autoSizeColumns() -> void {
unsigned minimumWidth = pFont::size([[tableColumn headerCell] font], tableView.state.headerText(column)).width + 4;
for(unsigned row = 0; row < tableView.state.text.size(); row++) {
unsigned width = pFont::size([cocoaView font], tableView.state.text(row)(column)).width + 2;
if(tableView.state.image(row)(height).empty() == false) width += height + 2;
if(tableView.state.image(row)(height)) width += height + 2;
if(width > minimumWidth) minimumWidth = width;
}
[tableColumn setWidth:minimumWidth];