|
|
Author: fabien
Date: 2007-04-05 10:30:37 -0400 (Thu, 05 Apr 2007)
New Revision: 5761
Log:
added delete menu and shortcut, so not necessary to cut anymore to delete somtg in the tree
Modified:
branches/fctrunk/fluid/fluid.cxx
branches/fctrunk/fluid/fluid_menus.cxx
Modified: branches/fctrunk/fluid/fluid.cxx
===================================================================
--- branches/fctrunk/fluid/fluid.cxx 2007-04-05 13:57:29 UTC (rev 5760)
+++ branches/fctrunk/fluid/fluid.cxx 2007-04-05 14:30:37 UTC (rev 5761)
@@ -755,6 +755,16 @@
if (p) select_only(p);
}
+void delete_cb(Widget *, void *) {
+ if (!FluidType::current) return;
+ Undo::checkpoint();
+ ipasteoffset = 0;
+ FluidType *p = FluidType::current->parent;
+ while (p && p->selected()) p = p->parent;
+ delete_all(1);
+ if (p) select_only(p);
+}
+
extern int force_parent;
void paste_cb(Widget*, void*) {
Modified: branches/fctrunk/fluid/fluid_menus.cxx
===================================================================
--- branches/fctrunk/fluid/fluid_menus.cxx 2007-04-05 13:57:29 UTC (rev 5760)
+++ branches/fctrunk/fluid/fluid_menus.cxx 2007-04-05 14:30:37 UTC (rev 5761)
@@ -42,6 +42,7 @@
DECL_MENUCBV(write_cb);
DECL_MENUCBV(exit_cb);
DECL_MENUCBV(cut_cb);
+DECL_MENUCBV(delete_cb);
DECL_MENUCBV(copy_cb);
DECL_MENUCBV(paste_cb);
DECL_MENUCBV(exit_cb);
@@ -180,6 +181,7 @@
new Item("&Paste", COMMAND+'v', paste_cb);
new Item("Select &All", COMMAND+'a', select_all_cb);
new Item("Select &None", SHIFT+COMMAND+'a', select_none_cb);
+ new Item("&Delete", DeleteKey, delete_cb);
new Divider();
new Item("Ed&it this widget", ReturnKey, openwidget_cb);
new Item("&Sort these widgets", 0, sort_cb);
[ Direct Link to Message ] | |
|
| |