Commit: much unix clipboard work

From: Dom Lachowicz (doml@appligent.com)
Date: Fri Aug 30 2002 - 16:27:36 EDT

  • Next message: Dom Lachowicz: "Commit: UTF-8 text on the unix clipboard"

    The clipboard has been ticking me off lately, so I plan to have it
    working mostly properly by the end of the weekend.

    I added a new constructor for both TEXT importer and exporter which take
    in an szEncoding argument. The UNIX clipboard uses both of those with
    "UTF-8" as the szEncoding argument now.

    Now, we do post UTF-8 data to the clipboard for now under the text/plain
    alias, which sucks. We also get potentially non-UTF8 data from the
    clipboard and pretend that it is. This also sucks. But this is an
    improvement over our current behavior and not any worse than what we
    currently do.

    http://developer.gnome.org/doc/API/2.0/gtk/gtk-clipboards.html#gtk-clipboard-request-text

    I've finished rewriting the AP layer (AP_UnixApp, AP_UnixClipboard). I
    need to finish rewriting the XAP layer (XAP_UnixClipboard) to use the
    following 2 functions:

    gtk_clipboard_set_text, gtk_clipboard_wait_for_text

    Which deal with UTF-8 text for us. If another app requests UCS-2,
    ISO-8859-1, JIS, ... GTK+ will do the conversion for us, which is quite
    a big win and will allow for things like Chinese data to be pasted
    plain-text on the clipboard.

    After that, I need to handle CLIPBOARD vs. PRIMARY selections better, as
    I don't think our GTK2 port is capable of pasting to or from PRIMARY,
    which really sucks. After that, maybe I'll work on HTML import and a
    more-generic clipboard layer based around mime-types. No promises.

    Dom

    CVS:
    ----------------------------------------------------------------------
    CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
    CVS:
    CVS: Committing in .
    CVS:
    CVS: Modified Files:
    CVS: src/af/ev/unix/ev_UnixMenu.cpp
    CVS: src/af/xap/unix/xap_UnixClipboard.cpp
    CVS: src/af/xap/unix/xap_UnixClipboard.h
    CVS: src/wp/ap/unix/ap_UnixApp.cpp
    CVS: src/wp/ap/unix/ap_UnixClipboard.cpp
    CVS: src/wp/ap/unix/ap_UnixClipboard.h
    CVS: src/wp/impexp/xp/ie_exp_Text.cpp
    CVS: src/wp/impexp/xp/ie_exp_Text.h
    CVS: src/wp/impexp/xp/ie_imp_Text.cpp
    CVS: src/wp/impexp/xp/ie_imp_Text.h
    CVS:
    ----------------------------------------------------------------------



    This archive was generated by hypermail 2.1.4 : Fri Aug 30 2002 - 16:31:32 EDT