-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 16 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index 73ef8f9..ce7da24 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp @@ -33,15 +33,16 @@ void AdvancedFm::init() { qDebug("<<<<<<<<<<<<<<<<<<<<<<<< OPIE!!!"); #endif setCaption( tr( "AdvancedFm" ) ); QVBoxLayout *layout = new QVBoxLayout( this ); layout->setSpacing( 2); - layout->setMargin( 2); + layout->setMargin( 0); // squeeze QMenuBar *menuBar = new QMenuBar(this); + menuBar->setMargin( 0 ); // squeeze fileMenu = new QPopupMenu( this ); viewMenu = new QPopupMenu( this ); // customDirMenu = new QPopupMenu( this ); layout->addWidget( menuBar ); @@ -51,13 +52,12 @@ void AdvancedFm::init() { cdUpButton = new QToolButton( 0,"cdUpButton"); cdUpButton->setPixmap(Resource::loadPixmap("up")); cdUpButton->setAutoRaise( true ); menuBar->insertItem( cdUpButton ); - QHBox *lineBox = new QHBox( this ); qpeDirButton= new QToolButton( 0,"QPEButton"); qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton"); qpeDirButton->setAutoRaise( true ); menuBar->insertItem( qpeDirButton ); @@ -111,29 +111,35 @@ void AdvancedFm::init() { // menuButton->insertItem(""); // customDirMenu->insertItem(tr("Add This Directory")); // customDirMenu->insertItem(tr("Remove This Directory")); // customDirMenu->insertSeparator(); - menuButton = new MenuButton( lineBox ); + QHBoxLayout *CBHB = new QHBoxLayout(); // parent layout will be set later + CBHB->setMargin( 0 ); + CBHB->setSpacing( 1 ); + + menuButton = new MenuButton( this ); menuButton->setUseLabel(false); menuButton->setMaximumWidth( 20 ); menuButton->insertItem( s_addBookmark); menuButton->insertItem( s_removeBookmark); menuButton->insertSeparator(); menuButton->setFocusPolicy(NoFocus); + CBHB->addWidget( menuButton ); customDirsToMenu(); - currentPathCombo = new QComboBox( FALSE, lineBox, "currentPathCombo" ); + currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); currentPathCombo->setEditable(TRUE); currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); currentPathCombo->setFocusPolicy(NoFocus); - layout->addWidget( lineBox ); + CBHB->addWidget( currentPathCombo ); + layout->addLayout( CBHB ); TabWidget = new OSplitter( Horizontal, this, "TabWidget" ); // TabWidget = new QTabWidget( this, "TabWidget" ); layout->addWidget( TabWidget, 4 ); tab = new QWidget( TabWidget, "tab" ); diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 6d41ac3..2461e26 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -813,13 +813,13 @@ void AdvancedFm::renameIt() { QListView *thisView = CurrentView();
oldName = thisView->currentItem()->text(0);
doRename( thisView );
}
void AdvancedFm::okRename() {
- if( !CurrentView()->currentItem()) return;
+ if( !renameBox) return;
QString newName = renameBox->text();
cancelRename();
QListView * view = CurrentView();
QString path = CurrentDir()->canonicalPath() + "/";
oldName = path + oldName;
|