]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix filesest was offset by 1. Weird, I had changed it earlier the other
authorDirk H Bartley <dbartley@schupan.com>
Sat, 19 May 2007 02:56:12 +0000 (02:56 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Sat, 19 May 2007 02:56:12 +0000 (02:56 +0000)
direction.
Fix of c:/ and d:/ in same restore showing up correctly in left pane.
Fix of RunCmdPage::cancelButtonPushed, add "." to get the m_at_main_prompt
set true again after window cancelled.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4830 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/TODO
bacula/src/qt-console/fileset/fileset.cpp
bacula/src/qt-console/restore/prerestore.cpp
bacula/src/qt-console/restore/restore.cpp
bacula/src/qt-console/run/runcmd.cpp

index 08a3153857e5d9ac5e2fe5447ad9d8bf58842e99..af88907e4a7f2bc206a6354fd245b67f4666706e 100644 (file)
@@ -1,14 +1,16 @@
 dhb
 ====================================================
-Prevent the ablility of a user to close the original joblist page.
-
 Further testing of restore with .mod
 
-Test left pane of restore with 2 windows drives in one backup job.
-
 User preferences.  With log to stdout options.
 Have settings for defaults of limits on joblist
 
+Add fileset to joblist.
+
+joblist cancel a running job.
+
+Set default for replace in run restore job to "always"??????
+
 Add context sensitive options for most commands
 status dir on page select director item
 All items with jobid= that I thought could work from joblist are done.
@@ -19,6 +21,8 @@ see COMMANDS file
 Option in joblist like with restore from jobid but restore populating timestamp
 of the selected job.
 
+Get the 5 second bring to bottom of console to stop
+
 Resolve issue of connection during restore selection.  Could go with preempt of
 connections.  (Kern is to work on)
 
@@ -66,6 +70,8 @@ processed.
 
 bRestore add code to get working.
 
+May be in brestore, find a file by name, find a directory by name
+
 ===========================================================
 NOT SURE
 ===========================================================
@@ -80,6 +86,9 @@ global one defined in the mainWin class (if I remember right).
 ============================================================
 DONE:
 ============================================================
+Test left pane of restore with 2 windows drives in one backup job.
+   Yup, id didn't work, now it does.
+
 Purging not working from console or from context sensitive.
    This was a confusion with the restore command.  Now resolved.
 
index b8f8aaba530b5f5775321e9301fd0bb813b39b4f..deb2743daca3e46954befa780adc7b22d4e47147 100644 (file)
@@ -114,10 +114,10 @@ void FileSet::populateTree()
                /* Iterate through fields in the record */
                foreach (field, fieldlist) {
                   field = field.trimmed();  /* strip leading & trailing spaces */
-                  filesetItem->setData(index+1, Qt::UserRole, 1);
+                  filesetItem->setData(index, Qt::UserRole, 1);
                   /* Put media fields under the pool tree item */
-                  filesetItem->setData(index+1, Qt::UserRole, 1);
-                  filesetItem->setText(index+1, field);
+                  filesetItem->setData(index, Qt::UserRole, 1);
+                  filesetItem->setText(index, field);
                   index++;
                }
             }
index 9ff37cf9b04087264dcd139aaf2b687d4447eb69..7a6829261fbc210c6dfd65f9105043d528d3d9c1 100644 (file)
@@ -239,7 +239,7 @@ int prerestorePage::jobdefsFromJob(QStringList &fieldlist, QString &jobId)
    " From Job, Client, FileSet"
    " WHERE Job.FileSetId=FileSet.FileSetId AND Job.ClientId=Client.ClientId"
    " AND JobId=\'" + jobId + "\'";
-   printf("query = %s\n", query.toUtf8().data());
+   //printf("query = %s\n", query.toUtf8().data());
    QStringList results;
    if (m_console->sql_cmd(query, results)) {
       QString field;
index 67c25627323bcf22e84e9e330c00f166e2c586a2..0f5e75dbe6d7866eb74fe38f5cb673aa9256dd40 100644 (file)
@@ -159,7 +159,8 @@ void restorePage::addDirectory(QString &newdirr)
    QString newdir = newdirr;
    QString fullpath = m_cwd + newdirr;
    QRegExp regex("^/[a-z]:/$");
-   bool ok=true;
+   bool ok = true;
+   bool windrive = false;
 
    //printf("In addDirectory cwd \"%s\" newdir \"%s\"\n", m_cwd.toUtf8().data(),
         //newdir.toUtf8().data());
@@ -176,14 +177,15 @@ void restorePage::addDirectory(QString &newdirr)
 
    if (regex.indexIn(fullpath,0) == 0) {
       /* this is a windows drive */
-      //printf("Need to do windows c:/\n");
+      //printf("Need to do windows \"letter\":/\n");
       fullpath.replace(0,1,"");
+      windrive = true;
    }
  
    /* is it already existent ?? */
    if (!m_dirPaths.contains(fullpath)) {
       QTreeWidgetItem *item = NULL;
-      if (m_dirPaths.empty()) {
+      if (windrive) {
          /* this is the base widget */
          item = new QTreeWidgetItem(directoryWidget);
          item->setText(0, fullpath.toUtf8().data());
@@ -195,7 +197,7 @@ void restorePage::addDirectory(QString &newdirr)
             item->setText(0, newdir.toUtf8().data());
             directoryWidget->expandItem(parent);
          } else {
-            ok=false;
+            ok = false;
             //printf("In else of if parent cwd \"%s\" newdir \"%s\"\n", 
                //m_cwd.toUtf8().data() ,newdir.toUtf8().data());
          }
index 25346ea7196126114f0a50f151bd333428cf1445..f83de90820b24f8e9185e277ae27e14021c36708 100644 (file)
@@ -166,6 +166,8 @@ void runCmdPage::okButtonPushed()
 
 void runCmdPage::cancelButtonPushed()
 {
+   m_console->displayToPrompt();
+   m_console->write_dir(".");
    m_console->displayToPrompt();
    mainWin->set_status(" Canceled");
    this->hide();