| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Move function is_sandboxed() from mime-actions to nautilus-application
to allow reuse.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
GtkPlacesOpenFlags as public API are gone in GTK 4. In preparation,
rename our NautilusWindowOpenFlags enumeration type and make it
value-compatible with GtkPlacesOpenFlags.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
So it can work over inheritance. This will be needed for the desktop
handling.
https://bugzilla.gnome.org/show_bug.cgi?id=712620
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Move this together with all the other application actions.
|
|
|
|
| |
This has been moved to GTK proper now.
|
|
|
|
|
| |
Move it to be completely contained within NautilusDesktopWindow,
considerably simplifying the code in NautilusApplication to handle that.
|
| |
|
| |
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=686968
|
| |
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Just activate the GAction when the menu item is clicked.
|
|
|
|
|
| |
This was some sort of GtkEditable undo framework in the past, but it's
basically just unused code now.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=674532
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
This simplifies the code a bit. Also, remove the useless "app" property
on NautilusWindow while we're at it.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|