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
Allow copy operations to work on multiple selected functions #28
Allow copy operations to work on multiple selected functions #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few nitpicks on code style & readability
gui_rename_function(function_addresses[0]) | ||
|
||
# handle the 'Copy name and address' or 'Copy names and addresses' action | ||
elif action == self._action_copy_name_and_address or action == self._action_copy_names_and_addresses: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to:
elif action in [self._action_copy_name_and_address, self._action_copy_names_and_addresses]:
...
copy_to_clipboard(function_name_and_address) | ||
|
||
# handle the 'Copy name' or 'Copy names' action | ||
elif action == self._action_copy_name or action == self._action_copy_names: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as comment above,
elif action in [self._action_copy_name, self._action_copy_names]:
...
elif action == self._action_copy_address: | ||
address_string = "0x%X" % function_address | ||
# handle the 'Copy address' or 'Copy addresses' action | ||
elif action == self._action_copy_address or action == self._action_copy_addresses: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the other two comments!
@@ -327,9 +327,14 @@ def _ui_init_ctx_menu_actions(self): | |||
|
|||
# function actions | |||
self._action_rename = QtWidgets.QAction("Rename", None) | |||
self._action_copy_name_and_address = QtWidgets.QAction("Copy name and address", None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this action/member definition to be after self._action_copy_address
self._action_copy_name = QtWidgets.QAction("Copy name", None) | ||
self._action_copy_address = QtWidgets.QAction("Copy address", None) | ||
|
||
self._action_copy_names_and_addresses = QtWidgets.QAction("Copy names and addresses", None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, move this definition after self._action_copy_addresses
This seems like a reasonable request to me :-) I've made a few nitpicks on code style and readability, but nothing major. I'd also like you to make the PR to the develop branch where I work on vNext / new features. Master is reserved for major releases or hotfixes. Thanks for the PR! |
9041ccf
to
f5c657e
Compare
f5c657e
to
3024fd2
Compare
Fixed.. I think :)? |
Thanks, looks good to me |
Allows "copy name", "copy address" to work with multiple selected functions. Also adds "copy name and address" for single/multiple functions.