Skip to content

Commit

Permalink
DeviceList: Use the model stored in the class
Browse files Browse the repository at this point in the history
No functional change just use the already stored model self.liststore,
which is the same model self.get_model() returns.
  • Loading branch information
infirit committed Jul 7, 2019
1 parent 8ccdf1d commit 00c0fad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions blueman/gui/DeviceList.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def find_device(self, device):
row = self.path_to_row[object_path]
if row.valid():
path = row.get_path()
tree_iter = self.get_model().get_iter(path)
tree_iter = self.liststore.get_iter(path)
return tree_iter
else:
del self.path_to_row[object_path]
Expand All @@ -362,7 +362,7 @@ def find_device_by_path(self, path):
row = self.path_to_row[path]
if row.valid():
path = row.get_path()
tree_iter = self.get_model().get_iter(path)
tree_iter = self.liststore.get_iter(path)
return tree_iter
else:
del self.path_to_row[path]
Expand All @@ -387,8 +387,8 @@ def do_cache(self, tree_iter, kwargs):

if object_path:
logging.info("Caching new device %s" % object_path)
self.path_to_row[object_path] = Gtk.TreeRowReference.new(self.get_model(),
self.get_model().get_path(tree_iter))
self.path_to_row[object_path] = Gtk.TreeRowReference.new(self.liststore,
self.liststore.get_path(tree_iter))

def append(self, **columns):
tree_iter = GenericList.append(self, **columns)
Expand Down

0 comments on commit 00c0fad

Please sign in to comment.