Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSai Vineet <saivineet89@gmail.com>2014-03-17 14:34:56 (GMT)
committer Sai Vineet <saivineet89@gmail.com>2014-03-17 14:34:56 (GMT)
commit037e50cb5b103d5e319db814e5e90a1dd402c799 (patch)
treeebfa1c4982d83dcd87fbb52744d511108d573148
parent0a6af33002e8de216ecf8bd09cd4cd5a92ed8e69 (diff)
Made TreeView show directories first
-rw-r--r--develop-activity/widgets.py8
1 files changed, 7 insertions, 1 deletions
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: