Bob Mottram пре 8 година
родитељ
комит
63f8de0023
1 измењених фајлова са 9 додато и 4 уклоњено
  1. 9
    4
      src/freedombone-controlpanel-user

+ 9
- 4
src/freedombone-controlpanel-user Прегледај датотеку

469
     trap "rm -f $data" 0 1 2 5 15
469
     trap "rm -f $data" 0 1 2 5 15
470
     dialog --title $"Remove someone's PGP/GPG key" \
470
     dialog --title $"Remove someone's PGP/GPG key" \
471
            --backtitle $"Freedombone User Control Panel" \
471
            --backtitle $"Freedombone User Control Panel" \
472
-           --inputbox $"Enter their email address below" 8 60 2>$data
472
+           --inputbox $"Enter their email address or key ID below" 8 60 2>$data
473
     sel=$?
473
     sel=$?
474
     case $sel in
474
     case $sel in
475
         0)
475
         0)
485
                                --msgbox $"It's not a good idea to remove your own encryption key" 6 65
485
                                --msgbox $"It's not a good idea to remove your own encryption key" 6 65
486
                     fi
486
                     fi
487
                 else
487
                 else
488
-                    dialog --title $"Unrecognised email address" \
489
-                           --backtitle $"Freedombone User Control Panel" \
490
-                           --msgbox $"This doesn't look like an email address" 6 50
488
+                    if [[ $REMOVE_EMAIL_ADDRESS == "0x"* ]]; then
489
+                        clear
490
+                        gpg --delete-key $REMOVE_EMAIL_ADDRESS
491
+                    else
492
+                        dialog --title $"Unrecognised email address" \
493
+                               --backtitle $"Freedombone User Control Panel" \
494
+                               --msgbox $"This doesn't look like an email address" 6 50
495
+                    fi
491
                 fi
496
                 fi
492
             fi
497
             fi
493
             ;;
498
             ;;