Patch for Delete key behavior (for dia-0.96.1)



Hello.

I send a patch for the Delete key behavior in Dia. It is remapped to
Ctrl+Delete (or remap it some other suitable shortcut), since a lot of
people find it annoying that pressing Delete while editing text deletes
the object.

It seems that different person chose Delete key for menu and other
person wrote the text_key_event (lib/text.c:795) -- if Delete is not
grabbed by menu, pressing Delete while editing text behaves as one would
expect.

Also, menus_init() (at app/menus.c:465, where ~/.dia/menurc shortcuts
are set up) is called before menus_initialize_updatable_items
(app/menus.c:768), which makes Dia ditch all user-chosen settings in the
menurc file.

Those are just minor nuisances, but fixing the delete key behavior makes
working with Dia much more comfortable.

Cheers,
  O. Mikle
diff -aur dia-0.96.1-old/app/menus.c dia-0.96.1/app/menus.c
--- dia-0.96.1-old/app/menus.c  2007-03-04 21:39:24.000000000 +0100
+++ dia-0.96.1/app/menus.c      2007-09-21 23:20:13.000000000 +0200
@@ -92,7 +92,7 @@
     { "EditCut", GTK_STOCK_CUT, NULL, "<control>X", NULL, G_CALLBACK (edit_cut_callback) },
     { "EditPaste", GTK_STOCK_PASTE, NULL, "<control>V", NULL, G_CALLBACK (edit_paste_callback) },
     { "EditDuplicate", NULL, N_("_Duplicate"), "<control>D", NULL, G_CALLBACK (edit_duplicate_callback) },
-    { "EditDelete", GTK_STOCK_DELETE, NULL, "Delete", NULL, G_CALLBACK (edit_delete_callback) },
+    { "EditDelete", GTK_STOCK_DELETE, NULL, "<control>Delete", NULL, G_CALLBACK (edit_delete_callback) },
 
     /* the following used to bind to <control><shift>C which collides with Unicode input. 
      * <control>>alt> doesn't work either */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]