From a924e1c2bcca44554760ce067d0cc9ecf810d87b Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Mon, 26 Jan 2009 18:59:51 +0000 Subject: Remove more unused code --- diff --git a/view.py b/view.py index 8a4d492..ccbbc82 100644 --- a/view.py +++ b/view.py @@ -40,11 +40,6 @@ class MindMapView(GtkView): self.canvas = Canvas() - #self.dragging_started.connect(self.__dragging_started_cb) - #self.dragging_finished.connect(self.__dragging_finished_cb) - - #self.connect('button-release-event', self.__button_release_event_cb) - if model is not None: self.model = model @@ -59,41 +54,6 @@ class MindMapView(GtkView): if row[2] != x or row[3] != y: self.model.set(row.iter, 2, x, 3, y) - def __dragging_started_cb(self, **kwargs): - x, y = kwargs['position'] - logging.debug('__dragging_started_cb %r %r' % (x, y)) - thought = kwargs['element'] - thought.dragging = True - self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.HAND1)) - - def __dragging_finished_cb(self, **kwargs): - self.window.set_cursor(None) - x, y = kwargs['position'] - thought = kwargs['element'] - logging.debug('__dragging_finished_cb %r %r' % (x, y)) - thought.dragging = False - - rect = self.get_allocation() - thought_rect = thought.get_rect() - if (x >= 0 and x + thought_rect.width <= rect.width) and \ - (y >= 0 and y + thought_rect.height <= rect.height): - row = self.model.find_by_id(thought.id) - self.model.set(row.iter, 2, x, 3, y) - - def __button_release_event_cb(self, widget, event): - logging.debug('button_release_event_cb') - - if self._selected_thought is not None: - self._selected_thought.selected = False - self._selected_thought = None - - thought = self.get_element_at(event.x, event.y) - if thought is not None: - thought.selected = True - self._selected_thought = thought - - return True - def set_model(self, new_model): logging.debug('set_model %r' % new_model) if self._model == new_model: -- cgit v0.9.1