Code

Make guidelines quickly deletable by using Ctrl+click (is Ctrl a suitable modifier...
authorcilix42 <cilix42@users.sourceforge.net>
Sun, 27 Jan 2008 14:00:23 +0000 (14:00 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Sun, 27 Jan 2008 14:00:23 +0000 (14:00 +0000)
src/desktop-events.cpp

index a2ad8103b58d6c4c4fdb285dd375e1e22204d7db..503f24c43f4a23c6cd4bda632256d5c190cf3357 100644 (file)
@@ -189,6 +189,13 @@ gint sp_dt_guide_event(SPCanvasItem *item, GdkEvent *event, gpointer data)
             break;
        case GDK_BUTTON_PRESS:
             if (event->button.button == 1) {
+                if (event->button.state & GDK_CONTROL_MASK) {
+                    SPDocument *doc = SP_OBJECT_DOCUMENT(guide);
+                    sp_guide_remove(guide);
+                    sp_document_done(doc, SP_VERB_NONE, _("Delete guide"));
+                    ret = TRUE;
+                    break;
+                }
                 dragging = true;
                 sp_canvas_item_grab(item,
                                     ( GDK_BUTTON_RELEASE_MASK  |