Commit graph

21235 commits

Author SHA1 Message Date
Ernestas Kulik bef68f12d7 flatpak: pass --device=dri in the GTK+ 4 manifest 2018-08-13 12:00:16 +03:00
Ernestas Kulik 9d9e202237 list-view: Fix secondary-click selection
Previously, the code would chain up to the parent button_press_event(),
which is impossible with the introduction of gestures. A workaround for
that is just unselecting everything and selecting the path that is
underneath the pointer.
2018-08-13 11:49:22 +03:00
Ernestas Kulik efa57b2014 ui: Hide state overlays by default
In GTK+ 4, the overlays for various different states (empty folder, no
search results, etc.) are visible by default and can be seen when
creating a new tab or opening a new location. That is fixable by hiding
them by default.
2018-08-13 11:39:09 +03:00
Ernestas Kulik b1503d98c4 notebook: Expand spinner
The spinner in the notebook tabs is currently start-aligned, so
expanding it fixes it not being centered.
2018-08-13 11:34:51 +03:00
Ernestas Kulik f9298aa3ab flatpak: Enable demos in the GTK+ 4 manifest 2018-08-13 11:22:29 +03:00
Ernestas Kulik 87b29fd6df list-view: Fix secondary button presses on column headers
This commit replaces the removed comparison of the event and tree view
bin windows with a check for negative coordinates, which will be the
case after converting the event coordinates when a header is pressed.
Additionally, this replaces the GtkWidget::event handlers with gestures.

Checking for negative coordinates could probably be removed if the
gestures were cleverly reordered, so that the header ones run first and
claim the sequence.
2018-08-13 10:33:20 +03:00
Ernestas Kulik 4c5b9ed2a9 container-max-width: Update size-allocate handler signature 2018-08-10 20:24:07 +03:00
Ernestas Kulik 0071456d95 files-view: Replace GtkWidget::event handler with key controller 2018-08-10 20:23:00 +03:00
Ernestas Kulik 99091364fd batch-rename-dialog: Replace ::event handlers with controllers 2018-08-10 20:23:00 +03:00
Ernestas Kulik d6b191309c list-view: Drop detail/priv structs
This commit does that for all list view types, as I can’t keep track of
it anymore.
2018-08-10 20:23:00 +03:00
Ernestas Kulik 2098c1b027 meson.build: Set -Werror=incompatible-pointer-types 2018-08-10 20:23:00 +03:00
Ernestas Kulik 73c0bdcfe1 list-view: Don’t claim event sequence
Else rows will not be selected on clicking them.
2018-08-10 20:23:00 +03:00
Ernestas Kulik ef4bee1d8f toolbar: Don’t hide location entry when window becomes inactive
This broke with replacing focus event handlers with listening to changes
in GtkWidget::has-focus, which doesn’t change in the toplevel when the
window goes inactive while the focus is on the entry.
2018-08-10 20:23:00 +03:00
Ernestas Kulik 1fb11ee4b7 toolbar: Fix GtkEntry::populate-popup handler
It shouldn’t return a value.
2018-08-10 20:23:00 +03:00
Ernestas Kulik 198dd46c96 rename-file-popover-controller: Use controller for key events 2018-08-10 20:23:00 +03:00
Ernestas Kulik 3125ac957d general: Fix header inclusions 2018-08-10 20:23:00 +03:00
Ernestas Kulik d53fe37f45 canvas-item: Use GObject macros to define type 2018-08-10 20:23:00 +03:00
Ernestas Kulik 9b3732e404 selection-canvas-item: Use GObject macros to define type 2018-08-10 20:23:00 +03:00
Ernestas Kulik 48c64bd6d8 canvas-private: Remove unused code 2018-08-10 20:23:00 +03:00
Ernestas Kulik 5f7da5d253 application: Make type final
The desktop is long gone and we don’t derive from it anywhere.
2018-08-10 20:23:00 +03:00
Ernestas Kulik fa4995c913 files-view: Remove unused signal 2018-08-10 20:23:00 +03:00
Ernestas Kulik eac3ba5a8b file: Tweak code formatting 2018-08-10 20:23:00 +03:00
Ernestas Kulik 61049cded8 properties-window: Fix usage chart
Until now, the usage pie chart was drawn by connecting to ::draw of
the GtkDrawingArea, which has since been obsoleted. Luckily to us, one
can very easily just set the draw function of the drawing area. This
commit does just that and fixes styling issues by moving out class
addition to just before drawing (2 px solid borders were being applied
to the entire drawing area, which wasn’t an intended look).
2018-08-10 20:23:00 +03:00
Ernestas Kulik b8e74919cc CI: Fix build log path 2018-08-10 20:23:00 +03:00
Ernestas Kulik bde403227b CI: Always upload artifacts 2018-08-10 20:23:00 +03:00
Ernestas Kulik 317af4d960 window-slot: Remove unused vfuncs 2018-08-10 20:23:00 +03:00
Ernestas Kulik 8de9640be1 properties-window: Set thumbnail GtkImage size explicitly
The icon size of a GtkImage is GTK_ICON_SIZE_INHERIT by default, which
is the size of a regular button, given that the parent element is a
button. This commit sets the pixel size of the GtkImage to that of the
displayed thumbnail.
2018-08-10 20:23:00 +03:00
Ernestas Kulik 231aa2ab6c icon-info: Clean up API
This merges some getter functions into one with additional parameters,
so that duplicate code can be avoided. Additionally, this converts
callers to use textures where possible.
2018-08-10 20:23:00 +03:00
Ernestas Kulik ea157cd736 pathbar: Replace ::button-press-event handler with gesture
This commit moves all button press handling into the gesture.
2018-08-10 20:23:00 +03:00
Ernestas Kulik 3adfd94a6f pathbar: Remove event GdkWindow 2018-08-10 20:23:00 +03:00
Ernestas Kulik 1dfc5026bc canvas-dnd: Fix DnD shadows 2018-08-10 20:23:00 +03:00
Ernestas Kulik de3a44b59b file-conflict-dialog: Use textures for file thumbnails 2018-08-10 20:23:00 +03:00
Ernestas Kulik 6a15cf6687 canvas-container: Draw DnD highlight in snapshot()
…instead of connecting to GtkWidget::draw, which has been removed.
2018-08-10 20:23:00 +03:00
Ernestas Kulik 1681519446 view-icon-item-ui: Use GdkTexture for thumbnail 2018-08-10 20:23:00 +03:00
Ernestas Kulik 22570e1122 nautilus-toolbar.ui: Remove main box margin
Since the addition of a GtkGizmo in GtkPopoverMenu, the content is
already padded by 8 px.
2018-08-10 20:23:00 +03:00
Ernestas Kulik 60f50bdced file: Remove references to folder-open icon
It’s no longer actually used.
2018-08-10 20:23:00 +03:00
Ernestas Kulik 1ce1120d23 list-model: Use GdkTexture for icon
GtkCellRendererPixbuf no longer allows using Cairo surfaces.
2018-08-10 20:23:00 +03:00
Ernestas Kulik 355bdd5823 canvas-container: Remove unused signal 2018-08-10 20:23:00 +03:00
Ernestas Kulik 4d6be33a96 files-view: Remove desktop leftovers 2018-08-10 20:23:00 +03:00
Ernestas Kulik 564fc21c27 nautilus-toolbar.ui: Use model for app menu 2018-08-10 20:23:00 +03:00
Ernestas Kulik 0df34b7ad9 progress-info: Don’t cast in g_clear_pointer()
The type of the pointer is propagated, so the cast results in an
incompatible type warning.
2018-08-10 20:23:00 +03:00
Ernestas Kulik 8837f790e2 general: Rename NautilusCanvasIconData to NautilusFile
NautilusCanvasIconData is a typedef for NautilusFile, and that really
hurts code readability.
2018-08-10 20:23:00 +03:00
Ernestas Kulik 2c2eeb5a92 general: Drop uses of gtk-timeout-expand setting
It no longer exists, so this commit adds a hardcoded value, equal to the
default of gtk-timeout-expand in GTK+ 3.
2018-08-10 20:23:00 +03:00
Ernestas Kulik e9e595ca05 canvas-container: Unconditionally redo layout
The ::size-allocate handler only redoes its layout if the allocation
had changed and if there isn’t an allocation loop. There used to be a
bug, which caused that to happen in certain cases, but the workarounds
break in GTK+ 4, and it doesn’t seem likely that the bug will manifest
itself again.
2018-08-10 20:23:00 +03:00
Ernestas Kulik 7f01de5e44 preferences-window: Stop using GtkEntry API on GtkSpinButton
It had since become a widget of its own.
2018-08-10 20:23:00 +03:00
Ernestas Kulik 1110890029 directory-async: Use g_clear_object() more liberally 2018-08-10 20:23:00 +03:00
Ernestas Kulik af6e3fafce nautilus-preferences-window.ui: Set numeric on GtkSpinButton
Since it is no longer a GtkEntry, the input-purpose property does not
exist there.
2018-08-10 20:23:00 +03:00
Ernestas Kulik d3a9ea5345 nautilus-preferences-window.ui: Stop setting GtkContainer::resize-mode 2018-08-10 20:23:00 +03:00
Ernestas Kulik 242f277cd2 view-icon-item-ui: Fill-align the icon
Otherwise it doesn’t get sized correctly.
2018-08-10 20:23:00 +03:00
Ernestas Kulik d629dabaab canvas-container: Use drag gesture for rubberband selection
This means that we no longer have to store the event device to get
coordinates from, but this means that the coordinates are no longer
toplevel-relative, so in some capacity the code becomes less convoluted.
2018-08-10 20:23:00 +03:00