@@ -17,7 +17,7 @@ - ( void ) tableView: ( Wbrowse * ) tableView mouseDownInHeaderOfTableColumn:
1717- ( void ) keyDown : ( NSEvent * ) theEvent ;
1818- ( void ) drawRow : ( NSInteger ) row clipRect : ( NSRect ) clipRect ;
1919- (void ) tableView : (Wbrowse *)aTableView willDisplayCell : (id )aCell forTableColumn : (NSTableColumn *)aTableColumn row : (NSInteger )rowIndex ;
20- - (void ) mouseDown : ( NSEvent * ) theEvent ;
20+ - (void ) mouseDown : ( NSEvent * ) theEvent ;
2121- ( void ) rightMouseDown : ( NSEvent * ) theEvent ;
2222@end
2323
@@ -71,32 +71,32 @@ - ( void ) keyDown : ( NSEvent * ) theEvent
7171 if ( hb_parnl ( -1 ) != 1 )
7272 [ super keyDown: theEvent ];
7373}
74-
75- - ( void ) rightMouseDown : ( NSEvent * ) theEvent
76- {
77- NSPoint point = [ theEvent locationInWindow ];
78-
79- NSPoint localLocation = [ self convertPoint: point fromView: nil ];
80-
81- self->nRow = [ self rowAtPoint: localLocation ];
82- self->nCol = [ self columnAtPoint: localLocation ] + 1 ;
83-
84- // [ super mouseDown: theEvent ];
85-
86- if ( symFMH == NULL )
87- symFMH = hb_dynsymSymbol ( hb_dynsymFindName ( " _FMH" ) );
88-
89- hb_vmPushSymbol ( symFMH );
90- hb_vmPushNil ();
91- hb_vmPushLong ( ( HB_LONG ) [ self window ] );
92- hb_vmPushLong ( WM_RBUTTONDOWN );
93- hb_vmPushLong ( ( HB_LONG ) self );
94- hb_vmPushLong ( point.y );
95- hb_vmPushLong ( point.x );
96- hb_vmPushLong ( self->nRow );
97- hb_vmPushLong ( self->nCol );
98- hb_vmDo ( 7 );
99- }
74+
75+ - ( void ) rightMouseDown : ( NSEvent * ) theEvent
76+ {
77+ NSPoint point = [ theEvent locationInWindow ];
78+
79+ NSPoint localLocation = [ self convertPoint: point fromView: nil ];
80+
81+ self->nRow = [ self rowAtPoint: localLocation ];
82+ self->nCol = [ self columnAtPoint: localLocation ] + 1 ;
83+
84+ // [ super mouseDown: theEvent ];
85+
86+ if ( symFMH == NULL )
87+ symFMH = hb_dynsymSymbol ( hb_dynsymFindName ( " _FMH" ) );
88+
89+ hb_vmPushSymbol ( symFMH );
90+ hb_vmPushNil ();
91+ hb_vmPushLong ( ( HB_LONG ) [ self window ] );
92+ hb_vmPushLong ( WM_RBUTTONDOWN );
93+ hb_vmPushLong ( ( HB_LONG ) self );
94+ hb_vmPushLong ( point.y );
95+ hb_vmPushLong ( point.x );
96+ hb_vmPushLong ( self->nRow );
97+ hb_vmPushLong ( self->nCol );
98+ hb_vmDo ( 7 );
99+ }
100100
101101- ( void ) mouseDown : ( NSEvent * ) theEvent
102102{
@@ -115,8 +115,8 @@ - ( void ) mouseDown: ( NSEvent * ) theEvent
115115 hb_vmPushLong ( ( HB_LONG ) [ self window ] );
116116 hb_vmPushLong ( WM_MOUSEDOWN );
117117 hb_vmPushLong ( ( HB_LONG ) self );
118- hb_vmPushLong ( self->nRow );
119- hb_vmPushLong ( self->nCol );
118+ hb_vmPushLong ( self->nRow );
119+ hb_vmPushLong ( self->nCol );
120120
121121 hb_vmDo ( 5 );
122122}
@@ -340,7 +340,7 @@ - (void) tableView: ( Wbrowse * ) aTableView setObjectValue: ( id ) aData forTab
340340
341341 [ sv setFrameSize: NSMakeSize ( hb_parnl ( 2 ), hb_parnl ( 3 ) ) ];
342342}
343-
343+
344344HB_FUNC ( BRWRESCREATE )
345345{
346346 NSWindow * window = ( NSWindow * ) hb_parnl ( 1 );
@@ -875,7 +875,16 @@ - ( NSSize ) cellSize
875875 NSScrollView * sv = [ browse enclosingScrollView ];
876876 NSScroller * scrol = [ sv verticalScroller ];
877877
878- [ scrol setControlTint: NSGraphiteControlTint ];
878+ #pragma clang diagnostic push
879+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
880+
881+ if (@available (macOS 10.7 , *)) {
882+ // Do nothing, as setControlTint has no effect on macOS 10.7 and later
883+ } else {
884+ [scrol setControlTint: NSGraphiteControlTint]; // Only executed on older macOS
885+ }
886+
887+ #pragma clang diagnostic pop
879888}
880889
881890HB_FUNC ( BRWSETBKCOLOR )
@@ -920,5 +929,14 @@ - ( NSSize ) cellSize
920929 NSScrollView * sv = [ browse enclosingScrollView ];
921930 NSScroller * scrol = [ sv horizontalScroller ];
922931
923- [ scrol setControlTint: NSGraphiteControlTint ];
932+ #pragma clang diagnostic push
933+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
934+
935+ if (@available (macOS 10.7 , *)) {
936+ // Do nothing, as setControlTint has no effect on macOS 10.7 and later
937+ } else {
938+ [scrol setControlTint: NSGraphiteControlTint]; // Only executed on older macOS
939+ }
940+
941+ #pragma clang diagnostic pop
924942}
0 commit comments