@@ -771,7 +771,8 @@ public ContextMenu CreateContextMenuForUnstagedChanges(string selectedSingleFold
771
771
ignoreFolder . Header = App . Text ( "WorkingCopy.AddToGitIgnore.InFolder" ) ;
772
772
ignoreFolder . Click += ( _ , e ) =>
773
773
{
774
- Commands . GitIgnore . Add ( _repo . FullPath , $ "{ selectedSingleFolder } /") ;
774
+ if ( _repo . CanCreatePopup ( ) )
775
+ _repo . ShowPopup ( new AddToIgnore ( _repo , $ "{ selectedSingleFolder } /") ) ;
775
776
e . Handled = true ;
776
777
} ;
777
778
addToIgnore . Items . Add ( ignoreFolder ) ;
@@ -783,7 +784,8 @@ public ContextMenu CreateContextMenuForUnstagedChanges(string selectedSingleFold
783
784
singleFile . Header = App . Text ( "WorkingCopy.AddToGitIgnore.SingleFile" ) ;
784
785
singleFile . Click += ( _ , e ) =>
785
786
{
786
- Commands . GitIgnore . Add ( _repo . FullPath , change . Path ) ;
787
+ if ( _repo . CanCreatePopup ( ) )
788
+ _repo . ShowPopup ( new AddToIgnore ( _repo , change . Path ) ) ;
787
789
e . Handled = true ;
788
790
} ;
789
791
addToIgnore . Items . Add ( singleFile ) ;
@@ -794,7 +796,8 @@ public ContextMenu CreateContextMenuForUnstagedChanges(string selectedSingleFold
794
796
byExtension . Header = App . Text ( "WorkingCopy.AddToGitIgnore.Extension" , extension ) ;
795
797
byExtension . Click += ( _ , e ) =>
796
798
{
797
- Commands . GitIgnore . Add ( _repo . FullPath , $ "*{ extension } ") ;
799
+ if ( _repo . CanCreatePopup ( ) )
800
+ _repo . ShowPopup ( new AddToIgnore ( _repo , $ "*{ extension } ") ) ;
798
801
e . Handled = true ;
799
802
} ;
800
803
addToIgnore . Items . Add ( byExtension ) ;
@@ -805,7 +808,8 @@ public ContextMenu CreateContextMenuForUnstagedChanges(string selectedSingleFold
805
808
byExtensionInSameFolder . Click += ( _ , e ) =>
806
809
{
807
810
var dir = Path . GetDirectoryName ( change . Path ) ! . Replace ( '\\ ' , '/' ) . TrimEnd ( '/' ) ;
808
- Commands . GitIgnore . Add ( _repo . FullPath , $ "{ dir } /*{ extension } ") ;
811
+ if ( _repo . CanCreatePopup ( ) )
812
+ _repo . ShowPopup ( new AddToIgnore ( _repo , $ "{ dir } /*{ extension } ") ) ;
809
813
e . Handled = true ;
810
814
} ;
811
815
addToIgnore . Items . Add ( byExtensionInSameFolder ) ;
@@ -827,7 +831,8 @@ public ContextMenu CreateContextMenuForUnstagedChanges(string selectedSingleFold
827
831
ignoreFolder . Header = App . Text ( "WorkingCopy.AddToGitIgnore.InFolder" ) ;
828
832
ignoreFolder . Click += ( _ , e ) =>
829
833
{
830
- Commands . GitIgnore . Add ( _repo . FullPath , $ "{ selectedSingleFolder } /") ;
834
+ if ( _repo . CanCreatePopup ( ) )
835
+ _repo . ShowPopup ( new AddToIgnore ( _repo , $ "{ selectedSingleFolder } /") ) ;
831
836
e . Handled = true ;
832
837
} ;
833
838
addToIgnore . Items . Add ( ignoreFolder ) ;
@@ -1133,7 +1138,8 @@ public ContextMenu CreateContextMenuForUnstagedChanges(string selectedSingleFold
1133
1138
ignoreFolder . Header = App . Text ( "WorkingCopy.AddToGitIgnore.InFolder" ) ;
1134
1139
ignoreFolder . Click += ( _ , e ) =>
1135
1140
{
1136
- Commands . GitIgnore . Add ( _repo . FullPath , $ "{ selectedSingleFolder } /") ;
1141
+ if ( _repo . CanCreatePopup ( ) )
1142
+ _repo . ShowPopup ( new AddToIgnore ( _repo , $ "{ selectedSingleFolder } /") ) ;
1137
1143
e . Handled = true ;
1138
1144
} ;
1139
1145
0 commit comments