summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/fsobject/directory.py16
-rw-r--r--ranger/fsobject/fsobject.py2
2 files changed, 7 insertions, 11 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index 44c4cf96..d7583025 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -48,7 +48,7 @@ class Directory(SuperClass, SettingsAware):
 		self.old_directories_first = self.settings.directories_first
 	
 	def mark_item(self, item, val):
-		item._mark(bool(val))
+		item._mark(val)
 		if val:
 			if item in self.files:
 				self.marked_items.add(item)
@@ -57,21 +57,17 @@ class Directory(SuperClass, SettingsAware):
 				self.marked_items.remove(item)
 
 	def toggle_mark(self, item):
-		if item.marked:
-			return self.unmark_item(item)
-		return self.mark_item(item)
+		self.mark_item(item, not item.marked)
 
 	def toggle_all_marks(self):
 		for item in self.files:
 			self.toggle_mark(item)
 	
 	def mark_all(self, val):
-		if val:
-			for item in self.files:
-				self.mark_item(item)
-		else:
-			for item in self.files:
-				self.unmark_item(item)
+		for item in self.files:
+			self.mark_item(item, val)
+
+		if not val:
 			self.marked_items.clear()
 			self._clear_marked_items()
 	
diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py
index d968d65f..b1354da1 100644
--- a/ranger/fsobject/fsobject.py
+++ b/ranger/fsobject/fsobject.py
@@ -98,7 +98,7 @@ class FileSystemObject(MimeTypeAware, FileManagerAware):
 	
 	def _mark(self, boolean):
 		"""Called by directory.mark_item() and similar functions"""
-		self.marked = boolean
+		self.marked = bool(boolean)
 
 	def load(self):
 		"""reads useful information about the filesystem-object from the
html/506math.mu.html?h=main&id=dc5a0acf3feea227d03a98cedf427d2aef462320'>dc5a0acf ^
5396e24c ^

372367f5 ^
5396e24c ^
372367f5 ^
78357b88 ^
5396e24c ^
78357b88 ^
372367f5 ^
5396e24c ^


78357b88 ^
5396e24c ^






























372367f5 ^
5396e24c ^







372367f5 ^
5396e24c ^











372367f5 ^

5396e24c ^









372367f5 ^

5396e24c ^










dd60caa3 ^
372367f5 ^
5396e24c ^







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115