wxString GetOSXKicadUserDataDir() { // According to wxWidgets documentation for GetUserDataDir: // Mac: ~/Library/Application Support/appname wxFileName udir( wxStandardPaths::Get().GetUserDataDir(), wxEmptyString ); // Since appname is different if started via launcher or standalone binary // map all to "kicad" here udir.RemoveLastDir(); udir.AppendDir( wxT( "kicad" ) ); return udir.GetPath(); }
void KfmView::slotOpenWith() { QStrList popupFiles = new QStrList(); getActiveView()->getSelected ( popupFiles ); // get selected URL(s) if ( popupFiles.isEmpty() && popupMenuEvent ) { popupFiles.append ( getURL() ); } OpenWithDlg l( klocale->translate("Open With:"), "", this, true ); if ( l.exec() ) { KMimeBind *bind = l.mimeBind(); if ( bind ) { const char *s; for( s = popupFiles.first(); s != 0L; s = popupFiles.next() ) bind->runBinding( s ); return; } QString pattern = l.getText(); if ( pattern.length() == 0 ) return; } else return; printf("KfmView::slotPopupOpenWith starts openWithOldApplication(%s)\n", l.getText()); KURL u(popupFiles.first()); if (u.isLocalFile()) { QString udir(u.directory()); udir.detach(); KURL::decodeURL(udir); // I hate KURL, you never know when it's encoded ... David. openWithOldApplication( l.getText(), popupFiles, udir ); } else openWithOldApplication( l.getText(), popupFiles ); }