|
|
Author: fabien
Date: 2007-04-05 16:31:22 -0400 (Thu, 05 Apr 2007)
New Revision: 5764
Log:
+ osx FileChooser cursor call was causing a crash fixed.
Modified:
branches/fctrunk/src/Cursor.cxx
branches/fctrunk/src/FileChooser.cxx
branches/fctrunk/src/FileChooser.fl
Modified: branches/fctrunk/src/Cursor.cxx
===================================================================
--- branches/fctrunk/src/Cursor.cxx 2007-04-05 19:31:58 UTC (rev 5763)
+++ branches/fctrunk/src/Cursor.cxx 2007-04-05 20:31:22 UTC (rev 5764)
@@ -402,6 +402,7 @@
// 16-bit shorts but apparently the system api wants the bytes the same,
// probably because they expect it to be resource data.
FL_API fltk::Cursor *fltk::cursor(void *raw) {
+ if (!raw) return 0;
fltk::Cursor *c = new fltk::Cursor;
c->resource=0;
// This overwrites the data, mask, and hotspot:
@@ -411,7 +412,7 @@
#endif
-fltk::Cursor* const fltk::CURSOR_DEFAULT= 0;
+fltk::Cursor* const fltk::CURSOR_DEFAULT= ((fltk::Cursor*)0);
fltk::Cursor* const fltk::CURSOR_ARROW = &arrow;
fltk::Cursor* const fltk::CURSOR_CROSS = ✗
fltk::Cursor* const fltk::CURSOR_WAIT = &wait_c;
Modified: branches/fctrunk/src/FileChooser.cxx
===================================================================
--- branches/fctrunk/src/FileChooser.cxx 2007-04-05 19:31:58 UTC (rev 5763)
+++ branches/fctrunk/src/FileChooser.cxx 2007-04-05 20:31:22 UTC (rev 5764)
@@ -376,9 +376,9 @@
window->hotspot(fileList);
window->show();
fltk::flush();
- fltk::cursor(fltk::CURSOR_WAIT);
+ window->cursor(fltk::CURSOR_WAIT);
rescan();
- fltk::cursor(fltk::CURSOR_DEFAULT);
+ window->cursor(fltk::CURSOR_DEFAULT);
fileName->take_focus();
}
@@ -386,9 +386,9 @@
window->resize(x, y,window->w(),window->h());
window->show();
fltk::flush();
- fltk::cursor(fltk::CURSOR_WAIT);
+ window->cursor(fltk::CURSOR_WAIT);
rescan();
- fltk::cursor(fltk::CURSOR_DEFAULT);
+ window->cursor(fltk::CURSOR_DEFAULT);
fileName->take_focus();
}
Modified: branches/fctrunk/src/FileChooser.fl
===================================================================
--- branches/fctrunk/src/FileChooser.fl 2007-04-05 19:31:58 UTC (rev 5763)
+++ branches/fctrunk/src/FileChooser.fl 2007-04-05 20:31:22 UTC (rev 5764)
@@ -322,9 +322,9 @@
code {window->hotspot(fileList);
window->show();
fltk::flush();
-fltk::cursor(fltk::CURSOR_WAIT);
+window->cursor(fltk::CURSOR_WAIT);
rescan();
-fltk::cursor(fltk::CURSOR_DEFAULT);
+window->cursor(fltk::CURSOR_DEFAULT);
fileName->take_focus();} {}
}
Function {show(int x, int y)} {open return_type void
@@ -332,9 +332,9 @@
code {window->show();
window->resize(x, y,window->w(),window->h());
fltk::flush();
-fltk::cursor(fltk::CURSOR_WAIT);
+window->cursor(fltk::CURSOR_WAIT);
rescan();
-fltk::cursor(fltk::CURSOR_DEFAULT);
+window->cursorcursor(fltk::CURSOR_DEFAULT);
fileName->take_focus();} {}
}
Function {shown()} {open return_type int
[ Direct Link to Message ] | |
|
| |