Commit graph

52 commits

Author SHA1 Message Date
Felipe Borges
484866e27e system, wwan: Depend on gcr4 2024-01-31 10:38:07 +01:00
Bart Gravendeel
cacc2b5bef Remove use-underline property from all CCListRows 2024-01-04 10:11:35 +00:00
Automeris naranja
6a04869948 wwan: Remove object ID from the "No WWAN Adapter Found" AdwStatusPage
I copied the AdwStatusPage code from the Bluetooth panel
to make https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2082.
However, I forgot to remove the object ID from the
"No WWAN Adapter Found" AdwStatusPage.

Remove the ID to avoid future problems.
2024-01-02 08:42:35 +00:00
Pablo Correa Gómez
1bafd46ea3 wwan: fix compiler warning
Fix many warnings of the shape:

warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Consequence of casting the pointers during g_clear_pointer
2023-12-11 15:12:00 +00:00
Automeris naranja
2e97cef7a8 wwan: Improve status pages design
- Use AdwStatusPage
- Use .pill and .suggested-action style classes in
the button from airplane mode status page

And use valign=center, otherwise AdwStatusPage
won't be vertically centralized.
2023-12-05 10:25:39 +00:00
Alice Mikhaylenko
4680f362f3 Port to AdwNavigationSplitView 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
b21991d002 wwan: Port to AdwToolbarView 2023-08-25 08:00:43 +00:00
Felipe Borges
0c9498d1f8 Mark some strings as translatable
These are strings that are presented in the UI that were not marked
for translation.

Fixes #2596
2023-08-11 12:07:00 +02:00
Marco Melorio
f9cd79e871 wwan: Replace usage of CcListRow + switch with AdwSwitchRow 2023-06-30 09:06:56 +00:00
Pablo Correa Gómez
7f7b65545c all: meson: do not specify resources from gresource files as dependencies
Meson extracts them by itself and add them as dependencies for the target.
It means one less location to keep track of files, and a lot less boilerplate
around the meson files
2023-05-24 08:34:14 +00:00
Maksym Hazevych
08c2e69851 Resolving suggestions 2023-03-29 14:26:55 +13:00
Maksym Hazevych
e00f773b2f Remove unnecessary visibility change 2023-03-29 14:26:55 +13:00
Maksym Hazevych
5b988a6943 Replace all occurrences of 'gtk_widget_hide'
Replace all occurrences of 'gtk_widget_hide(smth)' with
'gtk_widget_set_visible(smth, FALSE)'.
2023-03-29 14:26:55 +13:00
Maksym Hazevych
d831e5cb48 Replace all occurrences of 'gtk_widget_show'
Replace all occurrences of 'gtk_widget_show(smth)' with
'gtk_widget_set_visible(smth, TRUE)'.
2023-03-29 14:26:55 +13:00
Felipe Borges
294156c0f9 Drop most uses of deprecated gtk_style_context_add/remove_class
GtkStyleContext will be deprecated in gtk 4.10.
https://docs.gtk.org/gtk4/class.StyleContext.html

This preserves code blocks where additional GtkStyleContext operations
were used, such as gtk_style_context_save/restore.
2023-01-05 18:55:51 +00:00
Mohammed Sadiq
3b121805ed log: Improve logging
The 'tracing' build option is no longer needed.  And the verbosity
of logs can be set by providing '-v' multiple times.
2022-12-01 11:44:17 +00:00
Pablo Correa Gómez
5d10656689 wwan: wait for apn_list to exist to add SIM providers
This avoids the situation where a duplicate entry is created if
Settings is started with the wwan panel disabled, a previous connection
exists, and the panel is later enabled.

Fixes #1468
2022-11-08 16:12:22 +00:00
Mohammed Sadiq
d45bda09d2 wwan: Update operator code when 3gpp operator code changes
And update APN list if they are not populated yet

Fixes #1468
2022-11-08 16:12:22 +00:00
Mohammed Sadiq
3cdc27dcc7 wwan: Set apn access method before adding to list
So that accessing APN details returns the right values when
they are inquired immediately after they are added to the list.
2022-11-08 16:12:22 +00:00
Mohammed Sadiq
55fda5b569 wwan: Update apn list only if device is available
Otherwise APN list from mobile-provider-info may not be
properly loaded
2022-11-08 16:12:22 +00:00
Mohammed Sadiq
05371feaf3 wwan: Track apn list updates 2022-11-08 16:12:22 +00:00
Jake Dane
89443fe550 desktop: Remove obsolete Bugzilla entries
The `X-GNOME-Bugzilla-*` entries were for use by bug-buddy, a GNOME 2
technology that's been gone for over a decade. These entries are
obsolete and can be removed from all desktop files.

The `X-GNOME-Settings-Panel` entry is also obsolete as far as I can
tell and only these panels had it in their desktop file: notifications,
sharing, sound and user-accounts. These entries can also be removed.

After removing the `X-GNOME-Bugzilla-*` entries, the desktop files have
no more variables in them. The meson `configure_file` step is therefor
pointless—there are no variables to configure. As such the
`*.desktop.in.in` files are renamed to `*.desktop.in` to reflect this
and `meson.build` files are modified to remove `configure_file` step.
2022-10-20 13:20:09 +00:00
Dirk Su
83278d2724 panels: wwan: Add WWAN 5G connection support 2022-08-01 20:06:51 +00:00
Lubomir Rintel
dad011062b wwan: do not insist SIM ID being present
It is perfectly possible for mm_sim_dup_identifier() to return NULL if
the SIM ID wasn't provided by the modem for any reason, leading to an
assertion failure:

  (gnome-control-center:910641): cc-wwan-data-CRITICAL **: 12:43:51.573:
    cc_wwan_data_set_default_apn: assertion 'self->sim_id != NULL' failed

Handle the NULL SIM ID gracefully.
2022-06-20 23:48:31 +00:00
Robert Ancell
a793e49acd wwan: Replace deprecated nm_device_disconnect 2022-06-20 02:29:39 +00:00
Lukáš Tyrychtr
06b6614e9b Improve accessibility of the wwan settings panel 2022-06-19 21:04:48 +00:00
Mohammed Sadiq
1204b91f52 wwan: Use AdwToasts for notifications
AdwToasts replaces the GtkLabel inside revealer for notifications
and this simplifies handling the notifications and the toast-overlay
handles the complexities of when to show/withdraw them, the order
they are displayed, etc.
2022-05-10 04:24:49 +00:00
Mohammed Sadiq
9aff773564 wwan: Strip remote dbus error before it's presented
That's more useful for the users
2022-05-10 04:24:49 +00:00
Mohammed Sadiq
1dccede9a7 wwan: Return "No Error" if error is NULL 2022-05-10 04:24:49 +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
Mohammed Sadiq
8dc39c8831 wwan: Remove a never reached code
Since we return early, the code followed is never run.
Also, the password for GSM APNs are not actually sensitive
secrets.  So Remove the lines that are never reached.
2022-02-15 16:34:30 +00:00
Pablo Correa Gómez
c5ca6717e5 wwan: Make sure secrets are set when querying connection APN password
Otherwise the comparison in wwan_data_apn_are_same will always be False
due to nm_setting_gsm_get_password always returning NULL.

Helps #1468
Relates !1059
2022-02-15 13:46:48 +00:00
Mohammed Sadiq
703725e93f wwan: apn-dialog: Ellipsize apn row
ellipsize the apn row so that the window won't grow too long.
2022-02-05 04:15:16 +00:00
Mohammed Sadiq
7da8101446 wwan: apn-dialog: Use AdwPreferencesPage
This fixes the listbox content being cut of with the scrolled window.
2022-02-05 04:15:16 +00:00
Jakub Steiner
13376ecb8b Add individual app icons 2022-01-31 14:08:22 +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
0ab20af9ba panels: Switch to CcPanel content
Start porting panels to the new panel format. This commit
temporarily makes panels have two titlebar, which will be
fixed soon.
2022-01-20 02:23:42 +00:00
Mohammed Sadiq
14181fbbbd wwan: Port to use AdwPreferencesPage
And adapt to changes.

This helps avoid using widgets like AdwClamp as it will be
handled by AdwPreferencesPage and AdwPreferencesGroup.
2022-01-10 12:41:56 +00:00
Jan Beich
37b29c32cb meson: drop unused argument for i18n.merge_file()
Ignored in Meson < 0.60.0, deprecated since 0.60.1 and fatal since 0.61.0.

panels/applications/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/background/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/camera/meson.build:10:5: ERROR: Function does not take positional arguments.
[...]
2022-01-07 17:22:43 +00:00
Christopher Davis
e637f47e78 cc-list-row: Subclass AdwActionRow
AdwActionRow handles many of the properties we use
CcListRow for. We can re-use it instead of re-creating it.

CcListRow is now an AdwActionRow with three suffixes.
The `activatable-widget` is set when the switch is visible.

Since our `icon-name` property was only used for the arrow
icon, it has been replaced with a `show-arrow` property.

The `bold` property has been removed - it was only used in
one place, and it's not a pattern used in other apps.

I decided to go this route because replacing all the
instances of CcListRow with AdwActionRow directly would
end up being more code.
2022-01-06 08:56:12 -08:00
Mohammed Sadiq
81a5390c30 wwan: Use button icon-name property to set button image
This simplifies setting button image and improves the way they
are presented as the css will then be handled better this way.
2022-01-06 15:04:28 +00:00
Mohammed Sadiq
fbb2f98c44 wwan: Port to GTK4 2022-01-06 15:04:28 +00:00
Christopher Davis
981a8cea7b panels: Use .boxed-list instead of .content
The `.content` style class is deprecated in favor
of the `.boxed-list` style class, which is named
after the design pattern it's used for.
2021-12-16 12:52:44 -08:00
grumpey
f8e0558ebd Use proper unicode ellipses in strings
Fixes: #1458
2021-09-28 09:15:00 -04:00
Jeremy Bicha
496c719d7b wwan: Remove duplicate line from .desktop 2021-09-26 12:50:37 +00:00
Mohammed Sadiq
d762d93f38 wwan: Fix enabling data after APN is set
Since we don't use gtk_dialog_run(), the dialog was shown in a non-blocking
way.  So instead of handling the APN details immidiately after the APN
dialog is shown, handle them in a signal callback.

Fixes #1465
2021-09-17 21:18:55 +00:00
Mohammed Sadiq
191a179612 wwan-device: Fix network mode strings to be translatable
creating the mode strings by simply concating them
blindly can result in hard to translate strings.

Fixes #1446
2021-09-05 22:01:52 +00:00
Mohammed Sadiq
d975f56e66 wwan: Avoid translation of some strings
Many strings are not shown in the UI. Let's not overwhelm translators
2021-08-24 15:40:49 +00:00
Mohammed Sadiq
b3f4f9cafd wwan: Fix a typo
Fixes dc840f0aec (note_1249116)
2021-08-14 12:34:04 +00:00
Sebastian Krzyszkowiak
6e5169ad4d wwan: Fix signal strength display when extended signal retrieval is disabled
MMModemSignal interface is used to retrieve extended signal information that
requires periodic polling. Therefore, it needs to be manually enabled in order
to use. There if a fallback to use mm_modem_get_signal_quality when MMModemSignal
interface is unavailable, but it didn't check whether it's actually enabled,
leaving the UI with empty label.
2021-08-13 19:25:41 +00:00