def update_goglib(self):
self.window_update_message = Gtk.Window(
title = _("Changes in library"),
type = Gtk.WindowType.POPUP,
window_position = Gtk.WindowPosition.CENTER_ALWAYS,
resizable = False,
icon = app_icon,
)
self.box_update_message = Gtk.Box(
orientation = Gtk.Orientation.HORIZONTAL
)
self.label_update_message = Gtk.Label(
label = _("Updating GOG library..."),
margin_right = 10,
margin_top = 20,
margin_bottom = 20,
)
self.spinner_update_message = Gtk.Spinner(
active = True,
visible = True,
margin_left = 10,
width_request = 48,
height_request = 48
)
self.box_update_message.pack_start(self.spinner_update_message, True, True, 0)
self.box_update_message.pack_start(self.label_update_message, True, True, 0)
self.window_update_message.add(self.box_update_message)
self.main_window.hide()
if len(self.additional_windows_list) != 0:
for window in self.additional_windows_list:
window.hide()
while Gtk.events_pending():
Gtk.main_iteration()
self.window_update_message.show_all()
command = ['lgogdownloader', '--exclude', '1,2,4,8,16,32','--list-details']
pid, stdin, stdout, stderr = GLib.spawn_async(command,
flags=GLib.SpawnFlags.SEARCH_PATH|GLib.SpawnFlags.DO_NOT_REAP_CHILD,
standard_output=True,
standard_error=True)
io = GLib.IOChannel(stdout)
self.source_id_out = io.add_watch(GLib.IO_IN|GLib.IO_HUP,
self.watch_process,
'update_goglib',
priority=GLib.PRIORITY_HIGH)
评论列表
文章目录