summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* query-editor: use entries on the search barwip/csoriano/search-popoverCarlos Soriano2016-02-033-10/+82
| | | | | | | | | | | | It's important to give feedback even when the search popover is closed about which filters are in place. This is only achievable if the search bar shows some labels tags as gnome-photos or gnome-documents does. Unfortunately we don't have this tool in gtk+ yet, so we need to use libgd. So implement the query-editor with a custom GdtaggedEntry and update the libgd subrepository to apply the latest style changes.
* search-popover: provide function to reset date and mime typeCarlos Soriano2016-02-032-18/+35
| | | | | | | And use it internally. Better than setting up the widgets by hand every time we wanted a reset. It's made public because we are going to use it in a upcoming patch.
* search: export mime types utilitiesCarlos Soriano2016-02-034-187/+225
| | | | | | Use the same mimetypes utilities and extract the functions to mime-actions to clean it up and being able to be used outside of the search popover class.
* search-popover: merge and clean up date formattingCarlos Soriano2016-02-033-97/+124
| | | | So we use the same function all over.
* query-editor: update information label accordinglyCarlos Soriano2016-02-031-33/+61
| | | | Update the label shown below the search bar when preferences change.
* search-engine-model: remove debug spewCarlos Soriano2016-02-031-4/+0
|
* preferences: add remote and local recursive searchCarlos Soriano2016-02-037-319/+670
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using a switch in the search popover. The search popover is meant to be as a temporary filter. That means that the "Search subfolders" switch that was present there was reset every time a new search was performed. Even if the nature of the popover is temporary and therefore should be understandable that the switch is also temporary, this can bring confusion in such a sensible matter. To avoid confusion, add two preferences, one for remote file systems and one for local file systems to allow the choice to make a recursive or non recursive search, and remove the switch to avoid frustration. Also, I expect this choice to be more a permanent one than a temporary one, as in, I expect users to what they really want is to make a permanent choice whether they want recursive search or not. For local file systems, on what I can gather, either wants to emulate the type-ahead search, because it's file system is slow to perform a recursive search and will always be, therefore a permanent choice, or the opposite where the file system of the user is fast enough to perform a recursive search, which will most of the cases be like that, and therefore also a permanent choice. For remote file systems is similar. Either the internet connection of the user is fast enough for the whole session or use, therefore wants recursive search always enabled, or it's not, and therefore it doesn't want recursive search enabled.
* preferences-dialog:update modelineCarlos Soriano2016-02-031-1/+1
|
* search: rename recursive to local and remoteCarlos Soriano2016-02-034-11/+11
| | | | For clarity.
* search-popover: disconnect old query signalsCarlos Soriano2016-02-031-2/+2
| | | | Just a thynko/typo.
* search-popover: use single signals for changesCarlos Soriano2016-02-032-33/+49
| | | | | | It's more flexible and better to maintain different signals for different changes, rather than a single signal with a single generic parameter.
* query: make date range retrieval thread safeCarlos Soriano2016-02-034-0/+19
| | | | | We are accessing it from multiple threads of the search, so we need to make sure we don't free it in the middle.
* search: use range of datesCarlos Soriano2016-02-039-178/+250
| | | | | | | | | | This was not implemented. We want to differenciate between a range of days we want to search for and a specific date, as set on the mockups. The calendar selector will be specific dates, whether the days selector will be a "since". Also on the way fix various things and code preferences.
* search-popover: use full more descriptive var nameCarlos Soriano2016-02-021-9/+9
| | | | "n" is not really useful.
* files-view: don't remove floating bar in an idleCarlos Soriano2016-02-021-1/+5
| | | | | | | | | | | | | | | | | | If the view is still loading. This happens when we schedule an idle to update the selection info to display it in the floating bar, but selection becomes null. Then the idle callback will remove the floating bar because the status is none. But that is wrong, because the floating bar is used for more than to display the selection. We use it for displaying whether the view is loading or searching, so if that happens we were removing the floating bar. To fix it, check in the idle callback for the other use case of the floating bar, that means if it's still loading, and do nothing in that case since that is taken care in a different code path.
* query-editor: use is_* instead of !is_Carlos Soriano2016-02-021-2/+2
| | | | | | | | | | | | | | An element within the group that complies a property A doesn't mean the element automatically complies property B if we don't know previously that those properties are mutual exclusive. This can bring misbehavior if at some point a property C is introduced making the other two non mutual exclusive. Basically, it's better to check for the property you are going to assume on the code than the opposite mutual exclusive property. Also, is usually easier to understand what an element is than what is not.
* query-editor: use the priv struct pointerCarlos Soriano2016-02-021-36/+36
| | | | | Using a generic create_and_get_query is slighly misleading to understand when or not should be the query created.
* files-view: remove remote warning barCarlos Soriano2016-02-023-34/+0
| | | | We use it now directly in the search bar.
* files-view: reduce floating bar delayCarlos Soriano2016-02-021-1/+1
| | | | | | | | I was confused even for a few miliseconds plus the idle time why there was no searching going on. So decrease the floating bar delay to the point it only won't appear if the user wouldn't have time to look for a hint to know if the view was searching or not.
* query-editor: update query location on query editor locationCarlos Soriano2016-02-021-2/+2
| | | | | | We need to update it and create the query if it's not created already. In this way, when the user changes location the query and therefore the popover will acknowledge it and update its widgets.
* search-popover: update the switch when there is queryCarlos Soriano2016-02-021-1/+1
| | | | | | We need to update the switch also when there is already a query, since the query can change location and we would want to update the backing setting to reflect if the file is remote or not.
* query: return an invalid value on errorCarlos Soriano2016-02-021-2/+2
| | | | | We want to catch errors with warnings and crashes, not with misbehavior.
* search-popover: use gsettings for last/modified filter typeCarlos Soriano2016-02-023-1/+29
| | | | | | | | | | | We weren't syncing the last used/ last modified setting in the search popover when changed location, which means the query didn't get the last used user choice. We don't want however to listen to a gsetting key and change every ongoing search, so instead what we do is get the setting for the initial creation of a search, and then every user change will set the gsetting value, but will only affect the next created searches, not the ongoing ones.
* query-editor: emit changed when recursive changesCarlos Soriano2016-02-021-0/+2
|
* search-popover: remove unneeded location propertyCarlos Soriano2016-02-023-88/+46
| | | | | | We were using it only for binding with the query editor and update the switch for recursive search, but looks like something it doesn't belong to the search popover, and instead to its owner, the query.
* window-slot: close search when changing locationCarlos Soriano2016-02-021-4/+1
| | | | | And the query is empty, as in no mimetypes, date or text to search.
* query-editor: update query locationCarlos Soriano2016-02-021-0/+3
| | | | | | | We need to update the query location when the user changes the location and the slot acknowledge it. If we don't do it, next time a search is done the simple engine will use the previous location.
* search-popover: use last access and last timeCarlos Soriano2016-02-023-0/+29
| | | | It was partly unimplemented.
* query-editor: trigger a warning if type is wrongCarlos Soriano2016-02-021-0/+1
|
* search: use nautilus atime and mtimeCarlos Soriano2016-02-024-29/+19
| | | | | This was just not done yet, as Georges informed me. We were making sync operations before this patch.
* search-popover: G_N_ELEMENTS doesn't require NULL endCarlos Soriano2016-02-021-5/+0
| | | | | It's only for static arrays, which means it uses the stack size for knowing the number of elements.
* search: use full name in variablesCarlos Soriano2016-02-023-25/+26
| | | | Using dt instead of date can be confusing
* search-directory: don't reload searchCarlos Soriano2016-02-021-6/+0
| | | | | | | | | | | | | | | | | | | I know that it looks like it makes sense, but don't do it :) Basically, all the logic for when a the query changes and to load a new search directory (and therefore reload) is done outside of the engines or the query. So basically don't touch it here. What I believe is that reload should start the search again, not only stop it and invalidate the file attributes of the search directory, because as you could see it actually stops the search but doesn't restart it. I think this change of logic that makes reload not work properly on all cases was introduced by me when I introduced the concept of restarting the search engine internally, not only start and stop. I will take a deeper look in future.
* query-editor: remove hack for spinnerCarlos Soriano2016-02-021-20/+0
| | | | | | Instead, don't use it. We need a way to say that the view is loading/searching, which is the floating bar now, and hopefully something different in the future.
* search-popover: don't update label on showing date widgetsCarlos Soriano2016-02-021-7/+0
| | | | | This is done for any user action. In this way we don't have to do this confusing check here.
* search-popover: use GNU styleCarlos Soriano2016-02-021-262/+314
| | | | Don't mix more styles in nautilus.
* query: fix style issuesCarlos Soriano2016-02-021-12/+11
|
* general: update various modelinesCarlos Soriano2016-02-027-7/+7
| | | | As their files start to have more spaces than tabs in its style.
* search-engine-tracker: fix date boundsCarlos Soriano2016-02-021-5/+9
| | | | | | | | | | | | | | | With the previous patch we set the correct bound for the dates, however due to https://bugzilla.gnome.org/show_bug.cgi?id=761455 bug in tracker, we cannot use dates vars defined in the SELECT clause in the WHERE clause. After discussing the nautilsu query to tracker, we came up that it's not needed to use OPTIONAl and coalesce for it, since contentAccessed is not something that will be set for files, instead the file ontology should be used. So just remove the coalesce and move the variables definitions to the WHERE clause to make them with the correct type.
* search-engine-tracker: fix thinko in the filterCarlos Soriano2016-02-021-2/+2
| | | | We were setting the upper bound instead of the lower one.
* search-engines: adapt to the new search modelGeorges Basile Stavracas Neto2016-02-027-67/+328
| | | | | | | | | The search engines currently aren't able to perform searches against modification or access times. Also, exposes the current operation status, i.e. whether it's running or not. This commit implements it for simple, model & tracker search engines.
* nautilus-file: expose ::get_date functionGeorges Basile Stavracas Neto2016-02-021-0/+4
| | | | | This function is needed for performing the search agains dates.
* files-view: use nautilus_query_is_empty to validate queryGeorges Basile Stavracas Neto2016-02-021-9/+1
| | | | | | The previous commits introduced a new function to NautilusQuery that performs the check we're doing here. Use this API to validate the query.
* search-directory: use the query's recursive flagGeorges Basile Stavracas Neto2016-02-021-8/+1
| | | | | | | | | | | | NautilusSearchDirectory decides whether the search will be done recursively or not by manually checking if the current directory is remote or not. Since the NautilusQuery::recursive flag already does this job through NautilusQueryEditor, the manual check is obsolete. Fix that by using the query's recursive flag instead.
* search-popover: add popover to edit search filtersGeorges Basile Stavracas Neto2016-02-028-924/+1959
| | | | | | | | | | The newest mockups for Nautilus search shows a popover that contains all the necessary options to edit search filters. This commit implements it. The following commits will adapt NautilusQueryEditor to match the latest mockups and display this popover.
* query: make NautilusQuery a final classGeorges Basile Stavracas Neto2016-02-0210-97/+506
| | | | | | | | | | | | | NautilusQuery handle all the necessary data to perform searches throughout directories. Currently, there is no NautilusQuery subclass in Nautilus code, and - since it's inside libnautilus-private - there is no way to subclass it. This commit updates NautilusQuery code be a final class.
* settings: add setting to track remote search on remote locationsGeorges Basile Stavracas Neto2016-02-021-0/+5
| | | | | | | | | | | Remote locations by default don't handle recursive search, since it has high costs associated. We can't, however, neglect the ability to search recursively on those folders, nor share the same setting with common folders too. To fix that, add a new setting called "enable-remote-recursive-search" which will be used by the next commits to properly implement recursive search for remote locations.
* desktop-window: restore transparency (again)Alberts Muktupāvels2016-02-021-2/+3
| | | | | | | GTK+ 31cc642288a4b707bd1400dc258c47f7cfa82829 commit rewrited notebook style and now background color is set on notebook > stack. Update css rule to remove background also from stack.
* canvas-container: fix desktop snappingCarlos Soriano2016-02-011-2/+2
| | | | | | | | | | | | | | | To snap an icon to the closest grid cell, we were trying to round the x position with an offset of 0.5. However, cells are not normalized, so that 0.5 is actually doing little to round the position. This is making the icons to snap to the right closest cell once the user drags more the icon left to the current cell. The actual size of the cell is SNAP_SIZE_*, so to fix this use half of the SNAP_SIZE to "round" the number. https://bugzilla.gnome.org/show_bug.cgi?id=750446
* nautilus-window: add a styleclassHorst31802016-01-281-0/+7
| | | | | | | | | | | This adds the "nautilus-window" styleclass to the main Nautilus window. This commit provides a way for third party themes to apply their own custom styling to Nautilus by using the newly introduced styleclass, since the inbuilt Adwaita.css stylesheet is only being loaded when the Adwaita theme is used. https://bugzilla.gnome.org/show_bug.cgi?id=761098