-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index 9be0ceb..eaf4f79 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp | |||
@@ -154,125 +154,125 @@ void AdvancedFm::init() { | |||
154 | Local_View->setColumnAlignment(1,QListView::AlignRight); | 154 | Local_View->setColumnAlignment(1,QListView::AlignRight); |
155 | Local_View->addColumn( tr("Date"),-1); | 155 | Local_View->addColumn( tr("Date"),-1); |
156 | Local_View->setColumnAlignment(2,QListView::AlignRight); | 156 | Local_View->setColumnAlignment(2,QListView::AlignRight); |
157 | Local_View->setAllColumnsShowFocus(TRUE); | 157 | Local_View->setAllColumnsShowFocus(TRUE); |
158 | Local_View->setMultiSelection( TRUE ); | 158 | Local_View->setMultiSelection( TRUE ); |
159 | Local_View->setSelectionMode(QListView::Extended); | 159 | Local_View->setSelectionMode(QListView::Extended); |
160 | Local_View->setFocusPolicy(StrongFocus); | 160 | Local_View->setFocusPolicy(StrongFocus); |
161 | Local_View->installEventFilter( this ); | 161 | Local_View->installEventFilter( this ); |
162 | 162 | ||
163 | QPEApplication::setStylusOperation( Local_View->viewport() , QPEApplication::RightOnHold); | 163 | QPEApplication::setStylusOperation( Local_View->viewport() , QPEApplication::RightOnHold); |
164 | 164 | ||
165 | tabLayout->addWidget( Local_View, 0, 0 ); | 165 | tabLayout->addWidget( Local_View, 0, 0 ); |
166 | 166 | ||
167 | TabWidget->addWidget( tab,"advancedfm/smFileBrowser.png", tr("1")); | 167 | TabWidget->addWidget( tab,"advancedfm/smFileBrowser.png", tr("1")); |
168 | // TabWidget->insertTab( tab, tr("1")); | 168 | // TabWidget->insertTab( tab, tr("1")); |
169 | 169 | ||
170 | tab_2 = new QWidget( TabWidget, "tab_2" ); | 170 | tab_2 = new QWidget( TabWidget, "tab_2" ); |
171 | tabLayout_2 = new QGridLayout( tab_2 ); | 171 | tabLayout_2 = new QGridLayout( tab_2 ); |
172 | tabLayout_2->setSpacing( 2); | 172 | tabLayout_2->setSpacing( 2); |
173 | tabLayout_2->setMargin( 2); | 173 | tabLayout_2->setMargin( 2); |
174 | 174 | ||
175 | Remote_View = new QListView( tab_2, "Remote_View" ); | 175 | Remote_View = new QListView( tab_2, "Remote_View" ); |
176 | Remote_View->addColumn( tr("File"),130); | 176 | Remote_View->addColumn( tr("File"),130); |
177 | Remote_View->addColumn( tr("Size"),-1); | 177 | Remote_View->addColumn( tr("Size"),-1); |
178 | Remote_View->setColumnAlignment(1,QListView::AlignRight); | 178 | Remote_View->setColumnAlignment(1,QListView::AlignRight); |
179 | Remote_View->addColumn( tr("Date"),-1); | 179 | Remote_View->addColumn( tr("Date"),-1); |
180 | Remote_View->setColumnAlignment(2,QListView::AlignRight); | 180 | Remote_View->setColumnAlignment(2,QListView::AlignRight); |
181 | Remote_View->setAllColumnsShowFocus(TRUE); | 181 | Remote_View->setAllColumnsShowFocus(TRUE); |
182 | Remote_View->setMultiSelection( TRUE ); | 182 | Remote_View->setMultiSelection( TRUE ); |
183 | Remote_View->setSelectionMode(QListView::Extended); | 183 | Remote_View->setSelectionMode(QListView::Extended); |
184 | Remote_View->setFocusPolicy(StrongFocus); | 184 | Remote_View->setFocusPolicy(StrongFocus); |
185 | Remote_View->installEventFilter( this ); | 185 | Remote_View->installEventFilter( this ); |
186 | 186 | ||
187 | QPEApplication::setStylusOperation( Remote_View->viewport(), QPEApplication::RightOnHold); | 187 | QPEApplication::setStylusOperation( Remote_View->viewport(), QPEApplication::RightOnHold); |
188 | 188 | ||
189 | tabLayout_2->addWidget( Remote_View, 0, 0 ); | 189 | tabLayout_2->addWidget( Remote_View, 0, 0 ); |
190 | 190 | ||
191 | TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); | 191 | TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); |
192 | TabWidget->setSizeChange( 370 ); | 192 | TabWidget->setSizeChange( 370 ); |
193 | // TabWidget->insertTab( tab_2, tr( "2")); | 193 | // TabWidget->insertTab( tab_2, tr( "2")); |
194 | 194 | ||
195 | /* tab_3 = new QWidget( TabWidget, "tab_3" ); | 195 | /* tab_3 = new QWidget( TabWidget, "tab_3" ); |
196 | tabLayout_3 = new QGridLayout( tab_3 ); | 196 | tabLayout_3 = new QGridLayout( tab_3 ); |
197 | tabLayout_3->setSpacing( 2); | 197 | tabLayout_3->setSpacing( 2); |
198 | tabLayout_3->setMargin( 2); | 198 | tabLayout_3->setMargin( 2); |
199 | 199 | ||
200 | 200 | ||
201 | // OFileDialog fileDialog; | 201 | // OFileDialog fileDialog; |
202 | // fileDialog; | 202 | // fileDialog; |
203 | // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy | 203 | // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy |
204 | // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); | 204 | // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); |
205 | // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/"); | 205 | // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/"); |
206 | 206 | ||
207 | QListView *fileTree; | 207 | QListView *fileTree; |
208 | fileTree = new QListView( tab_3, "tree" ); | 208 | fileTree = new QListView( tab_3, "tree" ); |
209 | 209 | ||
210 | 210 | ||
211 | tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 ); | 211 | tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 ); |
212 | 212 | ||
213 | TabWidget->insertTab( tab_3, tr( "Remote" ) ); | 213 | TabWidget->insertTab( tab_3, tr( "Remote" ) ); |
214 | */ | 214 | */ |
215 | 215 | ||
216 | /////////////// | 216 | /////////////// |
217 | 217 | ||
218 | if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" )) | 218 | if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" )) |
219 | zaurusDevice=TRUE; | 219 | zaurusDevice=TRUE; |
220 | else | 220 | else |
221 | zaurusDevice=FALSE; | 221 | zaurusDevice=FALSE; |
222 | 222 | ||
223 | 223 | ||
224 | if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { | 224 | if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { |
225 | odebug << "not have sd" << oendl; | 225 | odebug << "not have sd" << oendl; |
226 | sdButton->hide(); | 226 | sdButton->hide(); |
227 | } | 227 | } |
228 | if( !StorageInfo::hasCf() ) { | 228 | if( !StorageInfo::hasCf() ) { |
229 | odebug << "not have cf" << oendl; | 229 | odebug << "not have cf" << oendl; |
230 | cfButton->hide(); | 230 | cfButton->hide(); |
231 | } | 231 | } |
232 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 232 | currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
233 | currentDir.setPath( QDir::currentDirPath()); | 233 | currentDir.setPath( QDir::currentDirPath()); |
234 | 234 | ||
235 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); | 235 | currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); |
236 | currentRemoteDir.setPath( QDir::currentDirPath()); | 236 | currentRemoteDir.setPath( QDir::currentDirPath()); |
237 | 237 | ||
238 | // b = TRUE; | 238 | // b = TRUE; |
239 | 239 | ||
240 | filterStr="*"; | 240 | filterStr="*"; |
241 | showMenuHidden(); | 241 | showMenuHidden(); |
242 | TabWidget->setCurrentWidget(0); | 242 | TabWidget->setCurrentWidget(0); |
243 | 243 | ||
244 | } | 244 | } |
245 | 245 | ||
246 | void AdvancedFm::initConnections() | 246 | void AdvancedFm::initConnections() |
247 | { | 247 | { |
248 | 248 | ||
249 | connect(qApp,SIGNAL(aboutToQuit()),this,SLOT(cleanUp())); | 249 | connect(qApp,SIGNAL(aboutToQuit()),this,SLOT(cleanUp())); |
250 | connect( qpeDirButton ,SIGNAL(released()),this,SLOT( QPEButtonPushed()) ); | 250 | connect(qpeDirButton,SIGNAL(released()),this,SLOT(QPEButtonPushed())); |
251 | connect( cfButton ,SIGNAL(released()), this,SLOT( CFButtonPushed()) ); | 251 | connect(cfButton,SIGNAL(released()),this,SLOT(CFButtonPushed())); |
252 | connect( sdButton ,SIGNAL(released()), this,SLOT( SDButtonPushed()) ); | 252 | connect(sdButton,SIGNAL(released()),this,SLOT(SDButtonPushed())); |
253 | connect( cdUpButton ,SIGNAL(released()), this,SLOT( upDir()) ); | 253 | connect(cdUpButton,SIGNAL(released()),this,SLOT(upDir())); |
254 | connect( docButton,SIGNAL(released()), this,SLOT( docButtonPushed()) ); | 254 | connect(docButton,SIGNAL(released()),this,SLOT(docButtonPushed())); |
255 | connect( homeButton,SIGNAL(released()), this,SLOT( homeButtonPushed()) ); | 255 | connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed())); |
256 | connect( currentPathCombo, SIGNAL( activated(const QString&) ), this, SLOT( changeTo(const QString&) ) ); | 256 | connect(currentPathCombo,SIGNAL(activated(const QString&)),this,SLOT(changeTo(const QString&))); |
257 | 257 | ||
258 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), this,SLOT(currentPathComboChanged())); | 258 | connect(currentPathCombo->lineEdit(),SIGNAL(returnPressed()),this,SLOT(currentPathComboChanged())); |
259 | 259 | ||
260 | connect( Local_View, SIGNAL( clicked(QListViewItem*)), this,SLOT( ListClicked(QListViewItem*)) ); | 260 | connect(Local_View,SIGNAL(clicked(QListViewItem*)),this,SLOT( ListClicked(QListViewItem*))); |
261 | 261 | ||
262 | connect( Local_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); | 262 | connect(Local_View,SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); |
263 | 263 | ||
264 | connect( Remote_View, SIGNAL( clicked(QListViewItem*)), this,SLOT( ListClicked(QListViewItem*)) ); | 264 | connect(Remote_View,SIGNAL(clicked(QListViewItem*)),this,SLOT(ListClicked(QListViewItem*))); |
265 | connect( Remote_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); | 265 | connect(Remote_View,SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),this,SLOT(ListPressed(int,QListViewItem*,const QPoint&,int))); |
266 | 266 | ||
267 | connect( TabWidget,SIGNAL(currentChanged(QWidget*)), this,SLOT(tabChanged(QWidget*))); | 267 | connect(TabWidget,SIGNAL(currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*))); |
268 | 268 | ||
269 | connect( Remote_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)), this, SLOT(showFileMenu())); | 269 | connect(Remote_View,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),this,SLOT(showFileMenu())); |
270 | connect( Local_View, SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&,int)), this, SLOT(showFileMenu())); | 270 | connect(Local_View,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),this,SLOT(showFileMenu())); |
271 | 271 | ||
272 | connect( menuButton, SIGNAL( selected(const QString&)), SLOT(gotoCustomDir(const QString&))); | 272 | connect(menuButton,SIGNAL(selected(const QString&)),SLOT(gotoCustomDir(const QString&))); |
273 | // connect( menuButton, SIGNAL( selected(int)), SLOT( dirMenuSelected(int))); | 273 | // connect( menuButton, SIGNAL( selected(int)), SLOT( dirMenuSelected(int))); |
274 | connect( viewMenu, SIGNAL( activated(int)), this, SLOT(slotSwitchMenu(int))); | 274 | connect(viewMenu,SIGNAL(activated(int)),this,SLOT(slotSwitchMenu(int))); |
275 | // connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(int))); | 275 | // connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(int))); |
276 | 276 | ||
277 | } | 277 | } |
278 | 278 | ||