PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:GtkTreeView search on windows. (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:GtkTreeView search on windows.


#228
cesutherland (User)
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
GtkTreeView search on windows. 5 Years ago Karma: 0  
I am having a problem with GtkTreeView search functionality on windows, which I believe pertains more to GTK2 than to php-gtk2 or my code.

I experience this problem in all GTK applications on my machine, Pidgin, for example.

The search functionality (Ctrl+F or lookahead find) within a GtkTreeView does not work properly. With Ctrl+F the entry pops up, but none of my text is entered. With lookahead find the first character I type is entered and that is it. The search works properly for that one character.

Has anyone else experienced this? Solved it?
 
  The administrator has disabled public write access.

#229
kksou (Admin)
Admin
Posts: 1680
graph
User Online Now Click here to see the profile of this user
Re:GtkTreeView search on windows. 5 Years ago Karma: 27  
Hi,

I think it's a bug with the windows version they provided on gtk.php.net.

I tried the mac compilation by Anant Narayanan: http://www.nabble.com/Installer-for-OS-X-to16555371.html

The interactive search is working fine.

Elizabeth: if you happen to see this post, would be really great if you could do all of us windows users a great favor to recompile the windows binary using the latest php-gtk cvs. I believe the problem with the interactive search will be fixed in the new compilation.

Regards,
/kksou
 
 
Last Edit: 2008/05/21 13:35 By kksou.
  The administrator has disabled public write access.

#230
cesutherland (User)
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
Re:GtkTreeView search on windows. 5 Years ago Karma: 0  
Hello, thank you for the quick reply.

The issue is not appearing just with php-gtk2 though. I also see it with C++ gtk applications such as Gimp and Pidgin. I am wondering if any other windows users experience this issue.

-carl
 
  The administrator has disabled public write access.
#232
kksou (Admin)
Admin
Posts: 1680
graph
User Online Now Click here to see the profile of this user
Re:GtkTreeView search on windows. 5 Years ago Karma: 27  
They just released PHP-GTK 2.0.1 on May 16!

I tried the interactive search for treeview on the new version. Seems like it’s still not fixed yet for the windows version.

Something’s different though. Last time in windows, you need to hit ctrl-F to start the interactive search. Now, like the linux version, you can just start typing. However, it stops at the first character, and doesn’t receive any more keyboard input.

So apparently it's working, but only for the first character.

Regards,
/kksou
 
  The administrator has disabled public write access.
#245
cesutherland (User)
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
Re:GtkTreeView search on windows. 4 Years, 12 Months ago Karma: 0  
One work-around I've found:

Use GtkTreeView->set_enable_search() to disable automatic interactive search.
Use GtkTreeView "start-interactive-search" to launch a dialog when interactive search is started manually with Ctrl+F.
Use GtkTreeView->set_search_entry() to set the search entry field to your own entry field within the dialog.

-carl
 
  The administrator has disabled public write access.
#247
kksou (Admin)
Admin
Posts: 1680
graph
User Online Now Click here to see the profile of this user
Re:GtkTreeView search on windows. 4 Years, 12 Months ago Karma: 27  
Hi Carl,

Your method is brilliant!

I just did a quick test. Yes, it worked!

I think this will benefit a lot of people who have migrated to v2.0/v2.0.1 and found that treeview interactive search is not working!

I will polish up the code and publish it tomorrow. I'm trying to see if I can automatically position the search window such that it appears as if it is the built-in one.

Regards,
/kksou
 
  The administrator has disabled public write access.
#248
cesutherland (User)
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
Re:GtkTreeView search on windows. 4 Years, 12 Months ago Karma: 0  
Great I would be interested to see the code!

What I have at the moment is part of a prototype and not so pretty, otherwise I would've posted it. I did have one issue where the "start-interactive-search" signal was raised twice, did you encounter this?

-carl
 
  The administrator has disabled public write access.
#260
kksou (Admin)
Admin
Posts: 1680
graph
User Online Now Click here to see the profile of this user
Re:GtkTreeView search on windows. 4 Years, 11 Months ago Karma: 27  
Hi Carl,

Here are the two of the sample codes first:

Sample Code 500: How to setup interactive search in GtkTreeView for PHP GTK v2.0 - Part 1 - non OOP version?

Sample Code 501: How to setup interactive search in GtkTreeView for PHP GTK v2.0 - Part 2 - OOP version using classes? Edit

Took me a while because I was trying to see if I can make the following work. And they did!

Part 3: on windows platform, the interactive search will automatically kicks in when you start typing any character in the treeview - just like what the users experience on the linux platform! Yes, you do not need to press Ctrl-F to start the interactive search!.

In Part 4: the interactive search box will automatically disappear after 3 seconds of inactivity.

Will release them once I polish up the codes.

Regards,
/kksou
 
  The administrator has disabled public write access.
#267
cesutherland (User)
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
Re:GtkTreeView search on windows. 4 Years, 11 Months ago Karma: 0  
Hey, everything looks good! Nice work.
 
  The administrator has disabled public write access.



Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Links - Classes - Social Business - BPM - Web - General
Copyright © 2006-2013. kksou.com. All Rights Reserved