Skip to content

Commit

Permalink
Add ZoomIt conflict warning to Settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimecbernardo committed Nov 11, 2024
1 parent 34ea831 commit 5a3151a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/modules/ZoomIt/ZoomIt/Zoomit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6938,6 +6938,12 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance
CreateEvent( NULL, FALSE, FALSE, _T("ZoomitActive"));
}
if( GetLastError() == ERROR_ALREADY_EXISTS ) {
if (g_StartedByPowerToys)
{
MessageBox(NULL, L"We've detected another instance of ZoomIt is already running.\nCan't start a new ZoomIt instance from PowerToys.",
APPNAME, MB_ICONERROR);
return 1;
}

// Tell the other instance to show the options dialog
g_hWndMain = FindWindow( L"ZoomitClass", NULL );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
IsOpen="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.IsEnabledGpoConfigured, Mode=OneWay}"
Severity="Informational" />
<InfoBar
x:Uid="ZoomIt_SimultaneousStandaloneZoomItWarning"
IsClosable="False"
IsOpen="True"
IsTabStop="True"
Severity="Informational" />
<controls:SettingsGroup x:Uid="ZoomIt_BehaviorGroup" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<tkcontrols:SettingsCard x:Uid="ZoomIt_Toggle_ShowTrayIcon">
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.ShowTrayIcon, Mode=TwoWay}" />
Expand Down
3 changes: 3 additions & 0 deletions src/settings-ui/Settings.UI/Strings/en-us/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -4484,6 +4484,9 @@ Activate by holding the key for the character you want to add an accent to, then
<value>Learn more about ZoomIt</value>
<comment>{Locked="ZoomIt"}</comment>
</data>
<data name="ZoomIt_SimultaneousStandaloneZoomItWarning.Title" xml:space="preserve">
<value>Running ZoomIt through PowerToys and the classical standalone ZoomIt executable at the same time is not supported. Please exit the original ZoomIt before enabling it here.</value>
</data>
<data name="ZoomIt_BehaviorGroup.Header" xml:space="preserve">
<value>Behavior</value>
</data>
Expand Down

1 comment on commit 5a3151a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@check-spelling-bot Report

🔴 Please review

See the 📜action log or 📝 job summary for details.

Unrecognized words (427)
accepteula
accessoires
n'accorde
Adanced
additionnels
ADDSTRING
ADVANCEDBREAK
ALIGNRIGHT
ALLCHILDREN
amihaiuc
Animnate
ansicpg
ANSIONLY
s'appliquera
ARROWKEYS
aucune
AUTOBUDDY
AUTOCHECKBOX
AUTOHSCROLL
AUTORADIOBUTTON
autoris
n'autorise
AUTOTICKS
AUTOVSCROLL
autres
BACKGROUNDBROWSE
BACKROUNDFILE
beggining
binres
Bitmaps
BITSPERPEL
BLACKFRAME
BLENDFUNCTION
brdrb
brdrs
brdrt
brdrw
BREAKHOTKEY
brsp
CALCRECT
Calibri
CAPTUREAUDIO
capturevideosample
cdit
celles
certaines
certains
Cette
CGraphics
CHECKBACKGROUNDFILE
CHECKBACKGROUNDSTRETCH
CHECKSOUNDFILE
chf
CHINESEBIG
choosefont
CHOOSEFONTFLAGS
chrg
ciaux
clamations
CLEARCOLOR
CLEARTYPE
COLORPICK
colorref
colortbl
compris
concerne
conio
conna
connaissait
consommateurs
contrat
contrefa
COPYCROP
COPYPEN
cplusplus
CREATEPROCESS
CRegistry
CTEXT
CTLCOLORSTATIC
currentversion
CURSORARMLENGTH
dans
deff
deflang
DEMOTYPE
DEMOTYPEBROWSE
DEMOTYPEFILE
DEMOTYPEHOTKEY
DEMOTYPERESET
DEMOTYPESLIDER
DEMOTYPESPEEDSLIDER
DEMOTYPESTATIC
DEMOTYPETEXT
DEMOTYPEUSERDRIVEN
DESIGNINFO
DESKTOPBACKGROUND
DEVMODE
devrait
dgxi
DIALOGEX
DISABLENOSCROLL
dispatcherqueue
DISPLAYFLAGS
DISPLAYFREQUENCY
DISPLAYORIENTATION
distribu
dlg
DLGITEMTEMPLATE
DLGTEMPLATE
DOCINFO
dommage
DONTCARE
DRAWHOTKEY
drawingc
DROPFILES
DSurface
DTexture
eame
EASTEUROPE
EDITSTREAM
EDITTEXT
edtion
eetre
elles
ENABLEHOOK
ENABLETAB
ENABLETEMPLATE
ENABLETEMPLATEHANDLE
ETDT
eula
exclues
EXITMODE
EXLIMITTEXT
expresse
EXTRALIGHT
fcharset
ficier
FILEOPENDIALOGOPTIONS
FILTERMODE
FIXEDPITCHONLY
FIXEDSYS
FIXFIX
fldinst
fldrslt
fnil
fonttbl
FONTTYPE
FORCEFILESYSTEM
FORCEFONTEXIST
FORMATDLGORD
FORMATRANGE
fournies
fournisseurs
fprq
fran
fswiss
galement
garantie
garanties
GDIPVER
GETCURSEL
GETHOTKEY
GETNONCLIENTMETRICS
GETSOURCERECT
GETSTICKYKEYS
GETZOOMLEVEL
gligence
hbrush
hdr
HIDEREADONLY
HIDETRAYICON
HIGHLIGHTANDBLUR
hihglighting
HKCOMB
HKM
hlighting
HORZRES
HOTKEYF
HWNDPARENT
idc
IDCANCEL
IDOK
implicites
inacessible
INACTIVEFONTS
INCONTACT
indemnisation
indendation
INITDIALOG
INITTOLOGFONTSTRUCT
iotuap
isblur
juridique
keepn
Keyname
ldblquote
Ldr
LEFTTEXT
limite
LIMITSIZE
LIMITTEXT
LIVEHOTKEY
LIVEPENWIDTH
LIVEZOOM
LIVEZOOMDRAW
logfont
logiciel
LOGPIXELSY
loi
LONGNAMES
lpcf
LPCFHOOKPROC
lpv
lstrcpyn
LTEXT
MAGNIFYCURSOR
MAGTRANSFORM
MAKELONG
MAKELPARAM
MAKEWPARAM
marchande
MINMAXINFO
MODALFRAME
modifie
monleft
montop
MOVEREGIONS
msctls
Msimg
msvsmon
nfor
NMAKE
NOCLIP
NOCRLF
NOFACESEL
NOFAILCREATE
NOINVERT
NONANTIALIASED
NONCLIENTMETRICSW
NOOEMFONTS
NOPAGENUMS
NOPREFIX
NOSCRIPTSEL
NOSELECTION
NOSIMULATIONS
NOSIZESEL
NOSTYLESEL
NOTHOUSANDS
NOTICKS
NOTXORPEN
nouicompat
NOVECTORFONTS
NOVERTFONTS
ntout
NTSYSAPI
NULLCURSOR
obtenir
occurence
OEMCONVERT
offert
OSVERSIONINFO
OSVERSIONINFOW
OVERWRITEPROMPT
OWNERDRAWFIXED
particulier
PCTSTR
PDEVMODE
PDLL
PDRAW
PELSHEIGHT
PELSWIDTH
PENCONTROL
PENWIDTH
permettent
permises
pertes
peut
PISWOW
PMAGTRANSFORM
PNMLINK
POINTERID
POINTERUPDATE
POPTIONS
pourriez
pouvez
pquns
PRINTDLG
PRINTERFONTS
PRINTSETUP
procmon
PRTL
PTCHAR
PTYPED
qualit
quation
quel
quelque
RCZOOMIT
rdblquote
RDW
RECORDCROP
RECORDFRAMERATE
RECORDHOTKEY
Recordingsession
RECORDSCALING
RECORDWINDOW
reli
RELOADSETTINGS
reseting
RESIZEPEN
responsabilit
RESTORECURSOR
RETURNDC
Riched
richedit
ril
Rsrc
Russinovich
SAVECROP
SAVECURSOR
SCALABLEONLY
SCREENFONTS
SCRIPTSONLY
SECONDARYDISPLAY
SELCHANGE
SELECTSCRIPT
SETBUDDYINT
SETCURSEL
SETHOTKEY
SETLOWPOWERACTIVE
SETPOWEROFFACTIVE
SETRANGE
SETRULES
SETSCREENSAVEACTIVE
SETSTICKYKEYS
SETZOOM
seule
SHACF
SHIFTJIS
SHOWEXPIRED
SHOWHELP
SHOWMAGNIFIEDCURSOR
SHOWTRAYICON
slmult
SNIPHOTKEY
SNIPSAVE
soit
sont
SOUNDBROWSE
SOUNDFILE
SPINTIMER
stdc
STEPIN
STEPOUT
STEPTIME
STICKYKEYS
STOPRECORDING
stprintf
STREAMIN
stricte
stscanf
SUBMODULEUPDATE
sxs
SYSMON
SYSTEMMODAL
tant
TCIF
TCITEM
TCN
tcscat
tcschr
tcscmp
tcsdup
tcsicmp
tcslen
tcsrchr
technet
TEdition
TEXTFONT
textptr
tfopen
TIMERPOS
TITLEBARINFO
tnid
Toute
trackbar
TRAYACTIVATE
TRYICON
tstoi
TTONLY
TYPINGOFF
UACUI
UBR
ulnone
une
unhiding
uniquement
unzoom
UPDATENOW
UPDATEREGISTRY
updown
USESTYLE
utilisation
Valuename
ventualit
VERTRES
viewkind
vigueur
VIRTKEY
votre
vous
vstprintf
vus
WANTRETURN
wdm
WINDOWINFO
xit
yle
Zomm
Zoome
Zoomin
zoomit
ZOOMITX
zoomlevel
ZOOMSLIDER
ZOOMSPIN
ZOOMSPINTIMER
Previously acknowledged words that are now absent Dlg LOGFONT 🫥
Some files were automatically ignored 🙈

These sample patterns would exclude them:

[^/]\.cur$

You should consider adding them to:

.github/actions/spell-check/excludes.txt

File matching is via Perl regular expressions.

To check these files, more of their words need to be in the dictionary than not. You can use patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.

To accept these unrecognized words as correct and remove the previously acknowledged and now absent words and update file exclusions, you could run the following commands

... in a clone of the [email protected]:microsoft/PowerToys.git repository
on the dev/jaime/integrate-zoomIt branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.22/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/11782385695/attempts/1'
Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionary

This includes both expected items (1921) from .github/actions/spell-check/expect.txt and unrecognized words (427)

Dictionary Entries Covers Uniquely
cspell:r/src/r.txt 543 1 1

Consider adding them (in .github/workflows/spelling2.yml) for uses: check-spelling/[email protected] in its with:

      with:
        extra_dictionaries:
          cspell:r/src/r.txt

To stop checking additional dictionaries, add (in .github/workflows/spelling2.yml) for uses: check-spelling/[email protected] in its with:

check_extra_dictionaries: ''
Pattern suggestions ✂️ (1)

You could add these patterns to .github/actions/spell-check/patterns.txt:

# Automatically suggested patterns
# hit-count: 18 file-count: 2
# latex (check-spelling >= 0.0.22)
\\\w{2,}\{

Errors (4)

See the 📜action log or 📝 job summary for details.

❌ Errors Count
ℹ️ binary-file 2
ℹ️ candidate-pattern 2
❌ check-file-path 9
❌ forbidden-pattern 1

See ❌ Event descriptions for more information.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Please sign in to comment.