mirror of
https://github.com/lutris/lutris
synced 2024-10-02 22:14:23 +00:00
Replace status text with status box
This commit is contained in:
parent
496d94d047
commit
87bfad00ac
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,7 +2,7 @@
|
||||||
/share/lutris/ui/dialog-pga-sources.ui~
|
/share/lutris/ui/dialog-pga-sources.ui~
|
||||||
/share/lutris/ui/dialog-uninstall-game.ui~
|
/share/lutris/ui/dialog-uninstall-game.ui~
|
||||||
/share/lutris/ui/about-dialog.ui~
|
/share/lutris/ui/about-dialog.ui~
|
||||||
/share/lutris/ui/LutrisWindow.ui~
|
/share/lutris/ui/lutris-window.ui~
|
||||||
nbproject
|
nbproject
|
||||||
build
|
build
|
||||||
.project
|
.project
|
||||||
|
|
|
@ -124,8 +124,6 @@ class LutrisWindow(Gtk.Application):
|
||||||
# Scroll window
|
# Scroll window
|
||||||
self.games_scrollwindow = self.builder.get_object('games_scrollwindow')
|
self.games_scrollwindow = self.builder.get_object('games_scrollwindow')
|
||||||
self.games_scrollwindow.add(self.view)
|
self.games_scrollwindow.add(self.view)
|
||||||
# Status bar
|
|
||||||
self.status_label = self.builder.get_object('status_label')
|
|
||||||
self.joystick_icons = []
|
self.joystick_icons = []
|
||||||
# Buttons
|
# Buttons
|
||||||
self.stop_button = self.builder.get_object('stop_button')
|
self.stop_button = self.builder.get_object('stop_button')
|
||||||
|
@ -345,7 +343,7 @@ class LutrisWindow(Gtk.Application):
|
||||||
if first_run:
|
if first_run:
|
||||||
icons_sync = AsyncCall(self.sync_icons, None, stoppable=True)
|
icons_sync = AsyncCall(self.sync_icons, None, stoppable=True)
|
||||||
self.threads_stoppers.append(icons_sync.stop_request.set)
|
self.threads_stoppers.append(icons_sync.stop_request.set)
|
||||||
self.set_status("Library synced")
|
self.set_status("")
|
||||||
|
|
||||||
def update_runtime(self):
|
def update_runtime(self):
|
||||||
cancellables = runtime.update(self.set_status)
|
cancellables = runtime.update(self.set_status)
|
||||||
|
@ -357,7 +355,12 @@ class LutrisWindow(Gtk.Application):
|
||||||
stop_request=stop_request)
|
stop_request=stop_request)
|
||||||
|
|
||||||
def set_status(self, text):
|
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):
|
def refresh_status(self):
|
||||||
"""Refresh status bar."""
|
"""Refresh status bar."""
|
||||||
|
|
|
@ -726,12 +726,14 @@
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="status_label">
|
<object class="GtkBox" id="status_box">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes">Status</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="justify">center</property>
|
<property name="homogeneous">True</property>
|
||||||
<property name="lines">1</property>
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
|
|
Loading…
Reference in a new issue