Commit 81742252 authored by Hugo Posnic's avatar Hugo Posnic

Minor fixes

parent d3539018
......@@ -39,7 +39,8 @@ class PacmanMirrors(Gtk.Window):
for server in server_list:
mirrors_list.append((False,
server["country"],
"{}h".format(server["last_sync"]),
"{}h {}m".format(server["last_sync"][:2],
server["last_sync"][-2:]),
server["url"][:-20]))
self.mirrors_liststore = Gtk.ListStore(bool, str, str, str)
for mirror_ref in mirrors_list:
......@@ -84,11 +85,11 @@ class PacmanMirrors(Gtk.Window):
self.mirrors_liststore[path][0] = not self.mirrors_liststore[path][0]
if self.mirrors_liststore[path][0]:
for server in self.server_list:
if server["url"][:-20] == self.mirrors_liststore[path][2]:
if server["url"][:-20] == self.mirrors_liststore[path][3]:
self.custom_list.append(server)
else:
for server in self.custom_list:
if server["url"][:-20] == self.mirrors_liststore[path][2]:
if server["url"][:-20] == self.mirrors_liststore[path][3]:
self.custom_list.remove(server)
self.button_done.set_sensitive(bool(self.custom_list))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment