mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Allow last changes to be compileable with FLTK 1.1.x. This way I found some rand()/srand() calls without stdlib.h inclusion...
This commit is contained in:
parent
361d3a532a
commit
095feb98e7
@ -21,6 +21,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/fl_draw.H>
|
||||
|
@ -153,7 +153,20 @@ void DesktopIcon::set_image(const char *name) {
|
||||
}
|
||||
|
||||
void DesktopIcon::set_tooltip(const char *tip) {
|
||||
#if (FL_MAJOR_VERSION >= 1) && (FL_MINOR_VERSION >= 3)
|
||||
copy_tooltip(tip);
|
||||
#else
|
||||
/*
|
||||
* in versions prior 1.3, copy_tooltip didn't exist and there wasn't any
|
||||
* way to store tooltip without manually managing the storage
|
||||
*/
|
||||
if(tip) {
|
||||
ttip = tip;
|
||||
tooltip(ttip.c_str());
|
||||
} else {
|
||||
tooltip(tip);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void DesktopIcon::update_label_font_and_size(void) {
|
||||
|
@ -90,6 +90,10 @@ private:
|
||||
EDELIB_NS_PREPEND(String) path, cmd;
|
||||
EDELIB_NS_PREPEND(MenuButton) *imenu;
|
||||
|
||||
#if !((FL_MAJOR_VERSION >= 1) && (FL_MINOR_VERSION >= 3))
|
||||
EDELIB_NS_PREPEND(String) ttip;
|
||||
#endif
|
||||
|
||||
public:
|
||||
DesktopIcon(const char *l, int W = DESKTOP_ICON_SIZE_W, int H = DESKTOP_ICON_SIZE_H);
|
||||
~DesktopIcon();
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <FL/Fl.H>
|
||||
#include <edelib/Ede.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user