Commit graph

5007 commits

Author SHA1 Message Date
Robert Ancell
770a3b1df6 color: Replace GObject boilerplace with G_DECLARE_TYPE 2018-05-30 15:08:44 +12:00
Robert Ancell
961b41a291 display: Use g_auto for variables 2018-05-29 22:35:32 +00:00
Robert Ancell
72a3516389 display: Replace ifdefs with #pragma once 2018-05-29 21:53:28 +00:00
Robert Ancell
40520d7b7f display: Replace GObject boilerplace with G_DECLARE_TYPE 2018-05-29 21:53:28 +00:00
Robert Ancell
17945caef6 search: Replace ifdefs with #pragma once 2018-05-29 21:42:33 +00:00
Robert Ancell
880ac4a89d search: Replace GObject boilerplace with G_DECLARE_TYPE 2018-05-29 21:42:32 +00:00
Georges Basile Stavracas Neto
90e7f05057 wi-fi: Remove unused header 2018-05-29 16:09:51 -03:00
Georges Basile Stavracas Neto
4151af5ea2 wifi: Hide when no Wi-Fi adapter is available
It's WIP.
2018-05-29 16:09:51 -03:00
Robert Ancell
7e4c1e3eae nofications: Use g_auto for variables 2018-05-29 18:29:45 +00:00
Robert Ancell
fceac14a2c notifications: Replace ifdefs with #pragma once 2018-05-29 18:29:45 +00:00
Robert Ancell
67a94dfee9 notifications: Replace GObject boilerplace with G_DECLARE_TYPE 2018-05-29 18:29:45 +00:00
Georges Basile Stavracas Neto
1b68bf1cb4 keyboard: Update code style
No functional changes were introduced. This is purely
aesthetical.
2018-05-29 13:50:17 -03:00
Robert Ancell
6a72e73d0c datetime: Use GtkTemplate 2018-05-29 16:34:28 +00:00
Robert Ancell
5174ae136d keyboard: Replace ifdefs with #pragma once 2018-05-29 15:44:19 +00:00
Robert Ancell
57975633e6 keyboard: Replace GObject boilerplace with G_DECLARE_TYPE 2018-05-29 15:44:19 +00:00
Georges Basile Stavracas Neto
ed36688c58 night-light: Rework implementation
This commit improves the Night Light code in various
ways:

 * Turn it into a template class, subclass of GtkDialog,
   and adapts all the code to reflect that.

 * Update the code style in various places, to make it
   more conformant with the documented code style.

 * Reorganize the code a bit, moving functions around,
   to make it more conformant with the documented order.
2018-05-29 12:30:16 -03:00
Georges Basile Stavracas Neto
f0bba59699 night-light: Use "#pragma once" in header
Let's use modern code practices around.
2018-05-29 12:29:42 -03:00
Benjamin Berg
77a1225917 network: Fix disconnecting the VPN connection_removed_cb handler
The disconnect was for the wrong object (connection rather than client).
Fix this by simply moving to use g_signal_connect_object which obsoletes
the explicit disconnect calls.
2018-05-29 15:16:50 +02:00
Benjamin Berg
52034ba0be network: Update VPN title when the connection is changed
When the connection is modified then the title might be changed. Call
the UI update function to ensure that widgets are updated.
2018-05-29 15:16:43 +02:00
Benjamin Berg
a51dbcd8ca network: Fix Bluetooth panel showing up after connection removal
The test to check whether the Bluetooth (simple section) contains
elements was testing for NetObjectSimple. However, ethernet connections
are a subclass and check would count these. This causes issue when the
code is run after net object removal.

The fix is to check for the exact object type rather than also allowing
subclasses.
2018-05-29 15:16:43 +02:00
Robert Ancell
4aee26cc77 display: Fix double free of GError 2018-05-29 15:01:03 +12:00
Robert Ancell
a7e84dcf2e mouse: Use GtkTemplate 2018-05-29 00:36:30 +00:00
Georges Basile Stavracas Neto
02f0353fc4 display: Various style fixes
It makes @feaneron happier, and fixes a couple of
memory leaks.
2018-05-28 21:24:41 -03:00
Benjamin Berg
9a4449dfa9 display: Implement major/minor axis snapping and infinit for edges
This improves the snapping behaviour in a number of ways. It allows
increasing the snapping distance while still helping the user to align
monitors by snapping a different distance for the minor axis. The patch
also allows setting this distance to infinity so that we get the correct
behaviour in the case of two monitors for the corners.
2018-05-28 20:57:20 -03:00
Benjamin Berg
d54c356aa5 display: Enable infinit snapping when arranging two monitors
Two monitors are a special case where it is easy to ensure that the
monitors are always adjacent to each other by special casing the
snapping code. Do so by increasing the snapping distance to infinity and
adding extra snapping points so that corner cases are covered.
2018-05-28 20:57:20 -03:00
Benjamin Berg
08a7f7cb53 display: Move output utility functions into CcDisplayMonitor
This adds the following API:
 * cc_display_config_get_ui_sorted_monitors
   Returns the monitors in UI order
 * cc_display_config_count_useful_monitors
   Counts the useful monitors (active and usable)
 * cc_display_monitor_is_useful
   Checks if a monitor is active and usable
 * cc_display_monitor_is_useable
   Check if a monitor is marked as useable
 * cc_display_monitor_set_usable
   Used to mark builtin monitors as unusable if the lid is closed
 * cc_display_monitor_get_ui_*
   Get the UI number and strings for display

https://bugzilla.gnome.org/show_bug.cgi?id=786971
2018-05-28 20:57:20 -03:00
Benjamin Berg
6fa9368f38 display: Remove incorrect comment
The comment was not updated when the workaround in the code was removed.

https://bugzilla.gnome.org/show_bug.cgi?id=786971
2018-05-28 20:57:20 -03:00
Benjamin Berg
e17e9daa19 display: Remove unused old display arrangement code
Remove the code that has become unused with the new arrangement widget.

There are more possible cleanups as there is some code duplication
between cc-display-panel.c and cc-display-arrangment.c at this point.

https://bugzilla.gnome.org/show_bug.cgi?id=786971
2018-05-28 20:57:20 -03:00
Benjamin Berg
199a7117f2 display: Add new arrangement widget and hook it up
This commits adds a new arrangement widget, refactoring the existing
code and addressing a number of issues:
 * Forced snapping made laying out more than 2 monitors hard
 * Random gaps would be shown between monitors
 * The scaling was fixed and usually tiny

https://bugzilla.gnome.org/show_bug.cgi?id=786971
2018-05-28 20:57:20 -03:00
Benjamin Berg
32be5bd1d9 display: Add signal to monitor notifying about position changes
This is in preparation to a new arrangement widget.

https://bugzilla.gnome.org/show_bug.cgi?id=786971
2018-05-28 20:57:20 -03:00
Benjamin Berg
faaf402c82 display: Re-indent cc-display-config.h
This commit has no functional changes.
2018-05-28 20:57:20 -03:00
Robert Ancell
5bb152acb0 mouse: Replace ifdefs with #pragma once 2018-05-28 23:47:59 +00:00
Robert Ancell
38bbaeb8fa mouse: Replace GObject boilerplace with G_DECLARE_TYPE 2018-05-28 23:47:59 +00:00
Robert Ancell
5c418b8983 region: Use GtkTemplate 2018-05-29 11:38:39 +12:00
Robert Ancell
8436a4fe29 region: Replace ifdefs with #pragma once 2018-05-29 11:27:04 +12:00
Robert Ancell
5be47a16a5 region: Replace GObject boilerplace with G_DECLARE_TYPE 2018-05-29 11:27:04 +12:00
Robert Ancell
79e00c37b0 region: Use g_auto for variables 2018-05-28 23:09:27 +00:00
Robert Ancell
389bb1b87c privacy: Replace ifdefs with #pragma once 2018-05-29 10:47:48 +12:00
Robert Ancell
b81b93193a privacy: Replace GObject boilerplace with G_DECLARE_TYPE 2018-05-29 10:47:48 +12:00
Robert Ancell
a90e13f12c keyboard: Use g_auto for variables 2018-05-29 10:35:14 +12:00
Carlos Garnacho
35adc02d42 wacom: Use GdkMonitor API on calibrator UI
Replaces usage of deprecated GdkScreen API. We still have to pass
monitor numbers around for gdk_window_fullscreen_on_monitor(), such
is life.
2018-05-26 10:09:28 +02:00
Carlos Garnacho
c3b34e6798 wacom: Use GdkSeat grabs in g-c-c's pad button action mapper UI
Replaces usage of deprecated API.
2018-05-26 10:09:28 +02:00
Carlos Garnacho
2503832046 wacom: Use GdkSeat API to list slave stylus devices
Replaces usage of deprecated API.
2018-05-26 10:09:28 +02:00
Robert Ancell
ba3797aafe background: Remove unused variables 2018-05-25 12:36:34 +12:00
Michael Catanzaro
9b32898cee thunderbolt: Fix build
Providing autocleanups for types you don't own is not a good idea, since
it breaks when upstream adds those autocleanups.
2018-05-16 13:01:12 -05:00
Ondrej Holy
f4b1fb66a4 user-accounts: Fix hint for wrong enterprise user/password
A variable of label widget, used for a hint when wrong enterprise
user/password is used, is not properly initialized and thus criticals
are shown instead of the hint when user/password is wrong. Let's bind
the variable properly.
2018-05-12 04:12:43 +00:00
Andrea Azzarone
f9b65046e9 night-light-dialog: Ignore G_IO_ERROR_CANCELLED errors
We should ignore G_IO_ERROR_CANCELLED errors and avoid displaying useless
warnings. Also use g_clear_object instead of g_object_unref.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/87
2018-05-12 02:31:12 +00:00
Marek Kasik
f3257ce82a printers: Focus search entry in new printer dialog
Focus search entry in the new printer dialog once user starts to type
so he does not need to click on it.

Closes #41
2018-05-10 16:47:10 +00:00
Andrea Azzarone
1d26f63b18 night-ligth-dialog: Avoid dereferencing invalid pointer
dialog_got_proxy_cb and dialog_got_proxy_props_cb may be called after the
instance of CcNightLightDialog has been disposed. Make sure 'self' pointer is
not dereferenced if not valid.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/86
2018-05-10 00:56:19 +02:00
Georges Basile Stavracas Neto
197ed1ed55 datetime: Update backwards file
This is just a plain copy of the most recent (2017-10)
backwards file from tzinfo.
2018-05-09 15:38:12 -03:00