diff options
author | fluxgen <fluxgen> | 2003-04-26 14:47:04 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-04-26 14:47:04 (GMT) |
commit | e3c5e77bbf005ee76b99db248d13b1a56bb38578 (patch) | |
tree | 50b456eb4a0fa806e49696e60e45ad315fc73004 /src/FbTk/Menu.cc | |
parent | b2c53bf3a1c7e03d54b78b66c8fc766262a5c752 (diff) | |
download | fluxbox-e3c5e77bbf005ee76b99db248d13b1a56bb38578.zip fluxbox-e3c5e77bbf005ee76b99db248d13b1a56bb38578.tar.bz2 |
deleting not internal menus
Diffstat (limited to 'src/FbTk/Menu.cc')
-rw-r--r-- | src/FbTk/Menu.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 1882be6..dcb4932 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Menu.cc,v 1.16 2003/04/26 12:34:48 fluxgen Exp $ | 25 | // $Id: Menu.cc,v 1.17 2003/04/26 14:47:04 fluxgen Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -243,15 +243,19 @@ int Menu::remove(unsigned int index) { | |||
243 | 243 | ||
244 | if (item) { | 244 | if (item) { |
245 | menuitems.erase(it); | 245 | menuitems.erase(it); |
246 | /*if ((! internal_menu) && (item->submenu())) { | 246 | if ((! internal_menu) && (item->submenu())) { |
247 | Menu *tmp = item->submenu(); | 247 | Menu *tmp = item->submenu(); |
248 | 248 | // if menu is interal we should just hide it instead | |
249 | if (! tmp->internal_menu) { | 249 | // if destroying it |
250 | delete tmp; | 250 | if (! tmp->internal_menu) { |
251 | } else | 251 | #ifdef DEBUG |
252 | tmp->internal_hide(); | 252 | cerr<<__FILE__<<"("<<__FUNCTION__<<"): delete: "<<tmp<<endl; |
253 | } | 253 | #endif // DEBUG |
254 | */ | 254 | delete tmp; |
255 | } else | ||
256 | tmp->internal_hide(); | ||
257 | } | ||
258 | |||
255 | 259 | ||
256 | delete item; | 260 | delete item; |
257 | } | 261 | } |