Changeset d768767 for client


Ignore:
Timestamp:
Jul 5, 2010, 9:04:02 PM (14 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
master, debian, mac, no-cups, web
Children:
0d02eca
Parents:
b58aada
git-author:
Jessica B. Hamrick <jhamrick@…> (07/05/10 21:04:02)
git-committer:
Jessica B. Hamrick <jhamrick@…> (07/05/10 21:04:02)
Message:

Add 'last' keyword for gbrm

Location:
client/bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • client/bin/gbrm

    rb58aada rd768767  
    4141if ($id eq "all") {
    4242    foreach $id(@jobs) {
    43         $printer->cancelJob($id);
     43        cancel_job($id, $printer);
    4444    }
    4545}
    4646elsif ($id eq "current") {
    4747    $id = $jobs[0];
    48     $printer->cancelJob($id);
     48    cancel_job($id, $printer);
     49}
     50elsif ($id eq "last") {
     51    $id = $jobs[-1];
     52    cancel_job($id, $printer);
    4953}
    5054else {
     55    cancel_job($id, $printer);
     56}
     57
     58sub cancel_job {
     59    my ($id, $printer) = @_;
     60    my $job_ref = $printer->getJob($id);
     61    my $title = $job_ref->{'title'};
    5162    $printer->cancelJob($id);
     63
     64    print "Canceled job '$title' (id $id)\n";
    5265}
  • client/bin/gbrm.1

    ra81397c rd768767  
    1414.B current
    1515is used in place of an id, then the current (top) job is removed from
    16 the queue.  The queue must have previously been added with
     16the queue.  If
     17.B last
     18is used in place of an id, then the last job is removed from the
     19queue.  The queue must have previously been added with
    1720.B gutenbach-client-config
    1821so that gbrm knows which host to use.
Note: See TracChangeset for help on using the changeset viewer.