Commit graph

167 commits

Author SHA1 Message Date
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
Bastien Nocera
41bb1a6ff2 common: Fix gtk_tree_model_get_iter_first() retval
https://bugzilla.gnome.org/show_bug.cgi?id=749892
2015-05-27 11:06:02 +02:00
Bastien Nocera
9140b47fe3 common: Fix build on non-Linux systems
Only define HAVE_WAYLAND when GDK_WINDOWING_WAYLAND is defined.

https://bugzilla.gnome.org/show_bug.cgi?id=743266
2015-01-25 14:04:53 +01:00
Bastien Nocera
3c41d02b09 common: Fix build by providing dummy header
https://bugzilla.gnome.org/show_bug.cgi?id=743266
2015-01-21 14:26:00 +01:00
Bastien Nocera
1be3811717 common: Update from gnome-settings-daemon
https://bugzilla.gnome.org/show_bug.cgi?id=743266
2015-01-21 14:26:00 +01:00
Bastien Nocera
fcbdf920e6 common: Update commit message prefix for "update-from-gsd"
https://bugzilla.gnome.org/show_bug.cgi?id=743266
2015-01-21 14:26:00 +01:00
Carlos Garnacho
be8d68c591 Update device configuration from gnome-settings-daemon
GsdWacomDevice has been updated, dragging GsdDeviceManager as a dependency
from g-s-d, which has been added to panels/common, and compiled as a
separate static libary, which is used by the wacom and mouse modules.

gsd-input-helper.[ch] is now in such library and has been removed from
the panel directories.

https://bugzilla.gnome.org/show_bug.cgi?id=743196
2015-01-20 20:44:13 +01:00
Ondrej Holy
e9af927e5f cc-language-chooser: remove deprecated GtkMisc 2014-11-20 11:32:33 +01:00
Rui Matos
ed273aa8f1 cc-common-language.c: Don't check if we have translations here
The list of locales returned from gnome_get_all_locales() already
filters out the locales for which we don't have translations so this
is a redundant check since users of get_initial_languages() only show
a language if it exists in gnome_get_all_locales() .

In fact, this code stopped working correctly since we started passing
locales including the codeset suffix to insert_language() because the
translation directories usually don't include the suffix and we
weren't stripping the suffix here.

https://bugzilla.gnome.org/show_bug.cgi?id=710412
2014-10-29 15:03:43 +01:00
Rui Matos
c244568f0b cc-common-language.c: Remove a bunch of unused code
This stopped being used in the last region panel re-design. See commit
35d920f1b8 .

https://bugzilla.gnome.org/show_bug.cgi?id=710412
2014-10-29 15:02:46 +01:00