summaryrefslogtreecommitdiff
path: root/gtk/gtksearchenginesimple.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove simple search engineMatthias Clasen2020-01-311-386/+0
|
* gtk: Drop the "plus"Emmanuele Bassi2019-02-051-2/+2
| | | | Source names should use "[gtk]" without the plus.
* Replace gdk_threads_add_idle* with g_idle_add()Emmanuele Bassi2018-02-031-2/+2
| | | | | | | | | | | | | | | The main GDK thread lock is not portable and deprecated. The only reason why gdk_threads_add_idle() and gdk_threads_add_idle_full() exist is to allow invoking a callback with the GDK lock held, in case 3rd party libraries still use the deprecated gdk_threads_enter()/gdk_threads_leave() API. Since we're removing the GDK lock, and we're releasing a new major API, such code cannot exist any more; this means we can use the GLib API for installing idle callbacks. https://bugzilla.gnome.org/show_bug.cgi?id=793124
* Don't do remote checks on NULL filesРуслан Ижбулатов2016-02-041-1/+2
| | | | | | | | | | | | | | Calling _gtk_file_consider_as_remote() with a NULL argument results in warnings being thrown. Note that query->priv->location being NULL is a state that does not seem to be invalid by itself. This could happen if you do search-as-you-type in a filechooser, which has a filter that does not match anything *and* the current "place" selected is "Recent". https://bugzilla.gnome.org/show_bug.cgi?id=761552
* file chooser: Don't crawl recent://Matthias Clasen2015-07-301-1/+2
| | | | | | | This is unnecessary - all the recent files are in the model already. It also leads to duplicates, since our duplicate filtering is based on g_file_equal, which does not consider recent:///blabla with target-uri=/my/example to be the same as file:///my/example.
* Avoid more GFile<>uri roundtripsMatthias Clasen2015-07-271-1/+1
| | | | | | Make GtkSearchHit carry a GFile instead of an uri. Most of the search engines already have the object around, and converting to an uri and back is unnecessary extra work.
* search engine: Don't crawl remote locationsMatthias Clasen2015-07-271-8/+11
| | | | | This is slow, and causes too much network I/O. So skip locations that look like they are remote.
* Store locations as GFileMatthias Clasen2015-07-271-4/+3
| | | | | | It is a bit pointless to have the file chooser get a uri from an existing GFile to put in the query, only to have some of the search engines reconstruct a GFile from it.
* file chooser: Separate out delete and trashMatthias Clasen2015-07-061-0/+1
| | | | | | We only ever show one of the two context menu items (and we prefer Move to Trash over Delete). Only use the confirmation dialog when deleting.
* file chooser: Allow deleting filesMatthias Clasen2015-07-041-1/+2
| | | | | | | This is another often requestsed feature for save mode. Based on a patch by John Beard, https://bugzilla.gnome.org/show_bug.cgi?id=325150
* file chooser: Allow renaming filesMatthias Clasen2015-07-041-1/+2
| | | | | | | This has often been requested as a useful feature in save mode. Based on a patch by John Beard, https://bugzilla.gnome.org/show_bug.cgi?id=325150
* file chooser: Use access time for recent filesMatthias Clasen2015-07-041-1/+2
| | | | | Use access time for sorting the recent files, and show it in the list instead of mtime.
* file chooser: Make location column work betterMatthias Clasen2015-07-041-0/+1
| | | | | | | The location column did not work for search results in recent://. Fix that by looking at the target uri in this case. Show the location column in recent mode. And make it more similar to nautilus by showing the full path if it is not below $HOME.
* GtkSearchEngineSimple: Avoid a private structMatthias Clasen2015-06-191-40/+32
| | | | We can just make this type final, and avoid the private struct.
* GtkSearchEngine: Avoid a crashMatthias Clasen2015-06-191-1/+14
| | | | | | | | Add a destroy notify for the data of the callback, so we don't end up leaving a dangling pointer behind for a short while if the native engine is finalized before the simple one. This was showing up as crash when typing and backspacing in the search entry of the file chooser.
* GtkSearchEngine: Avoid crawling indexed locationsMatthias Clasen2015-06-191-1/+34
| | | | | Add a framework to the simple engine that allows to skip locations which are indexed by the native engine.
* GtkSearchEngine: Add recursive flagMatthias Clasen2015-06-181-1/+3
| | | | | | | Add a flag for recursive search, and implement non-recursive search in both the tracker and simple search engines. This is not currently used in the file chooser.
* Request the right attributes in the simple search engineMatthias Clasen2015-06-181-1/+5
| | | | | | This change makes it so that the file info passed along from the simple search engine has all the attributes that the file system model wants.
* search engine: Pass file infos along for hitsMatthias Clasen2015-06-181-13/+20
|
* GtkQuery: CleanupsMatthias Clasen2015-05-161-1/+1
| | | | | Strip leading underscores from GtkQuery api, and clean up the sources a bit.
* Rewrite search to be more similar to nautilusMatthias Clasen2015-05-161-173/+66
| | | | | The main advantage here is that this code works for remote locations as well.
* Rewrite simple search engine to use GFile and breadth orderРуслан Ижбулатов2015-05-011-62/+125
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=746916
* GtkSearchEngine: Drop unused functionalityMatthias Clasen2015-05-011-7/+0
|
* Formatting fixesMatthias Clasen2015-02-281-55/+55
|
* Use AC_USE_SYSTEM_EXTENSIONS to get _GNU_SOURCE, _XOPEN_SOURCE etc.Simon McVittie2014-08-211-8/+0
| | | | | | | | Similar to Bug #684123 in GLib. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=641638 Bug-Debian: https://bugs.debian.org/756476 Reviewed-by: Matthias Clasen
* Fix various warnings about unused thingsРуслан Ижбулатов2014-08-131-4/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=734735
* all: Name more idles and timeoutsBastien Nocera2014-03-261-2/+8
| | | | | | | | | | Following up from 438cd857c49242244dda2923ac447f36464b9e72, name more timeouts and idles. The original grep was missing checking for gdk_threads_add_*() functions (at least for some of the files). https://bugzilla.gnome.org/show_bug.cgi?id=726870
* gtk: Use new macros for defining private dataEmmanuele Bassi2013-07-091-4/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=702996
* Fix the build on SolarisMatthias Clasen2012-05-251-2/+2
| | | | http://bugzilla.gnome.org/show_bug.cgi?id=663991
* Change FSF AddressJavier Jardón2012-02-271-2/+1
|
* gtk/*: Use g_list_free_full() convenience functionJavier Jardón2012-01-051-2/+1
|
* GtkSearchEngineSimple: adapt the GLib thread api changesMatthias Clasen2011-11-011-6/+6
|
* Split off gtkprivate.hEmmanuele Bassi2010-10-201-0/+3
| | | | | | | | The gtkprivate.h header contains GtkWidget-specific private symbols that are not useful except in a handful of cases. Basically everything includes gtkprivate.h for the GTK_PARAM_* macros. https://bugzilla.gnome.org/show_bug.cgi?id=632539
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Mitch and Tim svn path=/trunk/; revision=20669
* gdk/gdkspawn.h gtk/gtkbuilderprivate.h gtk/gtkfilechoosersettings.cMichael Natterer2008-03-141-2/+0
| | | | | | | | | | | | | | | 2008-03-14 Michael Natterer <mitch@imendio.com> * gdk/gdkspawn.h * gtk/gtkbuilderprivate.h * gtk/gtkfilechoosersettings.c * gtk/gtksearchenginesimple.c * gtk/tests/liststore.c * gtk/tests/treestore.c: remove single-file includes of GLib headers or replace them by <glib.h> where needed. svn path=/trunk/; revision=19877
* Fixes for bug #480123.Emmanuele Bassi2007-09-251-12/+19
| | | | | | | | | | | | | | | | | 2007-09-25 Emmanuele Bassi <ebassi@gnome.org> Fixes for bug #480123. * gtk/gtksearchenginesimple.c: (gtk_search_engine_simple_dispose), (search_thread_done_idle): Cancel the file tree walking thread when disposing the search engine implementation. * gtk/gtkfilechooserdefault.c (search_stop_searching): Forcibly stop the search engine implementation when stopping the search, instead of just unreffing the object. svn path=/trunk/; revision=18865
* Make it compileMatthias Clasen2007-07-091-2/+2
| | | | svn path=/trunk/; revision=18414
* Address some thread-safety issues. (#452598)Matthias Clasen2007-07-091-4/+5
| | | | | | | | | | 2007-07-09 Matthias Clasen <mclasen@redhat.com> * gtk/gtksearchenginesimple.c: Address some thread-safety issues. (#452598) svn path=/trunk/; revision=18413
* Remove the MIME type calls and queries from the search engineEmmanuele Bassi2007-06-221-25/+1
| | | | | | | | | | | | | | 2007-06-22 Emmanuele Bassi <ebassi@gnome.org> * gtk/gtksearchenginebeagle.c: * gtk/gtksearchenginesimple.c: * gtk/gtksearchenginetracker.c: Remove the MIME type calls and queries from the search engine implementations, since we use our own GtkFileSystem to filter out basing on MIME types and we cannot query MIME types anyway. The GtkQuery private object still has MIME type, as well as location, support for future expansion. svn path=/trunk/; revision=18219
* Define GNU libc symbols unconditionallyEmmanuele Bassi2007-06-101-2/+5
| | | | | | | | | Unconditionally define _GNU_SOURCE and XOPEN_SOURCE, in order to make the simple search engine backend build on really ancient GNU libc (see bug 444097), which have ftw.h but need those symbols defined even to export a POSIX-like ftw() and friends. svn path=/trunk/; revision=18096
* Add check for GNU extensions to ftw()/nftw().Emmanuele Bassi2007-05-141-8/+23
| | | | | | | | | | | | 2007-05-14 Emmanuele Bassi <ebassi@gnome.org> * configure.in: Add check for GNU extensions to ftw()/nftw(). * gtk/gtksearchenginesimple.c: Fix compilation on systems with only POSIX-compliant ftw(). (#435797, based on a patch by Richard Hult) svn path=/trunk/; revision=17844
* Include <ftw.h> and use nftw() and all the symbols defined in <ftw.h>Emmanuele Bassi2007-05-131-6/+14
| | | | | | | | | 2007-05-13 Emmanuele Bassi <ebassi@gnome.org> * gtk/gtksearchenginesimple.c: Include <ftw.h> and use nftw() and all the symbols defined in <ftw.h> conditionally. svn path=/trunk/; revision=17836
* Assume Posix nftw behaviourMatthias Clasen2007-05-101-5/+3
| | | | svn path=/trunk/; revision=17812
* Remove spurious g_free() call.Emmanuele Bassi2007-05-031-2/+0
| | | | | | | | | 2007-05-03 Emmanuele Bassi <ebassi@gnome.org> * gtk/gtksearchenginesimple.c (search_engine_simple_finalize): Remove spurious g_free() call. svn path=/trunk/; revision=17786
* Add search file support in the GtkFileChooser. Original patch by FedericoEmmanuele Bassi2007-05-021-0/+378
2007-05-02 Emmanuele Bassi <ebassi@gnome.org> Add search file support in the GtkFileChooser. Original patch by Federico Mena Quintero; patch updated by Matthias Clasen. See bug #344785. * gtk/gtksearchengine.[ch]: Private search engine abstraction object. * gtk/gtksearchenginebeagle.[ch]: Private search engine implementation using libbeagle (via g_module_open()). * gtk/gtksearchenginesimple.[ch]: Private search engine implementation using file tree walking. * gtk/gtksearchenginetracker.[ch]: Private earch engine implementation using libtracker (via g_module_open()). * gtk/gtkquery.[ch]: Private query object for the search engines. * gtk/gtkfilechooserprivate.h: * gtk/gtkfilechooserdefault.c: Use the GtkSearchEngine to query a search engine backend using GtkQuery; create a new operating mode, OPERATION_MODE_SEARCH, and call the common operating mode OPERATION_MODE_BROWSE; add support for virtual shortcuts inside the shortcuts model and create a new "Search" virtual shortcut. * gtk/Makefile.am: Update the build with the new files svn path=/trunk/; revision=17783