Chargement en cours data/radios.csv +26 −0 Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff Chargement en cours @@ -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 No newline at end of file pupitre.py +16 −4 Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff Chargement en cours @@ -26,8 +26,8 @@ class Pupitre: def __init__(self): # calcul du nombre de radios contenues dans le fichier CSV self.nb_radios = len(radios_list) self.nb_pages = self.nb_radios // 20 # retient la partie entière de la division print("Nombre de pages : " + str(self.nb_pages)) self.nb_pages = self.nb_radios // 20 # partie entière de la division + 1 self.current_page = 0 # déclaration de la fenêtre principale self.root = tk.Tk() Chargement en cours Chargement en cours @@ -199,11 +199,23 @@ class Pupitre: def pages(self): # 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) # 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) 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): self.root.mainloop() Chargement en cours
data/radios.csv +26 −0 Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff Chargement en cours @@ -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 No newline at end of file
pupitre.py +16 −4 Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff Chargement en cours @@ -26,8 +26,8 @@ class Pupitre: def __init__(self): # calcul du nombre de radios contenues dans le fichier CSV self.nb_radios = len(radios_list) self.nb_pages = self.nb_radios // 20 # retient la partie entière de la division print("Nombre de pages : " + str(self.nb_pages)) self.nb_pages = self.nb_radios // 20 # partie entière de la division + 1 self.current_page = 0 # déclaration de la fenêtre principale self.root = tk.Tk() Chargement en cours Chargement en cours @@ -199,11 +199,23 @@ class Pupitre: def pages(self): # 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) # 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) 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): self.root.mainloop()