1
0
mirror of https://github.com/lutris/lutris synced 2024-07-03 07:28:41 +00:00

Replace status text with status box

This commit is contained in:
Mathieu Comandon 2016-09-02 17:47:27 -07:00
parent 496d94d047
commit 87bfad00ac
3 changed files with 14 additions and 9 deletions

2
.gitignore vendored
View File

@ -2,7 +2,7 @@
/share/lutris/ui/dialog-pga-sources.ui~
/share/lutris/ui/dialog-uninstall-game.ui~
/share/lutris/ui/about-dialog.ui~
/share/lutris/ui/LutrisWindow.ui~
/share/lutris/ui/lutris-window.ui~
nbproject
build
.project

View File

@ -124,8 +124,6 @@ class LutrisWindow(Gtk.Application):
# Scroll window
self.games_scrollwindow = self.builder.get_object('games_scrollwindow')
self.games_scrollwindow.add(self.view)
# Status bar
self.status_label = self.builder.get_object('status_label')
self.joystick_icons = []
# Buttons
self.stop_button = self.builder.get_object('stop_button')
@ -345,7 +343,7 @@ class LutrisWindow(Gtk.Application):
if first_run:
icons_sync = AsyncCall(self.sync_icons, None, stoppable=True)
self.threads_stoppers.append(icons_sync.stop_request.set)
self.set_status("Library synced")
self.set_status("")
def update_runtime(self):
cancellables = runtime.update(self.set_status)
@ -357,7 +355,12 @@ class LutrisWindow(Gtk.Application):
stop_request=stop_request)
def set_status(self, text):
self.status_label.set_text(text)
status_box = self.builder.get_object('status_box')
for child_widget in status_box.get_children():
child_widget.destroy()
label = Gtk.Label(text)
label.show()
status_box.add(label)
def refresh_status(self):
"""Refresh status bar."""

View File

@ -726,12 +726,14 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="status_label">
<object class="GtkBox" id="status_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Status</property>
<property name="justify">center</property>
<property name="lines">1</property>
<property name="orientation">vertical</property>
<property name="homogeneous">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>