-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new "address type" column to the "receiving tab" address book page #753
base: master
Are you sure you want to change the base?
Add new "address type" column to the "receiving tab" address book page #753
Commits on Oct 7, 2023
-
gui: Refactor AddressType from ReceiveCoinsDialog
Extract and refactor ui->addressType combo content filling into GUIUtil, having the translated descriptions in one place and allowing other Qt widget containers to easily create similar combo boxes with customizable tooltips per item and default selected item, both specified by the caller.
Configuration menu - View commit details
-
Copy full SHA for bc0e33f - Browse repository at this point
Copy the full SHA bc0e33fView commit details -
wallet: Correct output type for Segwit address
Current OutputTypeFromDestination at outputtype, returns OUTPUT_TYPE_STRING_LEGACY for Segwit addresses, as p2sh-segwit requires extra info from the wallet to figure that out, this change adds a correct way to obtain the desired result from the wallet interface. So far this will be needed from the UI to identify such type, as currently a user could select this output type to create an address (receivecoinsdialog) but no display of it exists.
Configuration menu - View commit details
-
Copy full SHA for 90284c7 - Browse repository at this point
Copy the full SHA 90284c7View commit details -
gui: Add Address Type Column to AddressBookPage
Add new address type column to the addresstablemodel, use the getOutputType function from the wallet interface to display the correct address type in the new column content. Update the address book page to set the new column resize mode and to display the new column only when the receiving tab is enabled so it must be hidden on the sending tab. Update AddressBookFilterProxyModel::filterAcceptsRow so the filter works also on the new addressType column content. Also the searLineEdit greyed text reflects that the new field/ column addressType will be included in the search/ filter by but only when the receiving tab is enabled. Add the new column to the export feature.
Configuration menu - View commit details
-
Copy full SHA for 7be6b79 - Browse repository at this point
Copy the full SHA 7be6b79View commit details -
gui: Extend address book filter for nested filtering
Extend AddressBookFilterProxyModel to allow using nested filters to be applied on top of it. If future needs arise for similar filters outside the address book page, the code could be easily refactored and moved in a new subclass of QSortFilterProxyModel, perhaps with limits on nested levels. For safety and performance reasons, the code of the filter proxy model class declaration (in addressbookpage.h) and its instance creation were updated by aligning it with TransactionFilterProxy in overviewpage.h as this addresses situations of unexpected crashes, such as segfault on closing the app, double free or corruption, or stack smashing detection.
Configuration menu - View commit details
-
Copy full SHA for 5d597c0 - Browse repository at this point
Copy the full SHA 5d597c0View commit details -
gui: Add a combo widget to filter by address type
Introduce a label and a combobox UI widgets for address type filtering on the address book page. These 2 widgets are been displayed only on the Receiving tab. To ensure that the combo box selection updates the filter model correctly, an intermediary signal (addressTypeChanged) and a slot (handleAddressTypeChanged) were necessary due to the incompatibility between QComboBox::currentIndexChanged and QSortFilterProxyModel::setFilterFixedString. Update filter model to use nested filtering so when selected item changes on address type combo it will update the filter pattern on top of what the parent filter has already, which is lead by the searchLineEdit widget and all references of the current proxyModel (eg mapToSource, mapFromSource) to the nested and final filter model. Use GUIUtil::AddItemsToAddressTypeCombo to populate the combo with the default output types descriptions passing a defined local map for the output types tooltips that will be displayed for each item, similarly to the address types combobox in receivecoinsdialog.
Configuration menu - View commit details
-
Copy full SHA for dffc37f - Browse repository at this point
Copy the full SHA dffc37fView commit details