jamulussoftware / jamulussoftware/jamulus
Refactor CClientDlgOnConnectDisconnectBut()
- Vorherrschende Sprache
- C
- Sterne
- 1.1k
- Forks
- 248
- Ø Merge
- 2 T. 3 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
This should be implemented by switching the `connect` setting for the signal handler for the button, rather than having one signal handler with an if that consults the state of the client.
Button life-cycle:
- (public) ConnectDlg onClickConnect is connected to (private) ClientDlg onConnectDlgConnect
- onClickConnect launches ConnectDlg if it's not already open (and nothing else)
- onConnectDlgConnect _disables_ the button and asks the client to connect to the provided address
- onConnect switches the onClick handler to onClickDisconnect and enables the button
- onConnectFailed just enables the button (keeping the onClickConnect handler) -- although, if Client is passing an error, here's where it would get displayed to the user
- onClickDisconnect _disables_ the button and asks the client to disconnect
- onDisconnect (which should be handled) switches the onClick handler to onClickDisconnect and enables the button
_Originally posted by @pljones in https://github.com/jamulussoftware/jamulus/pull/3372#discussion_r1761635248_
Beitragsleitfaden
Rechercherichtung
Beginnen Sie damit, die genannten ClientDlg-Handler und ihre Signalverbindungen nachzuverfolgen: onClickConnect, onConnectDlgConnect, onConnect, onConnectFailed, onClickDisconnect und onDisconnect. Bestätigen Sie den im Issue beschriebenen Lebenszyklus der Schaltflächen und überprüfen Sie anschließend, dass beim Verbinden und Trennen der jeweils passende Click-Handler ausgewählt wird, ohne in einem gemeinsamen Handler den Client-Zustand abzufragen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- c
- Bereich
- desktop
- Issue-Typ
- Refactoring
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100