@@ -92,7 +92,7 @@ public static AppBuilder BuildAvaloniaApp()
92
92
var toplevel = GetTopLevel ( ) as Window ;
93
93
if ( toplevel == null )
94
94
return ;
95
-
95
+
96
96
var dialog = new Views . Preference ( ) ;
97
97
dialog . ShowDialog ( toplevel ) ;
98
98
} ) ;
@@ -102,7 +102,7 @@ public static AppBuilder BuildAvaloniaApp()
102
102
var toplevel = GetTopLevel ( ) as Window ;
103
103
if ( toplevel == null )
104
104
return ;
105
-
105
+
106
106
var dialog = new Views . Hotkeys ( ) ;
107
107
dialog . ShowDialog ( toplevel ) ;
108
108
} ) ;
@@ -112,7 +112,7 @@ public static AppBuilder BuildAvaloniaApp()
112
112
var toplevel = GetTopLevel ( ) as Window ;
113
113
if ( toplevel == null )
114
114
return ;
115
-
115
+
116
116
var dialog = new Views . About ( ) ;
117
117
dialog . ShowDialog ( toplevel ) ;
118
118
} ) ;
@@ -247,7 +247,7 @@ public static Avalonia.Controls.Shapes.Path CreateMenuIcon(string key)
247
247
var geo = Current ? . FindResource ( key ) as StreamGeometry ;
248
248
if ( geo != null )
249
249
icon . Data = geo ;
250
-
250
+
251
251
return icon ;
252
252
}
253
253
@@ -257,7 +257,7 @@ public static TopLevel GetTopLevel()
257
257
{
258
258
return desktop . MainWindow ;
259
259
}
260
-
260
+
261
261
return null ;
262
262
}
263
263
@@ -302,6 +302,11 @@ public static void Check4Update(bool manually = false)
302
302
} ) ;
303
303
}
304
304
305
+ public static ViewModels . Launcher GetLauncer ( )
306
+ {
307
+ return Current is App app ? app . _launcher : null ;
308
+ }
309
+
305
310
public static ViewModels . Repository FindOpenedRepository ( string repoPath )
306
311
{
307
312
if ( Current is App app && app . _launcher != null )
@@ -501,10 +506,15 @@ private bool TryLaunchedAsCoreEditor(IClassicDesktopStyleApplicationLifetime des
501
506
private bool TryLaunchedAsAskpass ( IClassicDesktopStyleApplicationLifetime desktop )
502
507
{
503
508
var args = desktop . Args ;
504
- if ( args == null || args . Length != 1 || ! args [ 0 ] . StartsWith ( "Enter passphrase" , StringComparison . Ordinal ) )
509
+ if ( args == null || args . Length != 1 )
510
+ return false ;
511
+
512
+ var param = args [ 0 ] ;
513
+ if ( ! param . StartsWith ( "enter passphrase" , StringComparison . OrdinalIgnoreCase ) &&
514
+ ! param . Contains ( " password" , StringComparison . OrdinalIgnoreCase ) )
505
515
return false ;
506
516
507
- desktop . MainWindow = new Views . Askpass ( args [ 0 ] ) ;
517
+ desktop . MainWindow = new Views . Askpass ( param ) ;
508
518
return true ;
509
519
}
510
520
0 commit comments