]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/srchctrl.mm
setting correct alertType
[wxWidgets.git] / src / osx / cocoa / srchctrl.mm
index 0ed85e50f37c82a9fa5c8b81f993942cfcf19b0e..399729c1832fccec8b4e55530a4e015c769b39b6 100644 (file)
@@ -40,7 +40,7 @@
 + (void)initialize
 {
     static BOOL initialized = NO;
-    if (!initialized) 
+    if (!initialized)
     {
         initialized = YES;
         wxOSXCocoaClassAddWXMethods( self );
@@ -57,6 +57,7 @@
 
 - (void) searchAction: (id) sender
 {
+    (void) sender;
     wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
     if ( impl )
     {
@@ -101,7 +102,7 @@ public :
             [m_searchFieldCell setSearchButtonCell:nil];
         [m_searchField setNeedsDisplay:YES];
     }
-    
+
     virtual bool IsSearchButtonVisible() const
     {
         return [m_searchFieldCell searchButtonCell] != nil;
@@ -115,7 +116,7 @@ public :
             [m_searchFieldCell setCancelButtonCell:nil];
         [m_searchField setNeedsDisplay:YES];
     }
-    
+
     virtual bool IsCancelButtonVisible() const
     {
         return [m_searchFieldCell cancelButtonCell] != nil;
@@ -135,7 +136,7 @@ public :
         [m_searchFieldCell setPlaceholderString:
             wxCFStringRef( text , m_wxPeer->GetFont().GetEncoding() ).AsNSString()];
     }
-        
+
     virtual bool SetFocus()
     {
        return  wxNSTextFieldControl::SetFocus();
@@ -150,14 +151,14 @@ wxNSSearchFieldControl::~wxNSSearchFieldControl()
 {
 }
 
-wxWidgetImplType* wxWidgetImpl::CreateSearchControl( wxTextCtrl* wxpeer, 
-                                    wxWindowMac* parent, 
-                                    wxWindowID id, 
+wxWidgetImplType* wxWidgetImpl::CreateSearchControl( wxTextCtrl* wxpeer,
+                                    wxWindowMac* WXUNUSED(parent),
+                                    wxWindowID WXUNUSED(id),
                                     const wxString& str,
-                                    const wxPoint& pos, 
+                                    const wxPoint& pos,
                                     const wxSize& size,
-                                    long style, 
-                                    long extraStyle)
+                                    long WXUNUSED(style),
+                                    long WXUNUSED(extraStyle))
 {
     NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
     wxNSSearchField* v = [[wxNSSearchField alloc] initWithFrame:r];
@@ -165,10 +166,8 @@ wxWidgetImplType* wxWidgetImpl::CreateSearchControl( wxTextCtrl* wxpeer,
     // per wx default cancel is not shown
     [[v cell] setCancelButtonCell:nil];
 
-    [v setBezeled:NO];
-    [v setBordered:NO];
-
     wxNSSearchFieldControl* c = new wxNSSearchFieldControl( wxpeer, v );
+    c->SetNeedsFrame( false );
     c->SetStringValue( str );
     return c;
 }