Re: Patch for Delete key behavior (for dia-0.96.1)



On Wed, 2007-09-26 at 20:07 +0530, Sameer Sahasrabuddhe wrote:
On 9/26/07, Ondrej Mikle <ondrej mikle gmail com> wrote:
Maciej Jaros wrote:
BTW I think that a nicer workaround would be to have a working Delete
key for removing any objects unless some text is active. If some text is
active (a cursor is visible) then use delete normally and Ctrl+Delete
for removing objects.

I could make such patch, it is not so hard; though lots of objects have
text in them, so most of the time you'd be using Ctrl+Del (since
clicking an object with text gives focus to the text immediately) and
Delete just a few times. Which is IMHO more confusing.

Just to clue people in, the proposed solution is a actually a "text
editing" mode, that over-rides all Dia key bindings, not just Delete.
When you are editing the text in some object, the operation is "modal"
... which means nothing else works until you somehow signal the app
that you have stopped editing the text.

As an analogy, recall what happens when you are renaming a file in the
file browser ... Explorer in windows, or Nautilus in Gnome. While you
are editing the name of the file, how often do you really think about
deleting that file or others altogether? All editor commands only
affect the name of the file in that mode. Other actions start working
only when you press escape or enter, or maybe click somewhere else,
thus leaving the name editing mode.

Lars is currently working on implementing that mode, and I am sure he
will appreciate help in terms of patches if people are interested. Why
spend time on workarounds when we could get the real fix in, instead!

Bravo!  Bravo!  You've summarized my plan eloquently.  This is why I was
asking for what the most reasonable way to enter a text mode would be -
unfortunately, no clear answer came up.  However, making the code that
switches between the two modes could be done even before that is sorted
out -- keyboard accelerator changes need to be about the same anyway.

For exiting text mode, I figure Esc or clicking on other parts of the
diagram.  Tab should go to the next object selected that has editable
text.  I probably should stop fighting the crappy group implementation
and look to text again.

-Lars




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