Commit graph

5603 commits

Author SHA1 Message Date
Mohammed Sadiq
0b6697934b search: Fix crash on clicking 'Search Locations'
When creating a Page, the dialog variable wasn't set and thus
dereferencing a NULL in a later code resulting a crash.

This was introduced in 14b9f65ba4


(cherry picked from commit 2fb0ff250b)
2019-09-19 17:25:08 +00:00
Philip Withnall
46f5c7f918 network: Add mnemonic for ‘Restrict background data usage’ checkbox
The other checkboxes on this page all have mnemonics. It seems unfair
for the background data usage one to be left out of the party.

Signed-off-by: Philip Withnall <withnall@endlessm.com>


(cherry picked from commit dadf2a4258)
2019-09-17 22:32:39 +00:00
Georges Basile Stavracas Neto
ca7634e4a3 network: fix Add Connection dialog
The Add Connection widgets from the connection
editor dialog weren't properly using the available
space, since they don't expand.

Fix that by making them expand and fill the available
space properly. It also avoids blank space by vertically
centering the list.



(cherry picked from commit 6e6e9952b4)
2019-09-17 22:22:12 +00:00
Damián Nohales
4b2724eb3b background: Allow load background file relative to XML file
(cherry picked from commit 70fb75eb27)
2019-09-17 22:10:27 +00:00
Philip Chimento
c2af930454 printers: Give printer name fewer characters in width
At the default window size, the printer name label is too wide and
collapses the UI into phone mode. (This is the only panel that shows up
in phone mode by default.) Giving the printer name fewer characters
avoids this.
2019-09-17 09:23:32 +02:00
Philip Chimento
0f8e3f332c region: Fix crash in keyboard layout population
The previous code would crash if 'variants' was null and 'layouts' had
more than one element in it.


(cherry picked from commit 412472c16d)
2019-09-12 18:16:13 +00:00
Felipe Borges
70631e9b23 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


(cherry picked from commit 1b81221092)
2019-09-12 11:07:42 +00:00
Benjamin Berg
f6b665625f datetime: Allow changing the timezone when auto-update is prohibited
When the user disables the use of location services in the privacy
panel, then the timezone will never be updated automatically. Automatic
timezone may still be enabled though, so we need to allow the user to
change the timezone when location services are disabled or when
automatic timezone updating is disabled.


(cherry picked from commit 8d9affbd6a)
2019-09-12 11:07:09 +00:00
Jonathan Kang
ef276fded1 network: disable the "Apply" button until a change has been made
Previously, when you open the connection editor dialog for each
connection, no matter whether you've made any changes or not, the
"Apply" button became sensetive, which is not what we expected.

Fix that by removing the unnecessary call to password_storage_changed()
while constructing the security tab.
2019-09-10 10:49:52 +12:00
Andrea Azzarone
b614a6c023 online-accounts: Don't segfault if get_all_providers_cb is called during init
Due to an API bug in GNOME Online Accounts, the asynchronous
goa_provider_get_all method doesn't accept a GCancellable argument. This makes
it difficult to cancel an ongoing call when the CcGoaPanel gets destroyed.

This was hacked around by taking a reference on the panel for the duration of
the call. Instead of cancelling a pending call on destruction, it would keep the
panel alive until the call was over.

The hack does not consider the case get_all_providers_cb is called while the
panel is still being initialized. E.g. this happen when create the panel passing
the paramenters "add <provider>" because the constuct properties are set just
after cc_goa_panel_init returns and because goa_provider_add_account will result
in a call to g_main_context_iterate (caused by gtk_dialog_run).

In order to work around this we can call goa_provider_get_all in _constructed()
after all construct properties have been set.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/401
2019-09-10 10:36:37 +12:00
Iain Lane
ad39840066 sound: Pass a GvcMixerControl to the stream volume sliders
Since 9d612ff1c7 this is required,
otherwise we never set up the GtkAdjustment and so the scales don't
display any values or widget to make adjustments, meaning they can't be
used.

Also call `notify_volume_cb()` from `update_ranges()` to initialise the
adjustment, since when we set the mixer control we now might not have
set the value.

Closes #652
2019-09-09 15:23:32 +00:00
Benjamin Berg
4e800cc558 display: Consider monitors in landscape mode for minimum size
Some devices have panels with a native resolution in portrait mode. In
these cases the monitor will likely be used in landscape mode.

Accept the modes as if they are landscape rather than portrait. A
further improvement would be to restrict the orientation setting.

Fixes #639
2019-08-27 13:43:29 +00:00
Robert Ancell
fe932a4cea info: Only connect web related mime types when setting default browser
The previous code would make that browser the default handler for all mime types
it supported. This meant Firefox would become the handler for PNG and JPEG images.

Fixes #473
2019-08-27 13:33:45 +00:00
Ondrej Holy
1f71ae6046 user-accounts: Check username validity over usermod
Username policies differ across the distributions. See the discussion on:
https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/359

It is not possible to hard-code some rules here without the need for
downstream modifications. Let's check the validity of usernames dynamically
over "usermod" to prevent this.

Just be careful that this is based on undocumented usermod behavior, which
may change in the future.
2019-08-26 16:26:45 +03:00
Robert Ancell
14b9f65ba4 search: Remove global variable that could get leaked
Tracker GSettings were previously stored in a global variable. This
seems to have been done to avoid difficulty passing the settings via
callbacks. Global variables are easy to leak and make mistakes with.

Update the code to have better callback handling so the variable can
be stored inside the object.
2019-08-26 11:57:53 +00:00
Robert Ancell
9d612ff1c7 sound: Fix volume sliders regression
GVC added additional checks that break where we were using a NULL value instead
of a GvcMixerControl. Solution is to pass this object where appropriate.

(gnome-control-center:833): Gvc-CRITICAL **: 11:09:33.818: gvc_mixer_control_get_vol_max_norm: assertion 'GVC_IS_MIXER_CONTROL (control)' failed

Fixes #636
2019-08-25 09:51:31 +00:00
Ting-Wei Lan
299647f970 build: Include generated sources in declared dependencies
Sometimes ninja decides to compile tests/interactive-panels/main.c,
which requires shell/resources.h, before shell/resources.h is generated.

The fix is to use 'sources' argument of declare_dependency to properly
declare the dependency on generated headers.

A fix for tests/datetime and panels/datetime is also included in the
commit to fix a similar problem.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/472
2019-08-25 09:42:22 +00:00
Benjamin Berg
6d16bf7337 display: Increase the trough size using a different method
Increasing the trough size by setting the min-height caused issue when
the scale was being fine-tuned. Changing the padding seems to have a
similar effect without triggering any such issue (with Adwaita).

Fixes #335
2019-08-25 09:16:46 +00:00
Robert Ancell
c3d3358130 info: Fix leak when /etc/os-release not found
There is a missing return statement, this was broken in 331f0d1
2019-08-21 17:27:55 +12:00
Robert Ancell
a760707291 universal-access: Fix compile warning
Introduced in 38897a751b
2019-08-13 10:40:59 +12:00
Benjamin Berg
fa873a04eb user: Support devices with more than 5 enroll steps
We are currently adding support for Synaptics devices that require 8
steps. Add another row for images which brings us to up to 10
supportable steps for now.
2019-08-12 22:27:07 +00:00
Mohammed Sadiq
cef992e717 network: Don’t add proxy device if NM isn’t running 2019-08-08 22:53:47 +00:00
Carlos Garnacho
f57a117cc1 common: Update to gdk/x11 API
We use gdk_error_trap*() in this little piece of remaining x11
code. Update to gdk_x11_display_error_trap*() found more recent
gtk.
2019-08-08 15:18:07 +00:00
Carlos Garnacho
7e6301d449 common: Remove unused X11/XI1/XI2 API
Those went unused over time. Time to clean those up.
2019-08-08 15:18:07 +00:00
Carlos Garnacho
3600cb5a40 common: Unite GsdDeviceManager
Drop the subtypes, and keep a single udev-based GsdDeviceManager,
which will work on both backends, and should work on all platforms
we care about (?).
2019-08-08 15:18:07 +00:00
Carlos Garnacho
9e5ccbd748 common: Drop update-from-gsd usage
Those files are no longer existent in gnome-settings-daemon, so
this module is free to do as it pleases with them, there doesn't
need to exist any synchronization anymore.
2019-08-08 15:18:07 +00:00
Felipe Borges
31e34cfe2e search: Add description label to Search Locations Dialog 2019-08-06 11:59:41 +00:00
Felipe Borges
041a3e92f1 search: Do not allow selecting rows
There is no functionality involving selecting a row here.
2019-08-06 11:59:41 +00:00
Felipe Borges
3f4f43f020 search: Add instructions label
Fixes #454
2019-08-06 11:59:41 +00:00
Felipe Borges
c38d0ed4a0 search: Place "Move" button in each row
This is based on the mockups available at
https://gitlab.gnome.org/Teams/Design/settings-mockups/raw/master/search/search.png

Fixes #591
2019-08-06 11:59:41 +00:00
Felipe Borges
c173424c11 search: Move "Search Locations" button to top bar
Fixes #591
2019-08-06 11:59:41 +00:00
Felipe Borges
db39bd159f search: Make rows reordable with drag and drop
Fixes #589
2019-08-06 11:59:41 +00:00
Felipe Borges
d39cf39fd4 search: Move row into its own object (CcSearchPanelRow)
This decouples the user interface parts from the control logic,
making it easy for designers to tweak the look & feel of the rows.
Besides, it makes it easier to introduce Drag & Drop capabilities.
2019-08-06 11:59:41 +00:00
Felipe Borges
14b9289791 search: Move GtkListBox to .ui file 2019-08-06 11:59:41 +00:00
Benjamin Berg
ca684c2a7c display: Update night light scale to new blackbody calculation
g-s-d was changed to use a better black body temperature calculation.
This strongly affects the effect of the color temperature (the default
is changed from 4000K to 2700K). Update the scale to represent a similar
range to default even if the distribution on the scale is quite
different.
2019-07-30 10:47:36 +02:00
Mohammed Sadiq
12e1565129 region-panel: Reduce the width of popover
So that it fits into 360px.  UI wise, the margin at end is almost
always larger than start (due to text wraping).  So reducing end
margin may also let the popover content feel more center aligned.
2019-07-26 01:32:10 +00:00
Mohammed Sadiq
53ba6dcd2e search: Make search locations dialog adaptive 2019-07-26 01:21:27 +00:00
Mohammed Sadiq
ed6ddf162a notifications-dialog: Make dialog adaptive 2019-07-26 01:13:20 +00:00
Mohammed Sadiq
faf305772c sharing: Allow dialogs to have smaller width
Reduce margins on either side, and allow the texts to be
wrapped early, so that it works well on smaller screens
2019-07-23 06:54:50 +05:30
Adrien Plazas
f80f1d63fd info: Make the Removable Media panel adaptive
Wrap or ellipsize the labels to allow the panel to fit in narrower
windows.
2019-07-22 21:34:56 +00:00
Allan Day
4bfb32a578 background: clarify remove background button
The button doesn't delete the original file - it just removes
the image from the selection. "Remove" is therefore a better word
than "Delete", and the destructive action style isn't appropriate.

Fixes #578
2019-07-22 21:25:29 +00:00
Carlos Garnacho
cb9beaa34a
network: Rename section header
The "Bluetooth" section is actually a catchall section for all
device types we don't know much specifically (Includes, but not
limited to Bluetooth).

Rename/relabel it to something more comprehensive.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/issues/488
2019-07-22 17:53:22 -03:00
Mohammed Sadiq
d697d96020 universal-access: Use HdyColumn to center align panel
and avoid the GtkBox hack
2019-07-22 20:44:04 +00:00
Benjamin Berg
345a819f84 display: Add guards for NULL display configuration
This may happen under some conditions. Possibly due to a race condition
(i.e. we did not receive any configuration from mutter yet) or also if
we are not running on GNOME.

Add guards for NULL configuration. This configuration is never
applicable and mostly clears the UI.

Fixes: #604
2019-07-20 02:23:53 +00:00
Benjamin Berg
561ac849d7 display: Add failure returns into CcDisplayConfig
This guards against accidental use of NULL pointers so that the panel
will hopefully not crash if new bugs like this are introduced.
2019-07-20 02:23:53 +00:00
Mohammed Sadiq
e1cd43cb48 background: Get Preview aspect ratio from primary monitor
Get the aspect ratio from Primary monitor, and allow the preview
to have smaller size, so that it works well on smaller screens
2019-07-20 02:22:03 +00:00
Allan Day
eb8263454f region: Use correct icon for the drag handle
There's a dedicated icon for drag handles - we should make use of
it. Also, change the color of the handle so it looks like it is
part of the row.

Fixes #590
2019-07-16 22:34:26 +00:00
Benjamin Berg
3721f9ed4a display: Update ShowMonitorLabels DBus call
The function has been changed in gnome-shell to be called ShowMonitorLabels
again (rather than ShowMonitorLabels2). Update g-c-c accordingly.

See https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/491
2019-07-15 09:21:23 +00:00
Mohammed Sadiq
38897a751b universal-access: Free zoom options dialog right
Use gtk_widget_destroy() instead of g_clear_object().
Otherwise, it results in segfault on dispose()
2019-07-15 04:40:42 +00:00
Jonathan Kang
90af5b87f9 network: Fix mtu label not requesting enough space
Remove the size group where mtu label belongs, so that it can request
enough space when it becomes visible. Since the size group is removed,
filler widget is no longer useful. Remove it as well.
2019-07-15 03:35:59 +00:00