Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-11-2004, 11:26 PM   #1
Registered: Jun 2004
Location: Beijing
Distribution: Slackware 9.1 but FUBAR with packages I compile myself, and OpenBSD (not exactly a distro) on QEMU
Posts: 153

Rep: Reputation: 35
Question GTK+ CList Internationalization

Software to hack: alsaplayer
Libraries involved: GTK+ 1.2

I'm using alsaplayer ( to play my music. I find that the playlist in the playlist window is not scrollable using the PageUp/PageDown keys; instead it goes straight to the first/last song in the list. I found (after reading the code, in interface/gtk/gladesrc.cpp, and which is also why I'm posting here, not in "Linux - Software") that the CList was put in a Viewport, and then the Viewport put in a ScrolledWindow.

So I tried to remove the Viewport, and put the CList directly in the ScrolledWindow. Now I can scroll the playlist perfectly using the PageUp/PageDown keys.

But there's another problem: now the playlist doesn't display Chinese characters (GB2312) correctly. It seems that the Viewport somehow "enabled" the loading of Chinese fonts and display them correctly. The weird thing is, all the other buttons are drawn with the Chinese font (the fonts are really different, and I'm using LC_CTYPE=zh_CN.gb2312 btw). Only the CList is not "internationalized".

Then I remembered how the file selection box displays my files with Chinese characters correctly. So I looked up the source (gtk+/gtkfilesel.c). The file selection box itself doesn't use a Viewport.

I believe locale support is already loaded, with a call to setlocale() in app/Main.cpp and gtk_set_locale() in interface/gtk/gtk.cpp. So what could be wrong?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Yast Text Translation For Internationalization strangedub SUSE / openSUSE 0 08-15-2005 01:46 PM
Slack 10.1 - Gnome internationalization skruf_man Slackware 1 07-12-2005 08:10 AM
GTK: how to write into a clist? Li... Programming 0 05-06-2005 07:17 PM
Internationalization problem skruf_man Amigo 2 11-23-2004 08:27 AM
clist pantera Programming 0 07-06-2004 02:41 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:53 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration