Show tooltip over icon if icon contains Comment key.

This commit is contained in:
Sanel Zukan 2013-10-28 21:51:05 +00:00
parent 2c9f804aa3
commit 361d3a532a
3 changed files with 8 additions and 0 deletions

View File

@ -384,6 +384,9 @@ DesktopIcon *Desktop::read_desktop_file(const char *path, const char *base, Desk
ret->set_image(buf);
else
ret->set_image(NULL);
if(df.comment(buf, sizeof(buf)))
ret->set_tooltip(buf);
if(df.exec(buf, sizeof(buf))) ret->set_cmd(buf);
}

View File

@ -152,6 +152,10 @@ void DesktopIcon::set_image(const char *name) {
size(img_w + OFFSET_W, img_h + OFFSET_H);
}
void DesktopIcon::set_tooltip(const char *tip) {
copy_tooltip(tip);
}
void DesktopIcon::update_label_font_and_size(void) {
E_RETURN_IF_FAIL(opts != 0);

View File

@ -97,6 +97,7 @@ public:
void set_icon_type(int c) { icon_type = c; }
int get_icon_type(void) { return icon_type;}
void set_image(const char *name);
void set_tooltip(const char *tip);
void update_label_font_and_size(void);