def update_queue_banners(self):
if self.goglib_box_width != 1:
new_downloads_pixbuf_width = (self.goglib_box_width - 60) / 5
else:
new_downloads_pixbuf_width = (self.mylib_box_width - 60) / 5
downloads_pixbuf_scale_level = float(new_downloads_pixbuf_width)/518
new_downloads_pixbuf_height = 240 * downloads_pixbuf_scale_level
if queue_game_image_list:
for i in range(0, len(queue_game_image_list)):
if os.path.exists(data_dir + '/images/goglib_banners/' + queue_game_image_list[i].get_name() + '.jpg'):
pixbuf = GdkPixbuf.Pixbuf.new_from_file(data_dir + '/images/goglib_banners/' + queue_game_image_list[i].get_name() + '.jpg')
else:
pixbuf = GdkPixbuf.Pixbuf.new_from_file(data_dir + '/images/mylib_banners/' + queue_game_image_list[i].get_name() + '.jpg')
pixbuf = pixbuf.scale_simple(new_downloads_pixbuf_width, new_downloads_pixbuf_height, InterpType.BILINEAR)
queue_game_image_list[i].set_from_pixbuf(pixbuf)
#~ def timer_check_for_new_games(self):
#~ self.check_for_new_games()
#~ GObject.timeout_add(30000, self.timer_check_for_new_games)
评论列表
文章目录