On Thu, Sep 13, 2012 at 10:13 AM, Andrej N. Gritsenko <[email protected]> wrote: > Hello! > > I have written on Thursday, 13 September, at 4:27: >> And of course, main GUI engine will be some class that opens a search >>dialog and then watches for finished search so it can start new search or >>cancel current. And of course, search will be cancelled if user changes >>directory as well. > > Hmm, even not class! How about such API in libfm-gtk? > > gboolean fm_launch_search_simple(GtkWindow* parent, GAppLaunchContext* ctx, > FmLaunchFolderFunc func, gpointer user_data); > > I think it should be not more complicated than that. FmFolderView will > unref FmFolder on directory change so FmJob will be cancelled. And launch > of FmSearchJob will be initiated by parsing URI fm_launch_search_simple > generated for FmLaunchFolderFunc. Just one gtk+ API is enough. Keep it > simple! Of course, that will require 4 implementations: > 1) FmSearch engine; > 2) fm-file internal gvfs extender; > 3) 'search://' uri handler (which uses FmSearch for dir listing); > 4) 'not-wait-job-finish' flag and 'files-found' signal support in FmFolder. > > FmSearch engine for such implementation needs a lot of thinking yet. In > progress... > > With best wishes. > Andriy. > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Pcmanfm-develop mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pcmanfm-develop
Please wait for a moment and give me some time to finish my implementation. I'll comment on your new proposal later. Mine is 80% finished now and I consider it very clean. We can change it later if you really don't like the new implementation. The code is not yet pushed to git but I'll push it soon. The code written in GSoC 2010 by the student is not usable and has many problems. I'm rewriting this part myself now and will push the new code to git this week. All of the work is done in one single class, FmSearchJob, which is derived from FmDirListJob and that's all. Then change is totally backward compatible and does not affect any existing parts. I'll push them to git ASAP for you to review. I promise, there are no dirty hacks. :-) So please give me some time. Thanks a lot. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Pcmanfm-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pcmanfm-develop
