Commit graph

100 commits

Author SHA1 Message Date
Felipe Borges
9871a09143 common, info-overview, sharing: Use AdwEntryRow for Hostname entries
See mockups in https://gitlab.gnome.org/Teams/Design/settings-mockups/-/issues/48
2022-12-13 16:16:08 +00:00
Jens Alpers
b9bf21a016 Issue 1846, Check for NULL pointer before gtk_editable_set_text 2022-07-11 02:20:50 +00:00
Lukáš Tyrychtr
af197cb813 Add missing a11y labels 2022-05-31 21:08:44 +00:00
Felipe Borges
44fdf9a492 sharing: Let GtkWindowControls add its own buttons
On the Verify Encryption dialog we were adding a GtkWindowControls
widget with a button child. This is a misunderstanding of the behavior
of GtkWindowControls, which adds its own buttons to the window.

Let's remove our custom close-button and its callback, since the
previous commit disabled this codepath for hiding the dialog.
2022-05-13 13:18:01 +02:00
Jeremy Bicha
f94c96577b sharing: Turn off RDP gsettings key when turning off RDP
Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1825
2022-05-11 00:28:25 +00:00
Jonas Ådahl
6affceebee sharing/remote-desktop: Show toasts when copying 2022-05-10 20:58:40 +00:00
Robert Ancell
7f77d087f4 sharing: Fix misleading widget name 2022-04-26 21:31:27 +00:00
Hu Jialun
8809dbc565 sharing/remote-desktop: handle gracefully when unable to get username
getlogin() can fail for several reasons as detailed in the man page, and
the current behaviour is a segmentation fault when it fails with NULL,
such as due to an unset loginuid.

* Check return value for error and act accordingly.
* Change to getpwuid(getuid())->pw_name, which is less likely to error.
2022-04-24 12:15:56 +00:00
Jeremy Bicha
414d4537cd sharing: Fix Remote Desktop on switch handling
Previously, we were only checking if the gnome-remote-desktop
user service was running but that service is always running
as of
https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/commit/7f4ef31fd38

We need to check the gsettings key too.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1775
2022-04-24 12:10:49 +00:00
Felipe Borges
52a8c998fb sharing: Remove leftover remote_desktop_password_insert_text_cb
This method is unused and was left behind after the rework in
commit 0ae59467fb

Fixes #1703
2022-03-22 13:54:46 +00:00
Jonas Ådahl
9d76bb3a80 sharing/remote-desktop: Copy entries via editable API
GtkPasswordEntry is not a GtkEntry so can't use that API. Both are
GtkEditable however, so use that instead.
2022-03-03 21:11:23 +00:00
Jonas Ådahl
dde343d8de sharing/remote-desktop: Only try to enable the RDP backend
Turning off the service doesn't mean we need to disable the RDP backend,
the setting can stay enabled in case one wants to manage it directly via
systemd.
2022-03-03 21:11:23 +00:00
Jonas Ådahl
5dc4081e2c sharing/remote-desktop: Initialize username/password if not set
If no password or username was set (not even an empty one), initialize
them to something, specifically the username of the user of the session,
and a auto generated password.
2022-02-26 18:19:14 +00:00
Jonas Ådahl
06efa4906e sharing/remote-desktop: Hook up to explicit enable setting
Enabling the service isn't enough, one also needs to enable the relevant
backend.
2022-02-26 18:19:14 +00:00
Jonas Ådahl
e8d574883a sharing/remote-desktop: Add copy buttons 2022-02-26 18:19:14 +00:00
Jonas Ådahl
1436dc8120 sharing/remote-desktop: Use systemd directly to manage service
This means we no longer rely on gsd-sharing to disable/enable the remote
desktop service depending on the current connected network.
2022-02-26 18:19:14 +00:00
Jonas Ådahl
3631338676 sharing: Generate RDP TLS certificates when missing
This also hooks up the certificate verification dialog to the configured
TLS certificate.
2022-02-26 18:19:14 +00:00
Felipe Borges
0ae59467fb sharing: Port Screen Sharing dialog to RDP
Also following the guidelines at
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/raw/master/remote-desktop/remote-desktop.png

Fixes #1413
2022-02-26 18:19:14 +00:00
Georges Basile Stavracas Neto
4300a4a290 panels: Use new CcPanel helpers for title widgets
This should significantly simplify these panels, by not forcing
them to override GObject.constructed all the time. Most panels
were quite straightfoward.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
f043ca3680 sharing: Port to GTK4
Again, it was easier to just switch some of the code to use
AdwActionRow, and that's what I've done in this commit.
2021-12-14 22:34:21 -03:00
Pascal Nowack
2a25607e74 sharing: Replace vino with gnome-remote-desktop for X11 sessions
vino does not work in Wayland sessions and gnome-settings-daemon
removed vino support in [1] which will effectively not start
'vino-server' any more.
The replacement for vino is gnome-remote-desktop since it works in both
Wayland and X11 sessions.
The gnome-remote-desktop sharing panel however is currently only shown
for Wayland sessions, which makes it harder to use it for X11 sessions
since the user has to login into the Wayland sessions just to be able
to enable gnome-remote-desktop.

Therefore, also remove vino from g-c-c and replace it with
gnome-remote-desktop for X11 sessions, too.

[1] https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/135

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/212
Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/937
2020-07-07 21:23:17 +02:00
Mohammed Sadiq
a623a3a2e3 sharing: Use the new list row patterns 2020-05-12 22:33:15 +00:00
Robert Ancell
3e4c1d3822 sharing: Move GTK code that was innappropriately in a helper function 2020-03-30 16:18:49 +13:00
Robert Ancell
10e73b733b sharing: Connect signals with g_signal_connect_object in swapped form 2020-03-30 16:18:49 +13:00
Robert Ancell
dcedf93e72 sharing: Add missing widget cast
Was missed in a5de11c3d6.
2020-02-25 09:46:13 +13:00
Carlos Garnacho
a5de11c3d6 sharing: Remember the password on remote desktop sharing
If we are going through mutter's RemoteDesktop interface, we don't
seemingly remember the password set. Add support for reading it
from secrets and change the entry password on dialog construction,
to bring it on par with our vino handling.
2020-02-14 13:32:44 +00:00
Robert Ancell
93b14a4339 panel: Move shared GCancellable code into panel class
Make the panel class provide a cancellable that will be cancelled when the panel
is destroyed. Panel implementations can use this and not have to mangage the
cancellable themselves. Consolidate cases where panels had multiple cancellables
that were all being used for this behaviour.
2020-02-03 09:36:24 +13:00
Robert Ancell
01fea23df1 sharing: Remove markup from translatable strings 2020-01-06 16:57:43 +00:00
Felipe Borges
1b81221092 sharing: Set new shared folder visible as soon as it gets added
When adding a Shared Folder row to the listbox, we were not settings
it to visible. Causing it to be hidden until the next time the panel
gets populated.

Fixes #580
2019-09-12 11:04:57 +02:00
Robert Ancell
a57a85a1db sharing: Fix warning when disabling sharing
The warning is:
(gnome-control-center:29760): Gtk-CRITICAL **: 11:45:48.076: gtk_widget_is_visible: assertion 'GTK_IS_WIDGET (widget)' failed

This is due to the code trying to disable switches that only exist if support
for that feature is available.
2019-07-15 14:38:52 +12:00
Stefano Facchini
b47ada9b76 sharing: Fix master switch
Since the switches for media, personal file, and screen sharing are in the header bar of the
respective dialogs, they are not visible when we click on the master switch. This caused the
check in OFF_IF_VISIBLE to always fail.

Fix it by checking if the corresponding button in the main list box is visible, instead.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/240
2019-07-15 00:05:23 +00:00
Georges Basile Stavracas Neto
75f150d5a2 shell: Add position to cc_shell_embed_widget_in_header()
So we can control where the widget should be added to. The
main window only supports left and right positions.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/528
2019-05-21 12:59:36 -03:00
Robert Ancell
41d2eff314 sharing: Make .ui filename match the .c filename 2018-11-12 16:41:01 +00:00
Robert Ancell
c058f15d10 sharing: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-18 01:18:57 +00:00
Benjamin Berg
2bd03bbb6d sharing: Bind hostname_entry from UI
The entry was not bound. Due to this we could run into a segfault trying
to query the hostname_entry. This would only happen if avahi is not
running.

Fixes #178
2018-09-21 16:59:25 +00:00
Jonas Ådahl
49ef965dc7 sharing: Enable settings widget for gnome-remote-desktop
Enable support for manipulating GNOME Remote Desktop settings. Settings
are done via the org.gnome.desktop.remote-desktop.vnc schema.
Configuring the VNC password is done via libsecret, thus libsecret is
added as a dependency.
2018-07-10 19:59:51 +00:00
Robert Ancell
eff88ab2f1 sharing: Use GtkTemplate 2018-06-07 00:58:22 +00:00
Robert Ancell
a30f660db9 sharing: Use g_auto for variables 2018-06-03 01:11:17 +00:00
Robert Ancell
394797025f sharing: Replace GObject boilerplace with G_DECLARE_TYPE 2018-06-01 21:21:05 +00:00
Benjamin Berg
c2f601a9d4 Move common panel code from shell/ to panel/common
This creates a new static library called libwidget which the shell links
against.
2018-04-17 15:26:59 +02:00
Jeremy Bicha
40fe964a65 sharing: Drop the "Personal" from "Personal File Sharing" description
https://bugzilla.gnome.org/show_bug.cgi?id=772355
2018-01-21 12:37:01 -02:00
Felipe Borges
afbdddc2ed sharing: properly resize listbox rows
https://bugzilla.gnome.org/show_bug.cgi?id=767646
2018-01-17 23:54:33 -02:00
Georges Basile Stavracas Neto
eca7f39782 sharing: Use gtk_menu_popup_at_pointer
Instead of the deprecated gtk_menu_popup().
2018-01-17 23:23:59 -02:00
Georges Basile Stavracas Neto
0af9a5ad64 sharing: Ensure CcHostnameEntry GType before initialization
The exact same reasoning of 35e670c6da.
2018-01-17 23:18:37 -02:00
Rui Matos
2556fd5e2c sharing: Make use of the cancellable for async hostname calls
We have it initialized and disposed and the async calls already handle
being cancelled. We just forgot to actually use it.

https://bugzilla.gnome.org/show_bug.cgi?id=786984
2017-08-29 19:26:58 +02:00
Rui Matos
94045b8418 sharing: Remove an unused variable
https://bugzilla.gnome.org/show_bug.cgi?id=786984
2017-08-29 19:26:58 +02:00
Rui Matos
f959b9127b sharing: Make panel initialization asynchronous
https://bugzilla.gnome.org/show_bug.cgi?id=786984
2017-08-29 19:26:58 +02:00
Rui Matos
58bad723ee sharing: Show the networks widget in the screen sharing dialog
The way it works is independent of the service so there's no reason
not to show it. We should also hide the remote-control-box widget
hierarchy since those can't be used here.

https://bugzilla.gnome.org/show_bug.cgi?id=786565
2017-08-29 19:26:58 +02:00
Jonas Ådahl
ecb0e6dd23 sharing: Add Wayland screen sharing support
This allows enabling screen sharing support under Wayland, as long as
the org.gnome.Mutter.RemoteDesktop D-Bus name is exported by mutter /
gnome-shell. That name will currently only be exported if the
corresponding experimental features has been added to mutter.

So far nothing is configurable, as gnome-remote-desktop is yet to be
configureable.

https://bugzilla.gnome.org/show_bug.cgi?id=786565
2017-08-29 18:55:42 +02:00
Mohammed Sadiq
4c0928f324 sharing: Don't leak path
g_file_get_path() allocates new memory for path.
So using g_strdup() later would leak the previous allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=782045
2017-05-02 12:55:26 +02:00