-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Implement confirmation dialog for deleting items #110
base: master
Are you sure you want to change the base?
Conversation
Can you extract the readme changes into another PR? I'd like to accept that right away. |
Done. There is still the locale which has not been updated yet. |
@@ -587,7 +617,7 @@ class ClipboardIndicator extends PanelMenu.Button { | |||
this.entries.bytes > MAX_BYTES) | |||
) { | |||
const next = entry.next; | |||
this._removeEntry(entry, true); | |||
this._confirmRemoveEntry(entry, true); |
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.
This is not something caused by a user action, undo.
@@ -886,7 +916,7 @@ class ClipboardIndicator extends PanelMenu.Button { | |||
last.text.endsWith(text) || | |||
last.text.startsWith(text)) | |||
) { | |||
this._removeEntry(last, true); | |||
this._confirmRemoveEntry(last, true); |
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.
Undo
@@ -1020,7 +1050,7 @@ class ClipboardIndicator extends PanelMenu.Button { | |||
} | |||
|
|||
_deleteEntryAndRestoreLatest(entry) { | |||
this._removeEntry(entry, true, true); | |||
this._confirmRemoveEntry(entry, true, true); |
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.
Not correct either because this shouldn't trigger a confirmation:
gnome-clipboard-history/extension.js
Line 914 in d437412
this._deleteEntryAndRestoreLatest(this.currentlySelectedEntry), |
I think you need to take in an optional confirm param.
@@ -74,6 +74,22 @@ | |||
</description> | |||
</key> | |||
|
|||
<key name="confirm-remove-favorite" type="b"> |
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.
These settings need to be supported in code (prefs.js).
Addresses #109
Changes
Help wanted