88 a program to manage file transfers between a computer and a collection
91 Copyright (C) 2010-2012 Georges Khaznadar <georgesk@ofset.org>
93 This program is free software: you can redistribute it and/or modify
94 it under the terms of the GNU General Public License as published by
95 the Free Software Foundation, either version 3 of the License, or
96 (at your option) any later version.
98 This program is distributed in the hope that it will be useful,
99 but WITHOUT ANY WARRANTY; without even the implied warranty of
100 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
101 GNU General Public License for more details.
103 You should have received a copy of the GNU General Public License
104 along with this program. If not, see <http://www.gnu.org/licenses/>.
106 licence[
'en']=licenceEn
109 scolasync version %s :
111 un programme pour gérer des transferts de fichiers entre un
112 ordinateur et une collection de clés USB.
114 Copyright (C) 2010-2012 Georges Khaznadar <georgesk@ofset.org>
116 Ce projet est un logiciel libre : vous pouvez le redistribuer, le
117 modifier selon les terme de la GPL (GNU Public License) dans les
118 termes de la Free Software Foundation concernant la version 3 ou
119 plus de la dite licence.
121 Ce programme est fait avec l'espoir qu'il sera utile mais SANS
122 AUCUNE GARANTIE. Lisez la licence pour plus de détails.
124 <http://www.gnu.org/licenses/>.
126 licence[
'fr']=licenceFr
129 import getopt, os, sys
133 sip.setapi(
'QVariant', 1)
147 def run(debugger=False, callback=lambda x:
print(x)):
149 from dbus.mainloop.qt
import DBusQtMainLoop
150 DBusQtMainLoop(set_as_default=
True)
152 app = QApplication(sys.argv)
154 locale =
"%s" %QLocale.system().name()
155 qtTranslator = QTranslator()
156 if qtTranslator.load(
"qt_" + locale,
"/usr/share/qt5/translations"):
158 app.installTranslator(qtTranslator)
159 appTranslator = QTranslator()
160 for path
in [
"/usr/share/scolasync",
"."]:
161 langdir=os.path.join(path,
"lang",locale+
".qm")
162 b= appTranslator.load(langdir)
165 app.installTranslator(appTranslator)
171 debug.button(window, callback)
174 sys.exit(app.exec_())
176 if __name__ ==
'__main__':
defines the main window of the application.
def run
Le lancement de l'application.