summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-29 15:09:30 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-29 15:09:30 +0200
commit27ce669bdf288e356e2ee2f9b73fd3b4ce6bfea0 (patch)
tree7138adfaca0b6f8dcf4d1d77e51ac1a4a427f8e8
parent1be6b8dc3417de2b7b8c9c32e92755ece9d6498c (diff)
downloadfpGUI-27ce669bdf288e356e2ee2f9b73fd3b4ce6bfea0.tar.xz
Code cleanup by removing leftover writeln() statements.
-rw-r--r--examples/gui/drag_n_drop/dndexample.lpr13
-rw-r--r--src/corelib/gdi/fpg_gdi.pas2
2 files changed, 7 insertions, 8 deletions
diff --git a/examples/gui/drag_n_drop/dndexample.lpr b/examples/gui/drag_n_drop/dndexample.lpr
index 13750e86..e134fb74 100644
--- a/examples/gui/drag_n_drop/dndexample.lpr
+++ b/examples/gui/drag_n_drop/dndexample.lpr
@@ -130,26 +130,23 @@ var
d: TfpgDrag;
v: variant;
begin
- writeln('in >');
m := TfpgMimeData.Create;
+
{ via convenience properties }
m.Text := 'My name is Earl';
m.HTML := 'My name is <b>Earl</b>';
- { via generic SetData function }
- //m.SetData('text/special', 'type number three');
- //v := 'type number four';
- //m.SetData('text/four', v);
- //m.SetData('text/five', 'type number five');
+ { Could also have used the generic SetData function }
+// m.SetData('text/plain', 'My name is Earl');
+// m.SetData('text/html', 'My name is <b>Earl</b>');
{ tell TfpgDrag who is the Source of the drag }
-// d := TfpgDrag.Create(MyDragSourceLabel);
d := TfpgDrag.Create(Sender as TfpgWindow);
{ TfpgDrag now takes ownership of TfpgMimeData }
d.MimeData := m;
+
{ TfpgDrag instance will be freed later when DND action is completed }
d.Execute([daCopy]);
- writeln('< out');
end;
procedure TMainForm.ShowMimeList(AMimeList: TStringList);
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index e85d81e3..6f95d8a8 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -2845,7 +2845,9 @@ begin
lIsTranslated := False;
{$Note OLE DND: We are only handling strings at the moment, this needs to be extended to other types too }
itm := FMimeData[i];
+ {$IFDEF DND_DEBUG}
writeln(' Processing mime-type: ', itm.Format);
+ {$ENDIF}
{ description of data we are sending }
New(F);