From 037e50cb5b103d5e319db814e5e90a1dd402c799 Mon Sep 17 00:00:00 2001 From: Sai Vineet Date: Mon, 17 Mar 2014 14:34:56 +0000 Subject: Made TreeView show directories first --- diff --git a/develop-activity/widgets.py b/develop-activity/widgets.py index ed4c342..c7748a5 100644 --- a/develop-activity/widgets.py +++ b/develop-activity/widgets.py @@ -292,7 +292,13 @@ class FileViewer(Gtk.ScrolledWindow): if os.path.isdir(full_path): new_iter = self._model.append(parent, [f, full_path]) self._add_dir_to_model(full_path, new_iter) - else: + + for f in os.listdir(dir_path): + if f.endswith(_EXCLUDE_EXTENSIONS) or f in _EXCLUDE_NAMES: + continue + + full_path = os.path.join(dir_path, f) + if not os.path.isdir(full_path): current_iter = self._model.append(parent, [f, full_path]) self._opened_files[full_path] = current_iter if full_path == self._initial_filename: -- cgit v0.9.1