Changeset 76295fb


Ignore:
Timestamp:
05/15/14 07:37:32 (7 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
eaea8ff
Parents:
c246252
Message:

Add ability to set comment on snapshots created via LP gui

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/life-preserver/lp-gui/LPBackend.cpp

    rc246252 r76295fb  
    11#include "LPBackend.h" 
     2#include <QInputDialog> 
     3#include <QObject> 
    24 
    35// ============== 
     
    169171  //This needs to run externally - since the snapshot is simply added to the queue, and the replication 
    170172  //   afterwards may take a long time. 
    171   QString cmd = "lpreserver mksnap --replicate "+dataset+" "+snapshotname; 
     173   bool ok; 
     174   QString comment = QInputDialog::getText (0, QObject::tr("Snapshot comment"), QObject::tr("Snapshot comment"), QLineEdit::Normal, "GUI snapshot", &ok); 
     175   if ( ! ok ) 
     176     comment = "GUI snapshot"; 
     177 
     178  QString cmd = "lpreserver mksnap " + dataset + " " + snapshotname.replace(" ", "") + " \"" + comment +"\""; 
    172179  QProcess::startDetached(cmd); 
    173180    
Note: See TracChangeset for help on using the changeset viewer.