Browse code

Add some FIXME/TODO remarks.

See discussion https://github.com/jrfonseca/xdot.py/pull/81

Jose Fonseca authored on 17/08/2020 12:37:04
Showing 1 changed files

... ...
@@ -64,6 +64,9 @@ class DragAction(object):
64 64
 
65 65
 
66 66
 class NullAction(DragAction):
67
+
68
+    # FIXME: The NullAction class is probably not the best place to hold this
69
+    # sort mutable global state.
67 70
     _tooltip_window = Gtk.Window(Gtk.WindowType.POPUP)
68 71
     _tooltip_label = Gtk.Label(xalign=0, yalign=0)
69 72
     _tooltip_item = None
... ...
@@ -84,6 +87,7 @@ class NullAction(DragAction):
84 87
             dot_widget.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.HAND2))
85 88
             dot_widget.set_highlight(item.highlight)
86 89
             if item is not NullAction._tooltip_item:
90
+                # TODO: Should fold this into a method.
87 91
                 if isinstance(item, Jump) and item.item.tooltip is not None:
88 92
                     NullAction._tooltip_label.set_markup(item.item.tooltip.decode())
89 93
                     NullAction._tooltip_window.resize(