[Scummvm-cvs-logs] SF.net SVN: scummvm: [29667] tools/branches/gsoc2007-toolsgui
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Nov 30 15:29:15 CET 2007
Revision: 29667
http://scummvm.svn.sourceforge.net/scummvm/?rev=29667&view=rev
Author: fingolfin
Date: 2007-11-30 06:29:14 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
Disable Drag&Drop support if the wxWidgets version used does not support it
Modified Paths:
--------------
tools/branches/gsoc2007-toolsgui/tools_gui.cpp
tools/branches/gsoc2007-toolsgui/tools_gui.h
Modified: tools/branches/gsoc2007-toolsgui/tools_gui.cpp
===================================================================
--- tools/branches/gsoc2007-toolsgui/tools_gui.cpp 2007-11-30 14:07:14 UTC (rev 29666)
+++ tools/branches/gsoc2007-toolsgui/tools_gui.cpp 2007-11-30 14:29:14 UTC (rev 29667)
@@ -157,6 +157,7 @@
}
}
+#if wxUSE_DRAG_AND_DROP
FileDrop::FileDrop(wxTextCtrl *target, bool isFileChooser) : wxFileDropTarget() {
_target = target;
_target->SetDropTarget(this);
@@ -174,6 +175,7 @@
return true;
}
+#endif
IOChooser::IOChooser(wxWindow *parent, kEventId buttonId, wxString title, bool isFileChooser) : wxPanel(parent) {
wxStaticBox *staticBox = new wxStaticBox(this, wxID_ANY, title);
@@ -188,7 +190,9 @@
_browse = new wxButton(panel, buttonId, wxT("Browse"));
_isFileChooser = isFileChooser;
+#if wxUSE_DRAG_AND_DROP
_dropTarget = new FileDrop(_text, _isFileChooser);
+#endif
sizer->Add(_text, 1, wxEXPAND | wxRIGHT, 5);
sizer->Add(_browse, 0);
Modified: tools/branches/gsoc2007-toolsgui/tools_gui.h
===================================================================
--- tools/branches/gsoc2007-toolsgui/tools_gui.h 2007-11-30 14:07:14 UTC (rev 29666)
+++ tools/branches/gsoc2007-toolsgui/tools_gui.h 2007-11-30 14:29:14 UTC (rev 29667)
@@ -28,7 +28,9 @@
class Process;
class LocationDialog;
+#if wxUSE_DRAG_AND_DROP
class FileDrop;
+#endif
class IOChooser;
class DropDownBox;
class CompressionOptions;
@@ -153,6 +155,7 @@
void prompt();
};
+#if wxUSE_DRAG_AND_DROP
class FileDrop : public wxFileDropTarget {
public:
FileDrop(wxTextCtrl *target, bool isFileChooser);
@@ -162,6 +165,7 @@
virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames);
};
+#endif
class IOChooser : public wxPanel {
public:
@@ -170,7 +174,9 @@
wxTextCtrl *_text;
wxButton *_browse;
bool _isFileChooser;
+#if wxUSE_DRAG_AND_DROP
FileDrop *_dropTarget;
+#endif
};
class DropDownBox : public wxPanel {
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