summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5e230ff)
raw | patch | inline | side by side (parent: 5e230ff)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 18 Apr 2007 01:46:21 +0000 (01:46 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 18 Apr 2007 01:46:21 +0000 (01:46 +0000) |
src/arc-context.cpp | patch | blob | history | |
src/rect-context.cpp | patch | blob | history | |
src/spiral-context.cpp | patch | blob | history | |
src/star-context.cpp | patch | blob | history |
diff --git a/src/arc-context.cpp b/src/arc-context.cpp
index db64d79511c95671037b286467fd697a41625182..4a8d6b9d1c55604b4844d7459c5b456d2a07faaf 100644 (file)
--- a/src/arc-context.cpp
+++ b/src/arc-context.cpp
@@ -357,6 +357,21 @@ static gint sp_arc_context_root_handler(SPEventContext *event_context, GdkEvent
case GDK_Escape:
sp_desktop_selection(desktop)->clear();
//TODO: make dragging escapable by Esc
+ break;
+
+ case GDK_space:
+ if (dragging) {
+ sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate),
+ event->button.time);
+ dragging = false;
+ if (!event_context->within_tolerance) {
+ // we've been dragging, finish the rect
+ sp_arc_finish(ac);
+ }
+ // do not return true, so that space would work switching to selector
+ }
+ break;
+
default:
break;
}
diff --git a/src/rect-context.cpp b/src/rect-context.cpp
index b6c3315384918635cfac39ade944a4493d7b04c6..c8f9bf0f101d0b1e2cc9e3b50a79bf49b5f3dc13 100644 (file)
--- a/src/rect-context.cpp
+++ b/src/rect-context.cpp
@@ -400,6 +400,21 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent
case GDK_Escape:
sp_desktop_selection(desktop)->clear();
//TODO: make dragging escapable by Esc
+ break;
+
+ case GDK_space:
+ if (dragging) {
+ sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate),
+ event->button.time);
+ dragging = false;
+ if (!event_context->within_tolerance) {
+ // we've been dragging, finish the rect
+ sp_rect_finish(rc);
+ }
+ // do not return true, so that space would work switching to selector
+ }
+ break;
+
default:
break;
}
diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp
index bdc7c65c70bb5c2532127f1c0b1f9a2b796c8ef0..1fcbc29a9eb9927aa10b110c16613ce3dc5c1b41 100644 (file)
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
case GDK_Escape:
sp_desktop_selection(desktop)->clear();
//TODO: make dragging escapable by Esc
+ break;
+
+ case GDK_space:
+ if (dragging) {
+ sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate),
+ event->button.time);
+ dragging = false;
+ if (!event_context->within_tolerance) {
+ // we've been dragging, finish the rect
+ sp_spiral_finish(sc);
+ }
+ // do not return true, so that space would work switching to selector
+ }
+ break;
+
default:
break;
}
diff --git a/src/star-context.cpp b/src/star-context.cpp
index d6e9f85837cdb08590db09e35d3491f7afdc59f5..bb002ec893215ff57d463aa650336be6ab7f4d36 100644 (file)
--- a/src/star-context.cpp
+++ b/src/star-context.cpp
@@ -364,6 +364,21 @@ static gint sp_star_context_root_handler(SPEventContext *event_context, GdkEvent
case GDK_Escape:
sp_desktop_selection(desktop)->clear();
//TODO: make dragging escapable by Esc
+ break;
+
+ case GDK_space:
+ if (dragging) {
+ sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate),
+ event->button.time);
+ dragging = false;
+ if (!event_context->within_tolerance) {
+ // we've been dragging, finish the rect
+ sp_star_finish(sc);
+ }
+ // do not return true, so that space would work switching to selector
+ }
+ break;
+
default:
break;
}