Mercurial > libervia-web
changeset 773:08aa9acc8367
browser_side (blog): hide the entry icons while editing
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 26 Nov 2015 19:55:55 +0100 |
parents | 2970b8af3cd7 |
children | 734e59ba74a7 |
files | src/browser/sat_browser/blog.py |
diffstat | 1 files changed, 17 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/browser/sat_browser/blog.py Thu Nov 26 19:31:20 2015 +0100 +++ b/src/browser/sat_browser/blog.py Thu Nov 26 19:55:55 2015 +0100 @@ -194,10 +194,10 @@ """ self.editable = editable self.bubble.edit(self.editable) - self.updateSyntaxSwitchButton() + self.updateIconsAndButtons() - def updateSyntaxSwitchButton(self): - """Set the visibility of the button to switch between blog and microblog.""" + def updateIconsAndButtons(self): + """Set the visibility of the icons and the button to switch between blog and microblog.""" try: self.bubble_commands.removeFromParent() except (AttributeError, TypeError): @@ -228,6 +228,19 @@ self.bubble_commands.add(toggle_syntax_button) self.entry_dialog.add(self.bubble_commands) + # hide these icons while editing + try: + self.delete_label.setVisible(not self.editable) + except (TypeError, AttributeError): + pass + try: + self.update_label.setVisible(not self.editable) + except (TypeError, AttributeError): + pass + try: + self.comment_label.setVisible(not self.editable) + except (TypeError, AttributeError): + pass def onClick(self, sender): if sender == self: @@ -286,7 +299,7 @@ self.delete() else: self.editable = False - self.updateSyntaxSwitchButton() + self.updateIconsAndButtons() def _showWarning(self, sender, keycode, modifiers): if keycode == keyb.KEY_ENTER & keyb.MODIFIER_SHIFT: # FIXME: fix edit_listeners, it's dirty (we have to check keycode/modifiers twice !)