#1 Le 25/08/2007, à 15:42
- weedfast
[résolu] Zenity : choisir un répertoire
je suis entrain de créer un petit script avec l'aide zenity pour afficher les boites de dialogues... Je souhaiterai affiché une fenêtre pour choisir un répertoire mais comment faire ? je connais bien la commande pour choisir un fichier :
zenity --title="Choisir un fichier" --file-selection
Y aurait- il la même chose pour choisir un répertoire ??
Dernière modification par weedfast (Le 26/08/2007, à 11:27)
Mon blog : http://ubunblox.servhome.org/ --> Tutos, Astuces, etc...
Portable : Asus Eee PC
Desktop : Asus P4c800, Intel P4C 3Ghz,
Corsair twinx xms Cas 2 2*512,Nvidia 6800GT
Hors ligne
#2 Le 25/08/2007, à 17:25
- jb_causeries
Re : [résolu] Zenity : choisir un répertoire
Trouvé sur gloogloo ...
zenity --title="Choisir un fichier" --file-selection --directory
Testé, ça marche.
JB
http://www.causeries-numeriques.fr
Hors ligne
#3 Le 26/08/2007, à 07:51
- weedfast
Re : [résolu] Zenity : choisir un répertoire
Trouvé sur gloogloo ...
zenity --title="Choisir un fichier" --file-selection --directory
Testé, ça marche.JB
Merci ça marche !! Pourrais tu me donner une adresse où est listé toutes les commandes de zenity ?
Mon blog : http://ubunblox.servhome.org/ --> Tutos, Astuces, etc...
Portable : Asus Eee PC
Desktop : Asus P4c800, Intel P4C 3Ghz,
Corsair twinx xms Cas 2 2*512,Nvidia 6800GT
Hors ligne
#4 Le 26/08/2007, à 10:43
- Sleipnir
Re : [résolu] Zenity : choisir un répertoire
Merci ça marche !! Pourrais tu me donner une adresse où est listé toutes les commandes de zenity ?
man zenity
Hors ligne
#5 Le 26/08/2007, à 11:08
- weedfast
Re : [résolu] Zenity : choisir un répertoire
man zenity ---> première chose que j'ai fait puis recherhe sur le web de documentation s !! merci quand même .....
Mon blog : http://ubunblox.servhome.org/ --> Tutos, Astuces, etc...
Portable : Asus Eee PC
Desktop : Asus P4c800, Intel P4C 3Ghz,
Corsair twinx xms Cas 2 2*512,Nvidia 6800GT
Hors ligne
#6 Le 26/08/2007, à 14:07
- Alain.g
Re : [résolu] Zenity : choisir un répertoire
Salut,
Tu peux chercher dans l'aide (centre d'aide d'ubuntu). Le "Manuel de Zenity" est très intéressant (pas la même chose que man zenity, c'est plutôt un tuto). .
yelp file:///usr/share/gnome/help/zenity/fr/zenity.xml
sinon : zenity --help-all pour un aide mémoire complet
Dernière modification par Alain.g (Le 26/08/2007, à 14:10)
Xubuntu Karmic !
Hors ligne
#7 Le 26/08/2007, à 14:35
- diodio13fr
Re : [résolu] Zenity : choisir un répertoire
comme je suis egalement intéressé par le sujet et n'ayant pas trouvé toutes les options possibles ni dans les pages man ni dans le how-to-zenity ni sur notre ami gogol, j'ai farfouillé dans les sources de zenity bien que ne comprenant rien en langage des sources (c'est quoi au fait du C ? ) j'ai trouvé le fichier option.c dont voici une copie épuré. J'espere que cela ne va pas contre la licence, je ne pense pas mais au cas ou les modos peuvent suprimer le texte.
Dans ce fichier il me semble que toutes les options possibles sont là meme celles ne figurant pas dans les aides classiques.
option.c :
/*
* option.h
*
* Copyright (C) 2002 Sun Microsystems, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* Authors: Glynn Foster <glynn.foster@sun.com>
* Lucas Rocha <lucasr@im.ufba.br>
*/
general_options[] = {
{
"title",
N_("Set the dialog title"),
"window-icon",
N_("Set the window icon"),
"width",
N_("Set the width"),
"height",
N_("Set the height"),
"timeout",
N_("Set dialog timeout in seconds"),
calendar_options[] = {
{
"calendar",
N_("Display calendar dialog"),
"text",
N_("Set the dialog text"),
"day",
N_("Set the calendar day"),
"month",
N_("Set the calendar month"),
"year",
N_("Set the calendar year"),
"date-format",
N_("Set the format for the returned date"),
entry_options[] = {
{
"entry",
N_("Display text entry dialog"),
"text",
N_("Set the dialog text"),
"entry-text",
N_("Set the entry text"),
"hide-text",
N_("Hide the entry text"),
error_options[] = {
{
"error",
N_("Display error dialog"),
"text",
N_("Set the dialog text"),
"no-wrap",
N_("Do not enable text wrapping"),
info_options[] = {
{
"info",
N_("Display info dialog"),
"text",
N_("Set the dialog text"),
"no-wrap",
N_("Do not enable text wrapping"),
file_selection_options[] = {
{
"file-selection",
N_("Display file selection dialog"),
"filename",
N_("Set the filename"),
"multiple",
N_("Allow multiple files to be selected"),
"directory",
N_("Activate directory-only selection"),
"save",
N_("Activate save mode"),
"separator",
N_("Set output separator character"),
"confirm-overwrite",
N_("Confirm file selection if filename already exists"),
list_options[] = {
{
"list",
N_("Display list dialog"),
"text",
N_("Set the dialog text"),
"column",
N_("Set the column header"),
"checklist",
N_("Use check boxes for first column"),
"radiolist",
N_("Use radio buttons for first column"),
"separator",
N_("Set output separator character"),
"multiple",
N_("Allow multiple rows to be selected"),
"editable",
N_("Allow changes to text"),
"print-column",
N_("Print a specific column (Default is 1. 'ALL' can be used to print all columns)"),
"hide-column",
N_("Hide a specific column"),
notification_options[] = {
{
"notification",
N_("Display notification"),
"text",
N_("Set the notification text"),
"listen",
N_("Listen for commands on stdin"),
progress_options[] = {
{
"progress",
N_("Display progress indication dialog"),
"text",
N_("Set the dialog text"),
"percentage",
N_("Set initial percentage"),
"pulsate",
N_("Pulsate progress bar"),
"auto-close",
N_("Dismiss the dialog when 100% has been reached"),
"auto-kill",
N_("Kill parent process if cancel button is pressed"),
question_options[] = {
{
"question",
N_("Display question dialog"),
"text",
N_("Set the dialog text"),
"no-wrap",
N_("Do not enable text wrapping"),
text_options[] = {
{
"text-info",
N_("Display text information dialog"),
"filename",
N_("Open file"),
"editable",
N_("Allow changes to text"),
warning_options[] = {
{
"warning",
N_("Display warning dialog"),
"text",
N_("Set the dialog text"),
"no-wrap",
N_("Do not enable text wrapping"),
scale_options[] = {
{
"scale",
N_("Display scale dialog"),
"text",
N_("Set the dialog text"),
"value",
N_("Set initial value"),
"min-value",
N_("Set minimum value"),
"max-value",
N_("Set maximum value"),
"step",
N_("Set step size"),
"print-partial",
N_("Print partial values"),
"hide-value",
N_("Hide value"),
miscellaneous_options[] = {
{
"about",
N_("About zenity"),
"version",
N_("Print version"),
Dernière modification par diodio13fr (Le 26/08/2007, à 14:36)
█▒▒▒░░
Hors ligne
#8 Le 26/08/2007, à 16:32
- jb_causeries
Re : [résolu] Zenity : choisir un répertoire
Bien vu le coup du fichier source. Il n'y pas , amha, de problème à le diffuser car il est GPL. En effet, il y a beaucoup d'options non renseignées, à essayer à l'occasion.
http://www.causeries-numeriques.fr
Hors ligne
#9 Le 26/08/2007, à 16:40
- jb_causeries
Re : [résolu] Zenity : choisir un répertoire
Tu retrouves toutes ces infos dans le doc http://www.agu3l.org/article.php3?id_article=25
http://www.causeries-numeriques.fr
Hors ligne
#10 Le 26/08/2007, à 16:44
- diodio13fr
Re : [résolu] Zenity : choisir un répertoire
non il n'y en a pas autant dans la doc.
█▒▒▒░░
Hors ligne
#11 Le 26/08/2007, à 16:54
- weedfast
Re : [résolu] Zenity : choisir un répertoire
Merci pour ce fichier !!!
Mon blog : http://ubunblox.servhome.org/ --> Tutos, Astuces, etc...
Portable : Asus Eee PC
Desktop : Asus P4c800, Intel P4C 3Ghz,
Corsair twinx xms Cas 2 2*512,Nvidia 6800GT
Hors ligne
#12 Le 26/08/2007, à 17:02
- diodio13fr
Re : [résolu] Zenity : choisir un répertoire
de rien par contre je n'ai rien pu essayer je suis au boulot sous win$ dis moi si ca marche stp. je suis curieux du resultat et je ne pourrai pas essayer avant ce soir ou demain.
le timeout a l'air pas mal, et la possibilité de choisir l'icone aussi surtout pour les notifications.
Dernière modification par diodio13fr (Le 26/08/2007, à 17:07)
█▒▒▒░░
Hors ligne
#13 Le 26/08/2007, à 19:32
- Alain.g
Re : [résolu] Zenity : choisir un répertoire
La seule option en plus par rapport zenity --help-all , c'est timeout (j'en aurais loupées ?)
Et quand j'essaie timeout, ça renvoie : This option is not available
Xubuntu Karmic !
Hors ligne
#14 Le 26/08/2007, à 21:12
- diodio13fr
Re : [résolu] Zenity : choisir un répertoire
en effet il y a tout sauf timeout qui semble ne pas marcher.
mais bon entre
man zenity
zenity --help
et
zenity --help-all
on s'y perd un peu
et c'est pareil pour toute les commandes
█▒▒▒░░
Hors ligne
#15 Le 14/11/2008, à 00:45
- v@sco
Re : [résolu] Zenity : choisir un répertoire
Bonjour,
zenity --info --timeout 60 --text="Démarrage de la séquence dans 1mn..."
fonctionne
Hors ligne
#16 Le 14/11/2008, à 01:27
- Alain.g
Re : [résolu] Zenity : choisir un répertoire
oui, maintenant. Et depuis timeout est aussi dans les options de --help-all
Mais ce sujet date d'il y a plus d'un an, la version de zenity a changé
Xubuntu Karmic !
Hors ligne