GTK+ CList Internationalization
Software to hack: alsaplayer
Libraries involved: GTK+ 1.2
I'm using alsaplayer (http://www.alsaplayer.org/) 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?
|All times are GMT -5. The time now is 03:11 AM.|