summaryrefslogtreecommitdiff
path: root/src/nautilus-application.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert "application: add common startup code"Ondrej Holy2023-01-131-1/+0
| | | | | | | This reverts commit 23ae53870a39afe43548111b6432db39511a6e97. This change was needed for split of desktop-related functionality, but it seems no more needed to me. Let's revert those changes to make the code a bit easier as a preparation for the next commits.
* application: Adopt AdwApplicationIgnacy Kuchciński2022-09-011-5/+3
| | | | | | | | | | | | | Doing this allows us to automatically load stylesheets located in the resource base path, so move contents of both Adwaita.css and nautilus.css to style.css in the root of the resource directory, which will be always automatically loaded. Additionally, create a style-hc.css which will be used when the system high contrast preference is enabled, and adjust it to fix issues with NautilusPathBar. Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2166
* application: Move is_sandboxed() to allow re-useCorey Berla2022-07-141-0/+1
| | | | | Move function is_sandboxed() from mime-actions to nautilus-application to allow reuse.
* window: Drop GdkScreen parameter from ::new()António Fernandes2022-01-051-2/+1
| | | | | | | | GdkScreen is obsolete, and gone in GTK 4. Also, most of the time it's just the default screen anyway. For the 2 cases where we actually want to set a display, do it separately using wrappers with the same signatures as the GTK 4 API.
* enums: Make OpenFlags more genericAntónio Fernandes2021-12-281-2/+2
| | | | | | GtkPlacesOpenFlags as public API are gone in GTK 4. In preparation, rename our NautilusWindowOpenFlags enumeration type and make it value-compatible with GtkPlacesOpenFlags.
* shell: pass the full query to the slot to preserve all settingsMarco Trevisan (Treviño)2018-07-261-2/+1
| | | | | | | Instead of just opening a window with just the location and search terms, we should pass to the window slot the full nautilus query with all the shell search provider flags, so that they will be respected and that the results in the overview will respect the ones in nautilus
* general: Clean up headers and their inclusionsErnestas Kulik2018-05-181-3/+2
| | | | | | | This commit removes redundant header inclusions and tries to optimize headers by using forward declarations of types in headers. Such optimization should generally make builds speedier in that changes in certain headers will not cause unrelated sources to be rebuilt.
* general: Remove include guards in favor of pragma onceAlexandru Fazakas2018-03-191-5/+2
| | | | | | | | | | | | | | | | | | The traditional include guards are not as easy to handle and require extra thought into the names. Pragma once is an easier, more contributor friendly approach. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/294 general: Remove include guards in favor of pragma once The traditional include guards are not as easy to handle and require extra thought into the names. Pragma once is an easier, more contributor friendly approach. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/294
* application: rename nautilus_application_add_accelerator()Ernestas Kulik2016-06-241-1/+1
| | | | | | | | nautilus_application_add_accelerator() is ambiguous in that it conveys that the function appends an accelerator to the list. This commit removes the ambiguity by renaming the function accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=763948
* application: add nautilus_application_set_accelerators()Ernestas Kulik2016-06-241-0/+4
| | | | | | | | | nautilus_application_add_accelerator() only allows setting a single accelerator, which in some cases is not enough. This commit adds a wrapper for gtk_application_set_accels_for_action(), which takes an array of accels. https://bugzilla.gnome.org/show_bug.cgi?id=763948
* application: add common startup codeCarlos Soriano2016-04-141-0/+1
| | | | | | | | | So children of nautilus application can chain up to it. We leave out the parts that children won't be interested in, like the bus manager which only nautilus is owner. So far is only used for the opened locations, so it's fine. https://bugzilla.gnome.org/show_bug.cgi?id=712620
* application: allow overriding open_location_fullCarlos Soriano2016-04-141-0/+7
| | | | | | | So it can work over inheritance. This will be needed for the desktop handling. https://bugzilla.gnome.org/show_bug.cgi?id=712620
* 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.
* application: use G_DECLARE_DERIVABLECarlos Soriano2016-03-171-24/+8
|
* application: update modelineCarlos Soriano2016-03-171-1/+1
|
* application: handle notifications internallyRazvan Chitu2016-03-071-0/+7
| | | | | | | | | | | | | In Nautilus, operations such as unmounts create notifications that are not withdrawn on application closing. This leads to issues such as notifications that persist even after reboot. In order to fix this, the application should keep track of the notifications sent in order to withdraw them when it is closed. Add helper functions for sending and withdrawing notifications. Add "shutdown" signal handler for removing notifications on application closing. https://bugzilla.gnome.org/show_bug.cgi?id=763129
* general: allow to search from any part of the stackCarlos Soriano2016-03-031-0/+4
| | | | | | | | Expose the search function on the whole stack. We will need it for searches from the gnome-shell provider. https://bugzilla.gnome.org/show_bug.cgi?id=762076
* general: separate handling of windows/slots/viewsCarlos Soriano2015-08-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* window: delegate view mode to slotCarlos Soriano2015-08-231-2/+0
| | | | | | | | Delefate the view management to the slot. Also on the way, remove duplicates of views ID. This patch is another step forward to full isolation of window/slot/view
* operations: implement new designCarlos Soriano2015-07-171-4/+0
| | | | | | | | | Now operations reside in the toolbar, in form of a button with a popover. In this way we avoid to have a nautilus window hanging around for it. When no nautilus window is open, the persistence handlers of nautilus are enough. This use a notification if the server supports it or a systray icon in case it doesn't.
* general: rework menus of nautilusCarlos Soriano2015-01-241-0/+4
| | | | | | | | | Refresh the nautilus menus in the view (context menus) and the menus in the toolbar, changin as well in the path the UI of the toolbar to match mockups. In the way, port to GAction and GMenu every action and menu of nautilus and some clean ups thanks to this port.
* application: cleanup use of gtk_application_get_windows()Cosimo Cecchi2014-12-061-0/+2
| | | | | | We're really only interested in the NautilusWindows that we create - so keep track of them explicitly instead of checking for NAUTILUS_IS_WINDOW() every time.
* application: move handling of show-file-transfers actionCosimo Cecchi2014-11-291-0/+3
| | | | Move this together with all the other application actions.
* application: remove unused unmount notification codeCosimo Cecchi2014-11-291-6/+0
| | | | This has been moved to GTK proper now.
* application: refactor desktop constructionCosimo Cecchi2014-04-301-2/+0
| | | | | Move it to be completely contained within NautilusDesktopWindow, considerably simplifying the code in NautilusApplication to handle that.
* application: split action handling in a separate fileCosimo Cecchi2014-04-281-0/+2
|
* Updated FSF's addressDaniel Mustieles2014-01-311-3/+1
|
* application: move nautilus_application_new() to its own functionCosimo Cecchi2013-02-271-0/+2
|
* places-sidebar: add a Connect to Server sidebar itemCosimo Cecchi2013-02-121-0/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=686968
* application: remove unused definesCosimo Cecchi2012-08-311-5/+0
|
* Fix other breakage from IconView->CanvasView renamesCosimo Cecchi2012-08-071-1/+1
| | | | | | | | | - fix loading of the desktop icon view - don't use the term "Canvas" in translatable strings, since that's just an internal implementation detail This also fixes https://bugzilla.gnome.org/show_bug.cgi?id=681388
* bookmarks: cleanup NautilusWindow bookmark codeCosimo Cecchi2012-07-161-0/+6
| | | | | | | | | - move NautilusBookmarkList ownership to NautilusApplication, and avoid making it a separate singleton - move NautilusBookmarksWindow ownership to NautilusApplication as well, since it's global and not per-window - remove nautilus-window-bookmarks.[ch], since at this point, it only contains dead or unused code
* places-sidebar: add a notification while ejecting volumesCosimo Cecchi2012-07-111-0/+6
| | | | | | | | | | | Using the show-unmount-progress signal on GMountOperation Based on an initial patch by Tomáš Bžatek <tbzatek@redhat.com> https://bugzilla.gnome.org/show_bug.cgi?id=619665 See also: https://bugzilla.gnome.org/show_bug.cgi?id=676111 https://bugzilla.redhat.com/show_bug.cgi?id=819492
* application: don't handle the singleton ourselvesCosimo Cecchi2012-04-251-2/+0
| | | | | | Since GIO has g_application_get_default() now, there's no need to keep track of the singleton ourselves. Remove the _get_singleton() method from NautilusApplication.
* application: remove unused codeCosimo Cecchi2012-04-251-2/+0
| | | | Just activate the GAction when the menu item is clicked.
* all: remove unused NautilusUndoManager objectsCosimo Cecchi2012-04-241-4/+0
| | | | | This was some sort of GtkEditable undo framework in the past, but it's basically just unused code now.
* application: implement app menu actionsCosimo Cecchi2012-04-241-2/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=674532
* Add nautilus_application_open_location()Federico Mena Quintero2011-12-131-0/+5
| | | | | | | | This is a convenience function so that NautilusFreedesktopDBus can cause the application to open a location and optionally select an item within that location. Signed-off-by: Federico Mena Quintero <federico@gnome.org>
* all: don't return a reference when getting the application singletonCosimo Cecchi2011-06-161-1/+1
| | | | | This simplifies the code a bit. Also, remove the useless "app" property on NautilusWindow while we're at it.
* application: rewrite GApplication command line handlingCosimo Cecchi2011-05-241-1/+0
| | | | | | | | | | | | | Do the command line parsing in local_command_line for the set of options we're interested in parsing there (e.g. directories to open, self checks and --quit); move the rest of initialization in nautilus_application_startup() and use g_application_open() and a custom "quit" action to forward the requests to the main application. This also fixes these two bugs. https://bugzilla.gnome.org/show_bug.cgi?id=649336 https://bugzilla.gnome.org/show_bug.cgi?id=637157
* all: merge NautilusNavigationWindow into NautilusWindowCosimo Cecchi2011-02-171-4/+4
|
* all: remove spatial windows methods from NautilusApplicationCosimo Cecchi2011-02-171-9/+0
|
* progress-info: split progress information notify into a new managerCosimo Cecchi2011-02-031-4/+3
|
* Rework architecture of NautilusWindow/NautilusWindowSlotInfoCosimo Cecchi2011-01-111-5/+2
| | | | | | | | | | | | | | | | | | | | | | In the past, nautilus was designed keeping in mind the concept that it might not just be a file browser, but a sort of platform to embed various kind of views in it. - libnautilus-private: general lowlevel items, such as the icon container, NautilusFile, I/O and so on - src: general widgets and UI items - src/file-manager: file manager views, agnostic of what's in src/, for the sake of being pluggable enough This is really not applicable anymore, as nautilus won't go in any direction other than being a file manager; at the same time, this complicates code and architecture quite a lot. In this commit, as a first step towards a more clean codebase, we remove the NautilusWindowInfo and NautilusWindowSlotInfo interfaces, using NautilusWindow and NautilusWindowSlot directly. Note that there should be no actual code changes, only moving of pieces around.
* smclient: remove XSMP supportCosimo Cecchi2010-12-201-2/+0
| | | | | | | | | | EggSmClient is not well-maintained, and it doesn't seem like it will ever hit GTK+, and the overall implementation seems to be poorly tested and buggy. Moreover, moving to 3.0 with nautilus being an application, it makes less sense to have it save opened windows state, as it might not be always running at all.
* Don't automount volumes on nautilus startupTomas Bzatek2010-11-251-1/+0
|
* application: fix interaction with the session managerCosimo Cecchi2010-11-121-0/+2
| | | | | | | | | The porting to GApplication broke the session management code that took care of saving and loading existing windows if the session saving is active. We now fix it by changing a bit our startup process, so that the EggSMClient object is actually created at the right time.
* application: fix some bad interactions with GApplicationCosimo Cecchi2010-11-041-1/+1
|
* application: fix interaction with SMCLientCosimo Cecchi2010-10-301-0/+2
| | | | | | Use late-initialization, otherwise we and up locked while reading session information. Also, don't try to use that information more than once in the app lifetime.
* application: remove get_n_windows()Cosimo Cecchi2010-10-301-1/+0
|