Commit 42f33525 authored by Thorfin89's avatar Thorfin89

Ajout incrémentation pages

parent 9bd67245
...@@ -32,3 +32,29 @@ Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png ...@@ -32,3 +32,29 @@ Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
\ No newline at end of file
...@@ -26,8 +26,8 @@ class Pupitre: ...@@ -26,8 +26,8 @@ class Pupitre:
def __init__(self): def __init__(self):
# calcul du nombre de radios contenues dans le fichier CSV # calcul du nombre de radios contenues dans le fichier CSV
self.nb_radios = len(radios_list) self.nb_radios = len(radios_list)
self.nb_pages = self.nb_radios // 20 # retient la partie entière de la division self.nb_pages = self.nb_radios // 20 # partie entière de la division + 1
print("Nombre de pages : " + str(self.nb_pages)) self.current_page = 0
# déclaration de la fenêtre principale # déclaration de la fenêtre principale
self.root = tk.Tk() self.root = tk.Tk()
...@@ -199,11 +199,23 @@ class Pupitre: ...@@ -199,11 +199,23 @@ class Pupitre:
def pages(self): def pages(self):
# bouton page arrière # bouton page arrière
btn_pageb = ttk.Button(self.bandeau, image=self.icon_pageb, command=None, style="BW.TLabel") btn_pageb = ttk.Button(self.bandeau, image=self.icon_pageb, command=self.page_back, style="BW.TLabel")
btn_pageb.place(width=40, height=32, x=5, y=10) btn_pageb.place(width=40, height=32, x=5, y=10)
# bouton page avant # bouton page avant
btn_pagef = ttk.Button(self.bandeau, image=self.icon_pagef, command=None, style="BW.TLabel") btn_pagef = ttk.Button(self.bandeau, image=self.icon_pagef, command=self.page_forward, style="BW.TLabel")
btn_pagef.place(width=40, height=32, x=455, y=10) btn_pagef.place(width=40, height=32, x=455, y=10)
def page_back(self):
self.current_page -= 1
if self.current_page < 0:
self.current_page = self.nb_pages
print(self.current_page)
def page_forward(self):
self.current_page += 1
if self.current_page > self.nb_pages:
self.current_page = 0
print(self.current_page)
def boucle(self): def boucle(self):
self.root.mainloop() self.root.mainloop()
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