# HG changeset patch # User insilmaril # Date 1147678330 0 # Node ID 40c4806dfef25ba06997481e6eccc8a9da6116c8 # Parent 7758f3ceb98a77c6d01b483293b04e76f59ac250 1.7.17 diff -r 7758f3ceb98a -r 40c4806dfef2 mainwindow.cpp --- a/mainwindow.cpp Mon May 15 07:32:10 2006 +0000 +++ b/mainwindow.cpp Mon May 15 07:32:10 2006 +0000 @@ -1072,6 +1072,7 @@ a->setToggleAction(true); a->setOn ( settings.readBoolEntry ("/vym/mapeditor/editmode/useDelKey",false) ); a->addTo( menu ); + connect( a, SIGNAL( activated() ), this, SLOT( settingsToggleDelKey() ) ); actionSettingsUseDelKey=a; a= new QAction( tr( "Use exclusive flags in flag toolbars" ), QPixmap(), tr( "Exclusive flags" ), 0, this, "flaggroups" ); @@ -1836,10 +1837,29 @@ void Main::fileImportFirefoxBookmarks() { - ImportFirefoxBookmarks im; - im.transform(); - if (success==fileLoad (im.getTransformedFile(),NewMap) && currentMapEditor() ) - currentMapEditor()->setFilePath (""); + QFileDialog *fd=new QFileDialog( this); + fd->setDir (vymBaseDir.homeDirPath()+"/.mozilla/firefox"); + fd->setMode (QFileDialog::ExistingFiles); + fd->addFilter ("Firefox "+tr("Bookmarks")+" (*.html)"); + fd->setCaption(tr("Import")+" "+"Firefox "+tr("Bookmarks")); + fd->show(); + + if ( fd->exec() == QDialog::Accepted ) + { + ImportFirefoxBookmarks im; + QStringList flist = fd->selectedFiles(); + QStringList::Iterator it = flist.begin(); + while( it != flist.end() ) + { + im.setFile (*it); + if (im.transform() && + success==fileLoad (im.getTransformedFile(),NewMap) && + currentMapEditor() ) + currentMapEditor()->setFilePath (""); + ++it; + } + } + delete (fd); } void Main::fileImportMM() @@ -2640,6 +2660,17 @@ return ok; } +void Main::settingsToggleDelKey() +{ + if (actionSettingsUseDelKey->isOn()) + { + actionEditDelete->setAccel (QKeySequence (Key_Delete)); + } else + { + actionEditDelete->setAccel (QKeySequence ("")); + } +} + void Main::windowToggleNoteEditor() { if (textEditor->showWithMain() )