diff --git a/ede-desktop/Desktop.cpp b/ede-desktop/Desktop.cpp index b7b50cc..b31bb4e 100644 --- a/ede-desktop/Desktop.cpp +++ b/ede-desktop/Desktop.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include diff --git a/ede-desktop/DesktopIcon.cpp b/ede-desktop/DesktopIcon.cpp index a901001..386a606 100644 --- a/ede-desktop/DesktopIcon.cpp +++ b/ede-desktop/DesktopIcon.cpp @@ -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) { diff --git a/ede-desktop/DesktopIcon.h b/ede-desktop/DesktopIcon.h index 4883515..58eb34a 100644 --- a/ede-desktop/DesktopIcon.h +++ b/ede-desktop/DesktopIcon.h @@ -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(); diff --git a/ede-desktop/ede-desktop.cpp b/ede-desktop/ede-desktop.cpp index d183e6b..5ecaa55 100644 --- a/ede-desktop/ede-desktop.cpp +++ b/ede-desktop/ede-desktop.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include