mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-12-31 21:21:56 +00:00
use GTK2_RC_FILES (thanks fgiunchedi)
This commit is contained in:
parent
e355625ac5
commit
0089f43a4d
@ -115,7 +115,7 @@ base root of the tomb.
|
||||
.IP "bind-hooks"
|
||||
This hook file consists of a simple two column list of files or
|
||||
directories inside the tomb to be made directly accessible inside the
|
||||
current user's home directory. Tomb will use the "mount -o bind"
|
||||
current user's home directory. Tomb will use the "mount \-o bind"
|
||||
command to bind locations inside the tomb to locations found in $HOME
|
||||
so in the first column are indicated paths relative to the tomb and in
|
||||
the second column are indicated paths relative to $HOME contents, for
|
||||
|
@ -25,7 +25,11 @@ install-data-hook:
|
||||
@mkdir -p $(prefix)/lib/mime/packages
|
||||
@echo "application/x-tomb-volume; tomb-open '%s'; priority=8" > $(prefix)/lib/mime/packages/tomb
|
||||
@echo "installing icons";
|
||||
@if ! [ -n `which xdg-icon-resource install` ]; then xdg-icon-resource install --context mimetypes --size 32 ../src/monmort.xpm monmort; xdg-icon-resource install --size 32 ../src/monmort.xpm dyne-monmort; fi
|
||||
@if ! [ -n `which xdg-icon-resource` ]; then \
|
||||
xdg-icon-resource install --context mimetypes --size 32 ../src/monmort.xpm monmort; \
|
||||
xdg-icon-resource install --size 32 ../src/monmort.xpm dyne-monmort; fi
|
||||
mkdir -p $(datadir)/themes/tomb/gtk-2.0-key
|
||||
sed -e 's@\%prefix\%@'"$(datadir)"'@' gtkrc-2.0 > $(datadir)/themes/tomb/gtk-2.0-key/gtkrc
|
||||
@if ! [ -n `which update-desktop-database` ]; then echo update-desktop-database; update-desktop-database; fi
|
||||
@if ! [ -n `which update-menus` ]; then echo update-menus; update-menus; fi
|
||||
@if ! [ -n `which update-mime` ]; then echo update-mime; update-mime; fi
|
||||
|
3
share/gtkrc-2.0
Normal file
3
share/gtkrc-2.0
Normal file
@ -0,0 +1,3 @@
|
||||
pixmap_path "%prefix%/pixmaps"
|
||||
style "normal" { stock["gtk-dialog-authentication"] = {{"monmort.xpm"}} }
|
||||
widget "*" style "normal"
|
23
src/tomb
23
src/tomb
@ -56,32 +56,19 @@ ask_password() {
|
||||
|
||||
# pinentry has no custom icon setting
|
||||
# so we need to temporary modify the gtk theme
|
||||
if [ -r ~/.gtkrc-2.0 ]; then
|
||||
cp ~/.gtkrc-2.0 ~/.gtkrc-2.0.tomb.bak
|
||||
else
|
||||
touch ~/.gtkrc-2.0
|
||||
if [ -r /usr/local/share/themes/tomb/gtk-2.0-key/gtkrc ]; then
|
||||
GTK2_RC=/usr/local/share/themes/tomb/gtk-2.0-key/gtkrc
|
||||
elif [ -r /usr/share/themes/tomb/gtk-2.0-key/gtkrc ]; then
|
||||
GTK2_RC=/usr/share/themes/tomb/gtk-2.0-key/gtkrc
|
||||
fi
|
||||
|
||||
cat <<EOF >> ~/.gtkrc-2.0
|
||||
pixmap_path "/usr/local/share/pixmaps"
|
||||
style "normal" { stock["gtk-dialog-authentication"] = {{"monmort.xpm"}} }
|
||||
widget "*" style "normal"
|
||||
EOF
|
||||
|
||||
cat <<EOF | pinentry | awk '/^D/ { print $2 }'
|
||||
cat <<EOF | GTK2_RC_FILES=${GTK2_RC} pinentry | awk '/^D/ { print $2 }'
|
||||
SETTITLE Insert tomb password
|
||||
SETDESC Open tomb: $1
|
||||
SETPROMPT Password:
|
||||
GETPIN
|
||||
EOF
|
||||
|
||||
# restore gtk as it was
|
||||
if [ -r ~/.gtkrc-2.0.tomb.bak ]; then
|
||||
cp ~/.gtkrc-2.0.tomb.bak ~/.gtkrc-2.0
|
||||
rm ~/.gtkrc-2.0.tomb.bak
|
||||
else
|
||||
rm -f ~/.gtkrc-2.0
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user