summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-07 01:22:17 +0100
committerhut <hut@lavabit.com>2010-01-07 01:22:17 +0100
commitf5db66a1795d97c9f80d31b41a9607ce5cd0242b (patch)
tree59b90a2053228de596ee5ff2ef4901d625067bf3
parent3db854eee17ff7e9c29319be04f8ae2b3e966bbf (diff)
downloadranger-f5db66a1795d97c9f80d31b41a9607ce5cd0242b.tar.gz
random cleanups and fixes
-rw-r--r--doc/uml/2.session11
-rw-r--r--ranger/defaults/options.py2
-rw-r--r--ranger/fsobject/directory.py3
-rw-r--r--ranger/gui/widgets/browserview.py5
-rw-r--r--ranger/help/index.py6
-rw-r--r--test/tc_keyapi.py1
6 files changed, 15 insertions, 13 deletions
diff --git a/doc/uml/2.session b/doc/uml/2.session
index 42a43d47..5365445d 100644
--- a/doc/uml/2.session
+++ b/doc/uml/2.session
@@ -1,25 +1,26 @@
 window_sizes 1678 1033 393 1275 795 144
 motifplus_style
 diagrams
-  active  classdiagram_ref 128002 // Displayable Hierarchy
+  classdiagram_ref 128002 // Displayable Hierarchy
     1275 795 100 4 0 0
-  classdiagram_ref 134530 // Overview
+  active  classdiagram_ref 134530 // Overview
     1275 795 100 4 0 0
   sequencediagram_ref 141058 // Basic Logic
-    1275 795 100 4 60 0
+    1275 795 100 4 0 0
 end
 show_stereotypes
-selected classdiagram_ref 128002 // Displayable Hierarchy
+selected classdiagram_ref 134530 // Overview
 open
   class_ref 128002 // Displayable
   class_ref 128130 // UI
   class_ref 128258 // DefaultUI
-  class_ref 135170 // FileList
+  class_ref 135170 // BrowserColumn
   class_ref 148866 // Command
   class_ref 148994 // CommandList
   class_ref 149122 // Environment
   class_ref 149378 // FM
   class_ref 155906 // FileSystemObject
+  class_ref 175746 // Pager
   class_ref 149250 // curses
 end
 end
diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py
index fb1358e6..27d8b5d4 100644
--- a/ranger/defaults/options.py
+++ b/ranger/defaults/options.py
@@ -6,7 +6,7 @@ colorscheme = colorschemes.default
 max_history_size = 20
 scroll_offset = 2
 max_dirsize_for_autopreview = None
-preview_files = True
+preview_files = False
 
 sort = 'basename'
 reverse = False
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index 1079d126..40e8caa9 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -139,6 +139,8 @@ class Directory(FileSystemObject, Accumulator, SettingsAware):
 					filenames.append(join(self.path, fname))
 				yield
 
+				self.load_content_mtime = os.lstat(self.path).st_mtime
+
 				marked_paths = set(map( \
 						lambda obj: obj.path, self.marked_items))
 
@@ -185,7 +187,6 @@ class Directory(FileSystemObject, Accumulator, SettingsAware):
 			self.last_update_time = time()
 
 		finally:
-			self.load_content_mtime = os.lstat(self.path).st_mtime
 			self.loading = False
 
 	def unload(self):
diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py
index 1635cbe0..0677a703 100644
--- a/ranger/gui/widgets/browserview.py
+++ b/ranger/gui/widgets/browserview.py
@@ -13,17 +13,16 @@ class BrowserView(Widget, DisplayableContainer):
 
 	def __init__(self, win, ratios, preview = True):
 		DisplayableContainer.__init__(self, win)
-		from functools import reduce
 		self.ratios = ratios
 		self.preview = preview
 
 		# normalize ratios:
-		ratio_sum = float(reduce(lambda x,y: x + y, ratios))
+		ratio_sum = float(sum(ratios))
 		self.ratios = tuple(map(lambda x: x / ratio_sum, ratios))
 
 		if len(self.ratios) >= 2:
 			self.stretch_ratios = self.ratios[:-2] + \
-					((self.ratios[-2] + self.ratios[-1] * 0.9), \
+					((self.ratios[-2] + self.ratios[-1] * 0.9),
 					(self.ratios[-1] * 0.1))
 		
 		offset = 1 - len(ratios)
diff --git a/ranger/help/index.py b/ranger/help/index.py
index 0f5d8727..3821bd4b 100644
--- a/ranger/help/index.py
+++ b/ranger/help/index.py
@@ -8,9 +8,9 @@
 
 	|0?|	This index
 	|1?|	Basic movement and browsing
-	|2?|	(Running Files)
-	|3?|	(The console)
-	|4?|	(File operations)
+		Running Files
+		The console
+		File operations
 
 ==============================================================================
 
diff --git a/test/tc_keyapi.py b/test/tc_keyapi.py
index f1067e26..d6c32271 100644
--- a/test/tc_keyapi.py
+++ b/test/tc_keyapi.py
@@ -13,6 +13,7 @@ class Test(TestCase):
 		class commandarg(object):
 			def __init__(self):
 				self.fm = dummyfm
+				self.n = None
 
 		arg = commandarg()
 
a id='n384' href='#n384'>384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609