Thanks, pushed.<div><br></div><div>Gonzalo<br><br><div class="gmail_quote">On Tue, May 29, 2012 at 1:03 PM, Manuel Kaufmann <span dir="ltr"><<a href="mailto:humitos@gmail.com" target="_blank">humitos@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Alert the user with a Confirmation Alert when he / she removes a bookmark<br>
informing that the bookmark information will be lost.<br>
<br>
Signed-off-by: Manuel Kaufmann <<a href="mailto:humitos@gmail.com">humitos@gmail.com</a>><br>
---<br>
 readactivity.py |   18 ++++++++++++++++++<br>
 1 file changed, 18 insertions(+)<br>
<br>
diff --git a/readactivity.py b/readactivity.py<br>
index c0092d5..5e23b86 100644<br>
--- a/readactivity.py<br>
+++ b/readactivity.py<br>
@@ -39,6 +39,7 @@ from sugar3.graphics.toolbarbox import ToolbarBox<br>
 from sugar3.graphics.toolbarbox import ToolbarButton<br>
 from sugar3.graphics.toolcombobox import ToolComboBox<br>
 from sugar3.graphics.toggletoolbutton import ToggleToolButton<br>
+from sugar3.graphics.alert import ConfirmationAlert<br>
 from sugar3.activity.widgets import ActivityToolbarButton<br>
 from sugar3.activity.widgets import StopButton<br>
 from sugar3 import network<br>
@@ -477,7 +478,24 @@ class ReadActivity(activity.Activity):<br>
         if self._bookmarker.props.active:<br>
             self._sidebar.add_bookmark(page)<br>
         else:<br>
+            alert = ConfirmationAlert()<br>
+            alert.props.title = _('Delete bookmark')<br>
+            alert.props.msg = _('All the information related '<br>
+                                'with this bookmark will be lost')<br>
+            self.add_alert(alert)<br>
+            alert.connect('response', self.__alert_response_cb, page)<br>
+            alert.show()<br>
+<br>
+    def __alert_response_cb(self, alert, response_id, page):<br>
+        self.remove_alert(alert)<br>
+<br>
+        if response_id is Gtk.ResponseType.OK:<br>
             self._sidebar.del_bookmark(page)<br>
+        elif response_id is Gtk.ResponseType.CANCEL:<br>
+            self._bookmarker.handler_block(self._bookmarker_toggle_handler_id)<br>
+            self._bookmarker.props.active = True<br>
+            self._bookmarker.handler_unblock(\<br>
+                self._bookmarker_toggle_handler_id)<br>
<br>
     def __page_changed_cb(self, model, page_from, page_to):<br>
         self._update_nav_buttons(page_to)<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.10<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Gonzalo Odiard<br><br><br>
</div>