Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
openmamba
license-dialog
Commits
6a380bd2
Commit
6a380bd2
authored
Dec 26, 2011
by
Filippo Bedendo Bordon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Choice of icons from 'DESKTOP SESSION' variable
parent
a03b89ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
+15
-10
ChangeLog
ChangeLog
+3
-0
VERSION
VERSION
+1
-1
license-dialog
license-dialog
+11
-9
No files found.
ChangeLog
View file @
6a380bd2
Changes in version 0.6
-Scelta delle icone a seconda della variabile d'ambiente 'DESKTOP_SESSION'
Changes in version 0.5
-Eccezione in assenza di argomento
-Controllo che la path non sia una directory
...
...
VERSION
View file @
6a380bd2
VERSION=0.
5
VERSION=0.
6
license-dialog
View file @
6a380bd2
...
...
@@ -6,15 +6,17 @@ import sys #---: 0 -> licenza accettata
import
gettext
#---: 1 -> licenza rifiutata
from
PyQt4
import
QtGui
,
QtCore
#---: 2 -> percorso licenza sbagliato o non presente o se l'argomento digitato è -h o --help
#kde
imgAccetto
=
"/opt/kde/share/icons/oxygen/32x32/actions/dialog-ok-apply.png"
imgRifiuto
=
"/opt/kde/share/icons/oxygen/32x32/actions/dialog-close.png"
imgForm
=
"/opt/kde/share/icons/oxygen/32x32/mimetypes/text-rtf.png"
#gnome
#imgAccetto = "/usr/share/icons/gnome/32x32/actions/go-next.png"
#imgRifiuto = "/usr/share/icons/gnome/32x32/actions/gtk-stop.png"
#imgForm = "/usr/share/icons/gnome/32x32/mimetypes/document.png"
# Decisione presa in run-time
desktop_session
=
QtCore
.
QString
(
os
.
getenv
(
'DESKTOP_SESSION'
))
# Codice preso da mambatray
if
(
desktop_session
==
'default'
)
or
(
desktop_session
.
left
(
3
)
==
'kde'
):
# Scelgo le icone di kde
imgAccetto
=
"/opt/kde/share/icons/oxygen/32x32/actions/dialog-ok-apply.png"
imgRifiuto
=
"/opt/kde/share/icons/oxygen/32x32/actions/dialog-close.png"
imgForm
=
"/opt/kde/share/icons/oxygen/32x32/mimetypes/text-rtf.png"
else
:
# In alternativa quelle di gnome
imgAccetto
=
"/usr/share/icons/gnome/32x32/emblems/emblem-default.png"
imgRifiuto
=
"/usr/share/icons/gnome/32x32/actions/gtk-stop.png"
imgForm
=
"/usr/share/icons/gnome/32x32/mimetypes/document.png"
def
usage
():
print
_
(
"Usage: license-dialog /license/path"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment