contacts-importer: Use application icon
This makes the notifications identifiable
This commit is contained in:
parent
ac7ecb81f9
commit
760385479f
|
@ -9,6 +9,7 @@ function usage()
|
|||
exit 0
|
||||
}
|
||||
|
||||
NOTIFY_SEND="notify-send -i preferences-desktop-personal"
|
||||
|
||||
case "$1" in
|
||||
--help|-h|-?)
|
||||
|
@ -30,7 +31,7 @@ if [ "$FILE" == "" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
notify-send -t 1000 "Import Contacts" "Importing Contacts from $FILE"
|
||||
$NOTIFY_SEND -t 1000 "Import Contacts" "Importing Contacts from $FILE"
|
||||
|
||||
#Name of the database where the contacts will be imported to.
|
||||
CONTACTDB=$(syncevolution --print-databases | grep "system-address-book"| sed 's#(.*##' | sed 's# ##g' )
|
||||
|
@ -45,7 +46,7 @@ MIMETYPE=$(file --mime-type -b "$FILE")
|
|||
CONTROL="text/vcard"
|
||||
|
||||
if [[ "$MIMETYPE" != "$CONTROL" ]]; then
|
||||
notify-send -t 1000 "File is not a vcard! Bye!" && exit 1
|
||||
$NOTIFY_SEND -t 1000 "File is not a vcard! Bye!" && exit 1
|
||||
fi
|
||||
|
||||
#Begin importing contacts
|
||||
|
@ -62,9 +63,9 @@ done
|
|||
|
||||
if [ $RET -eq 0 ]
|
||||
then
|
||||
notify-send "Successful import";
|
||||
$NOTIFY_SEND "Successful import"
|
||||
exit 0
|
||||
else
|
||||
notify-send "Error" >&2
|
||||
$NOTIFY_SEND "Error"
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue