Changeset 143a31e


Ignore:
Timestamp:
06/25/14 12:14:01 (9 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.3, releng/10.1, releng/10.1.1
Children:
92c92a5
Parents:
48743e0
Message:

Another couple small fixs for lumina-fm:
1) Make sure to clear the clipboard if it just successfully finished pasting a "cut" operation (the original file locations are now invalid).
2) Make sure the browser widget is disabled temporarily while it is loading the directory (can take a few moments sometimes - usually right after starting the application).
3) Make sure to clearly list if the directory is read-only at the bottom of the screen.

Location:
lumina/lumina-fm
Files:
2 edited

Legend:

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

    r48743e0 r143a31e  
    7676  ui->actionNew_Tab->setIcon( LXDG::findIcon("tab-new-background","") ); 
    7777  ui->action_Preferences->setIcon( LXDG::findIcon("configure","") ); 
    78   ui->actionRefresh->setIcon( LXDG::findIcon("view-refresh","") ); 
    7978  ui->actionUpDir->setIcon( LXDG::findIcon("go-up","") ); 
    8079  ui->actionBack->setIcon( LXDG::findIcon("go-previous","") ); 
     
    234233  } //do nothing 
    235234  //qDebug() << "Show Directory:" << dir; 
     235  ui->tree_dir_view->setEnabled(false); //disable while loading 
     236  ui->label_dir_stats->setText(tr("Loading Directory...")); 
    236237  isUserWritable = info.isWritable(); 
    237238  if(dir.endsWith("/") && dir!="/" ){ dir.chop(1); } 
     
    495496void MainUI::directoryLoaded(){ 
    496497  ui->tree_dir_view->resizeColumnToContents(0); 
     498  ui->tree_dir_view->setEnabled(true); //re-enable since it is done loading 
     499        QString msg; 
     500        if(!isUserWritable){ msg = tr("Read-only directory"); } 
     501  ui->label_dir_stats->setText(msg); 
    497502} 
    498503 
     
    818823    } 
    819824  } 
    820  
     825  bool errs = false; 
     826  //Perform the copy/move operations 
    821827  if(!copy.isEmpty()){  
    822828    qDebug() << "Paste Copy:" << copy << "->" << newcopy; 
     
    824830      dlg.CopyFiles(copy, newcopy); 
    825831      dlg.exec(); 
     832      errs = errs || !dlg.noerrors; 
    826833  } 
    827834  if(!cut.isEmpty()){ 
     
    830837      dlg.MoveFiles(cut, newcut); 
    831838      dlg.exec(); 
     839      errs = errs || !dlg.noerrors; 
     840  } 
     841  //Modify the clipboard appropriately 
     842  if(!errs && !cut.isEmpty()){ 
     843    //Now clear the clipboard since those old file locations are now invalid 
     844    QApplication::clipboard()->clear();  
     845    if(!copy.isEmpty()){ 
     846      //There were also files copied: save those files back into the clipboard 
     847       QMimeData *dat = new QMimeData; 
     848        dat->clear(); 
     849        dat->setData("x-special/lumina-copied-files", raw.filter("copy::::").join("\n").toLocal8Bit()); 
     850        QApplication::clipboard()->setMimeData(dat); 
     851    } 
    832852  } 
    833853         
  • lumina/lumina-fm/MainUI.ui

    rba50b13 r143a31e  
    1616  <widget class="QWidget" name="centralwidget"> 
    1717   <layout class="QHBoxLayout" name="horizontalLayout_2"> 
     18    <property name="margin"> 
     19     <number>1</number> 
     20    </property> 
    1821    <item> 
    1922     <widget class="QStackedWidget" name="stackedWidget"> 
     
    3841            </property> 
    3942            <item> 
    40              <widget class="QToolButton" name="tool_addToDir"> 
    41               <property name="text"> 
    42                <string notr="true">&amp;New Dir</string> 
    43               </property> 
    44               <property name="shortcut"> 
    45                <string>Ctrl+N</string> 
    46               </property> 
    47               <property name="popupMode"> 
    48                <enum>QToolButton::InstantPopup</enum> 
    49               </property> 
    50               <property name="toolButtonStyle"> 
    51                <enum>Qt::ToolButtonTextBesideIcon</enum> 
    52               </property> 
    53               <property name="autoRaise"> 
    54                <bool>true</bool> 
    55               </property> 
    56              </widget> 
    57             </item> 
    58             <item> 
    5943             <widget class="QLabel" name="label_dir_stats"> 
    6044              <property name="sizePolicy"> 
     
    6448               </sizepolicy> 
    6549              </property> 
     50              <property name="font"> 
     51               <font> 
     52                <weight>75</weight> 
     53                <bold>true</bold> 
     54               </font> 
     55              </property> 
    6656              <property name="text"> 
    6757               <string notr="true"/> 
     58              </property> 
     59             </widget> 
     60            </item> 
     61            <item> 
     62             <widget class="QToolButton" name="tool_addToDir"> 
     63              <property name="text"> 
     64               <string notr="true">&amp;New Dir</string> 
     65              </property> 
     66              <property name="shortcut"> 
     67               <string>Ctrl+N</string> 
     68              </property> 
     69              <property name="popupMode"> 
     70               <enum>QToolButton::InstantPopup</enum> 
     71              </property> 
     72              <property name="toolButtonStyle"> 
     73               <enum>Qt::ToolButtonTextBesideIcon</enum> 
     74              </property> 
     75              <property name="autoRaise"> 
     76               <bool>true</bool> 
    6877              </property> 
    6978             </widget> 
     
    545554    </property> 
    546555    <addaction name="actionView_Hidden_Files"/> 
    547     <addaction name="separator"/> 
    548     <addaction name="actionRefresh"/> 
    549556   </widget> 
    550557   <widget class="QMenu" name="menuBookmarks"> 
     
    655662   </property> 
    656663  </action> 
    657   <action name="actionRefresh"> 
    658    <property name="text"> 
    659     <string>Refresh</string> 
    660    </property> 
    661    <property name="toolTip"> 
    662     <string>Refresh Directory</string> 
    663    </property> 
    664    <property name="shortcut"> 
    665     <string>F5</string> 
    666    </property> 
    667   </action> 
    668664  <action name="actionBookMark"> 
    669665   <property name="text"> 
Note: See TracChangeset for help on using the changeset viewer.