Re: Japanese Display for gtk+-1.2.9

2005-11-02 Thread Xyber Blue
Thanks for the hint Mr Suzuki,  I will work on it. I will try to rebuild the X-Window with no -DX_LOCALE.

I am also trying building gtk before Im posting this problem with the following:
     make CFLAGS=-DX_LOCALE

But still doesn't work...

I will post soon If I encounter some problem and still if it does not work.

This is a very big help for  us.  Thanks for your concern.

Best regards,
XyberOn 11/2/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:On Wed, 2 Nov 2005 14:43:57 +0800Xyber Blue <
[EMAIL PROTECTED]> wrote:>>>Could you compile xmbcs.c after replacing setlocale()>>>by _Xsetlocale() as following?>>After the said changes, the program successfully displayed the japanese
>characters.>>What does it mean??? What is the difference between the setlocale and>_Xsetlocale???_Xsetlocale() is an independent emulation of setlocale(),for X11 internal use.
When X11R6 was implemented, the open group decided to useANSI locale model for localization of X11 system. But,there were too many UNIX systems whose locale in libc arebroken, US-ASCII only, or 8bit only. To use multibyte
scripts like CJK on X11 on such systems, X11R6 introducedan emulation functions for required ANSI locale functions._Xsetlocale(), _Xmblen(), _Xmbtowc(), _Xmbstowcs(),_Xwctomb() and _Xwcstombs() were written for internal use.
When X11 is built with -DX_LOCALE flag, these emulationfunctions are built in libX11. If without -DX_LOCALE,these emulation functions are not used, original functionsin libc (setlocale(), mblen(), ...) are used.
See /usr/X11R6/include/X11/Xlocale.h. Even if -DX_LOCALEis on, the emulated functions are not published, butsetlocale() is replaced by _Xsetlocale() by cpp hooking.Keep it in mind: _Xsetlocale() should not be called explicitly.
Your problem is caused by the inconsistency of localehandlers: X11 is built with -DX_LOCALE, but gtk+-1.2.9is built without -DX_LOCALE.In your X11, locale related functions expects thatthe internal variables are initalized by _Xsetlocale()
in lib/X11/SetLocale.c. If they are not initialized,their default values are tuned as if LANG=C.In your gtk+-1.2.x, the locale handler is written ingdk_set_locale() in gdkim.c. It calls setlocale().
I think, your gtk+-1.2.9 calls setlocale() in libc,instead of _Xsetlocale().As a result, although locale functions in libc are correctlyset to LANG=ja_JP by calling setlocale(), X11 does not usethem at all and uninitialized emulation functions in LANG=C
mode.--In summary, there are 2 solutions.A) Rebuilding X11 without -DX_LOCALEB) Rebuilding gtk+-1.2.x with -DX_LOCALEAlthough I think X_LOCALE is fantastic system, I recommend A.
Because, there are too many "modern" applications that thedeveloper never test with -DX_LOCALE. In fact, most of Linuxdistriburions are shipped with X11 built without -DX_LOCALE.If using B solution, you may find many many sucking bugs that
the most Linux developer never found. In addition, recentlyX_LOCALE functionalities has not been maintained well (especiallyin XFree86 team products).--Why your X11 is built with -DX_LOCALE? I don't know.
I'm afraid the imake configuration files in xc/config/cfdoesn't know about FR-V processor, so configuration isfalled back into ancient Linux in libc5 era: whose localeis broken and X_LOCALE is required for CJK.

___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Japanese Display for gtk+-1.2.9

2005-11-02 Thread mpsuzuki
On Wed, 2 Nov 2005 16:50:58 +0800
Xyber Blue <[EMAIL PROTECTED]> wrote:

>Thanks for the hint Mr Suzuki, I will work on it. I will try to rebuild the
>X-Window with no -DX_LOCALE.
>
>I am also trying building gtk before Im posting this problem with the
>following:
>make CFLAGS=-DX_LOCALE
>
>But still doesn't work...

I remember the X_LOCALE detection method in configure
of gtk+-1.2 is not suitable for cross-development.

If you check symbols in libgdk-1.2.so (built with -DX_LOCALE) like:
nm -ap /usr/lib/libgdk-1.2.so.0 | fgrep setlocale
what do you receive?
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Japanese Display for gtk+-1.2.9

2005-11-02 Thread Xyber Blue
>>If you check symbols in libgdk-1.2.so (built with -DX_LOCALE) like:
 >>       nm -ap /usr/lib/libgdk-1.2.so.0 | fgrep setlocale
>>what do you receive?

[EMAIL PROTECTED] ~]# frv-linux-gnu-nm -ap /opt/gtk-dillo/lib/libgdk-1.2.so.0 | fgrep setlocale
 U setlocale@@GLIBC_2.3.4

That is the output. what's with the output???On 11/2/05, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:On Wed, 2 Nov 2005 16:50:58 +0800Xyber Blue <
[EMAIL PROTECTED]> wrote:>Thanks for the hint Mr Suzuki, I will work on it. I will try to rebuild the>X-Window with no -DX_LOCALE.>>I am also trying building gtk before Im posting this problem with the
>following:>make CFLAGS=-DX_LOCALE>>But still doesn't work...I remember the X_LOCALE detection method in configureof gtk+-1.2 is not suitable for cross-development.If you check symbols in 
libgdk-1.2.so (built with -DX_LOCALE) like:nm -ap /usr/lib/libgdk-1.2.so.0 | fgrep setlocalewhat do you receive?
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Japanese Display for gtk+-1.2.9

2005-11-02 Thread Xyber Blue
By the way, I successfully compiled the X-window without -DNO_LOCALE
and -DX_LOCALE support. When I try to execute testgtk with ja_JP.eucJP
locale I got a warning message:

 Gdk-WARNING **: locale not supported by C library

And the widgets will not convert the english text to japanese. 
What causes the problem??? Do I need to retain the -DNO_LOCALE option???On 11/2/05, Xyber Blue <[EMAIL PROTECTED]
> wrote:>>If you check symbols in 
libgdk-1.2.so (built with -DX_LOCALE) like:
 >>       nm -ap /usr/lib/libgdk-1.2.so.0 | fgrep setlocale
>>what do you receive?

[EMAIL PROTECTED] ~]# frv-linux-gnu-nm -ap /opt/gtk-dillo/lib/libgdk-1.2.so.0 | fgrep setlocale
 U setlocale@@GLIBC_2.3.4

That is the output. what's with the output???On 11/2/05, 
[EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
On Wed, 2 Nov 2005 16:50:58 +0800Xyber Blue <
[EMAIL PROTECTED]> wrote:>Thanks for the hint Mr Suzuki, I will work on it. I will try to rebuild the
>X-Window with no -DX_LOCALE.>>I am also trying building gtk before Im posting this problem with the
>following:>make CFLAGS=-DX_LOCALE>>But still doesn't work...I remember the X_LOCALE detection method in configureof gtk+-1.2 is not suitable for cross-development.If you check symbols in 
libgdk-1.2.so (built with -DX_LOCALE) like:nm -ap /usr/lib/libgdk-1.2.so.0 | fgrep setlocalewhat do you receive?



___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Japanese Display for gtk+-1.2.9

2005-11-02 Thread Xyber Blue
Im very sorry but I need to post this. If Im going to call locale command, i got this following messages:

 [EMAIL PROTECTED] gtk]# locale
  locale: Cannot set LC_CTYPE to default locale: No such file or directory
  locale: Cannot set LC_MESSAGES to default locale: No such file or directory
  locale: Cannot set LC_ALL to default locale: No such file or directory
  LANG=ja_JP.eucJP
  LC_CTYPE="ja_JP.eucJP"
  LC_NUMERIC="ja_JP.eucJP"
  LC_TIME="ja_JP.eucJP"
  LC_COLLATE="ja_JP.eucJP"
  LC_MONETARY="ja_JP.eucJP"
  LC_MESSAGES="ja_JP.eucJP"
  LC_PAPER="ja_JP.eucJP"
  LC_NAME="ja_JP.eucJP"
  LC_ADDRESS="ja_JP.eucJP"
  LC_TELEPHONE="ja_JP.eucJP"
  LC_MEASUREMENT="ja_JP.eucJP"
  LC_IDENTIFICATION="ja_JP.eucJP"
  LC_ALL=ja_JP.eucJP
Im just wondering the error above. Does it affects the problem???On 11/2/05, Xyber Blue <[EMAIL PROTECTED]> wrote:
By the way, I successfully compiled the X-window without -DNO_LOCALE
and -DX_LOCALE support. When I try to execute testgtk with ja_JP.eucJP
locale I got a warning message:

 Gdk-WARNING **: locale not supported by C library

And the widgets will not convert the english text to japanese. 
What causes the problem??? Do I need to retain the -DNO_LOCALE option???On 11/2/05, Xyber Blue <
[EMAIL PROTECTED]
> wrote:>>If you check symbols in 

libgdk-1.2.so (built with -DX_LOCALE) like:
 >>       nm -ap /usr/lib/libgdk-1.2.so.0 | fgrep setlocale
>>what do you receive?

[EMAIL PROTECTED] ~]# frv-linux-gnu-nm -ap /opt/gtk-dillo/lib/libgdk-1.2.so.0 | fgrep setlocale
 U setlocale@@GLIBC_2.3.4

That is the output. what's with the output???On 11/2/05, 

[EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
On Wed, 2 Nov 2005 16:50:58 +0800Xyber Blue <
[EMAIL PROTECTED]> wrote:>Thanks for the hint Mr Suzuki, I will work on it. I will try to rebuild the
>X-Window with no -DX_LOCALE.>>I am also trying building gtk before Im posting this problem with the
>following:>make CFLAGS=-DX_LOCALE>>But still doesn't work...I remember the X_LOCALE detection method in configureof gtk+-1.2 is not suitable for cross-development.If you check symbols in 
libgdk-1.2.so (built with -DX_LOCALE) like:nm -ap /usr/lib/libgdk-1.2.so.0 | fgrep setlocalewhat do you receive?





___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: GTK+ or GTK?

2005-11-02 Thread Jose Hevia
> On Tue, Nov 01, 2005 at 11:29:40PM +0100, yordy wrote:
> > GTK+ is GTK-2.x, they are the same?
> > I want to install XFCE desktop environment,
> 
> The package names seem to indicate you have Fedora Core 4.
> If it's so, please just install XFce with you favourite
> package manager and don't try to compile anything.  The
> distro comes with XFce 4.2.2.
> 
> > but the
> > installer say: Gtk+ >= 2.2.0... not found.
> > I have installed all this gtk packages:
> > 
> > gtk+-1.2.10-39
> > gtk-engines-0.12-7
> > gtk2-2.8.6-1.1.fc4.nr
> > gtk2-engines-2.6.5-1.1.fc4.nr
> 
> RedHat GTK+ package naming is
> 
> gtk+ == GTK+ 1.2.x
> gtk2 == GTK+ 2.x
> 
> They are practically two independent libraries and they can
> be installed both.

They are two independent libraries, with no backwards compatibility.

Programs that use gtk1.2: xmms(right click and see the fonts without 
antialising).
Programs that use gtk2.x: amule(recent), gimp, Inkscape, Beep Media 
Player(xmms fork), xmms2. 

___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Japanese Display for gtk+-1.2.9

2005-11-02 Thread mpsuzuki

Xyber Blue wrote:
 >>If you check symbols in libgdk-1.2.so  (built 
with -DX_LOCALE) like:

 >>   nm -ap /usr/lib/libgdk-1.2.so.0 | fgrep setlocale
 >>what do you receive?

[EMAIL PROTECTED] ~]# frv-linux-gnu-nm -ap 
/opt/gtk-dillo/lib/libgdk-1.2.so.0 | fgrep setlocale

 U setlocale@@GLIBC_2.3.4

That is the output. what's with the output???


It means your gtk+-1.2.x is built to use locale in libc.
It does not call _Xsetlocale(). Therefore, it will fail
as the first test with xmbcs.c.

If it is configured to use _Xsetlocale(), libgdk-1.2.so.0
won't call setlocale().

___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Japanese Display for gtk+-1.2.9

2005-11-02 Thread mpsuzuki
On Wed, 2 Nov 2005 18:36:33 +0800
Xyber Blue <[EMAIL PROTECTED]> wrote:

>Im very sorry but I need to post this. If Im going to call locale command, i
>got this following messages:

Before all, I recommend you to work with non-root account.

>[EMAIL PROTECTED] gtk]# locale
>locale: Cannot set LC_CTYPE to default locale: No such file or directory
>locale: Cannot set LC_MESSAGES to default locale: No such file or directory
>locale: Cannot set LC_ALL to default locale: No such file or directory

When you receive "No such file or directory" error, you
should strace to know what file/directory is tried and
if the file is exist/permitted access etc.
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


shaped buttons

2005-11-02 Thread Andrew Shafer

Can I get the gdkwindow from a button?

Or what is the best way to make an arbitrary shaped button?



___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Full redraw of root window

2005-11-02 Thread Ian King

Hi,

Is is possible for gtk to force a redraw of the entire root window.  
With gnome 2.10 on Fedora Core at least, when I draw to the root window 
using gdk_draw_line with the drawable being the gdk_root_parent, a call to


  gdk_window_invalidate_rect (gdk_root_parent, default_pointer, 
True)

  gdk_window_process_updates (gdk_root_parent, True)

does not remove the line, is there a way I can force the root window to 
redraw itself and all of its children and therefore remove any drawings 
that I have drawn using gdk_root_parent.


Thanks for your time

Ian King

___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Japanese Display for gtk+-1.2.9

2005-11-02 Thread Xyber Blue
By the way, how to enable -DX_LOCALE in gtk+-1.2.9??? 
Is the make CFLAGS=-DX_LOCALE enough to enable this???On 11/2/05, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:On Wed, 2 Nov 2005 18:36:33 +0800Xyber Blue <
[EMAIL PROTECTED]> wrote:>Im very sorry but I need to post this. If Im going to call locale command, i>got this following messages:Before all, I recommend you to work with non-root account.
>[EMAIL PROTECTED] gtk]# locale>locale: Cannot set LC_CTYPE to default locale: No such file or directory>locale: Cannot set LC_MESSAGES to default locale: No such file or directory>locale: Cannot set LC_ALL to default locale: No such file or directory
When you receive "No such file or directory" error, youshould strace to know what file/directory is tried andif the file is exist/permitted access etc.
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Japanese Display for gtk+-1.2.9

2005-11-02 Thread Xyber Blue
>>> [EMAIL PROTECTED] ~]# frv-linux-gnu-nm -ap>>> /opt/gtk-dillo/lib/libgdk-1.2.so.0 | fgrep setlocale>>>          U setlocale@@GLIBC_2.3.4>> That is the output. what's with the output???
>>It means your gtk+-1.2.x is built to use locale in libc.
>>It does not call _Xsetlocale(). Therefore, it will fail
>>as the first test with xmbcs.c.

>>If it is configured to use _Xsetlocale(), libgdk-1.2.so.0
>>won't call setlocale().

mpsuzuki Im very sorry for my previous reply. It seems that this cross compiled gtk doesn't use -DXLOCALE.

The ouput of cross compiled gtk built with -DX_LOCALE is this:

*
  ]# frv-linux-gnu-nm -ap
/nfs/rootgtk98/rootfs-glibc-frv-040820-3/opt/gtk-dillo/lib/libgdk-1.2.so.0
|  fgrep setlocale
 U _Xsetlocale*
It seems that it does not give anything. I edited the .c files
containing setlocale to _Xsetlocale but when I try to set
LC_ALL=ja_JP.eucJP, it does not convert english text to japanese text
 Instead, it only display english text-DX_LOCALE is already
enabled at this time. 
On 11/3/05, Xyber Blue <[EMAIL PROTECTED]> wrote:
By the way, how to enable -DX_LOCALE in gtk+-1.2.9??? 
Is the make CFLAGS=-DX_LOCALE enough to enable this???On 11/2/05, 
[EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
On Wed, 2 Nov 2005 18:36:33 +0800Xyber Blue <
[EMAIL PROTECTED]> wrote:>Im very sorry but I need to post this. If Im going to call locale command, i
>got this following messages:Before all, I recommend you to work with non-root account.
>[EMAIL PROTECTED] gtk]# locale>locale: Cannot set LC_CTYPE to default locale: No such file or directory>locale: Cannot set LC_MESSAGES to default locale: No such file or directory>locale: Cannot set LC_ALL to default locale: No such file or directory
When you receive "No such file or directory" error, youshould strace to know what file/directory is tried andif the file is exist/permitted access etc.


___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Japanese Display for gtk+-1.2.9

2005-11-02 Thread mpsuzuki
On Thu, 3 Nov 2005 12:29:22 +0800
Xyber Blue <[EMAIL PROTECTED]> wrote:

 [EMAIL PROTECTED] ~]# frv-linux-gnu-nm -ap
 /opt/gtk-dillo/lib/libgdk-1.2.so.0 | fgrep setlocale
 U setlocale@@GLIBC_2.3.4

 That is the output. what's with the output???
>
>>>It means your gtk+-1.2.x is built to use locale in libc.
>>>It does not call _Xsetlocale(). Therefore, it will fail
>>>as the first test with xmbcs.c.
>
>>>If it is configured to use _Xsetlocale(), libgdk-1.2.so.0
>>>won't call setlocale().
>
>mpsuzuki Im very sorry for my previous reply. It seems that this cross
>compiled gtk doesn't use -DXLOCALE.

I think your cross building can screw up header files of host 
and target system.

>It seems that it does not give anything. I edited the .c files
>containing setlocale to _Xsetlocale

I think It is insufficient to use X_LOCALE. What you receive
when you execute?

frv-linux-gnu-nm -ap /opt/gtk-dillo/lib/libgtk-1.2.so.0 | fgrep alnum

___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Japanese Display for gtk+-1.2.9

2005-11-02 Thread Xyber Blue
>>I think It is insufficient to use X_LOCALE. What you receive
>>when you execute?

 >>       frv-linux-gnu-nm -ap /opt/gtk-dillo/lib/libgtk-1.2.so.0 | fgrep alnum

With -DX_LOCALE (No output)
]# frv-linux-gnu-nm -ap /nfs/rootgtk98/rootfs-glibc-frv-040820-3/opt/gtk-dillo/lib/libgtk-1.2.so.0 | fgrep alnum
   
Without -DX_LOCALE
]# frv-linux-gnu-nm -ap
/nfs/rootgtk-jap-20051018/rootgtk99/rootfs-glibc-frv-040820-3/opt/gtk-dillo/lib/libgtk-1.2.so.0
| fgrep alnum
 U iswalnum@@GLIBC_2.3.4



On 11/3/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:On Thu, 3 Nov 2005 12:29:22 +0800Xyber Blue <
[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] ~]# frv-linux-gnu-nm -ap /opt/gtk-dillo/lib/libgdk-1.2.so.0 | fgrep setlocale U setlocale@@GLIBC_2.3.4
 That is the output. what's with the output???It means your gtk+-1.2.x is built to use locale in libc.>>>It does not call _Xsetlocale(). Therefore, it will fail
>>>as the first test with xmbcs.c.If it is configured to use _Xsetlocale(), libgdk-1.2.so.0>>>won't call setlocale().>>mpsuzuki Im very sorry for my previous reply. It seems that this cross
>compiled gtk doesn't use -DXLOCALE.I think your cross building can screw up header files of hostand target system.>It seems that it does not give anything. I edited the .c files>containing setlocale to _Xsetlocale
I think It is insufficient to use X_LOCALE. What you receivewhen you execute?frv-linux-gnu-nm -ap /opt/gtk-dillo/lib/libgtk-1.2.so.0 | fgrep alnum
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Japanese Display for gtk+-1.2.9

2005-11-02 Thread mpsuzuki
On Thu, 3 Nov 2005 13:43:22 +0800
Xyber Blue <[EMAIL PROTECTED]> wrote:

>>>I think It is insufficient to use X_LOCALE. What you receive
>>>when you execute?
>
>>> frv-linux-gnu-nm -ap /opt/gtk-dillo/lib/libgtk-1.2.so.0 | fgrep alnum
>
>With -DX_LOCALE (No output)
>]# frv-linux-gnu-nm -ap
>/nfs/rootgtk98/rootfs-glibc-frv-040820-3/opt/gtk-dillo/lib/libgtk-1.2.so.0 |
>fgrep alnum

that's ok - iswalnum is locale function in libc. if using
X_LOCALE, it shouldn't be refered. show me strace output
when you execute small gtk test program.
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Changing the GtkButton appearence

2005-11-02 Thread sadhees kumar
Dear Friends, 
I want to display my button widget with different look.
    Is there any way to change the appearence of GtkButton from rectangle to ellipse? 
    if anybody achieved this, attach the sample code.
    Thanks in advance. _Regards,K.Sadheeskumar. 
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list