[GTK3] Fix and remove FIXME comments

- Several of the FIXME comments seem to be outdated so removed.
- The status_icon comment was resolved by fixing the arguments supplied to
tray_menu.popup().
- The TreePath no longer returns a tuple so cast path to int.
- Fix an error with Pixbuf signature.
This commit is contained in:
Calum Lind 2018-09-20 20:47:46 +01:00 committed by Calum Lind
commit cf4012bb60
5 changed files with 6 additions and 11 deletions

View file

@ -35,7 +35,7 @@ log = logging.getLogger(__name__)
def create_blank_pixbuf(size=16): def create_blank_pixbuf(size=16):
pix = Pixbuf(Colorspace.RGB, True, 8, size, size) pix = Pixbuf.new(Colorspace.RGB, True, 8, size, size)
pix.fill(0x0) pix.fill(0x0)
return pix return pix

View file

@ -217,11 +217,8 @@ class ListView(object):
self.last_sort_order = {} self.last_sort_order = {}
def record_position(model, path, _iter, data): def record_position(model, path, _iter, data):
# FIXME: TypeError: 'TreePath' object does not support indexing unique_id = model[_iter][self.unique_column_id]
# Verify (old code: ` = path[0]`) self.last_sort_order[unique_id] = int(str(path))
self.last_sort_order[model[_iter][self.unique_column_id]] = int(
str(model.get_path(iter))
)
model.foreach(record_position, None) model.foreach(record_position, None)
@ -576,7 +573,6 @@ class ListView(object):
column.set_min_width(20) column.set_min_width(20)
column.set_reorderable(True) column.set_reorderable(True)
column.set_visible(not hidden) column.set_visible(not hidden)
# FIXME: Check for errors with button press, related new signal
column.connect('button-press-event', self.on_treeview_header_right_clicked) column.connect('button-press-event', self.on_treeview_header_right_clicked)
if tooltip: if tooltip:

View file

@ -1164,7 +1164,6 @@ class PathChooserComboBox(Gtk.Box, StoredValuesPopup, GObject.GObject):
self.default_text = None self.default_text = None
self.button_properties = self.builder.get_object('button_properties') self.button_properties = self.builder.get_object('button_properties')
# FIXME: These are commented out but should be fixed.
self.combobox_window = self.builder.get_object('combobox_window') self.combobox_window = self.builder.get_object('combobox_window')
self.combo_hbox = self.builder.get_object('entry_combobox_hbox') self.combo_hbox = self.builder.get_object('entry_combobox_hbox')
# Change the parent of the hbox from the glade Window to this hbox. # Change the parent of the hbox from the glade Window to this hbox.

View file

@ -352,8 +352,9 @@ class SystemTray(component.Component):
if windows_check() or osx_check(): if windows_check() or osx_check():
popup_function = None popup_function = None
button = 0 button = 0
# FIXME why was status_icon removed?? self.tray_menu.popup(
self.tray_menu.popup(None, None, None, popup_function, button, activate_time) None, None, None, popup_function, status_icon, button, activate_time
)
def on_menuitem_show_deluge_activate(self, menuitem): def on_menuitem_show_deluge_activate(self, menuitem):
log.debug('on_menuitem_show_deluge_activate') log.debug('on_menuitem_show_deluge_activate')

View file

@ -662,7 +662,6 @@ class TorrentView(ListView, component.Component):
to_update = [] to_update = []
for i, status_field in fields_to_update: for i, status_field in fields_to_update:
row_value = status[torrent_id][status_field] row_value = status[torrent_id][status_field]
# FIXME: Seeing UnicodeWarning??
if row[i] != row_value: if row[i] != row_value:
to_update.append(i) to_update.append(i)
to_update.append(row_value) to_update.append(row_value)