Re: [evolution-patches] Patch for GtkHTML and Composer, take two



On Tue, 2003-09-02 at 12:34, Federico Mena Quintero wrote:
> GtkHTML's editor control and the Evolution composer do not merge/unmerge
> their menu items appropriately, and this patch fixes it.
> 
> The most visible bug that gets fixed with this is when you hit
> Edit/Paste while on the subject line, and the clipboard contents get
> pasted in the message body.
> 
> OK to commit?

Hm, I have finally managed to test the patch, and I don't think it's a
good idea...

It causes the composer to completely remove the GtkHTML toolbar / menu
items when the focus is not in the editor widget, and the effect is a
bit disturbing:

	http://primates.ximian.com/~ettore/broken-composer.gif

I know the original behavior was quite broken as well, but here it looks
to me like the remedy is worse than the problem.

It's also a bit confusing that you do have cut/copy/paste keybinding
when you are in the to/cc/bcc/subject entries, but the corresponding
icons are only available if the focus is in the HTML.

Ideally we would want the following:

      * No items disappear at any given time.

      * The items that only work for the HTML text (e.g. "insert table",
        "insert link", "font size" etc.) are made insensitive when the
        focus is in the to/cc/bcc/subject entries, and made sensitive
        when the focus is in the HTML part.  (Of course if HTML is
        disabled they should be insensitive at all times.)

      * The items that should work for both the HTML text and the
        entries ("cut", "copy", "paste", "select all" etc.) should be
        sensitive both when the focus is in the HTML and when it's in
        the entries.  But then, they should dispatch the command where
        it's supposed to go, i.e. to the widget that has the focus... 
        (Maybe this can only be done by making to/cc/bcc having their
        own cut/copy/paste items.)

      * The items that don't really need a cursor to operate should be
        available and sensitive at all times; e.g. "Find" and "Replace"
        would probably be a bit annoying if they were insensitive when
        the focus is not in the main text.

I think we should revert the parts of this patch that have already been
committed to CVS, and restore the previous behavior until we come up
with something that is closer to correct.

(It's a bit sad that Bonobo makes this all so complicated; we should
probably make sure that the new menu merging code in GTK 2.4 doesn't
repeat the same mistakes...)

-- Ettore



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