Changeset 20c7552


Ignore:
Timestamp:
06/21/14 18:11:33 (15 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2, releng/10.2, stable/10
Children:
b3b08221
Parents:
949f28c
Message:

Add a new dialog to lumina-fm: the file operations dialog performs things like removals, copies, restores, and moves while keeping the user informed about success/failure.

Location:
lumina/lumina-fm
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • lumina/lumina-fm/MainUI.cpp

    rcb56f7e r20c7552  
     1//=========================================== 
     2//  Lumina-DE source code 
     3//  Copyright (c) 2014, Ken Moore 
     4//  Available under the 3-clause BSD license 
     5//  See the LICENSE file for full details 
     6//=========================================== 
    17#include "MainUI.h" 
    28#include "ui_MainUI.h" 
     
    8389  ui->tool_zfs_nextSnap->setIcon( LXDG::findIcon("go-next-view","") ); 
    8490  ui->tool_zfs_prevSnap->setIcon( LXDG::findIcon("go-previous-view","") ); 
    85   ui->tool_zfs_restoreAll->setIcon( LXDG::findIcon("edit-undo","") ); 
    8691  ui->tool_zfs_restoreItem->setIcon( LXDG::findIcon("document-revert","") ); 
    87          
    8892} 
    8993 
     
    554558  } 
    555559  //Now remove the file/dir 
    556   bool ok = false; 
     560  //bool ok = false; 
    557561  qDebug() << "Delete: "<<baseDir; 
    558   if(fsmod->isDir(index)){ 
     562  FODialog dlg(this); 
     563    dlg.RemoveFiles(QStringList() << baseDir); 
     564    dlg.exec(); 
     565  /*if(fsmod->isDir(index)){ 
    559566    qDebug() << " - Note: Recursive directory deletion not implemented yet!"; 
    560567    ok = fsmod->rmdir(index); 
     
    564571  if(!ok){ 
    565572    QMessageBox::warning(this, tr("Removal Failure"), tr("The file or directory could not be deleted. Please check that you have the proper permissions to delete it.")); 
    566   } 
     573  }*/ 
    567574} 
    568575 
  • lumina/lumina-fm/MainUI.h

    rcb56f7e r20c7552  
     1//=========================================== 
     2//  Lumina-DE source code 
     3//  Copyright (c) 2014, Ken Moore 
     4//  Available under the 3-clause BSD license 
     5//  See the LICENSE file for full details 
     6//=========================================== 
     7//  This is the main interface for the Lumina File Manager (Insight) 
     8//=========================================== 
    19#ifndef _LUMINA_FILE_MANAGER_UI_H 
    210#define _LUMINA_FILE_MANAGER_UI_H 
     
    2129 
    2230// Local includes 
     31#include "FODialog.h" //file operation dialog 
    2332 
    2433namespace Ui{ 
     
    4857 
    4958        //Simplification Functions 
    50         void setupIcons();              //used during initialization 
     59        void setupIcons();                      //used during initialization 
    5160        void setupConnections();        //used during initialization 
    5261        void loadSettings();            //used during initialization 
  • lumina/lumina-fm/MainUI.ui

    rcb56f7e r20c7552  
    1919     <widget class="QStackedWidget" name="stackedWidget"> 
    2020      <property name="currentIndex"> 
    21        <number>3</number> 
     21       <number>0</number> 
    2222      </property> 
    2323      <widget class="QWidget" name="page_browser"> 
     
    2626         <layout class="QVBoxLayout" name="verticalLayout_browser"> 
    2727          <item> 
    28            <widget class="QTreeView" name="tree_dir_view"/> 
     28           <widget class="QTreeView" name="tree_dir_view"> 
     29            <property name="selectionMode"> 
     30             <enum>QAbstractItemView::ExtendedSelection</enum> 
     31            </property> 
     32           </widget> 
    2933          </item> 
    3034          <item> 
     
    384388        <item> 
    385389         <widget class="QTreeView" name="tree_zfs_dir"> 
     390          <property name="selectionMode"> 
     391           <enum>QAbstractItemView::ExtendedSelection</enum> 
     392          </property> 
    386393          <property name="rootIsDecorated"> 
    387394           <bool>false</bool> 
     
    400407        <item> 
    401408         <layout class="QHBoxLayout" name="horizontalLayout_8"> 
    402           <item> 
    403            <widget class="QToolButton" name="tool_zfs_restoreAll"> 
    404             <property name="toolTip"> 
    405              <string>Restore entire directory</string> 
    406             </property> 
    407             <property name="text"> 
    408              <string>Restore All</string> 
    409             </property> 
    410             <property name="toolButtonStyle"> 
    411              <enum>Qt::ToolButtonTextBesideIcon</enum> 
    412             </property> 
    413            </widget> 
    414           </item> 
    415409          <item> 
    416410           <widget class="QToolButton" name="tool_zfs_restoreItem"> 
  • lumina/lumina-fm/lumina-fm.pro

    r58138a3 r20c7552  
    88 
    99SOURCES += main.cpp \ 
    10            MainUI.cpp  
     10                MainUI.cpp \ 
     11                FODialog.cpp 
    1112 
    12 HEADERS  += MainUI.h  
     13HEADERS  += MainUI.h \ 
     14                FODialog.h 
    1315 
    14 FORMS    += MainUI.ui 
     16FORMS    += MainUI.ui \ 
     17                FODialog.ui 
    1518 
    1619# RESOURCES+= lumina-fm.qrc 
     
    9093dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/local/share/Lumina-DE/i18n/ 
    9194 
    92 INSTALLS += target dotrans 
     95desktop.files=lumina-fm.desktop 
     96desktop.path=/usr/local/share/applications/ 
     97 
     98INSTALLS += target dotrans desktop 
Note: See TracChangeset for help on using the changeset viewer.