summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2025-01-16Keyboard backlight handling improvements (#404)HEADmasterColomban Wendling1-78/+84
* gpm-kbd-backlight: Fix toggling backlight back on The static value was reset on every call rather than only initially, resulting in failure to restore the initial value when toggling it back on. * gpm-kbd-backlight: Persistently save user-set brightness Try and save the user-set brightness to be able to restore it on next restart. This is not perfect because we have complex interaction between settings which makes it not trivial, if at all possible, to save the value yet respect the dim settings. Here we try to save the value in a way that counteract battery dimming so that restoring the value yields expected results (e.g. a value saved on battery restores identical on battery again), but it cannot work when the value to save is larger than the dimmed maximum as at the moment the maximum value is 100%. It is however the best I could come up with working with the settings we currently have, and it's probably good enough at least as a starting point. It also switches from `master_percentage` to `brightness_percent` in the toggle code because the former is only initialized to the actual current brightness value once brightness changed at least once, while the former is properly initialized. It is otherwise quivalent for this feature, and less confusing as to when the value gets updated. * refactor: gpm-kbd-backlight: Remove some unnecessary temp variables * refactor: gpm-kbd-backlight: Move dimming logic to a helper function * gpm-kbd-backlight: Get rid of `master_percentage` Now the on-AC value changes following user input, the internal `master_percentage` was just plain confusing and actually make things a bit weird at times because it doesn't follow dynamic user choices. So just get rid of it, replacing it with the on-AC value. * gpm-kbd-backlight: Rationalize handling of battery-reduce setting Handling of a disabled battery-reduce setting was too aggressive, which could reduce in not setting backlight value in unrelated cases, including initial startup and resume, as well as some cases of IDLE handling. Now the user choices are better followed, the whole special-casing could probably be removed as the internal state should always reflect the reality, but keep the specific check not to do anything on AC plug/unplug when this is disabled just in case, although the historical reasons why it was actually problematic should be gone now.
2023-11-06Remove compilation warning fix data type format errorzhuyaliang19-102/+122
2023-10-24Add meson build supportzhuyaliang1-0/+241
2023-10-16replace deprecated gtk_image_menu_item_new_from_stockraveit651-1/+3
2023-10-16replace deprecated gtk_image_menu_itemraveit652-6/+10
2022-03-21Show device model even if vendor is not availableDamien Thébault2-0/+6
2022-03-21Add support for gaming inputsDamien Thébault2-0/+8
2022-03-18gpm-prefs: fix memory leakrbuj1-3/+1
In addition, it adds enumerations to access indexed arrays.
2022-03-18gpm-statistics: fix memory leakrbuj1-51/+115
In addition, it adds enumerations to access indexed arrays.
2022-03-18Fix implicit conversion changes signedness: 'gboolean' to 'guint'rbuj2-2/+2
2022-03-11gpm-backlight: unused function 'gpm_common_sum_scale'rbuj1-13/+0
2022-01-01Fix build warnings about missing field initializerrbuj4-4/+4
2021-12-11Use a blank line at mostrbuj9-10/+0
2021-06-22update copyright to 2021raveit6564-0/+64
2021-02-04build: Use PACKAGE_URL variablerbuj1-2/+2
2021-01-16Update copyright to 2021rbuj1-1/+1
2021-01-07Remove warning -Wunused-but-set-variablerbuj2-13/+1
2020-12-07gpm-backlight: Fix the position of the inline keywordrbuj1-1/+1
2020-11-10mate-power-preferences: add option to enable keyboard dimmingAndrej Valek1-0/+3
2020-10-20gpm-control.c: Add libsecret implementation to gpm_control_hibernate()NP-Hardass1-0/+37
2020-10-20gpm-control.c: Add libsecret implementation to gpm_control_suspend()NP-Hardass1-0/+40
2020-10-20Add autotools support for libsecretNP-Hardass1-0/+3
2020-09-10Revert "add meson project"raveit652-186/+0
This reverts commit 1db4b409322e559a3d3a03677dd482a0613f3b29.
2020-09-03add meson projectVictor A. Santos2-0/+186
fix indentation in some files
2020-08-04Remove trailing spaces/tabsrbuj4-7/+7
find . \( -name '*.h' -o -name '*.c' \) -exec sed -i 's/[[:space:]]*$//' {} \; find . \( -name '*.h' -o -name '*.c' \) -exec sed -i 's/\t*$//' {} \;
2020-07-12gpm-kbd-backlight: Remove unused functionsrbuj1-100/+0
2020-07-08Remove unused variable from gpm_notebook_scroll_event_cbrbuj4-39/+37
2020-06-25Add git.mk to generate .gitignoretamplan1-0/+1
2020-05-25gpm-kbd-backlight: do not change keyboard back-light, when disabledAndrej Valek1-9/+16
Automatically change keyboard back-light only when enabled on battery. Keep previous brightness level between state change. Signed-off-by: Andrej Valek <[email protected]>
2020-04-01gpm-phone: silent "not connected" message unless debugraveit651-1/+1
Debug message is modified to something identifiable
2020-03-31gpm-brightness: silent "using cache for value" message unless debugraveit651-1/+1
2020-03-25Remove warning: ‘GTimeVal’ is deprecatedrbuj1-5/+3
2020-03-14gpm-backlight: silent "no dimming hardware" message unless debugrbuj1-1/+1
2020-03-11gpm-control: warning when a property cannot be set using dbusrbuj1-6/+6
2020-03-10glib-genmarshal: replace deprecated tokens NONE and BOOLrbuj1-15/+15
2020-03-09Remove warning function declaration isn’t a prototyperbuj1-1/+1
2020-03-09Port from EggDebug to the built-in GLib logging frameworkrbuj31-840/+395
2020-03-08gpm-manager: Remove dereference of a null pointer warningrbuj1-13/+17
2020-03-07Remove warning use of memory after it is freedrbuj1-1/+1
2020-03-07Rewrite gpm-prefs.ui from scratchrbuj1-130/+80
2020-03-03Remove warnings: unused variablerbuj4-5/+0
2020-02-27Read authors (updated) from mate-power-manager.aboutrbuj2-7/+39
2020-02-24Remove the CPU wakeups featurerbuj1-374/+4
2020-02-20Update copyright year on about dialogrbuj1-1/+1
2019-09-30Use WARN_CFLAGS which are only set with -enable-compiler-warningsrbuj1-14/+18
MATE_COMPILE_WARNINGS is present in configure.ac but WARN_CFLAGS variable is not used. git grep WARN_CFLAGS It removes -enable-extra-warn=yes, since it is recommended to use -enable-compile-warnings=maximum. It sets -enable-compiler-warnings=yes, the default value for all MATE packager for now. It prints WARN_CFLAGS in summary table.
2019-09-26drop obsolete version checks for upowerraveit657-467/+2
with required version bump to upower-0.99.8 we don't need them any more.
2019-09-26Use up_client_get_devices2()raveit653-3/+3
The previous code would have leaked all the UpDevice objects because no free function was set on the returned GPtrArray. With depending on upower-glib 0.99.8 get_devices() was deprecated and get_devices2() was introduced, we can simply switch to get_devices2() which does set a free function on the returned GPtrArray, stopping the leak. Inspired from: https://gitlab.gnome.org/GNOME/gnome-control-center/commit/c1210c5 see upower upstream: https://gitlab.freedesktop.org/upower/upower/commit/cb1071b
2019-08-20Use gresources for gpm-prefs.ui and gpm-statistics.uirbuj4-10/+32
2019-08-20egg-console-kit: avoid 'g_type_class_add_private'Pablo Barciela1-5/+4
2019-08-20gpm-engine: avoid 'g_type_class_add_private'Pablo Barciela1-5/+3