summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 90c887f..26bc36d 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -802,2 +802,3 @@ void AdvancedFm::doRename(QListView * view) {
r.setX( view->contentsX() );
+
if ( r.width() > view->visibleWidth() )
@@ -812,5 +813,9 @@ void AdvancedFm::doRename(QListView * view) {
renameBox->installEventFilter( this );
+
view->addChild( renameBox, r.x(), r.y() );
+
renameBox->resize( r.size() );
+
view->viewport()->setFocusProxy( renameBox );
+
renameBox->setFocus();
@@ -822,2 +827,3 @@ void AdvancedFm::renameIt() {
if( !CurrentView()->currentItem()) return;
+
QListView *thisView = CurrentView();
@@ -825,3 +831,2 @@ void AdvancedFm::renameIt() {
doRename( thisView );
- rePopulate();
}
@@ -830,2 +835,3 @@ void AdvancedFm::okRename() {
if( !CurrentView()->currentItem()) return;
+
QString newName = renameBox->text();
@@ -836,3 +842,2 @@ void AdvancedFm::okRename() {
newName = path + newName;
-
if( rename( oldName.latin1(), newName.latin1())== -1)
@@ -841,3 +846,2 @@ void AdvancedFm::okRename() {
oldName = "";
-
view->takeItem( view->currentItem() );