Commit 8f04a59c authored by prx's avatar prx

fix welcome + lang

parent 296ee68c
......@@ -39,11 +39,11 @@ if [ "${TRAD}" == "fr" ]; then
orca &
fi
#demande de mise à jour
sleep 5s && python ./handyupdate.py
sleep 5s && python3 ./handyupdate.py
fi
else
#english language
cd /usr/local/bin/welcome-en
cd /usr/local/bin/welcome
#live session
if [ -d /home/human ]; then
#traduction des dossiers
......
......@@ -3,47 +3,63 @@
from gi.repository import Gtk
import os
import locale
LOCALE = locale.setlocale(locale.LC_ALL, "")[0:2]
class HandyUpdate():
def on_button1_clicked(self, widget):
Gtk.main_quit()
def on_button2_clicked(self, widget):
os.system("handy-update-checker &")
gtk.main_quit()
def __init__(self):
window = Gtk.Window()
window.set_title("HandyUpdate")
window.connect("destroy", self.on_button1_clicked)
window.set_default_size(300, 200)
vBox = Gtk.VBox()
label = Gtk.Label()
label.set_text("\n Vous venez d'installer HandyLinux ... merci :) \n" +
"\n Votre système est prêt à être utilisé, cependant \n" +
" selon la date de construction de votre image ISO, \n" +
" des mises à jour peuvent être disponibles. \n" +
"\n Désirez-vous vérifier les mises à jour disponibles ? \n" +
"\n Une connexion internet active est nécessaire. \n" +
" Votre mot de passe vous sera demandé. \n")
vBox.pack_start(label, False, False, 10)
hBox = Gtk.HBox()
bouton1 = Gtk.ToggleButton(label = "non merci")
bouton1.connect("clicked", self.on_button1_clicked)
bouton2 = Gtk.ToggleButton(label = "oui, merci")
bouton2.connect("clicked", self.on_button2_clicked)
hBox.add(bouton1)
hBox.add(bouton2)
vBox.pack_end(hBox, False, False, 4)
window.add(vBox)
window.show_all()
Gtk.main()
def on_button1_clicked(self, widget):
Gtk.main_quit()
def on_button2_clicked(self, widget):
os.system("handy-update-checker &")
gtk.main_quit()
def __init__(self):
window = Gtk.Window()
window.set_title("HandyUpdate")
window.connect("destroy", self.on_button1_clicked)
window.set_default_size(300, 200)
vBox = Gtk.VBox()
label = Gtk.Label()
if LOCALE == 'fr':
label.set_text("\n Vous venez d'installer HandyLinux ... merci :) \n" +
"\n Votre système est prêt à être utilisé, cependant \n" +
" selon la date de construction de votre image ISO, \n" +
" des mises à jour peuvent être disponibles. \n" +
"\n Désirez-vous vérifier les mises à jour disponibles ? \n" +
"\n Une connexion internet active est nécessaire. \n" +
" Votre mot de passe vous sera demandé. \n")
else:
label.set_text("\n You have just installed HandyLinux ... merci :) \n" +
"\n Your system is ready to use, but \n" +
" depending on your ISO building date, \n" +
" some updates may be available. \n" +
"\n Do you want to check for available update(s) ? \n" +
"\n You need an active network. \n" +
" Your password will be asked. \n")
vBox.pack_start(label, False, False, 10)
hBox = Gtk.HBox()
if LOCALE == 'fr':
bouton1 = Gtk.ToggleButton(label = "non merci")
else:
bouton1 = Gtk.ToggleButton(label = "no thanks")
bouton1.connect("clicked", self.on_button1_clicked)
if LOCALE == 'fr':
bouton2 = Gtk.ToggleButton(label = "oui, merci")
else:
bouton2 = Gtk.ToggleButton(label = "yes, thanks")
bouton2.connect("clicked", self.on_button2_clicked)
hBox.add(bouton1)
hBox.add(bouton2)
vBox.pack_end(hBox, False, False, 4)
window.add(vBox)
window.show_all()
Gtk.main()
if __name__ == '__main__':
HandyUpdate()
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="bienvenue">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_focus">True</property>
<property name="is_focus">True</property>
<property name="title" translatable="yes">Welcome to HandyLinux</property>
<property name="modal">True</property>
<property name="window_position">center</property>
<signal name="delete-event" handler="on_bienvenue_delete_event" swapped="no"/>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">welcome-en.png</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="border_width">5</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_button1_clicked" swapped="no"/>
<child>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">noob-en.png</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">10</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
......@@ -26,7 +26,7 @@ if [ "${TRAD}" == "fr" ]; then
rm /home/$USER/.config/Thunar/uca.xml.en
else
#english language
cd /usr/local/bin/welcome-en
cd /usr/local/bin/welcome
#installed session
#traduction des dossiers
mv /home/$USER/Images /home/$USER/Pictures &
......
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