Used new features from IconChooser.

This commit is contained in:
Sanel Zukan 2012-12-26 01:53:08 +00:00
parent 97da788155
commit 1046c2d4d5

View File

@ -87,25 +87,7 @@ static void ok_cb(Fl_Widget*, void*) {
if(comment->value()) if(comment->value())
df.set_comment(comment->value()); df.set_comment(comment->value());
if(!img_path.empty() && img_path.length() > 1) { df.set_icon((img_path.length() > 1) ? img_path.c_str() : DEFAULT_ICON);
/* figure out basename */
const char *s;
char *p, *e;
s = img_path.c_str();
p = (char*)strrchr(s, E_DIR_SEPARATOR);
if(p && *p++) {
/* now remove extension */
e = (char*)strrchr((const char*)p, '.');
if(e) *e = '\0';
df.set_icon(p);
}
} else {
df.set_icon(DEFAULT_ICON);
}
df.set_exec(execute->value()); df.set_exec(execute->value());
/* determine filename and save it */ /* determine filename and save it */