diff options
author | Matsuu Takuto <matsuu@gentoo.org> | 2003-12-12 16:55:44 +0000 |
---|---|---|
committer | Matsuu Takuto <matsuu@gentoo.org> | 2003-12-12 16:55:44 +0000 |
commit | 8d5fb9b6c62130f6409d11f0c5d833850ddd8fd1 (patch) | |
tree | 51ade5d0068ceba330ed5b10f454d6d61724f681 /dev-util/anjuta | |
parent | Added XIM patch. (#35569) (diff) | |
download | gentoo-2-8d5fb9b6c62130f6409d11f0c5d833850ddd8fd1.tar.gz gentoo-2-8d5fb9b6c62130f6409d11f0c5d833850ddd8fd1.tar.bz2 gentoo-2-8d5fb9b6c62130f6409d11f0c5d833850ddd8fd1.zip |
Added XIM patch. (#35569)
Diffstat (limited to 'dev-util/anjuta')
-rw-r--r-- | dev-util/anjuta/ChangeLog | 5 | ||||
-rw-r--r-- | dev-util/anjuta/Manifest | 4 | ||||
-rw-r--r-- | dev-util/anjuta/anjuta-1.2.0.ebuild | 11 | ||||
-rw-r--r-- | dev-util/anjuta/files/anjuta-1.2.0_xim.patch | 205 |
4 files changed, 220 insertions, 5 deletions
diff --git a/dev-util/anjuta/ChangeLog b/dev-util/anjuta/ChangeLog index b53d1f9cdca8..8786de9f1aed 100644 --- a/dev-util/anjuta/ChangeLog +++ b/dev-util/anjuta/ChangeLog @@ -1,9 +1,12 @@ # ChangeLog for dev-util/anjuta # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/anjuta/ChangeLog,v 1.27 2003/12/08 17:05:32 foser Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/anjuta/ChangeLog,v 1.28 2003/12/12 16:55:40 matsuu Exp $ *anjuta-1.2.0 (08 Dec 2003) + 13 Dec 2003; MATSUU Takuto <matsuu@gentoo.org> anjuta-1.2.0.ebuild : + Added XIM patch. (#35569) + 08 Dec 2003; foser <foser@gentoo.org> anjuta-1.2.0.ebuild : First stable release of the gnome2 port minor dep fix diff --git a/dev-util/anjuta/Manifest b/dev-util/anjuta/Manifest index e8e15e462051..6c4fa7e7a5cc 100644 --- a/dev-util/anjuta/Manifest +++ b/dev-util/anjuta/Manifest @@ -1,7 +1,7 @@ -MD5 517d11330cb23af2db94ff204eea87f5 ChangeLog 3468 +MD5 df84a4411d6b5ff730c48cd743118fbd ChangeLog 3569 MD5 199c821c326a39c6ebe99618443156f0 anjuta-1.0.2.ebuild 1237 MD5 d15fb5815497bed48e1b2479573388a7 metadata.xml 214 -MD5 7e1a064b1c020ce30b70097013d3d2d6 anjuta-1.2.0.ebuild 1300 +MD5 628bf021e560a3c844aff7402747a763 anjuta-1.2.0.ebuild 1301 MD5 0c5445576bbd1e7b0e63504d4d455c7a anjuta-1.1.98.ebuild 1025 MD5 e85b6f172c9060236ecad97dd8d434e8 files/digest-anjuta-1.0.2 65 MD5 0f284888456dcc52d1e31626d114e3de files/digest-anjuta-1.1.98 66 diff --git a/dev-util/anjuta/anjuta-1.2.0.ebuild b/dev-util/anjuta/anjuta-1.2.0.ebuild index 6ef2fb151741..82c400e23635 100644 --- a/dev-util/anjuta/anjuta-1.2.0.ebuild +++ b/dev-util/anjuta/anjuta-1.2.0.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/anjuta/anjuta-1.2.0.ebuild,v 1.1 2003/12/08 17:05:32 foser Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/anjuta/anjuta-1.2.0.ebuild,v 1.2 2003/12/12 16:55:40 matsuu Exp $ -inherit gnome2 +inherit eutils gnome2 DESCRIPTION="A versatile IDE for GNOME" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" @@ -37,6 +37,13 @@ DOCS="AUTHORS COPYING ChangeLog FUTURE NEWS README THANKS TODO" MAKEOPTS="${MAKEOPTS} -j1" +src_unpack() { + unpack ${A} + + cd ${S} + epatch ${FILESDIR}/${P}_xim.patch +} + pkg_postinst() { gnome2_pkg_postinst diff --git a/dev-util/anjuta/files/anjuta-1.2.0_xim.patch b/dev-util/anjuta/files/anjuta-1.2.0_xim.patch new file mode 100644 index 000000000000..1b1ff515d8e0 --- /dev/null +++ b/dev-util/anjuta/files/anjuta-1.2.0_xim.patch @@ -0,0 +1,205 @@ +--- anjuta-1.2.0/scintilla/ScintillaGTK.cxx 2003-11-28 18:09:08.000000000 +0800 ++++ anjuta-1.2.0/scintilla/ScintillaGTK.cxx 2003-12-10 15:29:50.000000000 +0800 +@@ -52,9 +52,9 @@ + #include "ExternalLexer.h" + #endif + +-#if GTK_MAJOR_VERSION < 2 ++//#if GTK_MAJOR_VERSION < 2 + #define INTERNATIONAL_INPUT +-#endif ++//#endif + + #if !PLAT_GTK_WIN32 + #include <iconv.h> +@@ -106,9 +106,13 @@ + CLIPFORMAT cfColumnSelect; + #endif + #ifdef INTERNATIONAL_INPUT ++#if GTK_MAJOR_VERSION < 2 + // Input context used for supporting internationalized key entry + GdkIC *ic; + GdkICAttr *ic_attr; ++#else ++ GtkIMContext *im_context; ++#endif + #endif + // Wheel mouse support + unsigned int linesPerScroll; +@@ -198,6 +202,10 @@ + gint KeyThis(GdkEventKey *event); + static gint KeyPress(GtkWidget *widget, GdkEventKey *event); + static gint KeyRelease(GtkWidget *widget, GdkEventKey *event); ++#if GTK_MAJOR_VERSION >= 2 ++ static void Commit(GtkIMContext *context, char *str, ScintillaGTK *sciThis); ++ void CommitThis(char *str); ++#endif + static void Destroy(GtkObject *object); + static void SelectionReceived(GtkWidget *widget, GtkSelectionData *selection_data, + guint time); +@@ -264,8 +272,12 @@ + capturedMouse(false), dragWasDropped(false), + lastKey(0), parentClass(0), + #ifdef INTERNATIONAL_INPUT ++#if GTK_MAJOR_VERSION < 2 + ic(NULL), + ic_attr(NULL), ++#else ++ im_context(NULL), ++#endif + #endif + lastWheelMouseDirection(0), + wheelMouseIntensity(0) { +@@ -323,6 +335,7 @@ + gdk_window_show(widget->window); + gdk_cursor_destroy(cursor); + #ifdef INTERNATIONAL_INPUT ++#if GTK_MAJOR_VERSION < 2 + if (gdk_im_ready() && (ic_attr = gdk_ic_attr_new()) != NULL) { + gint width, height; + GdkColormap *colormap; +@@ -379,6 +392,12 @@ + gdk_im_begin(ic, widget->window); + } + } ++#else ++ im_context = gtk_im_multicontext_new(); ++ g_signal_connect(im_context, "commit", ++ G_CALLBACK(Commit), this); ++ gtk_im_context_set_client_window(im_context, widget->window); ++#endif + #endif + gtk_widget_realize(PWidget(wText)); + gtk_widget_realize(PWidget(scrollbarv)); +@@ -399,6 +418,7 @@ + gtk_widget_unrealize(PWidget(scrollbarv)); + gtk_widget_unrealize(PWidget(scrollbarh)); + #ifdef INTERNATIONAL_INPUT ++#if GTK_MAJOR_VERSION < 2 + if (ic) { + gdk_ic_destroy(ic); + ic = NULL; +@@ -407,6 +427,9 @@ + gdk_ic_attr_destroy(ic_attr); + ic_attr = NULL; + } ++#else ++ g_object_unref(im_context); ++#endif + #endif + if (GTK_WIDGET_CLASS(parentClass)->unrealize) + GTK_WIDGET_CLASS(parentClass)->unrealize(widget); +@@ -474,12 +497,21 @@ + + #ifdef INTERNATIONAL_INPUT + gint ScintillaGTK::CursorMoved(GtkWidget *widget, int xoffset, int yoffset, ScintillaGTK *sciThis) { ++#if GTK_MAJOR_VERSION < 2 + if (GTK_WIDGET_HAS_FOCUS(widget) && gdk_im_ready() && sciThis->ic && + (gdk_ic_get_style (sciThis->ic) & GDK_IM_PREEDIT_POSITION)) { + sciThis->ic_attr->spot_location.x = xoffset; + sciThis->ic_attr->spot_location.y = yoffset; + gdk_ic_set_attr (sciThis->ic, sciThis->ic_attr, GDK_IC_SPOT_LOCATION); + } ++#else ++ GdkRectangle area; ++ area.x = xoffset; ++ area.y = yoffset; ++ area.width = 1; ++ area.height = 1; ++ gtk_im_context_set_cursor_location(sciThis->im_context, &area); ++#endif + return FALSE; + } + #else +@@ -495,10 +527,14 @@ + sciThis->SetFocusState(true); + + #ifdef INTERNATIONAL_INPUT ++#if GTK_MAJOR_VERSION < 2 + if (sciThis->ic) + gdk_im_begin(sciThis->ic, widget->window); ++#else ++ gtk_im_context_focus_in(sciThis->im_context); + #endif +- ++#endif ++ + return FALSE; + } + +@@ -509,7 +545,11 @@ + sciThis->SetFocusState(false); + + #ifdef INTERNATIONAL_INPUT ++#if GTK_MAJOR_VERSION < 2 + gdk_im_end(); ++#else ++ gtk_im_context_focus_out(sciThis->im_context); ++#endif + #endif + + return FALSE; +@@ -537,6 +577,7 @@ + sciThis->Resize(allocation->width, allocation->height); + + #ifdef INTERNATIONAL_INPUT ++#if GTK_MAJOR_VERSION < 2 + if (sciThis->ic && (gdk_ic_get_style (sciThis->ic) & GDK_IM_PREEDIT_POSITION)) { + gint width, height; + +@@ -547,6 +588,7 @@ + gdk_ic_set_attr(sciThis->ic, sciThis->ic_attr, GDK_IC_PREEDIT_AREA); + } + #endif ++#endif + } + + void ScintillaGTK::Initialise() { +@@ -966,6 +1008,7 @@ + + int ScintillaGTK::KeyDefault(int key, int modifiers) { + if (!(modifiers & SCI_CTRL) && !(modifiers & SCI_ALT)) { ++/* + #if GTK_MAJOR_VERSION >= 2 + char utfVal[4]="\0\0\0"; + wchar_t wcs[2]; +@@ -1007,6 +1050,7 @@ + } + } + #endif ++*/ + if (key < 256) { + AddChar(key); + return 1; +@@ -1707,6 +1751,10 @@ + gint ScintillaGTK::KeyThis(GdkEventKey *event) { + //Platform::DebugPrintf("SC-key: %d %x [%s]\n", + // event->keyval, event->state, (event->length > 0) ? event->string : "empty"); ++#if GTK_MAJOR_VERSION >= 2 ++ if (gtk_im_context_filter_keypress(im_context, event)) ++ return 1; ++#endif + if (!event->keyval) { + return true; + } +@@ -1754,6 +1802,20 @@ + return FALSE; + } + ++#if GTK_MAJOR_VERSION >= 2 ++void ScintillaGTK::Commit(GtkIMContext *context, ++ char *str, ++ ScintillaGTK *sciThis) ++{ ++ sciThis->CommitThis(str); ++} ++ ++void ScintillaGTK::CommitThis(char *str) ++{ ++ AddCharUTF(str, strlen(str)); ++} ++#endif ++ + void ScintillaGTK::Destroy(GtkObject* object) { + ScintillaObject *scio = reinterpret_cast<ScintillaObject *>(object); + // This avoids a double destruction |