# HG changeset patch # User souliane # Date 1448564155 -3600 # Node ID 08aa9acc83671fa5a2f9f08bcf2cced8c1d83e52 # Parent 2970b8af3cd7227df8f079746e7cc210ca939af7 browser_side (blog): hide the entry icons while editing diff -r 2970b8af3cd7 -r 08aa9acc8367 src/browser/sat_browser/blog.py --- 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 !)