Commit Graph

124 Commits

Author SHA1 Message Date
Matthias Clasen
6efdaa9ffd placeview: Hide the protocols grid when its empty
Seeing just the bold headings at the bottom of the
popover is confusing, so just hide the entire grid
in this case.
2020-05-08 09:20:02 -04:00
Alexander Mikhaylenko
8007891132 placesview: Stop using gtk_container_add() for GtkListBoxRow 2020-05-07 00:08:46 +05:00
Matthias Clasen
d03b1524e6 placesview: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:25:28 -04:00
Matthias Clasen
a9103ccd7c placesview: Drop the Private struct 2020-05-05 10:45:47 -04:00
Matthias Clasen
fc450e313b placesview: Fix translator comments
These comments were applied to the wrong strings
by xgettext.

Fixes: #2666
2020-04-27 00:23:49 -04:00
Matthias Clasen
0ebcf8c02e placesview: Fix up the address entry help popover
Popovers without parent don't work anymore. Set a
parent, a fix up the position.

Fixes: #2642
2020-04-21 07:43:52 -04:00
Matthias Clasen
df1816a29c button: Drop relief
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
6b9ac1043b Document actions 2020-04-11 10:07:31 -04:00
Matthias Clasen
9d84996fea placesview: Stop using ::popup-menu
This signal is going away.
2020-03-25 23:14:45 -04:00
Matthias Clasen
31db615885 Revert "Merge branch 'disable-window-test' into 'master'"
This reverts commit 3ac4c76b18, reversing
changes made to 6ec96d2e98.
2020-03-19 18:03:16 -04:00
Matthias Clasen
53f29ba427 placesview: Stop using ::popup-menu
This signal is going away.
2020-03-19 00:54:23 -04:00
Matthias Clasen
9d80db29de Merge branch 'spinning-spinner' into 'master'
Rename GtkSpinner::active to ::spinning

See merge request GNOME/gtk!1475
2020-02-25 04:04:46 +00:00
Matthias Clasen
e73a40733f Rename GtkSpinner::active to ::spinning
And add a setter and getter. The old name was
confusing with the widget state of the same
name. 'Active' is just too overloaded.
2020-02-24 22:37:02 -05:00
Matthias Clasen
a43d13aa74 popover: Drop ::relative-to
It is enough to just set the parent (and make the parent
call gtk_native_check_resize in size_allocate).

This commit removes the relative_to argument to the
constructors of GtkPopover and GtkPopoverMenu, and
updates all callers.
2020-02-24 20:46:41 -05:00
Emmanuele Bassi
6e699e3f04 Remove GtkPlacesView:local-only
We don't use it any more from the file chooser widget.
2020-02-22 15:22:06 +00:00
Timm Bäder
655711fef2 Rename gtk_widget{get,set,has}_style_class to _css_class
We want to use css instead of style everywhere now.
2020-02-07 13:16:45 -05:00
Timm Bäder
b7ee2cbc28 Start using GtkWidget's new style class API 2020-02-07 13:16:32 -05:00
Matthias Clasen
94e238c467 placesview: Use a popover
Replace the context menu with a popover.
2019-12-29 17:10:16 -05:00
Ondrej Holy
267ea7552b placesview: Always open default location after mounting
The default location (obtained over g_mount_get_default_location) is
opened after mounting volume, or when opening mounts from sidebar, but
not after mounting over "Connect to Server". Let's unify the behavior
and always open the default location.

https://gitlab.gnome.org/GNOME/nautilus/issues/1319
2019-12-19 17:28:35 +01:00
Emmanuele Bassi
04bb5aad36 Use a separate gesture for middle clicks on PlaceView rows
The click gesture in GtkListBox is exclusively for primary button
clicks; this means we're never going to get a click from the middle
button. We need to use a separate GtkGestureClick controller for middle
clicks, in order to activate rows with the 'open-in-tab' flag.

Fixes: #179
2019-11-25 16:02:40 +00:00
Timm Bäder
15af87345d placesview: Use proper setters for properties 2019-10-22 09:37:08 +02:00
Timm Bäder
7eae9d115c placesview: Make "Other Locations" search case-insensitive
It's just weird to search for "c" and not find the list item labelled
"Computer".
2019-07-21 09:51:54 +02:00
Christian Hergert
41e373f10c gtk: fix all uses of g_cclosure_marshal_generic
This adds specific marshallers for all of the locations where a generic
marshaller is being used. It also provides va_marshallers to reduce the
chances that we get stack traces from perf going through ffi_call_unix64.

This is forward ported from gtk-3-24.

# Conflicts:
#	gtk/gtkeventcontrollerkey.c
#	gtk/gtkeventcontrollermotion.c
#	gtk/gtkgesture.c
#	gtk/gtkgesturemultipress.c
2019-06-02 14:24:51 -07:00
Matthias Clasen
7447abb52b Stop using gtk_widget_get_toplevel
All uses of it can be replaced by gtk_widget_get_root.
2019-05-28 20:25:16 +00:00
Matthias Clasen
948347afa9 Stop using gtk_widget_is_toplevel 2019-05-28 20:25:16 +00:00
Matthias Clasen
4bf4f04d1f Adapt to new popover lifecycle
We need to unparent popovers in dispose.
2019-05-28 20:25:13 +00:00
Matthias Clasen
2bf1561b48 Port widgets to the root focus API 2019-03-16 21:24:44 -04:00
Matthias Clasen
9e0c471b03 entry, spin button: Drop redundant API
Avoid duplicating GtkEditable APIs. Port existing users.
2019-02-28 16:34:00 -05:00
Emmanuele Bassi
cb0d8d6d90 Remove gtk_widget_show_all() call
Extraneous chunk from 7601bca758.

Cherry picked from gtk-3-24, which has a gtk_widget_show_all() function.
2018-12-14 20:38:03 +00:00
António Fernandes
7601bca758 placesview: List only available protocols as available
We display a list of supported protocols in the server_addresses_popover.

However, this curated list contains protocols which may or may not be
available, depending on the respective gvfs backend being installed.

So, populate the list only with protocols which are available.

https://gitlab.gnome.org/GNOME/gtk/issues/1476
2018-12-14 12:30:52 -05:00
António Fernandes
3bbfff9280 placesview: Set .error style if unsupported protocol
When the user types an address with a schema that is not supported,
the Connect button doesn't become sensitive, but there is no visible
feedback at all.

This feels unresponsive and leaves the user clueless.

While it doesn't help explain why the address doesn't work, this will
provide a hint that the input was acknowledged but doesn't work.

https://gitlab.gnome.org/GNOME/gtk/issues/1476
2018-12-14 12:28:47 -05:00
Carlos Garnacho
e08e15ba51 gtkentry: Use gestures for entry icons
Instead of doing all handling manually in the ::event vfunc,
set up drag/multipress gestures on icon images, and implement
emission of ::icon-press/release and DnD there.

As a side effect, the GdkEvent field in ::icon-press/release
signals has been dropped. Callers that might be interested on it
may still use gtk_get_current_event*().
2018-06-21 12:50:57 +02:00
Carlos Garnacho
15e00759c7 eventcontrollerkey: Port to new API model 2018-04-26 17:59:42 +02:00
Marco Trevisan (Treviño)
4900c3eb3b gtkplacesview: disconnect from server list monitor changes on destroy
It might happen otherwise that a change is recorded in between the
widget dispose and finalization, causing a crash when setting
the visible name for the GtkStack (as that will be NULL at that point)
2018-04-19 02:59:52 -05:00
Marco Trevisan (Treviño)
f9452957cd gtkplacesview: unset entry_pulse_timeout_id before removing it
Fixes a warning on widget finalize, when trying to remove an invalid
source.
2018-04-19 02:59:43 -05:00
Matthias Clasen
6d1b21a028 places view: Stop using ::key-press-event 2018-04-05 19:26:53 +02:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Matthias Clasen
1818e7bed2 places view: Stop using ::button-press-event
Instead, use a multi-press gesture in the row widget,
and emit ::popup-menu from there.
2018-01-16 14:14:10 -05:00
Matthias Clasen
33fdcca2cf placesview: Make middle click work
This does not cost us much, and improves consistency.
2017-12-12 13:56:15 -05:00
Colin Leroy
0156c52a2c placesview: Present FUSE-reachable network shares in Other Locations
The documentation about gtk_file_chooser_set_local_only() states
that "non-native files may still be available using the native
filesystem via a userspace filesystem (FUSE)."
The code that made this possible in GTK+2 was missing from GTK+3 and
that represented a regression for Linux users in numerous applications
(Firefox, Thunderbird, Chromium, ...)

https://bugzilla.gnome.org/show_bug.cgi?id=787128
2017-12-07 21:31:46 -05:00
Matthias Clasen
1c59db9bff placesview: Drop the word stock from the docs
It does not really add anything here, and makes it harder
to grep for occurrences of stock ids.
2017-12-01 10:30:21 -05:00
Matthias Clasen
a8531605db Some more interning
This avoids more strdups at startup.
2017-11-18 08:18:11 -05:00
Matthias Clasen
ffd6baec42 gtk: Intern css names
This avoids a bunch of strdups at startup.
2017-11-17 22:49:57 -05:00
Matthias Clasen
dbfaa99107 image: Remove icon-size argument from icon setters
Instead, add a function gtk_image_set_icon_size() for the cases where
overriding the icon size is necessary.

Treat icon sizes the same way as pixel sizes, too. So gtk_image_clear()
no longer unsets the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
a409320cda gtk: Use gtk_widget_set_cursor()
... and gtk_widget_set_cursor_from_name() instead of setting cursors on
GdkWindows.
2017-11-04 01:37:03 +01:00
Benjamin Otte
9323d098a6 gdk: Cursors no longer have a display
Change constructors to reflect that.

While doing so, also add a fallback argument to the cursor constructors,
so it is now possible to create cursors with fallback.
2017-11-04 00:07:13 +01:00
Matthias Clasen
7793e8f071 places view: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Carlos Garnacho
8803886319 placesview: Update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Benjamin Otte
464ffad23e placesview: Remove event box usage 2017-08-02 14:05:02 +01:00
Timm Bäder
9c347c3012 placesview: Remove duplicate GtkMountOperation assignment
we assign a new mount operation a few lines later again.
2017-04-30 20:22:34 +02:00