From 121095dc7c727e8ae213f5734760ef090385934c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Launay?= Date: Fri, 11 Dec 2015 16:50:24 +0100 Subject: [PATCH] [Nettoyage] --- app_gestion/{MesCigares => }/MesCigares.py | 0 app_gestion/{MesCigares => }/bdd/jerome.db | Bin app_gestion/{MesCigares => }/bdd/main.db | Bin .../{MesCigares => }/conf/mescigares.conf | 0 .../{MesCigares => }/images/MesCigares.ico | Bin .../{MesCigares => }/images/bad_photo.jpg | Bin .../{MesCigares => }/images/no_photo.jpg | Bin app_gestion/phpgtk/calc.glade | 329 ------------------ app_gestion/phpgtk/calc.php | 79 ----- app_gestion/{MesCigares => }/ui/ui.glade | 0 10 files changed, 408 deletions(-) rename app_gestion/{MesCigares => }/MesCigares.py (100%) rename app_gestion/{MesCigares => }/bdd/jerome.db (100%) rename app_gestion/{MesCigares => }/bdd/main.db (100%) rename app_gestion/{MesCigares => }/conf/mescigares.conf (100%) rename app_gestion/{MesCigares => }/images/MesCigares.ico (100%) rename app_gestion/{MesCigares => }/images/bad_photo.jpg (100%) rename app_gestion/{MesCigares => }/images/no_photo.jpg (100%) delete mode 100644 app_gestion/phpgtk/calc.glade delete mode 100644 app_gestion/phpgtk/calc.php rename app_gestion/{MesCigares => }/ui/ui.glade (100%) diff --git a/app_gestion/MesCigares/MesCigares.py b/app_gestion/MesCigares.py similarity index 100% rename from app_gestion/MesCigares/MesCigares.py rename to app_gestion/MesCigares.py diff --git a/app_gestion/MesCigares/bdd/jerome.db b/app_gestion/bdd/jerome.db similarity index 100% rename from app_gestion/MesCigares/bdd/jerome.db rename to app_gestion/bdd/jerome.db diff --git a/app_gestion/MesCigares/bdd/main.db b/app_gestion/bdd/main.db similarity index 100% rename from app_gestion/MesCigares/bdd/main.db rename to app_gestion/bdd/main.db diff --git a/app_gestion/MesCigares/conf/mescigares.conf b/app_gestion/conf/mescigares.conf similarity index 100% rename from app_gestion/MesCigares/conf/mescigares.conf rename to app_gestion/conf/mescigares.conf diff --git a/app_gestion/MesCigares/images/MesCigares.ico b/app_gestion/images/MesCigares.ico similarity index 100% rename from app_gestion/MesCigares/images/MesCigares.ico rename to app_gestion/images/MesCigares.ico diff --git a/app_gestion/MesCigares/images/bad_photo.jpg b/app_gestion/images/bad_photo.jpg similarity index 100% rename from app_gestion/MesCigares/images/bad_photo.jpg rename to app_gestion/images/bad_photo.jpg diff --git a/app_gestion/MesCigares/images/no_photo.jpg b/app_gestion/images/no_photo.jpg similarity index 100% rename from app_gestion/MesCigares/images/no_photo.jpg rename to app_gestion/images/no_photo.jpg diff --git a/app_gestion/phpgtk/calc.glade b/app_gestion/phpgtk/calc.glade deleted file mode 100644 index 80b5d7f..0000000 --- a/app_gestion/phpgtk/calc.glade +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - True - False - - - True - False - - - True - False - - - True - False - False - _File - True - - - True - False - - - True - False - False - - - - - gtk-quit - True - False - False - True - True - - - - - - - - - - False - True - 0 - - - - - True - True - - False - False - True - True - - - True - True - 1 - - - - - True - False - 4 - 4 - - - 1 - True - True - True - False - 0.49000000953674316 - - - - 2 - 3 - - - - - 2 - True - True - True - False - - - - 1 - 2 - 2 - 3 - - - - - 3 - True - True - True - False - - - - 2 - 3 - 2 - 3 - - - - - 4 - True - True - True - False - - - - 1 - 2 - - - - - 5 - True - True - True - False - - - - 1 - 2 - 1 - 2 - - - - - 6 - True - True - True - False - - - - 2 - 3 - 1 - 2 - - - - - 7 - True - True - True - False - - - - - - 8 - True - True - True - False - - - - 1 - 2 - - - - - 9 - True - True - True - False - - - - 2 - 3 - - - - - 0 - True - True - True - False - - - - 3 - 4 - - - - - C - True - True - True - False - - - - 1 - 2 - 3 - 4 - - - - - = - True - True - True - False - - - - 2 - 3 - 3 - 4 - - - - - + - True - True - True - False - - - - 3 - 4 - - - - - - - True - True - True - False - - - - 3 - 4 - 1 - 2 - - - - - * - True - True - True - False - 0.50999999046325684 - - - - 3 - 4 - 2 - 3 - - - - - / - True - True - True - False - - - - 3 - 4 - 3 - 4 - - - - - True - True - 2 - - - - - - - diff --git a/app_gestion/phpgtk/calc.php b/app_gestion/phpgtk/calc.php deleted file mode 100644 index 90232fe..0000000 --- a/app_gestion/phpgtk/calc.php +++ /dev/null @@ -1,79 +0,0 @@ -glade = $glade; - } - /* Calculer le résultat de l'opération */ - protected function calculate($operation) { - $secondParam = (float) $this->glade->get_widget('entry1')->get_text(); - $firstParam = (float) $this->firstParam; - $result = 0; - switch($this->operation) { - case '*': - $result = $firstParam * $secondParam; - break; - case '/': - $result = ($secondParam > 0 ? $firstParam / $secondParam : 0); - break; - case '+': - $result = $firstParam + $secondParam; - break; - case '-': - $result = $firstParam - $secondParam; - break; - } - $this->glade->get_widget('entry1')->set_text($result); - $this->firstParam = $result; - $this->operation = null; - } - /* Effectuer une opération */ - public function performAction($obj) { - if ($this->firstParam == null) { - $this->firstParam = $this->glade->get_widget('entry1')->get_text(); - $this->glade->get_widget('entry1')->set_text(''); - } - if ($this->operation == null) { - $this->operation = str_replace( - array('action_mul', 'action_add', 'action_min', 'action_div'), - array('*', '+', '-', '/'), - $obj->name - ); - $this->glade->get_widget('entry1')->set_text(''); - } else { - $this->calculate($obj->name); - } - } - /* Ajout du caractère à la valeur courante de la zone d'entrée */ - public function enterValue($obj) { - /* Puisque nous avons les noms des boutons Input0 .. input1, vous devez couper le "input" et obtenir la valeur */ - /* Je sais que c'est stupide, mais la tâche n'est pas d'écrire des articles pour l'algorithme de calcul) */ - $this->glade->get_widget('entry1')->set_text( - $this->glade->get_widget('entry1')->get_text(). - str_replace('input', '', $obj->name) - ); - } - /* Effacer le champ d'entrée, et la valeur de la première variable, et l'opération étant exécutée */ - public function clearCalc($obj) { - $this->firstParam = null; - $this->operation = null; - $this->glade->get_widget('entry1')->set_text(''); - } - /* quitter */ - public function quit() { - exit; - } -} -/* Загрузить файл интефейса */ -$glade = new GladeXML('calc.glade'); -/* Указать, что все обработчики событий в классе Calc */ -$glade->signal_autoconnect_instance(new Calc($glade)); -/* При закрытии окна закрывать приложение */ -$glade->get_widget('window1')->connect_simple('destroy', array('Gtk', 'main_quit')); -/* Инициализация GTK приложения */ -Gtk::main(); - - diff --git a/app_gestion/MesCigares/ui/ui.glade b/app_gestion/ui/ui.glade similarity index 100% rename from app_gestion/MesCigares/ui/ui.glade rename to app_gestion/ui/ui.glade