Change Details
src/menu.cpp |
312 | 312 | return false; |
313 | 313 | } |
314 | 314 | |
315 | | void Menu::deleteSelectedLink() { |
| 315 | void Menu::deleteSelectedLink() |
| 316 | { |
| 317 | bool icon_used = false; |
| 318 | string iconpath = selLink()->getIconPath(); |
| 319 | |
316 | 320 | INFO("Deleting link '%s'\n", selLink()->getTitle().c_str()); |
317 | 321 | |
318 | 322 | if (selLinkApp()!=NULL) |
319 | 323 | unlink(selLinkApp()->getFile().c_str()); |
320 | | gmenu2x->sc.del(selLink()->getIconPath()); |
321 | 324 | sectionLinks()->erase( sectionLinks()->begin() + selLinkIndex() ); |
322 | 325 | setLinkIndex(selLinkIndex()); |
| 326 | |
| 327 | for (vector<linklist>::iterator section = links.begin(); |
| 328 | !icon_used && section<links.end(); section++) |
| 329 | for (linklist::iterator link = section->begin(); |
| 330 | !icon_used && link<section->end(); link++) |
| 331 | icon_used = !iconpath.compare((*link)->getIconPath()); |
| 332 | |
| 333 | if (!icon_used) |
| 334 | gmenu2x->sc.del(iconpath); |
323 | 335 | } |
324 | 336 | |
325 | 337 | void Menu::deleteSelectedSection() { |
Download the corresponding diff file