Commit graph

176 commits

Author SHA1 Message Date
Mohammed Sadiq
23a7401467 language-chooser: Port to HdyDialog
so that it works well on small screens
2019-09-09 22:14:18 +00:00
Robert Ancell
1752cf3bb5 Make /etc/os-release support common
The existing code is used in multiple places with slightly different
implementations.
2019-09-09 21:42:10 +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
Robert Ancell
e85816f83b common: Fix crash in language chooser
A report in Red Hat bugzilla [1] shows for some reason the country is set to
NULL and this causes a crash when comparing against search terms. The solution
is to handle the NULL without crashing.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1685251
2019-03-26 22:02:32 +00:00
Benjamin Berg
42006249af Remove internal copy of HdyValueObject
The relevant code is included in libhandy 0.8 and can be removed now
that we depend on a new enough version.
2019-03-04 16:59:25 +00:00
Benjamin Berg
b789a1cda2 common: Add CcValueObject until HdyValueObject is available
libhandy now has HdyValueObject, this simply copies the class over as it
will only become available in libhandy 0.8.
2019-01-29 12:05:43 +01:00
Peter Hutterer
008b1f68c8 common: fix udev-based device removal
libgudev allocs a new GUdevDevice object for each event, so the pointer value
for the 'add' udev event differs from the one for the 'remove' event. If we
use the pointer value as hash table key, we'll never remove the device.
Switch to use the syspath of the device instead, that one is unique per
device.

Fixes #309
2018-12-11 10:56:28 +10:00
Robert Ancell
f649308f1f common: Fix ... row not showing in language chooser
Broken in 67a9f47464
2018-11-12 20:33:05 +00:00
Robert Ancell
700b857ab8 common: Fix language chooser showing all languages as checked
If the language chooser was created and a language not set all the
checks are shown beside each entry. Solved by hiding these checks
by default.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/250
2018-10-26 16:59:04 +13:00
Robert Ancell
67a9f47464 common: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-11 22:21:34 +00:00
Robert Ancell
b2cd50019f common: Change language chooser layout to match design
Have the language name on the left and the country on the right dimmed as per:
https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage
2018-09-17 16:32:52 +00:00
Robert Ancell
a2401d8f9a common: Update language chooser dialog title and buttons to match design
Update to use "Select Language" and "Select" as per:
https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage
2018-09-14 15:18:42 +00:00
Robert Ancell
8af63dc40a common: Disable language chooser confirm button until a language is selected
Make the button insenstive until a language is chosen as per:
https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage
2018-08-27 18:33:52 +00:00
Robert Ancell
828024e225 common: Make language chooser dialog match design
Update the chooser to:

* Use a search bar at the top of the dialog, not the bottom
* Have a larger window
* Remove space from around listbox

https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage

Merges !129
2018-07-22 09:54:21 -03:00
Robert Ancell
148e4c8fd0 common: Use GtkTemplate for the language chooser dialog 2018-07-18 22:39:32 +00:00
Robert Ancell
65c43b4fac common: Fix missing reference
Was introduced in 86d1d30
2018-07-02 21:11:42 +00:00
Robert Ancell
86d1d30c63 common: Use g_auto for variables 2018-06-07 01:08:07 +00:00
Robert Ancell
223087cf39 common: sharing: Replace ifdefs with #pragma once 2018-06-01 21:41:34 +00:00
Robert Ancell
42ea814d72 common: Replace GObject boilerplace with G_DECLARE_TYPE 2018-06-01 21:41:33 +00:00
Gunnar Hjalmarsson
0bd90ca34b region: Show scrollbars if needed
If we are initially showing more entries than can be fit, we should
scroll then too rather than deciding in code when to do this.

https://bugzilla.gnome.org/show_bug.cgi?id=793861
2018-05-31 12:36:54 +12:00
Benjamin Berg
d2d4980ce8 Move panel/common tests into new tests subdirectory 2018-04-17 15:26:59 +02: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
Georges Basile Stavracas Neto
35f948f5fb common: Cache D-Bus proxy 2018-04-06 22:23:38 -03:00
Carlos Garnacho
3bd808127d common: Use GdkDevices directly as HT keys on GsdDeviceManagerX11
The dance we do to fetch event nodes from devices seems a bit superfluous
now, and even wrong if multiple X11 devices boil down to the same event
node.

Fixes the wacom panel not showing the "Map buttons..." action on older
kernels and wacom.ko modules, because the pad device shares the event node
with the stylus. Pad device lookups in order to enable the action obtain
the stylus device, thus the action is not shown.

https://bugzilla.gnome.org/show_bug.cgi?id=793029
2018-01-30 21:20:11 +01:00
Iñigo Martínez
dc0988d47c build: Remove autotools
To avoid the burden of maintaining multiple build systems, this
patch removes autotools support.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-18 12:20:08 +01:00
Georges Basile Stavracas Neto
62f07b2c6d common: Don't unconditionally define HAVE_WAYLAND
This header unconditionally defines HAVE_WAYLAND when GTK
is built with Wayland support. This breaks the build when
building with Wayland disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 20:09:38 -02:00
Iñigo Martínez
32edd6789e build: Port to meson build system
Meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 20:09:35 -02:00
Carlos Garnacho
f24b528695 common: Check for wayland before building GsdUdevDeviceManager
Udev is rather common, so this check doesn't suffice if anyone wants
to build with no wayland support whatsoever.

https://bugzilla.gnome.org/show_bug.cgi?id=780544
2018-01-16 17:35:03 +01:00
Carlos Garnacho
a23aa64ec7 common: Update from gnome-settings-daemon 2017-07-13 18:11:01 +02:00
Carlos Garnacho
3b72790b72 common: Add tablet device type to pad GdkDevices
The wacom panel expects all tablet devices to have the "tablet"
device type flag set on the GsdDevice, otherwise devices won't get
recognized and paired with the other devices for the same tablet.
Uncovered now that GTK+ correctly uses GDK_SOURCE_TABLET_PAD for
pad devices on X11.

https://bugzilla.gnome.org/show_bug.cgi?id=784882
2017-07-13 18:11:01 +02:00
Bastien Nocera
3ab88c7ff0 common: Fix parallel build
https://bugzilla.gnome.org/show_bug.cgi?id=752596
2017-02-08 18:37:06 +01:00
Rui Matos
1e7631d8a4 common: Handle trackpoint devices in GsdDeviceManagerX11
With gtk+ >= 3.22 trackpoints are classified separately from mice so
we need to handle them here. Also, remove the default case so that we
get a compilation warning in case this happens again.

In the future we might want to expose this further if we start adding
trackpoint specific UI.

https://bugzilla.gnome.org/show_bug.cgi?id=776660
2017-01-09 15:45:38 +01:00
Carlos Garnacho
0dca4e7fe9 common: Handle pad devices in GsdDeviceManagerX11
We cater for the old(=Wacom) and new(=libinput) type/name schemes,
so we don't require a too recent gtk+ just for this.
2016-11-04 23:26:41 +01:00
Carlos Garnacho
15d3e0e2b5 common: Detect pad devices in GsdDeviceManagerUdev 2016-11-04 23:26:41 +01:00
Carlos Garnacho
176dfca170 common: Add "pad" GsdDeviceType to GsdDeviceManager
So we can recognize pad devices.
2016-11-04 23:26:41 +01:00
Carlos Garnacho
8f9259ac06 common: Implement lookup vfunc in GsdDeviceManagerUdev 2016-11-04 23:26:41 +01:00
Carlos Garnacho
cfec960c56 common: Implement lookup vfunc in GsdDeviceManagerX11
And remove the get_gdk_devices() call, since it's unused and unneeded.
2016-11-04 23:26:41 +01:00
Carlos Garnacho
3db9203dd2 common: Add generic API to map GdkDevices to GsdDevices
Now that we have tablet support in wayland, we can kind of honor
that in the places we're interested. The inverse (looking up the
GdkDevices that a single GsdDevice represents) is unneeded.
2016-11-04 23:26:41 +01:00
Michael Catanzaro
fa9ea59ae4 common: fix parallel build race 2016-09-09 19:28:22 -05:00
Rui Matos
11d5d850b2 common: Fix search by skipping soft hyphens when normalizing
Commit b3be07609a introduced soft
hyphens in panel names which causes searches to fail. Fix this by
skipping soft hyphen when normalizing strings.

https://bugzilla.gnome.org/show_bug.cgi?id=765617
2016-04-26 17:17:31 +02:00
Zeeshan Ali (Khattak)
5ebf3d8ddf common: Fix codying-style in cc_util_get_smart_date()
https://bugzilla.gnome.org/show_bug.cgi?id=761245
2016-03-03 16:07:58 +00:00
Zeeshan Ali (Khattak)
afebec5d9a common: Move get_smart_date() to common utils
And rename it to cc_util_get_smart_date().

In a following patch, we'll need to use it from privacy panel.

https://bugzilla.gnome.org/show_bug.cgi?id=761245
2016-03-03 16:07:58 +00:00
Bastien Nocera
d98d42880d common: Update from gnome-settings-daemon 2016-01-10 10:24:41 +01:00
Rui Matos
ae7b1a97eb common: Tick an unselected row when enter is pressed
This makes the dialog easier to use via keyboard navigation since
otherwise we would just dismiss the dialog with the current selection
on enter when the user actually intended to change the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=752001
2015-07-07 18:48:56 +02:00
Rui Matos
32653a0a65 common: Dismiss dialog if the activated row was already ticked
This makes the dialog a bit friendlier to use.

https://bugzilla.gnome.org/show_bug.cgi?id=752001
2015-07-07 18:48:56 +02:00
Rui Matos
912e78d896 common: Update from gnome-settings-daemon 2015-07-02 15:17:28 +02:00
Rui Matos
dbe6eb9bbf common: Update from gnome-settings-daemon 2015-06-29 16:12:57 +02:00