Mercurial > hg > pub > prymula > scripts
diff bing4desktop/bing4desktop.py @ 19:e7a6488c02b7
bing4desktop-0.240207-3
author | prymula <prymula76@outlook.com> |
---|---|
date | Wed, 07 Feb 2024 14:35:01 +0100 |
parents | 3b8fd6a7f2d0 |
children | 7f02682ff5ed |
line wrap: on
line diff
--- a/bing4desktop/bing4desktop.py Wed Feb 07 12:44:50 2024 +0100 +++ b/bing4desktop/bing4desktop.py Wed Feb 07 14:35:01 2024 +0100 @@ -22,7 +22,7 @@ import shutil import glob -ver = "0.240207-2" +ver = "0.240207-3" BING_URI_BASE = "http://www.bing.com" BING_WALLPAPER_PATH = "/HPImageArchive.aspx?format=js&idx=1&n=1&mkt=en-US" @@ -197,8 +197,8 @@ self.tmp = None self.menu = ( item("Ustaw Tapetę", lambda icon, item: wp.set(full_path, True)), - item('Tapeta poprzednia', lambda icon, item: self.change_pic(1)), - item('Tapeta następna', lambda icon, item: self.change_pic(-1)), + item('Tapeta poprzednia', lambda icon, item: self.change_pic(1, icon)), + item('Tapeta następna', lambda icon, item: self.change_pic(-1, icon)), item('Opis zdjęcia', lambda icon, item: icon.notify(TMP_TITLE + ' --- ' + TMP_COPYRIGHT)), item('O Programie', lambda icon, item: self.about()), @@ -221,8 +221,8 @@ self.window.destroy() self.window.update() - def change_pic(self, n): - global actualImage, BING_WALLPAPER_PATH + def change_pic(self, n, icon): + global actualImage, BING_WALLPAPER_PATH, TITLE, COPYRIGHT_TXT BASE = "/HPImageArchive.aspx?format=js&idx=" OFF = "&n=1&mkt=en-US" @@ -251,7 +251,8 @@ img = Image.open(full_path) #.convert('RGBA') # PIL solution self.tmp = img.resize((600, 400), None, None, 3.0) self.tmp.show() - + icon.notify(TITLE + ' --- ' + COPYRIGHT_TXT) + def quit_window(self): self.icon.stop() self.window.destroy()