summaryrefslogtreecommitdiff
path: root/src/nautilus-location-entry.c
Commit message (Collapse)AuthorAgeFilesLines
* general: Uniformize case code styleAntónio Fernandes2021-07-111-0/+8
| | | | | | | | There are a few non-braced single-statement in the final cases, which have gone unnoticed until detected by a recent uncrustify update. Let's add the missing braces around single-statements even if it's the last case.
* location-entry: Highlight basenames of completionsJames Westman2021-02-121-0/+37
| | | | Or, rather, dim the dirnames so the basenames stand out.
* location-entry: Use relative completions for relative pathsJames Westman2021-02-121-1/+20
| | | | | | | | If the user enters a relative path, we get absolute paths as in the completion popover, which is quite jarring and makes it less useful. Instead, truncate the prefix, such that the completions dropdown text aligns with the entry text.
* location-entry: Use g_strstrip()James Westman2021-02-121-2/+2
| | | | Replace g_strchomp and g_strchug with g_strstrip, for simplicity.
* location-entry: Use GtkEntryCompletionJames Westman2021-02-121-31/+76
| | | | | | | | | Improves tab completion in the location entry. GtkEntryCompletion shows a popup when there are multiple matches, so you can choose one or continue typing. The completion's tree model is populated dynamically as you type using a GFilenameCompleter. https://gitlab.gnome.org/GNOME/nautilus/-/issues/1171
* location-entry: Play bell when tab-complete failsJames Westman2021-02-121-4/+11
| | | | | | | When you press Tab in the location entry and there's no autocomplete suggestion, play an error bell instead of closing the location entry. Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1171
* location-entry: Remove folder iconJames Westman2021-02-121-13/+0
| | | | | It hasn't been useful for quite a while, and messes with the visual alignment of the GtkEntryCompletion.
* location-entry: Allow white space paddingDaniel Pauls2019-06-021-5/+17
| | | | | | | | If a path in the location entry has white space as a padding Nautilus will throw an error. Stripping it before parsing will fix this. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/1030
* location-entry: Use event handler return value macros consistentlyErnestas Kulik2018-12-051-1/+1
|
* location-entry: Chain up to parent ::event handlerErnestas Kulik2018-12-051-3/+4
| | | | | | | | Simply propagating the event if it’s not a key press causes the parent handler to not be invoked and things like activating entry icons will stop working. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/768
* location-entry: Do not attempt auto-completion on ESC pressesErnestas Kulik2018-12-051-0/+3
| | | | | | | Currently, if org.gnome.nautilus.preferences.always-use-location-entry is enabled, pressing Escape will be treated as if it would insert text and trigger auto-completion. This is inconsistent with when the location entry is conditionally visible.
* location-entry: Handle less-deprecated signalsErnestas Kulik2018-05-281-76/+91
| | | | ::event-after is obsolete and ::key-press-event is getting there, too.
* location-entry: Handle focus changes in ::notify::has-focusErnestas Kulik2018-05-281-20/+26
|
* general: format code with newer UncrustifyCarlos Soriano2016-11-301-30/+30
| | | | | Some issues were fixed, and now we can rerun Uncrustify to format correctly more part of the code.
* location-entry: remove unused variableCarlos Soriano2016-09-291-2/+0
|
* Remove NautilusEntryErnestas Kulik2016-08-301-67/+141
| | | | | | | | NautilusEntry was written to work around some issues with GtkEntry, which are largely irrelevant, since its use has lessened over the years. This commit removes the class. https://bugzilla.gnome.org/show_bug.cgi?id=770578
* general: run uncrustifyCarlos Soriano2016-08-291-531/+594
| | | | | | | | And make the style of Nautilus the same for all files. Hopefully we can fix all the style issues we can find in the next days, so expect a little of movement on this. https://bugzilla.gnome.org/show_bug.cgi?id=770564
* general: merge libnautilus-private to srcwip/csoriano/private-to-srcCarlos Soriano2016-04-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And fix make distcheck. Although libnautilus-private seem self contained, it was actually depending on the files on src/ for dnd. Not only that, but files in libnautilus-private also were depending on dnd files, which you can guess it's wrong. Before the desktop split, this was working because the files were distributed, but now was a problem since we reestructured the code, and now nautilus being a library make distcheck stop working. First solution was try to fix this inter dependency of files, but at some point I realized that there was no real point on splitting some of those files, because for example, is perfectly fine for dnd to need to access the window functions, and it's perfectly fine for the widgets in the private library to need to access to all dnd functions. So seems to me the private library of nautilus is somehow an artificial split, which provides more problems than solutions. We needed libnautilus-private to have a private library that we could isolate from extensions, but I don't think it worth given the problems it provides, and also, this not so good logical split. Right now, since with the desktop split we created a libnautilus to be used by the desktop part of nautilus, extensions have access to all the API of nautilus. We will think in future how this can be handled if we want. So for now, merge the libnautilus-private into src, and let's rethink a better logic to split the code and the private parts of nautilus than what we had. Thanks a lot to Rafael Fonseca for helping in get this done. https://bugzilla.gnome.org/show_bug.cgi?id=765543
* general: remove vim modelinesCarlos Soriano2016-04-041-1/+0
| | | | | | | | | | | | | Vim and emacs modelines are used to specify some of the code style in the code. However, this is misleading and poorly supported since nautilus had a mix of code style for some time. Also, the mode lines doesn't specify the whole code style, so we will need to use a different tool as well to specify the whole code style. For that, we can just use a different tool for everything. So remove the mode lines, and in a short future we will reestyle the nautilus code to have a single code style, and use a tool like editorconfig to specify the whole code style.
* general: separate handling of windows/slots/viewsCarlos Soriano2015-08-281-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is another step towards the isolation of the management of the direcotories, views, slots and windows. The current situation had a few issues: - the comunication of changes in the model was done in a bidirectional way. So for example, sometimes the view updates directly the slot, sometimes directly the window, and sometimes the window was listening to changes on the model and updating the slot, view, or model itself. Problem with this is, encapsulation is wrong, the code paths are confusing, and the public API exposed is big. - public API is big, so even if sometimes if convenient to not do the same thing twice, having public API that is actually covered by the GLib or Gtk API doesn't worth it, if the complexity of the API grows too much. In Nautilus case, specifically on the slot, we were allowing all kind of convenient API, but it was behaving differently depending on small connotations. - management was not encapsulated. So the window was modifyng the model, or doing actions that belongs to the slot or the view. The same thing for the slot and the view, and similarly for the application and the window. For example, we were handling the flag for creating new windows on a specific window, instead of relying on the application management. Similar cases for the slot and the view. - there were multiple code paths for opening a location. This is one of the biggest changes on the patch. We were exposing API to open a location in every component, and we were using that API from other components above or below the hierarchy randomly. So for example the view was using the opening location API from the slot, the window, and the application; but with the same pourpose, opening a location in the active window. - API was not explicit. For example sometimes we wanted to open a location in the current active window, but somtimes it was implicit and sometimes not, and to be safe we were making it explicit on the caller. - we were using mutiple code paths with the same intention. This is related to the previous one, the intention in every caller was not clear. This patch tries to improve the situation, also thinking on the future rework of the views and separation of the desktop handling. The patch applies the following rules: - If the API is provided somehow by nautilus-file or Glib or Gtk, don't add new API. Custom API is fine if it is used inside the component itself, since the added complexity for tracking code paths is not that important. - Use one way communication, from the top level to the innermost component. In case that the component needs top level features, ask the most top level. A specific example, the view provides opening a new window with a selection. Although encapsulation is good, there is not a good way to avoid the dance from the model to the view to the slot to the window to the application. So instead of that, allow a quick shorcut only communicating to the top most level. In this way, the code path is always the same (therefore much easier to debug or to change code) and encapsulation is preserved. - don't break encapsulation. Only allow management of the component to the component itself or its parent. So for example, the slot is the one that manages errors on what happens in the slot itself. Exception to this is the application, that needs access to all the hierarchy for specific situations. For example for updating the dbus locations or to discern between a desktop window or a common window. - if two way communication is needed, listen changes through properties. We have been moving to properties lately, since it clearer and cleaner and allow a few features that are useful like listening to its changes withouth explicit API for it. This allows to bind properties in a clean way throuh the hierarchy and not breaking the encapsulation. In this patch most of the ground work is done, and some things are remaining like moving all the loading of the location to the view instead of the slot. Even if it is convenient to have some management on the slot to share between the views, some views don't use models at all, or they are not common files, like the other-locations, and this breaks the situation. At some point what we want for the files-view is having a common model API, that can be on top of nautilus-file or in nautilus-file itself. With this patch, a serie of improvements can be done now, and they will come in future patches.
* nautilus-window: Use private instead of detailsCarlos Soriano2015-03-021-1/+0
| | | | | A code clean up that will make things easier for the next patch where we will use a template for the window
* location-entry: Use the new support for RTL icons in GtkIconThemeYosef Or Boczko2014-06-021-6/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=731110
* location-entry: Set the arrow icon according to locale's text directionYosef Or Boczko2014-02-161-2/+7
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=719355
* toolbar: Port to GtkHeaderBarYosef Or Boczko2014-02-151-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=722542
* Updated FSF's addressDaniel Mustieles2014-01-311-2/+1
|
* src: don't use deprecated GtkImageMenuItem and GtkStockCosimo Cecchi2013-08-131-1/+1
| | | | | There's another occurrence of GtkImageMenuItem right now, for the "Open With..." menu which is harder to fix.
* Normalize signal namesWilliam Jon McCann2013-01-221-4/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=692234
* location-entry: use GFile instead of an uri for last_locationCosimo Cecchi2012-10-221-31/+24
| | | | | We will create a GFile internally and most of the times we have a GFile already, so change NautilusLocationEntry to just use a GFile too.
* Add an icon to the location entry and drop use of location barWilliam Jon McCann2012-09-101-36/+367
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=683598
* Rename icon view to canvas viewWilliam Jon McCann2012-08-071-1/+0
| | | | | | | This will allow us to retain canvas view for the desktop directory but implement a new icon view for other folders. https://bugzilla.gnome.org/show_bug.cgi?id=681370
* all: don't use EEL_CALL_PARENT* macrosCosimo Cecchi2011-10-051-16/+9
| | | | Replace them with regular calls to the parent class method pointer.
* location-entry: use symbolic icons for the secondary action hintCosimo Cecchi2011-05-231-6/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=647685
* location-entry: fix auto-complete for non-local URIsStefano Teso2011-02-041-3/+7
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=635333
* location-entry: don't treat '~' as a relative pathCosimo Cecchi2010-12-171-2/+2
| | | | | | Based on a patch by Reed Lipman <rmlipman@gmail.com> https://bugzilla.gnome.org/show_bug.cgi?id=628802
* [src] don't use GtkObjectCosimo Cecchi2010-09-301-6/+3
|
* [src] convert to new GDK_KEY prefixCosimo Cecchi2010-09-191-14/+14
|
* Don't fix relative paths for URIs.Cosimo Cecchi2010-06-181-2/+6
|
* Support relative paths in NautilusLocationEntry.Cosimo Cecchi2010-06-071-5/+48
| | | | | This also adds a custom 'activate' implementation which converts a relative path (if present) to an absolute one.
* Changed the "event-after" signal to "changed" to update the "Location" / "Go ↵Marcus Carlson2009-11-171-4/+38
| | | | | | to" label Change the secondary icon in the location to a "Go" (play) icon when the label is "Go to" otherwise a clear icon https://bugzilla.gnome.org/show_bug.cgi?id=163245
* Clear text in the location entryCosimo Cecchi2009-05-281-0/+15
| | | | | Add a clear text icon in the location entry, now that the icon entry is available in GTK+ 2.16 (#145732).
* Remove unnecessary includes of libgnomeCosimo Cecchi2008-10-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-10-06 Cosimo Cecchi <cosimoc@gnome.org> * libnautilus-private/nautilus-customization-data.c: * libnautilus-private/nautilus-dnd.c: * libnautilus-private/nautilus-file-utilities.c: * libnautilus-private/nautilus-file.c: * libnautilus-private/nautilus-global-preferences.c: * libnautilus-private/nautilus-icon-dnd.c: * libnautilus-private/nautilus-icon-private.h: * libnautilus-private/nautilus-monitor.c: * src/file-manager/fm-desktop-icon-view.c: * src/file-manager/fm-ditem-page.c: * src/file-manager/fm-error-reporting.h: * src/file-manager/fm-list-view.c: * src/file-manager/fm-properties-window.c: * src/nautilus-history-sidebar.c: * src/nautilus-image-properties-page.c: * src/nautilus-information-panel.c: * src/nautilus-location-bar.c: * src/nautilus-location-entry.c: * src/nautilus-main.c: * src/nautilus-navigation-window-menus.c: * src/nautilus-navigation-window.c: * src/nautilus-places-sidebar.c: * src/nautilus-window-manage-views.c: * src/nautilus-window-toolbars.c: Remove unnecessary includes of libgnome svn path=/trunk/; revision=14689
* Move all of Nautilus to single Gtk+ includes, because Mitch says so.A. Walton2008-05-211-2/+1
| | | | | | | | | | | 2008-05-21 A. Walton <awalton@gnome.org> * */*.[ch]: Move all of Nautilus to single Gtk+ includes, because Mitch says so. Closes Bug #530315. svn path=/trunk/; revision=14182
* do not leak the location string when autocompleting.Paolo Borelli2008-03-231-1/+2
| | | | | | | | | | 2008-03-23 Paolo Borelli <pborelli@katamail.com> * src/nautilus-location-entry.c: do not leak the location string when autocompleting. svn path=/trunk/; revision=13978
* Only use <gio/gio.h> includeAlexander Larsson2007-12-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-12-14 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-bookmark.c: * libnautilus-private/nautilus-bookmark.h: * libnautilus-private/nautilus-desktop-icon-file.c: * libnautilus-private/nautilus-desktop-link-monitor.c: * libnautilus-private/nautilus-desktop-link.c: * libnautilus-private/nautilus-desktop-link.h: * libnautilus-private/nautilus-directory-private.h: * libnautilus-private/nautilus-directory.h: * libnautilus-private/nautilus-emblem-utils.h: * libnautilus-private/nautilus-file-changes-queue.h: * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: * libnautilus-private/nautilus-file-utilities.c: * libnautilus-private/nautilus-file-utilities.h: * libnautilus-private/nautilus-file.c: * libnautilus-private/nautilus-file.h: * libnautilus-private/nautilus-icon-info.c: * libnautilus-private/nautilus-icon-info.h: * libnautilus-private/nautilus-link.c: * libnautilus-private/nautilus-mime-actions.h: * libnautilus-private/nautilus-mime-application-chooser.c: * libnautilus-private/nautilus-monitor.c: * libnautilus-private/nautilus-monitor.h: * libnautilus-private/nautilus-open-with-dialog.c: * libnautilus-private/nautilus-open-with-dialog.h: * libnautilus-private/nautilus-program-choosing.c: * libnautilus-private/nautilus-program-choosing.h: * libnautilus-private/nautilus-progress-info.h: * libnautilus-private/nautilus-recent.h: * libnautilus-private/nautilus-search-directory.c: * libnautilus-private/nautilus-search-engine-simple.c: * libnautilus-private/nautilus-trash-monitor.c: * libnautilus-private/nautilus-trash-monitor.h: * libnautilus-private/nautilus-ui-utilities.c: * libnautilus-private/nautilus-view-factory.h: * src/file-manager/fm-directory-view.c: * src/file-manager/fm-directory-view.h: * src/file-manager/fm-icon-container.c: * src/file-manager/fm-icon-view.c: * src/file-manager/fm-tree-model.h: * src/file-manager/fm-tree-view.c: * src/nautilus-application.c: * src/nautilus-application.h: * src/nautilus-bookmark-list.c: * src/nautilus-bookmark-list.h: * src/nautilus-desktop-window.c: * src/nautilus-image-properties-page.c: * src/nautilus-location-entry.c: * src/nautilus-navigation-window.c: * src/nautilus-pathbar.c: * src/nautilus-pathbar.h: * src/nautilus-places-sidebar.c: * src/nautilus-property-browser.c: * src/nautilus-query-editor.c: * src/nautilus-window-menus.c: Only use <gio/gio.h> include svn path=/trunk/; revision=13529
* Merge gio-branchAlexander Larsson2007-11-301-222/+35
| | | | svn path=/trunk/; revision=13464
* Use gi18n.h instead of deprecated gnome-i18n.h header.Martin Wehner2006-03-181-1/+1
| | | | | | | | | | | | | | | | | | 2006-03-18 Martin Wehner <martin.wehner@gmail.com> * libnautilus-private/*.c: * src/file-manager/*.c: * src/*.c: Use gi18n.h instead of deprecated gnome-i18n.h header. * libnautilus-private/nautilus-query.c: (nautilus_query_to_readable_string): Mark string for translation. * po/POTFILES.in: Add nautilus-query.c Patch from Wouter Bolsterlee <uws+gnome@xs4all.nl>
* Use strlen() instead of g_utf8_strlen() since gtk_editable_insert_textRyan Lortie2006-01-111-1/+1
| | | | | | | | 2006-01-11 Ryan Lortie <desrt@desrt.ca> * src/nautilus-location-entry.c (try_to_expand_path): Use strlen() instead of g_utf8_strlen() since gtk_editable_insert_text takes the number of bytes (not number of characters). Fixes #324406.
* --- Merged the nautilus-search2 branch ---Alexander Larsson2005-12-121-0/+54
|
* Replace eel_make_uri_from_input_with_trailing_ws with the gnome-vfs one.Christian Kellner2005-07-021-1/+1
| | | | | | | | | 2005-07-02 Christian Kellner <gicmo@gnome.org> * src/nautilus-location-entry.c: Replace eel_make_uri_from_input_with_trailing_ws with the gnome-vfs one. Fixes bug #165755.
* Minor cleanup from Jaap Haitsma <jaap@haitsma.org>GNOME_2_10_BRANCHPOINTAlexander Larsson2005-03-221-5/+3
| | | | | | | 2005-03-22 Alexander Larsson <alexl@redhat.com> * src/nautilus-location-entry.c: Minor cleanup from Jaap Haitsma <jaap@haitsma.org>