From f164916bd42e1f68bda00402e1220429e6940b85 Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Sat, 16 Oct 2021 19:14:22 -0400 Subject: [PATCH] filename in status bar --- cross.py | 2 -- status_bar.py | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cross.py b/cross.py index c0effaa..2494d8d 100644 --- a/cross.py +++ b/cross.py @@ -265,8 +265,6 @@ class Cross_painter(Widget): # redraw self.canvas.clear() self.draw() - # report position in status bar - self.app.status_bar.set_text(" {:05.2f} , {:05.2f}".format(self.selected.pos.x,self.selected.pos.y)) # find the cross at position pos diff --git a/status_bar.py b/status_bar.py index e69056c..2ea6b04 100644 --- a/status_bar.py +++ b/status_bar.py @@ -20,8 +20,6 @@ class Status_bar(Label): # init Label super(Status_bar,self).__init__(**kwargs) - def set_text(self,string): - self.raw_text=string self.draw() def draw(self): @@ -31,5 +29,9 @@ class Status_bar(Label): self.message="" return + if self.app.openfile!="": + self.raw_text=self.app.openfile + else: + self.raw_text="[no file]" # do not wrap self.text=self.raw_text[:min(len(self.raw_text),int(self.width/self.char_width))]