From 00c0fadda482decd9be80852f5c2043769268987 Mon Sep 17 00:00:00 2001 From: Sander Sweers Date: Sat, 6 Jul 2019 10:03:22 +0200 Subject: [PATCH] DeviceList: Use the model stored in the class No functional change just use the already stored model self.liststore, which is the same model self.get_model() returns. --- blueman/gui/DeviceList.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blueman/gui/DeviceList.py b/blueman/gui/DeviceList.py index 450a504ce..b00ea6e12 100644 --- a/blueman/gui/DeviceList.py +++ b/blueman/gui/DeviceList.py @@ -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] @@ -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] @@ -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)