[Scummvm-cvs-logs] SF.net SVN: scummvm: [28037] scummex/branches/gsoc2007-gameresbrowser/src/ browserapp/MainFormCommands.cpp
zbychs at users.sourceforge.net
zbychs at users.sourceforge.net
Thu Jul 12 06:45:37 CEST 2007
Revision: 28037
http://scummvm.svn.sourceforge.net/scummvm/?rev=28037&view=rev
Author: zbychs
Date: 2007-07-11 21:45:37 -0700 (Wed, 11 Jul 2007)
Log Message:
-----------
Added open dialog for loading plugins.
Modified Paths:
--------------
scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainFormCommands.cpp
Modified: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainFormCommands.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainFormCommands.cpp 2007-07-12 02:53:50 UTC (rev 28036)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainFormCommands.cpp 2007-07-12 04:45:37 UTC (rev 28037)
@@ -29,6 +29,7 @@
#include <wx/wfstream.h>
#include <wx/stdpaths.h>
#include <wx/choicdlg.h>
+#include <wx/filename.h>
#include "ObjectChain.h"
@@ -132,7 +133,23 @@
*/
void MainForm::OnLoadPlugin(wxCommandEvent& event)
{
- wxString plugin = askForAPlugin();
+ //wxString plugin = askForAPlugin();
+
+ wxString filepath;
+ wxFileDialog *openDlg = new wxFileDialog(this, wxT("Please select a plugin."), filepath, wxT(""),
+ wxT("All Files|*|")
+ wxT("Shared libs|*.so;*.dll"),
+ wxOPEN);
+
+ int ores = openDlg->ShowModal();
+ if (ores != wxID_OK) {
+ openDlg->Destroy();
+ return;
+ }
+
+ wxString plugin = openDlg->GetPath();
+ openDlg->Destroy();
+
if (plugin.IsEmpty())
return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list