Diffstat (limited to 'noncore/apps/advancedfm/advancedfmData.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index 463b202..ddaa39a 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -99,9 +99,11 @@ void AdvancedFm::init() { | |||
99 | fileMenu->setCheckable(TRUE); | 99 | fileMenu->setCheckable(TRUE); |
100 | 100 | ||
101 | viewMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); | 101 | viewMenu->insertItem( tr( "Switch to View 1" ), this, SLOT( switchToLocalTab())); |
102 | viewMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); | 102 | viewMenu->insertItem( tr( "Switch to View 2" ), this, SLOT( switchToRemoteTab())); |
103 | // viewMenu->insertSeparator(); | 103 | // viewMenu->insertSeparator(); |
104 | // viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); | 104 | // viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); |
105 | viewMenu->setCheckable(TRUE); | 105 | viewMenu->setCheckable(true); |
106 | viewMenu->setItemChecked( viewMenu->idAt(0), true); | ||
107 | viewMenu->setItemChecked( viewMenu->idAt(1), false); | ||
106 | 108 | ||
107 | s_addBookmark = tr("Bookmark Directory"); | 109 | s_addBookmark = tr("Bookmark Directory"); |
@@ -121,4 +123,5 @@ void AdvancedFm::init() { | |||
121 | menuButton->insertItem( s_removeBookmark); | 123 | menuButton->insertItem( s_removeBookmark); |
122 | menuButton->insertSeparator(); | 124 | menuButton->insertSeparator(); |
125 | menuButton->setFocusPolicy(NoFocus); | ||
123 | 126 | ||
124 | customDirsToMenu(); | 127 | customDirsToMenu(); |
@@ -127,5 +130,5 @@ void AdvancedFm::init() { | |||
127 | currentPathCombo->setEditable(TRUE); | 130 | currentPathCombo->setEditable(TRUE); |
128 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 131 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
129 | 132 | currentPathCombo->setFocusPolicy(NoFocus); | |
130 | layout->addWidget( lineBox ); | 133 | layout->addWidget( lineBox ); |
131 | 134 | ||
@@ -149,5 +152,7 @@ void AdvancedFm::init() { | |||
149 | Local_View->setMultiSelection( TRUE ); | 152 | Local_View->setMultiSelection( TRUE ); |
150 | Local_View->setSelectionMode(QListView::Extended); | 153 | Local_View->setSelectionMode(QListView::Extended); |
151 | 154 | Local_View->setFocusPolicy(StrongFocus); | |
155 | Local_View->installEventFilter( this ); | ||
156 | |||
152 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); | 157 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); |
153 | 158 | ||
@@ -171,6 +176,7 @@ void AdvancedFm::init() { | |||
171 | Remote_View->setMultiSelection( TRUE ); | 176 | Remote_View->setMultiSelection( TRUE ); |
172 | Remote_View->setSelectionMode(QListView::Extended); | 177 | Remote_View->setSelectionMode(QListView::Extended); |
173 | 178 | Remote_View->setFocusPolicy(StrongFocus); | |
174 | 179 | Remote_View->installEventFilter( this ); | |
180 | |||
175 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); | 181 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); |
176 | 182 | ||
@@ -204,14 +210,9 @@ void AdvancedFm::init() { | |||
204 | /////////////// | 210 | /////////////// |
205 | 211 | ||
206 | 212 | if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" )) | |
207 | struct utsname name; /* check for embedix kernel running on the zaurus*/ | ||
208 | if (uname(&name) != -1) { | ||
209 | QString release=name.release; | ||
210 | if(release.find("embedix",0,TRUE) !=-1) { | ||
211 | zaurusDevice=TRUE; | 213 | zaurusDevice=TRUE; |
212 | } else { | 214 | else |
213 | zaurusDevice=FALSE; | 215 | zaurusDevice=FALSE; |
214 | } | 216 | |
215 | } | ||
216 | 217 | ||
217 | if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { | 218 | if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { |
@@ -281,6 +282,7 @@ void AdvancedFm::initConnections() | |||
281 | connect( menuButton, SIGNAL( selected(const QString &)), SLOT(gotoCustomDir(const QString&))); | 282 | connect( menuButton, SIGNAL( selected(const QString &)), SLOT(gotoCustomDir(const QString&))); |
282 | // connect( menuButton, SIGNAL( selected( int)), SLOT( dirMenuSelected(int))); | 283 | // connect( menuButton, SIGNAL( selected( int)), SLOT( dirMenuSelected(int))); |
283 | 284 | connect( viewMenu, SIGNAL( activated(int )), this, SLOT(slotSwitchMenu(int ))); | |
284 | // connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(int))); | 285 | // connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(int))); |
285 | 286 | ||
286 | } | 287 | } |
288 | |||