>> Read Reply from No. 0 article  
RE: qt 3.1.1 와 kdelibs 한글패치는 없을까요?

등록 2003-01-30 12:24:00     조회 6
이름 민우    

		제목 그대로 입니다.
 데비안에서 qt 3.1.1 소스를 다운받았는데 qt 3.1.1+cvs 20021220 일자 버전이네요...
 데비안 유저그룹의 carles 님이 올리신 패치(3.0.5용을 수정한 것)으로 패치를 해보았더니, 
한글입력이 깔끔하긴 한데, 이상하게 한글을 입력할 땐 커서 색깔이 글자색과 같은 검은색
으로 변해서 글자입력하는 모습이 보이지 않네요... (그러면 over the spot 과 별차이가 없습니
다. emoticon;emoticon  그리고 여전히 kate 도 한글입력이 자연스럽지 않습니다. 한글 자소단위입력 수정
이 안됩니다. 이것도 kdelibs를 패치해야 할 것 같은데...  혹시 qt 3.1.1 패치하신분 있으시면 
패치파일을 1원짜리 팁란에 올려주시면 감사하겠습니다. emoticon  참고로, 제가 사용한 carles 님
의 패치파일 수정한 것을 첨부합니다.  < qt-x11-free-3.1.1+cvs.20021220.patch 파일 >  --- qwidget.h.orig	
2002-10-30 10:54:12.000000000 +0900 +++ qwidget.h	2003-01-30 01:40:01.000000000 +0900 @@ -524,6 +524,9 @@
     int		 metric( int )	const;
 
     void	 resetInputContext();
+#ifndef KO_INPUT_PATCH
+    void	clearInputContext();
+#endif
 
     virtual void create( WId = 0, bool initializeWindow = TRUE,
 			 bool destroyOldWindow = TRUE );
--- qwidget_x11.cpp.orig	2002-12-18 22:16:37.000000000 +0900
+++ qwidget_x11.cpp	2003-01-30 01:40:14.000000000 +0900
@@ -136,7 +136,11 @@
 	    FocusChangeMask |
 	    ExposureMask |
 	    PropertyChangeMask |
+#ifndef KO_INPUT_PATCH
+		StructureNotifyMask
+#else
 	    StructureNotifyMask | SubstructureRedirectMask
+#endif
 	);
 
 const uint stdDesktopEventMask =			// X event mask
@@ -2538,6 +2542,24 @@
 #endif // QT_NO_XIM
 }
 
+#ifndef KO_INPUT_PATCH
+void QWidget::clearInputContext()
+{
+#ifndef QT_NO_XIM
+	if(qt_xim_style & XIMPreeditCallbacks)
+	{
+		QWidget *tlw = topLevelWidget();
+		QTLWExtra *topdata = tlw->topData();
+		createInputContext();
+		if(topdata->xic)
+		{
+			QInputContext *qic = (QInputContext *)topdata->xic;
+			qic->setFocus();
+		}
+	}
+#endif //QT_NO_XIM
+}
+#endif //KO_INPUT_PATCH
 
 void QWidget::focusInputContext()
 {
--- qapplication_x11.cpp.orig	2002-12-18 22:16:37.000000000 +0900
+++ qapplication_x11.cpp	2003-01-30 01:40:38.000000000 +0900
@@ -3145,8 +3145,10 @@
 		    if ( inPopupMode() ) // no focus widget, see if we have a popup
 		        keywidget = (QETWidget*) activePopupWidget();
 		    else if ( widget )
-		        keywidget = (QETWidget*)widget->topLevelWidget();
-	        }
+//		        keywidget = (QETWidget*)widget->topLevelWidget();
+		        keywidget = widget->focusWidget()?
+				(QETWidget*)widget->focusWidget():widget;
+ 	        }
 	    }
         }
--- qinputcontext_x11.cpp.orig	2002-11-06 03:18:11.000000000 +0900
+++ qinputcontext_x11.cpp	2003-01-30 08:26:11.000000000 +0900
@@ -229,8 +229,24 @@
 	    if (drawstruct->chg_length == 0)
 		drawstruct->chg_length = -1;
 
-	    qic->text.remove(drawstruct->chg_first, drawstruct->chg_length);
+//	    qic->text.remove(drawstruct->chg_first, drawstruct->chg_length);
 	    qt_compose_emptied = qic->text.isEmpty();
+#ifndef KO_INPUT_PATCH
+		if(!qt_compose_emptied&&drawstruct->chg_length>0)
+		{
+			int cursorPos = -1 * drawstruct->chg_length;
+			QString modifier = QString(getenv("XMODIFIERS"));
+			if(modifier.contains("Ami"))
+				cursorPos = -1;
+			if(modifier.contains("vje"))
+			{
+				QIMComposeEvent event(QEvent::IMCompose,
+						qic->text,cursor,sellen);
+				QApplication::sendEvent(qic->focusWidget,&event);
+			}
+		}
+#endif
+		qic->text.remove(drawstruct->chg_first,drawstruct->chg_length);
 	    if ( qt_compose_emptied ) {
 		// qDebug( "compose emptied" );
 		// don't send an empty compose, since we will send an IMEnd with
--- qt/src/kernel/qrichtext.cpp.orig	2003-01-09 11:02:33.000000000 +0900
+++ qt/src/kernel/qrichtext.cpp	2003-01-09 11:03:20.000000000 +0900
@@ -5356,10 +5356,13 @@
 	}
 	if ( row < 0x11 ) // no asian font
 	    return FALSE;
+#ifndef KO_INPUT_PATCH
+#else
 	if ( row > 0x2d && row < 0xfb || row == 0x11 )
 	    // asian line breaking. Everywhere allowed except directly
 	    // in front of a punctuation character.
 	    return TRUE;
+#endif
     }
     return FALSE;
 }
--- qt/src/dialogs/qfiledialog.cpp.orig	2003-01-09 11:06:27.000000000 +0900
+++ qt/src/dialogs/qfiledialog.cpp	2003-01-09 11:10:25.000000000 +0900
@@ -1036,6 +1036,9 @@
     // doesn't encode whitespaces
     static QString encodeFileName( const QString& fName ) {
 
+#ifndef KO_INPUT_PATCH
+	return fName;
+#else
 	QString newStr;
 	QCString cName = fName.utf8();
 	const QCString sChars(
@@ -1065,6 +1068,7 @@
 	    }
 	}
 	return newStr;
+#endif
     }
 
     static bool fileExists( const QUrlOperator &url, const QString& name )
@@ -3126,6 +3130,28 @@
 	    }
 	}
     }
+#ifndef KO_INPUT_PATCH
+	QString LineText = nameEdit->text();
+	int dot_pos = LineText.find(".");
+	int line_len = LineText.length();
+	if(f.compare("*.*") != 0 && line_len > 0 && LineText.contains('.') < 2
+			&& index >= 0)
+	{
+		if(dot_pos >= 0)
+		{
+			if(dot_pos != 0 && dot_pos < (line_len-1))
+			{
+				LineText = LineText.left(LineText.findRev("."));
+				LineText = f.right(f.length() - f.findRev("."));
+				nameEdit->setText(LineText);
+			}
+		} else
+		{
+			LineText += f.right(f.length() - f.findRev("."));
+			nameEdit->setText(LineText);
+		}
+	}
+#endif
     rereadDir();
 }
 
--- qlineedit.cpp.orig	2002-12-18 00:04:21.000000000 +0900
+++ qlineedit.cpp	2003-01-30 08:33:53.000000000 +0900
@@ -697,17 +697,21 @@
 	    // the X11 keyboard layout is broken and does not reverse
 	    // braces correctly. This is a hack to get halfway correct
 	    // behaviour
-	    if ( d->parag && d->parag->string() && d->parag->string()->isRightToLeft() ) {
-		QChar *c = (QChar *)t.unicode();
-		int l = t.length();
-		while( l-- ) {
-		    if ( c->mirrored() )
-			*c = c->mirroredChar();
-		    c++;
+
+#ifndef KO_INPUT_PATCH
+		if((d->preeditLength > 0) && (cursorPosition() >= 0) )
+		{
+			d->parag->remove(d->preeditStart,d->preeditLength);
+			d->cursor->setIndex(d->preeditStart);
 		}
-	    }
+#endif
 #endif
 	    insert( t );
+#ifndef KO_INPUT_PATCH
+	d->preeditStart = cursorPosition();
+	d->preeditLength = -1;
+	clearInputContext();
+#endif
 	    return;
 	}
     }
@@ -920,6 +924,12 @@
 	removeSelectedText();
 
     d->preeditStart = cursorPosition();
+	if(selectedText().length() > 0)
+	{
+		d->preeditStart -= selectedText().length();
+		cut();
+		emit textChanged(text());
+	}
     d->preeditLength = 0;
     setMicroFocusHint( d->cursor->x() - d->offset, d->cursor->y(), 0,
 	d->cursor->paragraph()->rect().height(), TRUE );
@@ -977,6 +987,14 @@
     d->parag->removeSelection( QTextDocument::IMCompositionText);
     d->parag->removeSelection( QTextDocument::IMSelectionText);
 
+#ifndef KO_INPUT_PATCH
+	if(e->cursorPos() < -1)
+	{
+		d->preeditStart = cursorPosition() + e->cursorPos();
+		d->preeditLength = QABS(e->cursorPos());
+	}
+#endif
+
     if (d->preeditLength > 0)
 	d->parag->remove(d->preeditStart, d->preeditLength);
     if ( d->preeditStart >= 0 ) {
--- qt/src/widgets/qtextedit.cpp.orig	2003-01-09 11:15:45.000000000 +0900
+++ qt/src/widgets/qtextedit.cpp	2003-01-09 11:19:44.000000000 +0900
@@ -1411,7 +1411,19 @@
 		    }
 		}
 #endif
+#ifndef KO_INPUT_PATCH
+	if(d->preeditLength > 0 && cursor->paragraph() )
+	{
+		cursor->paragraph()->remove(d->preeditStart,d->preeditLength);
+		cursor->setIndex(d->preeditStart);
+	}
+#endif
 		insert( t, TRUE, FALSE );
+#ifndef KO_INPUT_PATCH
+	d->preeditStart = cursor->index();
+	d->preeditLength = -1;
+	clearInputContext();
+#endif
 		break;
 	    } else if ( e->state() & ControlButton ) {
 		switch ( e->key() ) {
@@ -1522,6 +1534,8 @@
     if ( hasSelectedText() )
 	removeSelectedText();
     d->preeditStart = cursor->index();
+	if(selectedText().length() > 0)
+		d->preeditStart -= selectedText().length();
     e->accept();
 }
 
@@ -1542,6 +1556,8 @@
 	cursor->paragraph()->remove( d->preeditStart, d->preeditLength );
     cursor->setIndex( d->preeditStart );
     insert( e->text() );
+	if(d->preeditLength <= 0)
+		d->preeditStart = cursor->index() - e->text().length();
     d->preeditLength = e->text().length();
 
     cursor->setIndex( d->preeditStart + d->preeditLength );
@@ -1579,6 +1595,14 @@
     doc->removeSelection( QTextDocument::IMCompositionText);
     doc->removeSelection( QTextDocument::IMSelectionText);
 
+#ifndef KO_INPUT_PATCH
+	if(e->cursorPos() < -1)
+	{
+		d->preeditStart = cursor->index() + e->cursorPos();
+		d->preeditLength = QABS(e->cursorPos());
+	}
+#endif
+
     if ( d->preeditLength > 0 && cursor->paragraph() )
 	cursor->paragraph()->remove( d->preeditStart, d->preeditLength );
     if ( d->preeditStart >= 0 ) {
이름
암호


>> 관련글
  답장 RE: kde3.1을 쉽게 설치하자  병형군  2003.01.30  ....
  답장 RE: qt 3.1.1 와 kdelibs 한글패치는 없을까요?  민우  2003.01.30  ....
  목록보기 윗글 아랫글
글쓰기
답장쓰기 수정 삭제
정규표현식 [ 상세 검색 ]
페이지로딩: [ 0.15 초 ] 작업시간: [ 0 초 ]

Copyleft 1999-2026 by JSBoard Open Project
Theme Designed by IDOO All right reserved
[TOP]

적수네 동네
+
| 적수네 동네
| 공부방
| 리눅스 잡지 서고
| LSN 소스
| 링크 모음
+---+
게시판
+
| 떠들어보세!
| 질문과 답변
| 새소식과 정보
| 1원짜리 팁?
| 대화방
+---+
칼럼?
+
| 세하 훔쳐보기
| Welcome2nite
| 혜진의 염장판
+---+
리눅스 상표권
+
| 반대 서명란
| 토론 게시판
+---+
GNU
+
| GNU 선언문
| GNU GPL
| GNU 미러 목록
+---+
프로젝트?
+
| 리눅스카운터
| RC5DES
| 실질헌법 제작
+---+
커널 소식
+
| 안정 버젼: 2.4.14
+---+
테마 선택
+
LSN 방송국?
+
| OFF AIR
+---+
회원
+
| 로그인
+---+
[ 적수네 동네 ] [ 리눅스 상표권 독점 반대 ] [ 한글 리눅스 문서 프로젝트 ] [ KrLine ] [ 사랑넷 ] [ Valid HTML 4.0! ] [ SlashDot ] [ Freshmeat ]
Copyleft (C) 1998-2001 Byeong-Chan Kim . License
TIME: 1791013138
System by WYZsoft, HDD by I.O.Linux, Mizi Research, Embryo, WOWLINUX, Domain by SarangNet, Network by KrLine.