Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.71 KB | None | 0 0
  1. Index: MemoryCardListPanel.cpp
  2. ===================================================================
  3. --- MemoryCardListPanel.cpp (revision 4349)
  4. +++ MemoryCardListPanel.cpp (working copy)
  5. @@ -346,7 +346,7 @@
  6.         return result;
  7.     }
  8.    
  9. -   virtual wxDragResult OnDropMcd( const McdListItem& src, const McdListItem& dest, wxDragResult def )
  10. +   virtual wxDragResult OnDropMcd( McdListItem& src, McdListItem& dest, wxDragResult def )
  11.     {
  12.         if( src.Slot == dest.Slot ) return wxDragNone;
  13.         if( !pxAssert( (src.Slot >= 0) && (dest.Slot >= 0) ) ) return wxDragNone;
  14. @@ -400,7 +400,7 @@
  15.             {
  16.                 wxFileName tempname;
  17.                 tempname.AssignTempFileName( basepath.ToString() );
  18. -               //Console.Warning( "srcExists && destExists" );
  19. +               Console.Warning( "srcExists && destExists" );
  20.                 // Neat trick to handle errors.
  21.                 result = result && wxRenameFile( srcfile.GetFullPath(), tempname.GetFullPath(), true );
  22.                 result = result && wxRenameFile( destfile.GetFullPath(), srcfile.GetFullPath(), false );
  23. @@ -408,14 +408,21 @@
  24.             }
  25.             else if( destExists )
  26.             {
  27. -               //Console.Warning( "destExists" );
  28. +               Console.Warning( "destExists" );
  29.                 result = wxRenameFile( destfile.GetFullPath(), srcfile.GetFullPath() );
  30.             }
  31.             else if( srcExists )
  32.             {
  33. -               //Console.Warning( "srcExists" );
  34. +               Console.Warning( "srcExists" );
  35.                 result = wxRenameFile( srcfile.GetFullPath(), destfile.GetFullPath() );
  36.             }
  37. +
  38. +           if (result)
  39. +           {
  40. +               bool temp = dest.IsEnabled;
  41. +               dest.IsEnabled = src.IsEnabled;
  42. +               src.IsEnabled = temp;
  43. +           }
  44.            
  45.             if( !result )
  46.             {
  47. @@ -595,7 +602,7 @@
  48.  
  49.         if( result )
  50.         {
  51. -           //Console.Warning( "Overwriting whatever was here" );
  52. +           Console.Warning( "Overwriting whatever was here" );
  53.             wxFileName fullpath( m_FolderPicker->GetPath() + g_Conf->Mcd[slot].Filename.GetFullName() );
  54.             wxRemoveFile( fullpath.GetFullPath() );
  55.         }
  56. @@ -693,11 +700,6 @@
  57.     return baselen;
  58.  }
  59.  
  60. -const McdListItem& Panels::MemoryCardListPanel_Simple::GetCard( int idx ) const
  61. -{
  62. -   return m_Cards[idx];
  63. -}
  64. -
  65.  McdListItem& Panels::MemoryCardListPanel_Simple::GetCard( int idx )
  66.  {
  67.     return m_Cards[idx];
  68. Index: MemoryCardListView.cpp
  69. ===================================================================
  70. --- MemoryCardListView.cpp  (revision 4349)
  71. +++ MemoryCardListView.cpp  (working copy)
  72. @@ -34,7 +34,7 @@
  73.     SetCardCount( m_CardProvider ? m_CardProvider->GetLength() : 0 );
  74.  }
  75.  
  76. -const IMcdList& BaseMcdListView::GetMcdProvider() const
  77. +IMcdList& BaseMcdListView::GetMcdProvider()
  78.  {
  79.     pxAssume( m_CardProvider );
  80.     return *m_CardProvider;
  81. Index: MemoryCardPanels.h
  82. ===================================================================
  83. --- MemoryCardPanels.h  (revision 4349)
  84. +++ MemoryCardPanels.h  (working copy)
  85. @@ -68,9 +68,7 @@
  86.  public:
  87.     virtual void RefreshMcds() const=0;
  88.     virtual int GetLength() const=0;
  89. -   virtual const McdListItem& GetCard( int idx ) const=0;
  90.     virtual McdListItem& GetCard( int idx )=0;
  91. -
  92.     virtual wxDirName GetMcdPath() const=0;
  93.  };
  94.  
  95. @@ -82,7 +80,7 @@
  96.     typedef wxListView _parent;
  97.  
  98.  protected:
  99. -   const IMcdList*     m_CardProvider;
  100. +   IMcdList*       m_CardProvider;
  101.  
  102.     // specifies the target of a drag&drop operation
  103.     int                 m_TargetedItem;
  104. @@ -101,7 +99,7 @@
  105.     virtual void LoadSaveColumns( IniInterface& ini );
  106.     virtual const ListViewColumnInfo& GetDefaultColumnInfo( uint idx ) const=0;
  107.  
  108. -   virtual const IMcdList& GetMcdProvider() const;
  109. +   virtual IMcdList& GetMcdProvider();
  110.     virtual void SetTargetedItem( int sel );
  111.  };
  112.  
  113. @@ -201,7 +199,6 @@
  114.         // Interface Implementation for IMcdList
  115.         virtual int GetLength() const;
  116.  
  117. -       virtual const McdListItem& GetCard( int idx ) const;
  118.         virtual McdListItem& GetCard( int idx );
  119.  
  120.     protected:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement