Thread: iLiad FBReader
View Single Post
Old 12-29-2008, 11:49 AM   #75
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by Antartica View Post
Hardware buttons only works if the application in registered to th X server as "sh". In gtk1.x this is done with

gtk_window_set_wmclass(GTK_WINDOW(my_main_window), "sh", "sh");
What's the difference between "gtk_window_set_title() " and "gtk_window_set_wmclass()"?
According to info provided in iRex Forum, iRex used gtk_window_set_title() in their app.
I have a strange problem now. I used the two lines independently in FBReader code,
Code:
gtk_window_set_title(GTK_WINDOW(myMainWindow), "fbreader");
	gtk_window_set_wmclass(GTK_WINDOW(myMainWindow), "sh", "sh");
And I have modified registry.xml with (for each case)
Code:
<xResourceName>fbreader</xResourceName>
<xResourceName>sh</xResourceName>
The result is only the case of gtk_window_set_wmclass() works. FBreader can get flipbar event in the case.

When I test the two case with my homebrew image viewer, both case work.

Now that I am trying to make djview4 (based on QT) work with flipbar, I found that setWindowTitle() (a QT function to set window title) doesn't work, either.

I might have to read source code of contetlister to understand how does CL do the job.

Last edited by ericshliao; 12-29-2008 at 12:24 PM.
ericshliao is offline   Reply With Quote