Skip to content

Commit 3ba56a7

Browse files
committed
dont show again button
1 parent 3074169 commit 3ba56a7

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

manager.py

+22-4
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ def filter(self, record):
177177

178178
if os.path.exists(app_path + "oiw_update.txt") == False:
179179
print("show ad")
180-
with open(app_path + "oiw_update.txt", "w") as filer:
181-
filer.write("Delete this file to get the OpenInWSL Ad on startup again")
182-
filer.close()
183-
show_ad = True
180+
#with open(app_path + "oiw_update.txt", "w") as filer:
181+
# filer.write("Delete this file to get the OpenInWSL Ad on startup again")
182+
# filer.close()
183+
show_ad = True
184184

185185

186186

@@ -1267,6 +1267,20 @@ def announce():
12671267

12681268
txt = title_font.render(_("Ok"), True, white)
12691269
txt.set_alpha(int(v * 255))
1270+
canvas.blit(txt,
1271+
[WIDTH / 2 - txt.get_width() / 2, HEIGHT - ui.inch2pix(0.8) - txt.get_height() - int((v - 1) * d)])
1272+
if mouse != False:
1273+
if mouse[0] > WIDTH / 2 - txt.get_width() / 2 - ui.inch2pix(0.2) and mouse[
1274+
0] < WIDTH / 2 - txt.get_width() / 2 + txt.get_width() + ui.inch2pix(0.2):
1275+
if mouse[1] > HEIGHT - ui.inch2pix(0.8) - txt.get_height() - int((v - 1) * d) and mouse[
1276+
1] < HEIGHT - ui.inch2pix(0.8) - txt.get_height() - int(
1277+
(v - 1) * d) + txt.get_height() + ui.inch2pix(0.1):
1278+
machine = None
1279+
animator.animate("choose", [0, 0])
1280+
1281+
1282+
txt = title_font.render(_("Don't Show Again"), True, white)
1283+
txt.set_alpha(int(v * 255))
12701284
canvas.blit(txt,
12711285
[WIDTH / 2 - txt.get_width() / 2, HEIGHT - ui.inch2pix(0.4) - txt.get_height() - int((v - 1) * d)])
12721286
if mouse != False:
@@ -1276,7 +1290,11 @@ def announce():
12761290
1] < HEIGHT - ui.inch2pix(0.4) - txt.get_height() - int(
12771291
(v - 1) * d) + txt.get_height() + ui.inch2pix(0.1):
12781292
machine = None
1293+
with open(app_path + "oiw_update.txt", "w") as filer:
1294+
filer.write("Delete this file to get the OpenInWSL Ad on startup again")
1295+
filer.close()
12791296
animator.animate("choose", [0, 0])
1297+
12801298

12811299
fpsClock.tick(60)
12821300
animator.update()

0 commit comments

Comments
 (0)