7700c17...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
files-view: Add files in right order
When populating a GList in a loop, we should use prepend() for best
performance, then flip it around once with reverse().
The list of pending additions to files view lacks the second part.
This used to be compensated for by the old views:
* NautilusCanvasView, through NautilusCanvasContainer, would iterate
this list to populate its own list with prepend(), effectively
reversing the order, as was necessary.
* NautilusListView, through NautilusListModel, would iterate this
list to populate its own list with insert_sorted(), once again
fixing the loading order.
The new view don't do that, and have no reason to because they don't
have their own GLists (instead, they manage GListModels). But this
means that the item which should be added last actually is added first.
GtkListBase treats the first added item as the initial focus and as
scroll anchor. The end result is that the view always scrolls to the
bottom and, on keyboard focus, the last item is selected first.
The first issue (view always scrolls to the bottom) has been worked
around with a hack, but the second one persists.
Therefore, lets just reverse the list right after it is built. This
way, the first added item is the one actual first item. It gets initial
keyboard focus and anchors the view to the top (allowing to remove the
workaround).
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.
window-slot: Show the sharing infobar when for g-u-s fallback
Normally we show the Sharing info bar when we are in the
XDG_PUBLICSHARE_DIR (i.e. G_USER_DIRECTORY_PUBLIC_SHARE).
gnome-user-share has a fallback to ~/Public when the PUBLIC_SHARE
folder is set to the user's home directory. Match the behavior
that g-u-s uses.
list-base: Check if item_widget is ready before setting focus
We use a hack to set the focus on the item when we set the selection.
Sometimes, the item_widget isn't ready by the time we are setting
the focus, which causes a seg fault. This became even worse, when
I applied the focus hack more consistently in 2ac420316bd9c8560fa2cdeba0e5f5b0092243b7
We should find a better solution, but in the meantime, let's stop
crashing.
683a3d5...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
audio-video-properties: Drop obsolete test program
The properties extension no longer creates a widget, so it's no
longer a simple task of packing that widget into a window.
We never use that test program anyway; manual testing can and
should be performed in the main application.
83c2c6f...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
test/interactive: Drop obsolete test
Originally introduced by 469047a2a58430026d68a3b99b223b922b18b8d1
It's been disabled because it relied on gtk_main* API, which is gone
in GTK4, but even after porting to GMainLoop API, it fails to work
because operations invoke GApplication inhibition.
In other words: I'm confident this test program has been broken for
years without anyone realizing it.
We already have automatic tests for copy operations. Manual testing
can be done with the nautilus application itself with debug messages
enabled.
So, let's just drop the broken obsolete test code.
26e9da3...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
Before the GTK 4 port, we had animation theatrics which showed an
expanding "aura" for the newly revealed button, together with a
glowing CSS animation.
Under GTK4 there is currently no available copylib for implementing
similar theatrics.
So, use only the CSS animation, make it simpler, and use accent
color to compensate for otherwise reduced attention-grabbing effect.
9bcbe0c...
by
=?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>
placessidebar: Don't unreferece the trash monitor
Using g_clear_object() we release a reference which we never aquired.
This causes crashes.
So, don't do that. And going a step futher: don't even keep a pointer
nor a singal id: just use g_signal_connect_object() and enjoy peace.