Mercurial > vim
comparison src/gui_kde.cc @ 75:388f285bda1b
updated for version 7.0031
author | vimboss |
---|---|
date | Wed, 05 Jan 2005 22:16:17 +0000 |
parents | e474bae3795f |
children | fca8a9b65afa |
comparison
equal
deleted
inserted
replaced
74:1154524da1cd | 75:388f285bda1b |
---|---|
239 | 239 |
240 if (parent) | 240 if (parent) |
241 { | 241 { |
242 idx++; // for tearoffs to be first in menus | 242 idx++; // for tearoffs to be first in menus |
243 me = new QPopupMenu(parent->widget, QSTR(menu->name)); | 243 me = new QPopupMenu(parent->widget, QSTR(menu->name)); |
244 parent->widget->insertItem(QSTR(menu->name), me, (int)me, idx); | 244 parent->widget->insertItem(QSTR(menu->name), me, (long)me, idx); |
245 } | 245 } |
246 else | 246 else |
247 { | 247 { |
248 me = new QPopupMenu(vmw->menuBar(), QSTR(menu->name)); | 248 me = new QPopupMenu(vmw->menuBar(), QSTR(menu->name)); |
249 vmw->menuBar()->insertItem(QSTR(menu->name), me, (int)me, idx); | 249 vmw->menuBar()->insertItem(QSTR(menu->name), me, (long)me, idx); |
250 } | 250 } |
251 | 251 |
252 me->setCaption((const char *)(menu->dname)); | 252 me->setCaption((const char *)(menu->dname)); |
253 if (vmw->have_tearoff) | 253 if (vmw->have_tearoff) |
254 me->insertTearOffHandle(0, 0); | 254 me->insertTearOffHandle(0, 0); |
294 #endif | 294 #endif |
295 if (pix.isNull()) | 295 if (pix.isNull()) |
296 return; // failed | 296 return; // failed |
297 vmw->toolBar()->insertButton( | 297 vmw->toolBar()->insertButton( |
298 pix, | 298 pix, |
299 (int)menu, // id | 299 (long)menu, // id |
300 true, | 300 true, |
301 QSTR(menu->strings[MENU_INDEX_TIP]), // tooltip or text | 301 QSTR(menu->strings[MENU_INDEX_TIP]), // tooltip or text |
302 idx); | 302 idx); |
303 menu->parent=parent; | 303 menu->parent=parent; |
304 return; | 304 return; |
309 if (menu_is_separator(menu->name)) | 309 if (menu_is_separator(menu->name)) |
310 { | 310 { |
311 parent->widget->insertSeparator(); | 311 parent->widget->insertSeparator(); |
312 return; | 312 return; |
313 } | 313 } |
314 parent->widget->insertItem(QSTR(menu->name), (int)menu, idx); | 314 parent->widget->insertItem(QSTR(menu->name), (long)menu, idx); |
315 #endif | 315 #endif |
316 }//}}} | 316 }//}}} |
317 | 317 |
318 | 318 |
319 void | 319 void |
388 gui_mch_destroy_menu(vimmenu_T *menu)//{{{ | 388 gui_mch_destroy_menu(vimmenu_T *menu)//{{{ |
389 { | 389 { |
390 #ifdef FEAT_TOOLBAR | 390 #ifdef FEAT_TOOLBAR |
391 if (menu->parent && menu_is_toolbar(menu->parent->name)) | 391 if (menu->parent && menu_is_toolbar(menu->parent->name)) |
392 { | 392 { |
393 vmw->toolBar()->removeItem((int)menu); | 393 vmw->toolBar()->removeItem((long)menu); |
394 return; | 394 return; |
395 } | 395 } |
396 #endif | 396 #endif |
397 if (menu->parent) | 397 if (menu->parent) |
398 menu->parent->widget->removeItem((int)menu); | 398 menu->parent->widget->removeItem((long)menu); |
399 if (menu->widget) | 399 if (menu->widget) |
400 delete menu->widget; | 400 delete menu->widget; |
401 menu->widget = 0; | 401 menu->widget = 0; |
402 }//}}} | 402 }//}}} |
403 #endif /* FEAT_MENU */ | 403 #endif /* FEAT_MENU */ |