News:

LMDE 6, unisce la praticità dell'ultima versione di cinnamon con la robustezza di debian 12

Menu principale

introduzione a Idle-Python 2.7

Aperto da andromeda., Giovedì 14 Febbraio 2013, 09:44:16

Discussione precedente - Discussione successiva

Pedro

Non te la devo fare io la gui, forza impegnati che ce la farai  :)

Quella nello screenshot e fatta con gtkdialog.

#!/bin/bash

funcvspCreate() {
local f=0

while [ $f -lt $1 ]; do
echo '<vseparator height-request="'$2'"></vseparator>'
f=$((f + 1))
done
}

funchspCreate() {
local f=0

while [ $f -lt $1 ]; do
echo '<hseparator width-request="'$2'"></hseparator>'
f=$((f + 1))
done
}

export Program='
<window title="Harald" resizable="false">
<vbox>
<frame Titolo>
<hbox>
<button space-expand="true" tooltip-text="Aggiorna la lista pacchetti" height-request="40" width-request="80">
<label>UPDATE</label>
<variable>Bottone1</variable>
<action>echo "sudo apt-get update" > /tmp/update</action>
<action>refresh:term</action>
</button>
'"`funchspCreate 5`"'
<button tooltip-text="Installa Secret Maryo Chronicles" height-request="40" width-request="80">
<label>SMC</label>
<variable>Bottone2</variable>
<action>echo "sudo apt-get install smc" > /tmp/update</action>
<action>refresh:term</action>
</button>
</hbox>
'"`funcvspCreate 5`"'
<hbox>
<button space-expand="true" tooltip-text="Aggiorna sistema" height-request="40" width-request="80">
<label>UPGRADE</label>
<variable>Bottone3</variable>
<action>echo "sudo apt-get upgrade" > /tmp/update</action>
<action>refresh:term</action>
</button>
'"`funchspCreate 5`"'
<button tooltip-text="CIAO" height-request="40" width-request="80">
<label>CIAO</label>
<variable>Bottone4</variable>
<action>echo "echo ciao" > /tmp/update</action>
<action>refresh:term</action>
</button>
</hbox>
'"`funcvspCreate 5`"'
<hbox>
<button space-expand="true" tooltip-text="Pulisce il terminale" height-request="40" width-request="80">
<label>PULISCI</label>
<variable>Bottone1</variable>
<action>clear:term</action>
</button>
'"`funchspCreate 5`"'
<button tooltip-text="Secret Maryo Chronicles" height-request="40" width-request="80">
<label>SMC5</label>
<variable>Bottone2</variable>
<action>echo "echo Non ci sono limiti" > /tmp/update</action>
<action>refresh:term</action>
</button>
</hbox>
<hbox>
<terminal argv0="/bin/bash" text-foreground-color="#fff">
<variable>term</variable>
<height>10</height>
<width>30</width>
<input file>/tmp/update</input>
</terminal>
</hbox>
</frame>
<hbox>
<button cancel></button>
<button ok></button>
</hbox>
</vbox>
</window>
'

gtkdialog -p Program
sed -i 'd' /tmp/update



Harald

Citazione di: Pedro il Domenica 26 Gennaio 2014, 12:37:30
Non te la devo fare io la gui, forza impegnati che ce la farai  :)


io la gui l'ho gia fatta, quello che non riesco assolutamente a fare ( 2 gg di studio matto e disperato) e' fare apparire il terminale nella gui, perche' se aggiungo un ppa-repo xxx devo fare l'invio per la chiave....
sto diventando matto :boh:

Dell XPS17, Intel Core i7-2630QM, 6,1GB di ram, skgrafica Intel Tungsten Graphics+NVIDIA 555m(3GB), HD 500GB

Powered by EzPortal