summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Charging ... until full, discharging ... remainingEric Curtin2021-04-191-9/+7
| | | | | | | The times beside the charging and discharging states are ambiguous, adding "until full" and "remaining" to be more clear. Closes: #128
* Fix compilation warningsGaël Bonithon2021-01-261-1/+1
|
* Fix missing-prototypesOlaf Hering2020-12-281-1/+1
| | | | | | xfpm-power-common.c:100:1: error: no previous prototype for 'xfpm_battery_get_icon_index' [-Werror=missing-prototypes] Signed-off-by: Olaf Hering <olaf@aepfle.de>
* link xfpm-brightness.c with -lmOlaf Hering2020-12-281-0/+1
| | | | | | | | Due to usage of powf, -lm must be used. Fixes commit c866cf9faec6333e60f6b55a56b92ec9494747f3 Signed-off-by: Olaf Hering <olaf@aepfle.de>
* Fix va_args usage in get_device_icon_nameOlaf Hering2020-12-281-2/+2
| | | | | | | | | | | | | | | | | | | | xfpm-power-common.c: In function 'get_device_icon_name': xfpm-power-common.c:257:52: error: left-hand operand of comma expression has no effect [-Werror=unused-value] 257 | icon_name = g_strdup_printf (is_panel ? "%s-%s", XFPM_AC_ADAPTER_ICON, "-symbolic" : "%s", XFPM_AC_ADAPTER_ICON); | ^ xfpm-power-common.c:257:74: error: left-hand operand of comma expression has no effect [-Werror=unused-value] 257 | icon_name = g_strdup_printf (is_panel ? "%s-%s", XFPM_AC_ADAPTER_ICON, "-symbolic" : "%s", XFPM_AC_ADAPTER_ICON); | ^ xfpm-power-common.c:269:52: error: left-hand operand of comma expression has no effect [-Werror=unused-value] 269 | icon_name = g_strdup_printf (is_panel ? "%s-%s", XFPM_AC_ADAPTER_ICON, "-symbolic" : "%s", XFPM_AC_ADAPTER_ICON); | ^ xfpm-power-common.c:269:74: error: left-hand operand of comma expression has no effect [-Werror=unused-value] 269 | icon_name = g_strdup_printf (is_panel ? "%s-%s", XFPM_AC_ADAPTER_ICON, "-symbolic" : "%s", XFPM_AC_ADAPTER_ICON); Fixes commit b6d6bf8b55ecce11d0c00b1267ce03fe9b9df44e Fixes #103 Signed-off-by: Olaf Hering <olaf@aepfle.de>
* panel-plugin: Prefer ac-adapter-symbolic (Fixes #103)Simon Steinbeiss2020-11-241-2/+2
|
* Cleanup codeSimon Steinbeiss2020-11-062-15/+13
|
* Move default icon names into one placeSimon Steinbeiss2020-11-061-0/+3
|
* Also use symbolic icons in battery notificationsSimon Steinbeiss2020-11-061-2/+6
|
* Use more accurate status icons (Fixes #95)Simon Steinbeiss2020-11-063-10/+60
| | | | | Previously we relied entirely on UPower, now we also check if the icons used by Gnome are available (battery-level-*).
* Guard against NULL pointer dereferenceSimon Steinbeiss2020-11-041-6/+15
|
* Fix spelling mistake (Bug #16698)Simon Steinbeiss2020-05-271-1/+1
|
* Add new app icon and switch to rDNS icon nameSimon Steinbeiss2020-05-211-1/+1
| | | | Co-author: Maurizio Galli <maurizio.galli@gmail.com>
* Make brightness steps configurable (Bug #12062)Timothy Lee2020-01-063-4/+61
| | | | | | | | | This commit introduces two new options: 1) Configuring the amount of brightness steps 2) Whether to distribute the steps in a linear or exponential way Both options are presented in the settings dialog and affect the brightness keys and the panel plugin.
* Fix indentationSimon Steinbeiss2020-01-051-2/+2
|
* Fix indentationSimon Steinbeiss2019-11-1610-1013/+992
|
* panel-plugin: Add (optional) Presentation mode indicator (Bug #15773)Simon Steinbeiss2019-11-091-0/+1
|
* Show discharge level even in unknown state (Bug #15280)Simon Steinbeiss2019-04-251-0/+10
| | | | Also strip leading/trailing whitespace from vendor and model.
* Handle glib deprecationsAndre Miranda2019-04-141-15/+29
|
* Fix g_type_class_add_private is deprecatedAndre Miranda2019-04-141-7/+2
|
* Rename variables for xfconf channel and property prefixKacper Piwiński2019-04-141-2/+4
|
* Fix various warningsViktor Odintsev2017-12-271-10/+16
| | | | Some are related to Gtk3.22, some are simply compiler warnings.
* Add support for XF86Battery button (Bug #14055)Viktor Odintsev2017-12-192-1/+3
|
* panel-plugin: Set ac-adapter icon for desktop systems (Bug #13959)Simon Steinbeiss2017-11-191-0/+6
| | | | | | | | | | | | | Unfortunately UPower does not differentiate between desktop and laptop systems so we decide that it's a desktop if it: * is not a UPS * does not have a battery * does not have a lid In this case we show the "ac-adapter" icon for the systray and the "ac-adapter-symbolic" icon for the Xfce Panel Plugin. Before the "battery-missing" icon was shown, which is what UPower reports for the display device.
* Fix build on FreeBSD and DragonFlyBSD (Bug #13984)Romain B2017-11-091-1/+1
| | | | | - Fix the DPMS detection by adding correct lib/cflags on Xext AC_CHECK_LIB, so -lXext is correctly added on link time (taken from xfwm4) - Also uses XDT_CHECK_LIBX11_REQUIRE to detect X11
* Replace deprecated gdk_screen_get_numberSimon Steinbeiss2017-10-301-76/+76
| | | | | with gdk_x11_screen_get_screen_number. Also lots of trailing whitespace got removed.
* Handle screensaver activity with it's own class (Bug #12603)Eric Koegel2016-05-312-31/+0
| | | | | | | | | | Move the screensaver inhibit, heartbeat, and lock code to its own set of files we can easily share with xfce4-session. Use the screensaver's dbus API if it supports it for inhibit and lock calls. Otherwise, use the heartbeat-command and LockCommand from xfpm and xfsm if available. Finally, for the lock function, fallback to trying xdg-screensaver, xflock4, and xscreensaver-command in that order.
* Fix a crash on logout (Bug #12465)Eric Koegel2016-02-251-0/+5
| | | | | | | | | During session shutdown we were in a situation with a NULL model which was crashing a crash. Set these to an empty string so xfpm properly handles it. Reported and fixed by Jaroslav Škarvada. Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
* Replace XTestFakeKeyEvent with inhibit/heartbeat (Bug #11083)Eric Koegel2016-02-161-0/+1
| | | | | | | | | Instead of using XTestFakeKeyEvent, attempt to contact whatever screensaver is running via its dbus interface. Failing that, a /xfce4-power-manager/heartbeat-command xfconf property will be executed every 30 seconds to keep the screensaver from launching. This way xscreensaver, xdg-screensaver, caffeine or a similar tool can be used.
* Bring back the about dialog (Bug #11982)Eric Koegel2015-06-142-9/+16
| | | | | This brings back the about dialog for the panel plugin and updates it for the newer stuff required by GTK3.
* Hidden option to show percentage/remaining time in panel plugin (Bug #4499)Simon Steinbeiss2015-06-051-0/+1
| | | | | | | | | | | | The property /xfce4-power-manager/show-panel-label has to be added to the channel xfce4-power-manager as INT. Then you can set the value from 0 to 3, where 0: hides the label 1: shows the percentage 2: shows the remaining time and 3: shows time and percentage. The format is not configurable for now and the label is hidden when UPower reports the status of the display device as "fully charged".
* Don't crash when UPower returns "" for the icon-name (Bug #11756)Eric Koegel2015-03-291-2/+13
| | | | I assume this is for devices UPower doesn't know anything about?
* Removed all dbus includes and add gio dependencyPeter de Ridder2015-03-222-3/+0
|
* Migrate to UPower's icon-namesSimon Steinbeiss2015-03-223-164/+49
|
* Use symbolic brightness icon and fix indentingSimon Steinbeiss2015-03-221-1/+1
|
* Improve notification icon sizeEric Koegel2015-03-221-1/+1
| | | | | | Before it was forcing the icon to a smaller size. Also switch to notify_notification_set_image_from_pixbuf since the other method is deprecated.
* common: fix deprecated warningsEric Koegel2015-03-222-22/+13
|
* Add support for ConsoleKit2Eric Koegel2015-02-141-0/+2
| | | | | | ConsoleKit2 implements the suspend/hibernate DBUS API. This patch uses it if ConsoleKit2 is running and reports the system as capable of suspend or hibernate.
* Use sysctl(3) to get or set brightness level on FreeBSD and DragonFly systemsOlivier Duchateau2015-02-071-1/+9
| | | | Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
* xrandr brightness: Check for eDP devices too (bug #11308)Marcus Overhagen2014-11-201-1/+1
| | | | | | | Backlight brightness control via xrandr API is not limited to LVDS displays but also available when the display is connected by Embedded Display Port (eDP). Signed-off-by: Harald Judt <h.judt@gmx.at>
* Use translated device type for unknown devices (bug #11217)Harald Judt2014-10-301-0/+14
| | | | | | | | | | | If the device is unknown to the kernel (maybe no-name stuff or whatever), then vendor and model will have a hex ID of 31 characters each. We do not want to show them, they are neither useful nor human-readable, so translate and use the device type instead of the hex IDs. This fixes the negative side-effect that the settings window width is too large.
* Never try to display the -missing iconsSimon Steinbeiss2014-08-211-6/+2
| | | | | The old code didn't check all UP_DEVICE states, e.g. UNKNOWN was missing, resulting in no icon being shown.
* Remove old CPU freq stuffEric Koegel2014-08-181-1/+0
| | | | | We don't do CPU frequency management anymore, remove the lingering code.
* Use generic icon-names for the devicesSimon Steinbeiss2014-08-172-24/+16
| | | | | | | Draw the progressbar indicating the load-status of the devices with cairo, eradicating the need for an icon per load-status. TODO: Add the same drawing routine for the devices tab in the settings manager.
* Use pkexec for pm-helper (Bug 10943)Eric Koegel2014-08-091-0/+2
| | | | | | | Switch to using pkexec instead of the sudo helper. This allows users to use things such as fingerprint readers and other auth methods to verify credentials. A default polkit rule is shipped in this patch as well in the org.xfce.power.policy.
* Reformat common/xfpm-config.hHarald Judt2014-08-041-61/+47
| | | | | Also rearrange the items to better reflect the layout in settings dialog. It's easier to find one's way around that way.
* Move xfpm-config.h from src to commonHarald Judt2014-08-041-0/+97
| | | | If it's used by all components, that's the place it should be.
* Implement brightness switch handling in common/xfpm-brightnessHarald Judt2014-07-232-1/+76
| | | | | This adds the necessary utility functions to read and write the kernel brightness switch setting.
* Selecting a device in the plugin displays the detailsEric Koegel2014-07-132-0/+13
| | | | | | When the user selects a device in the battery plugin, the xfpm settings dialog is activated, the devices tab is brought to focus, and the device is selected with the details shown.
* Remove tab from translatable stringEric Koegel2014-07-101-1/+1
|