]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed asserts when clicking on bugs table priority and opened columns; updated copyrights
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 2 Jun 2005 11:30:32 +0000 (11:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 2 Jun 2005 11:30:32 +0000 (11:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/grid/griddemo.cpp

index 0fec7527516f6671d0396e40dd90dc1670ec0450..af1a576dae0af3269cd903c78676d3f2f44bb9cd 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Michael Bedward
 // Modified by:
 // RCS-ID:      $Id$
-// Copyright:   (c) Michael Bedward, Julian Smart
+// Copyright:   (c) Michael Bedward, Julian Smart, Vadim Zeitlin
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
@@ -935,8 +935,7 @@ void GridFrame::OnEditorHidden( wxGridEvent& ev )
 void GridFrame::About(  wxCommandEvent& WXUNUSED(ev) )
 {
     (void)wxMessageBox( _T("\n\nwxGrid demo \n\n")
-                        _T("Michael Bedward \n")
-                        _T("mbedward@ozemail.com.au \n\n"),
+                        _T("Michael Bedward, Julian Small, Vadim Zeitlin"),
                         _T("About"),
                         wxOK );
 }
@@ -1197,10 +1196,13 @@ wxString BugsGridTable::GetValue( int row, int col )
     switch ( col )
     {
         case Col_Id:
+            return wxString::Format(_T("%d"), gd.id);
+
         case Col_Priority:
+            return wxString::Format(_T("%d"), gd.prio);
+
         case Col_Opened:
-            wxFAIL_MSG(_T("unexpected column"));
-            break;
+            return gd.opened ? _T("1") : _T("0");
 
         case Col_Severity:
             return severities[gd.severity];
@@ -1258,7 +1260,10 @@ void BugsGridTable::SetValue( int row, int col, const wxString& value )
     }
 }
 
-bool BugsGridTable::CanGetValueAs( int WXUNUSED(row), int col, const wxString& typeName )
+bool
+BugsGridTable::CanGetValueAs(int WXUNUSED(row),
+                             int col,
+                             const wxString& typeName)
 {
     if ( typeName == wxGRID_VALUE_STRING )
     {