Display revision on dialog
issue10059 review335531002
This commit is contained in:
1 parent
c9cbac387a
commit
61279e73c6
3 files changed
+16
-3
No files matched your search
@@ -1,3 +1,4 @@
|
||||
* Display revision on dialog
|
||||
* Execute report asynchronously
|
||||
* Add support for Python 3.9
|
||||
* Support empty value for timedelta converter
|
||||
|
||||
@@ -278,7 +278,7 @@ class Form(SignalEvent, TabContent):
|
||||
else:
|
||||
label = common.ellipsize(self.name, 80)
|
||||
tooltip = self.name
|
||||
self.title.set_markup(label)
|
||||
self.title.set_text(label)
|
||||
tooltips.set_tip(self.title, tooltip)
|
||||
self.set_buttons_sensitive(revision)
|
||||
|
||||
|
||||
@@ -107,11 +107,23 @@ class WinForm(NoModal, InfoBar):
|
||||
|
||||
self.win.set_title(self.title)
|
||||
|
||||
revision = self.screen.context.get('_datetime')
|
||||
if revision and self.screen.model_name in common.MODELHISTORY:
|
||||
format_ = self.screen.context.get('date_format', '%x')
|
||||
format_ += ' %H:%M:%S.%f'
|
||||
revision_label = ' @ %s' % revision.strftime(format_)
|
||||
label = common.ellipsize(
|
||||
self.title, 80 - len(revision_label)) + revision_label
|
||||
tooltip = self.title + revision_label
|
||||
else:
|
||||
label = common.ellipsize(self.title, 80)
|
||||
tooltip = self.title
|
||||
|
||||
title = Gtk.Label(
|
||||
label=common.ellipsize(self.title, 80),
|
||||
label=label,
|
||||
halign=Gtk.Align.START, margin=5,
|
||||
ellipsize=Pango.EllipsizeMode.END)
|
||||
tooltips.set_tip(title, self.title)
|
||||
tooltips.set_tip(title, tooltip)
|
||||
title.set_size_request(0, -1) # Allow overflow
|
||||
title.show()
|
||||
|
||||
|
||||
Reference in new issue
Block a user