feat(fillbar): Fill bar settings... au clic droit, ouvre l'onglet par-dessus l'entree en cours
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -116,6 +116,7 @@ type
|
||||
// force-killed (which leaves -shm / -wal files behind).
|
||||
FShutdownPending: Boolean;
|
||||
FOnTrayRestore: TProc;
|
||||
FOnFillBarSettings: TProc;
|
||||
FOnLockRequest: TProc;
|
||||
FOnQuit: TProc;
|
||||
FOnQuickSearchRequest: TProc;
|
||||
@@ -297,6 +298,9 @@ type
|
||||
property ShutdownPending: Boolean read FShutdownPending;
|
||||
// Fired on main thread when the user clicks the tray icon.
|
||||
property OnTrayRestore: TProc read FOnTrayRestore write FOnTrayRestore;
|
||||
// Clic droit sur la barrette -> "Fill bar settings..." : la fenetre revient
|
||||
// (OnTrayRestore) puis l'hote ouvre l'onglet Fill bar des reglages.
|
||||
property OnFillBarSettings: TProc read FOnFillBarSettings write FOnFillBarSettings;
|
||||
// Fired when the user picks "Lock vault" from the tray menu. Handler
|
||||
// should trigger the JS lockVault() (typically via ExecuteJavaScript).
|
||||
property OnLockRequest: TProc read FOnLockRequest write FOnLockRequest;
|
||||
@@ -436,6 +440,7 @@ const
|
||||
LAZY_ID_ADD = 106; // nouvelle entree depuis la fenetre en avant (Ctrl+Shift+A)
|
||||
LAZY_ID_SEARCH = 107; // recherche rapide (Ctrl+Shift+Q)
|
||||
LAZY_MENU_ICONS = 1; // hors des valeurs d'opacite (25..100) du meme menu
|
||||
LAZY_MENU_SETTINGS = 2;
|
||||
// LE SONDAGE PLUTOT QUE TrackMouseEvent. La barrette a quatre fenetres
|
||||
// enfants : passer d'elle a un bouton envoie deja un WM_MOUSELEAVE au parent,
|
||||
// et il faudrait donc suivre la souris sur les cinq fenetres pour recoller
|
||||
@@ -1250,6 +1255,7 @@ begin
|
||||
if FLazyIcons then LIconsLabel := 'Show text' else LIconsLabel := 'Show icons';
|
||||
AppendMenu(LMenu, MF_SEPARATOR, 0, nil);
|
||||
AppendMenu(LMenu, MF_STRING, LAZY_MENU_ICONS, PChar(LIconsLabel));
|
||||
AppendMenu(LMenu, MF_STRING, LAZY_MENU_SETTINGS, 'Fill bar settings...');
|
||||
|
||||
// LE BATTEMENT DOIT S'ARRETER PENDANT LE MENU. Il repose la barrette en
|
||||
// tete de la bande TOPMOST cinq fois par seconde - or le menu deroulant est
|
||||
@@ -1267,7 +1273,12 @@ begin
|
||||
LPt.X, LPt.Y, 0, FMsgWindow, nil));
|
||||
PostMessage(FMsgWindow, WM_NULL, 0, 0);
|
||||
|
||||
if LCmd = LAZY_MENU_ICONS then
|
||||
if LCmd = LAZY_MENU_SETTINGS then
|
||||
begin
|
||||
if Assigned(FOnTrayRestore) then FOnTrayRestore();
|
||||
if Assigned(FOnFillBarSettings) then FOnFillBarSettings();
|
||||
end
|
||||
else if LCmd = LAZY_MENU_ICONS then
|
||||
begin
|
||||
if FLazyIcons then SetPref(LAZY_ICONS_KEY, '0') else SetPref(LAZY_ICONS_KEY, '1');
|
||||
ReloadLazyBar;
|
||||
|
||||
@@ -314,6 +314,12 @@ begin
|
||||
FFileSaveChunks := TDictionary<string, TStringBuilder>.Create;
|
||||
FBridge.OnSystemLock := BridgeSystemLock;
|
||||
FBridge.OnTrayRestore := BridgeTrayRestore;
|
||||
FBridge.OnFillBarSettings :=
|
||||
procedure
|
||||
begin
|
||||
WebBrowser.ExecuteJavaScript(
|
||||
'if(window.Bridge&&Bridge.onOpenFillBarSettings)Bridge.onOpenFillBarSettings()');
|
||||
end;
|
||||
FBridge.OnLockRequest := BridgeLockRequest;
|
||||
FBridge.OnQuit := BridgeQuit;
|
||||
FBridge.OnAutofillRequest := BridgeAutofillRequest;
|
||||
|
||||
Reference in New Issue
Block a user