summaryrefslogtreecommitdiff
authorzecke <zecke>2002-04-17 17:22:50 (UTC)
committer zecke <zecke>2002-04-17 17:22:50 (UTC)
commitb94bcfb586b838885d7d0503623ea36ee0054464 (patch) (unidiff)
treeda2f5fb0e422e38d6fae0ab8f8572b332e7da08b
parentb382414bf0446b6facd11d35df5dc097edbd5396 (diff)
downloadopie-b94bcfb586b838885d7d0503623ea36ee0054464.zip
opie-b94bcfb586b838885d7d0503623ea36ee0054464.tar.gz
opie-b94bcfb586b838885d7d0503623ea36ee0054464.tar.bz2
include the current directory in the filename
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc
index 968541a..ea19143 100644
--- a/libopie/ofileselector.cc
+++ b/libopie/ofileselector.cc
@@ -268,129 +268,129 @@ void OFileSelector::setLineEditVisible( bool show )
268 268
269 m_shLne = show; 269 m_shLne = show;
270 if( !show ){ 270 if( !show ){
271 delete m_edit; 271 delete m_edit;
272 delete m_fnLabel; 272 delete m_fnLabel;
273 m_edit = 0; 273 m_edit = 0;
274 m_fnLabel = 0; 274 m_fnLabel = 0;
275 //delete m_boxName; will be deleted 275 //delete m_boxName; will be deleted
276 } 276 }
277 updateLay(); 277 updateLay();
278} 278}
279void OFileSelector::setChooserVisible( bool show ) 279void OFileSelector::setChooserVisible( bool show )
280{ 280{
281 if( show = m_shChooser ) 281 if( show = m_shChooser )
282 return; 282 return;
283 m_shChooser = show; 283 m_shChooser = show;
284 if( !show ){ 284 if( !show ){
285 delete m_mimeCheck; 285 delete m_mimeCheck;
286 delete m_viewCheck; 286 delete m_viewCheck;
287 m_mimeCheck = 0; 287 m_mimeCheck = 0;
288 m_viewCheck = 0; 288 m_viewCheck = 0;
289 } 289 }
290 updateLay(); 290 updateLay();
291} 291}
292QCheckBox* OFileSelector::permissionCheckbox( ) 292QCheckBox* OFileSelector::permissionCheckbox( )
293{ 293{
294 return m_checkPerm; 294 return m_checkPerm;
295} 295}
296void OFileSelector::setCaseSensetive( bool caSe ) 296void OFileSelector::setCaseSensetive( bool caSe )
297{ 297{
298 m_case = caSe; 298 m_case = caSe;
299 reparse(); 299 reparse();
300} 300}
301void OFileSelector::setShowFiles(bool files ){ 301void OFileSelector::setShowFiles(bool files ){
302 m_files = files; 302 m_files = files;
303 reparse(); 303 reparse();
304} 304}
305void OFileSelector::setPopupMenu(QPopupMenu *pop ) 305void OFileSelector::setPopupMenu(QPopupMenu *pop )
306{ 306{
307 //delete oldpopup; 307 //delete oldpopup;
308 m_custom = pop; 308 m_custom = pop;
309} 309}
310bool OFileSelector::setPermission( ) const 310bool OFileSelector::setPermission( ) const
311{ 311{
312 if( m_checkPerm == 0 ) 312 if( m_checkPerm == 0 )
313 return false; 313 return false;
314 else 314 else
315 return m_checkPerm->isChecked(); 315 return m_checkPerm->isChecked();
316} 316}
317void OFileSelector::setPermissionChecked( bool check ) 317void OFileSelector::setPermissionChecked( bool check )
318{ 318{
319 if( m_checkPerm == 0 ) 319 if( m_checkPerm == 0 )
320 return; 320 return;
321 m_checkPerm->setChecked( check ); 321 m_checkPerm->setChecked( check );
322} 322}
323QString OFileSelector::selectedName( )const 323QString OFileSelector::selectedName( )const
324{ 324{
325 QString string; 325 QString string;
326 if( m_selector == NORMAL ){ 326 if( m_selector == NORMAL ){
327 const DocLnk *lnk = m_select->selected(); 327 const DocLnk *lnk = m_select->selected();
328 string = lnk->file(); 328 string = lnk->file();
329 }else if(m_selector == EXTENDED || m_selector == EXTENDED_ALL ) { 329 }else if(m_selector == EXTENDED || m_selector == EXTENDED_ALL ) {
330 QListViewItem *item = m_View->currentItem(); 330 QListViewItem *item = m_View->currentItem();
331 if(item != 0 ){ 331 if(item != 0 ){
332 string = item->text( 1 ); 332 string = m_currentDir + "/" + item->text( 1 );
333 } 333 }
334 } 334 }
335 return string; 335 return string;
336} 336}
337QStringList OFileSelector::selectedNames()const 337QStringList OFileSelector::selectedNames()const
338{ 338{
339 QStringList list; 339 QStringList list;
340 return list; 340 return list;
341} 341}
342DocLnk OFileSelector::selectedDocument( )const 342DocLnk OFileSelector::selectedDocument( )const
343{ 343{
344 DocLnk lnk; 344 DocLnk lnk;
345 return lnk; 345 return lnk;
346} 346}
347void OFileSelector::updateLay() 347void OFileSelector::updateLay()
348{ 348{
349 /* if( m_shTool ) 349 /* if( m_shTool )
350 // 350 //
351 else 351 else
352 // hide 352 // hide
353 */ 353 */
354 // save the state 354 // save the state
355 bool check = false; 355 bool check = false;
356 if( m_checkPerm != 0 ) 356 if( m_checkPerm != 0 )
357 check = m_checkPerm->isChecked(); 357 check = m_checkPerm->isChecked();
358 QString text; 358 QString text;
359 359
360 if( m_edit != 0 ) 360 if( m_edit != 0 )
361 text = m_edit->text(); 361 text = m_edit->text();
362 // save current mimetype 362 // save current mimetype
363 363
364 delItems(); 364 delItems();
365 delete m_checkPerm; 365 delete m_checkPerm;
366 m_checkPerm = 0; 366 m_checkPerm = 0;
367 delete m_edit; 367 delete m_edit;
368 m_edit = 0; 368 m_edit = 0;
369 delete m_fnLabel; 369 delete m_fnLabel;
370 m_fnLabel = 0; 370 m_fnLabel = 0;
371 delete m_ok; 371 delete m_ok;
372 m_ok = 0; 372 m_ok = 0;
373 delete m_cancel; 373 delete m_cancel;
374 m_cancel = 0; 374 m_cancel = 0;
375 delete m_mimeCheck; 375 delete m_mimeCheck;
376 m_mimeCheck = 0; 376 m_mimeCheck = 0;
377 delete m_viewCheck; 377 delete m_viewCheck;
378 m_viewCheck = 0; 378 m_viewCheck = 0;
379 delete m_select; // test 379 delete m_select; // test
380 delete m_stack; 380 delete m_stack;
381 //delete m_list; 381 //delete m_list;
382 init(); 382 init();
383 if( m_shLne ) 383 if( m_shLne )
384 m_edit->setText(text ); 384 m_edit->setText(text );
385 if( m_shPerm ) 385 if( m_shPerm )
386 m_checkPerm->setChecked(check ); 386 m_checkPerm->setChecked(check );
387} 387}
388// let's update the mimetypes. Use the current mimefilter for the 2nd QDir retrieve 388// let's update the mimetypes. Use the current mimefilter for the 2nd QDir retrieve
389// insert QListViewItems with the right options 389// insert QListViewItems with the right options
390bool OFileSelector::compliesMime(const QString &path, const QString &mime ) 390bool OFileSelector::compliesMime(const QString &path, const QString &mime )
391{ 391{
392 if( mime == "All" ) 392 if( mime == "All" )
393 return true; 393 return true;
394 MimeType type( path ); 394 MimeType type( path );
395 if( type.id() == mime ) 395 if( type.id() == mime )
396 return true; 396 return true;