2006-10-17 Richard Hughes * src/gpm-hal-cpufreq.c: (gpm_hal_cpufreq_get_governor) Free the return string. * src/gpm-hal-cpufreq.c: (gpm_hal_cpufreq_finalize): Free any gobjects in use. * src/gpm-info-data.c: (gpm_info_data_free): Correct a typo that was stopping the info data being freed. * src/gpm-proxy.c: (gpm_proxy_finalize): Only unref if the object is not null. Paranoia. * src/gpm-tray-icon.c: (gpm_tray_icon_finalize): Free the strings in use by the gobject. 2006-10-17 Richard Hughes * src/gpm-manager.c: (power_button_pressed_cb): Don't poke the screen when we shut the lid. This should stop the display going off, on, off when the lid is closed. Should fix #362694. * src/gpm-power.c: (battery_kind_cache_update): When we fall back to using the ac-adapter, we check the percentage. The percentage was set below the check, and thus always failed. Pointed out in #361583, and will probably affect multibattery laptops. 2006-10-17 Richard Hughes * src/gpm-button.c: (gpm_button_grab_keystring), (gpm_button_init): Only allow single keys to be grabbed. It makes our life simpler. * src/gpm-tray-icon.c: (gpm_tray_icon_add_device): Use the localised general string to describe the battery device in the dropdown. This fixes #362690. * data/gnome-power-manager.schemas.in: * data/gpm-prefs.glade: * src/gpm-gconf.h: * src/gpm-manager.c: (idle_changed_cb): * src/gpm-prefs-core.c: (gpm_prefs_format_time_cb), Make the sleep options drop-downs like the other options, as feedback from a typical non-technical user (my girlfriend) was that is wasn't clear how to disable. 2006-10-16 Richard Hughes * src/gpm-button.c: (gpm_button_init): Added another accesskey. Will fix up the X stuff in a few mins. * src/gpm-power.c: (gpm_power_get_battery_device_entry): * src/gpm-tray-icon.c: (gpm_tray_icon_add_device): Only add a battery to the drop down if present. Fixes #362690 2006-10-14 Richard Hughes * configure.in: * po/POTFILES.in: * src/Makefile.am: * src/gpm-button.c: * src/gpm-button.h: * src/gpm-manager.c: Add XEVENTS functionality. This allows g-p-m to respond to events sent by X, as soon the kernel is going to be outputting INPUT events. Disabled by default. Very lightly tested. 2006-10-12 Richard Hughes * data/gpm-prefs.glade: * src/gpm-prefs-core.c: Make the glade file spacing more correct. The extra hbox's also allow us to use a smaller amount of code to enable and disable rows. 2006-10-12 Richard Hughes * src/gpm-hal-cpufreq.c: (gpm_hal_cpufreq_get_governors): When we have conservative and ondemand available, only expose conservative in the UI. They are too similar. 2006-10-12 Richard Hughes * Makefile.am: Add a couple of fixes to make sure we can trivially build on debian. * src/gpm-power.c: (gpm_power_status_for_device_more): Change rate to be unit W, and capacity to be unit Wh. 2006-10-11 Richard Hughes * .cvsignore: Add the .lineno files debian likes to chuck out. * configure.in: Check for HAL 0.5.8 and warn the user if they are using an old HAL. NOTE: The required dependency has not changed, but the recommended one has. You can still build with 0.5.6 * src/gpm-power.c: Small whitespace fix. 2006-10-11 Richard Hughes * po/POTFILES.in: * src/Makefile.am: * src/gpm-refcount.c: * src/gpm-refcount.h: Create this new object to be a general purpose refcounting object now that we are doing a similar thing in two places. * src/gpm-feedback-widget.c: Use the new beautiful GpmRefcount object rather than doing our own clunky thing. * src/gpm-hal-power.c: Make into a singleton as two things are using this in g-p-m. This fixes a pretty random crash in the SetLowMowerMode code. Oops. * src/gpm-manager.c: * src/gpm-power.c: * src/gpm-power.h: Add GpmRefcount functionality so that the data is tainted for a few seconds after a power event. This means that we should not be shutting down or warning after just pulling the plug or starting up and waiting for HAL to update the battery charge values. This should fix #350374. 2006-10-10 Richard Hughes * src/gpm-hal-cpufreq.c: * src/gpm-hal-cpufreq.h: * src/gpm-prefs-core.c: Get rid of gpm_hal_cpufreq_has_hardware and use the singleton method like we do for the brightness classes. This fixes a warning in the preferences code when you have a HAL not capable of cpufreq_control. 2006-10-10 Richard Hughes * data/icons/scalable/gpm-keyboard-030.svg: * data/icons/scalable/gpm-mouse-030.svg: Make these icons have the correct 'fill' colour. Fixes #352416. 2006-10-10 Richard Hughes * src/gpm-inhibit.c: * src/gpm-power.c: Apply a patch from Elijah Newren to remove markup in translatable messages. This fixes #360464. * configure.in: * src/gpm-tray-icon.c: (libnotify_event): OOps. Make this build. 2006-10-10 Richard Hughes * src/gpm-graph-widget.c: * src/gpm-graph-widget.h: * src/gpm-info.c: * src/gpm-power.c: * src/gpm-power.h: * src/gpm-statistics-core.c: Display a graph for battery voltage. This is interesting for power people that want to calculate hysteresis. Like me. * configure.in: * src/gpm-tray-icon.c: (libnotify_event): Detect a new enough libnotify and enable the pointing code if new enough. This fixes #356431 Distros should comment this check out if libnotify 0.4.2 has been patched from CVS. 2006-10-09 Gabor Kelemen * src/gpm-graph-widget.c: Mark time measurement units for translation. Fix for bug #359089. 2006-10-06 Richard Hughes * src/gpm-manager.c: Now react immediatly when the user changes the cpufreq policy. Also clean up this the actions, and split the sync routine into it's seporate parts. It's more manageable this way, and reduces CPU load when you start changing bazzillions of gconf keys. 2006-10-05 Frederic Peters * configure.in: Don't define HAVE_LIBNOTIFY when libnotify is not found. 2006-10-01 Richard Hughes * po/POTFILES.in: Add a missing file (Marcel Telka) * src/Makefile.am: * src/gpm-hal-brightness-kbd.c: * src/gpm-hal-brightness-kbd.h: * src/gpm-hal-light-sensor.c: * src/gpm-hal-light-sensor.h: * src/gpm-manager.c: Merge some new light-sensor stuff based on a patch from David Zeuthen. This isn't finished yet - I need to take some more ideas from David's patch and merge them - along with some more ideas of my own on the feedback mechanism for the LCD and keyboard backlight. I've been busy this weekend - so coding will resume some point this week. 2006-09-29 Richard Hughes * src/gpm-hal-brightness-sensor.c: * src/gpm-hal-brightness-sensor.h: Add initial light sensor class that does nothing and isn't even connected up to make. This might give DavidZ something to work with. 2006-09-28 Richard Hughes * help/C/figures/gpm-info-devices.png: * help/C/figures/gpm-info-event-log.png: * help/C/figures/gpm-info-percentage.png: * help/C/figures/gpm-info-rate.png: * help/C/figures/gpm-info-time.png: * help/C/gnome-power-manager.xml: * help/Makefile.am: Remove the old info images and re-organise the help file a little bit. 2006-09-28 Richard Hughes * help/C/figures/gpm-mouse-left.png: * help/C/figures/gpm-mouse-right.png: * help/C/figures/gpm-prefs-ac.png: * help/C/figures/gpm-prefs-actions.png: * help/C/figures/gpm-prefs-battery.png: * help/C/figures/gpm-prefs-display.png: * help/C/figures/gpm-prefs-notification.png: * help/C/figures/gpm-prefs-options.png: * help/C/figures/gpm-prefs-processor.png: * help/C/figures/gpm-prefs-sleep.png: * help/C/figures/gpm-stats-graph.png: * help/C/gnome-power-manager.xml: * help/Makefile.am: Update the yelp pictures to reflect reality. 2006-09-28 Richard Hughes * src/gpm-feedback-widget.c: Fix the display of the feedback icon. 2006-09-28 Richard Hughes * src/gpm-manager.c: * src/gpm-polkit.c: Move the HAVE_POLKIT stuff into the GpmPolkit module and just return NULL if support is not compiled in. This means we get ridof some ugly ifdefs from the manager class. 2006-09-28 Richard Hughes * src/gpm-hal-brightness-kbd.c: (gpm_hal_brightness_kbd_new): * src/gpm-hal-brightness-lcd.c: (gpm_hal_brightness_lcd_new): Return NULL for no hardware, not FALSE; * src/gpm-hal-cpufreq.c: (gpm_hal_cpufreq_has_hw): Only load the gobject if we have the cpufreq_control hardware. * src/gpm-hal.h: Define org.freedesktop.Hal.Device.LightSensor for some crazy new experimental stuff on the horizon. 2006-09-28 Richard Hughes * docs/icon-scheme.xml: Add gpm-brightness-lcd and gpm-brightness-kbd. * src/gpm-power.c: * src/gpm-power.h: Now we have gpm_hal_device_get_uint, use it. 2006-09-28 Richard Hughes * data/icons/16x16/Makefile.am: * data/icons/16x16/gpm-brightness-kbd.png: * data/icons/16x16/gpm-brightness-lcd.png: * data/icons/16x16/gpm-brightness.png: * data/icons/16x16/gpm-primary-missing.png: * data/icons/16x16/gpm-ups-100-charging.png: * data/icons/22x22/Makefile.am: * data/icons/22x22/gpm-brightness-kbd.png: * data/icons/22x22/gpm-brightness-lcd.png: * data/icons/22x22/gpm-brightness.png: * data/icons/24x24/Makefile.am: * data/icons/24x24/gpm-brightness-kbd.png: * data/icons/24x24/gpm-brightness-lcd.png: * data/icons/24x24/gpm-brightness.png: * data/icons/scalable/Makefile.am: * data/icons/scalable/gpm-brightness-kbd.svg: * data/icons/scalable/gpm-brightness-lcd.svg: * data/icons/scalable/gpm-brightness.svg: Rename gpm-brightness to gpm-brightness-lcd and add gpm-brightness-kbd. This is for the feedback widget for keyboard backlight feedback. * data/gnome-power-manager.schemas.in: * po/POTFILES.in: * src/Makefile.am: * src/gpm-hal-brightness.c: * src/gpm-hal-brightness.h: * src/gpm-hal-brightness-lcd.c: * src/gpm-hal-brightness-lcd.h: Rename as we have a new kid on the block, namely kbd. * src/gpm-hal-brightness.c: * src/gpm-hal-brightness.h: When stepping down, actually use the step value. (David Zeuthen) Check for overflow / underflow when step value > 1. Used signed integers when stepping down as we may underflow. Should fix #358067. * src/gpm-common.c: * src/gpm-common.h: Add gpm_percent_to_discrete() and gpm_discrete_to_percent() generic functions. * src/gpm-feedback-widget.c: * src/gpm-feedback-widget.h: * src/gpm-stock-icons.h: Add gpm_feedback_set_icon_name() so we can set different icons on the feedback widget. Also load the feedback widget here and get rid of the manager signal - this allows us to save memory if we don't have the hardware. * src/gpm-hal.c: * src/gpm-hal.h: Add a dummy function gpm_hal_device_get_uint() so we don't have to muck about with casting. * src/gpm-gconf.h: * src/gpm-manager.c: * src/gpm-hal-brightness-kbd.c: * src/gpm-hal-brightness-kbd.h: Add a heavily modified patch from David Zeuthen to add keyboard backlight (write) support to gnome-power-manager. Many thanks! 2006-09-27 Richard Hughes * data/icons/16x16/gpm-keyboard-030.png: * data/icons/16x16/gpm-keyboard-060.png: * data/icons/16x16/gpm-keyboard-100.png: * data/icons/16x16/gpm-mouse-030.png: * data/icons/16x16/gpm-mouse-060.png: * data/icons/16x16/gpm-mouse-100.png: Update the icons to have the right colours and levels. This partially fixes #352416 * src/gpm-hal-monitor.c: * src/gpm-manager.c: Better detect hotplugged wireless mice. * src/gpm-hal.c: * src/gpm-hal.h: Add gpm_hal_device_has_capability(). 2006-09-26 Richard Hughes * src/gpm-power.c: (gpm_power_get_device_from_udi), * src/gpm-power.h: Export this, we need it in the tray icon class. * src/gpm-info.c: (gpm_info_log_do_poll): * src/gpm-manager.c: (gpm_manager_init): * src/gpm-tray-icon.c: Remove the info code and place into a notification. This will change to a modal dialogue at some stage, to conform more to the HIG. Ooop. There goes another 200Kb writable from the daemon now we are not loading all the glade and GTK stuff. * data/Makefile.am: * data/gpm-info.glade: * po/POTFILES.in: Remove the glade file now we are not using it. 2006-09-26 Richard Hughes * data/gpm-prefs.glade: * src/gpm-prefs-core.c: (prefs_setup_actions), (gpm_prefs_init): Added policy in the UI for the suspend button action due to a distro beginning with U changing the default action to "nothing". 2006-09-26 Francisco Javier F. Serrador * data/gpm-prefs.glade: Fixed typo which made a duplicate string. 2006-09-26 Richard Hughes * data/gnome-power-statistics.desktop.in: Actually use a valid category so it shows up in the menus. 2006-09-26 Richard Hughes * data/icons/16x16/Makefile.am: * data/icons/16x16/gpm-statistics.png: * data/icons/22x22/Makefile.am: * data/icons/22x22/gpm-statistics.png: * data/icons/24x24/Makefile.am: * data/icons/24x24/gpm-statistics.png: * data/icons/scalable/Makefile.am: * data/icons/scalable/gpm-statistics.svg: * src/gpm-stock-icons.h: * src/gpm-tray-icon.c: Add a proper gpm-statistics tango icon. (Jakub Steiner) 2006-09-25 Richard Hughes * src/gpm-manager.c: * src/gpm-power.c: * src/gpm-power.h: Use perhaps_recall rather than might_explode to prevent angry calls from big legal teams. Also tone down the warning a little. 2006-09-23 Richard Hughes * src/gpm-manager.c: * src/gpm-power.c: * src/gpm-power.h: Add in preliminary support for detecting batteries that might explode. See http://hughsient.livejournal.com/4240.html for more details. 2006-09-23 Richard Hughes * src/Makefile.am: * src/gpm-statistics-core.c: (gpm_statistics_activate_window): * src/gpm-statistics-core.h: * src/gpm-statistics.c: (guniqueapp_command_cb): Add guniqueapp support to gnome-power-statistics. 2006-09-23 Richard Hughes * data/gnome-power-manager.schemas.in: * src/gpm-gconf.h: * src/gpm-statistics-core.c: Add /apps/gnome-power-manager/statistics_graph_type so that gnome-power-statistics remembers the graph type for startup. 2006-09-22 Richa/apps/gnome-power-manager/statistics_graph_typerd Hughes * src/gpm-graph-widget.h: Make charging line a lighter blue. 2006-09-22 Richard Hughes * src/gpm-graph-widget.c: * src/gpm-graph-widget.h: Draw different shapes for the event for colour-blind support. * src/gpm-statistics-core.c: * src/gpm-info.c: Send the *event* rather than the colour of the event. * src/gpm-manager.c: Remove the DPMS events, they never really belonged anyway. 2006-09-22 Richard Hughes * src/gpm-graph-widget.c: * src/gpm-graph-widget.h: Add in initial code to be able to draw dots of differing shape: circle, square, diamond and triangle. This is to make the graph output more suitable for colour-blind people as pointed out in my blog. 2006-09-22 Richard Hughes * data/gpm-info.glade: * src/gpm-info.c: Remove the infrequently used event log from the UI. There goes another 200Kb of writable memory. I plan to add tooltip support for the text points in the statistics tool. 2006-09-22 Richard Hughes * src/gpm-info.c: (gpm_info_init): Fix simple comment typo. * src/gpm-prefs.c: Make Elijah's patch compile with -Werror. :-) * src/gpm-tray-icon.c: Remove the gtk_ui_manager-style dropdown menus in favour of something simpler. We need to be able to add arbitary number of entries with custom icons for devices and so we need more control of the menu. Move Help, About, Statistics and Preferences to right mouse button action to fix #347913. 2006-09-22 Elijah Newren * src/gpm-prefs.c (main): Make sure to obtain the DESKTOP_STARTUP_ID environment variable before gtk_init() is called since gtk_init() clears it. #357128. 2006-09-22 Richard Hughes * help/C/figures/gpm-stats-graph.png: * help/C/gnome-power-manager.xml: * help/Makefile.am: Add this new image so I can blog about it. * src/gpm-hal-brightness.c: * src/gpm-hal-power.c: Convert the last two (insane) users of dbus_g_proxy_call to something a bit more standard. * src/gpm-hal.c: Be less verbose about missing keys, sometimes it's legitimate. 2006-09-21 Richard Hughes * src/gpm-hal-brightness.c: * src/gpm-hal-cpufreq.c: * src/gpm-hal-power.c: * src/gpm-hal.c: * src/gpm-info.c: * src/gpm-main.c: * src/gpm-manager.c: * src/gpm-polkit.c: * src/gpm-prefs-core.c: * src/gpm-screensaver.c: * src/gpm-statistics-core.c: Convert all the wacky invokations of dbus_g_proxy_call to use a common format. Also convert all the g_warnings into gpm_warnings so we can log them properly. Lots more GError love too. 2006-09-21 Richard Hughes * data/gpm-info.glade: * src/gpm-info.c: Remove the graphs from the info window. This saves over 500kb of writable memory from each gnome-power-manager daemon process. More to be cut soon. * src/gpm-tray-icon.c: Enable the statistics option in the right mouse button menu. 2006-09-21 Richard Hughes * po/POTFILES.in: * src/Makefile.am: * src/gpm-gconf.h: * src/gpm-info.c: * src/gpm-manager.c: * src/gpm-power.c: * src/gpm-prefs-core.c: * src/gpm-prefs.h: * src/gpm-statistics-core.c: * src/gpm-statistics.c: Move the gconf keys out of gpm-prefs.h into a new file gpm-gconf.h There are no good reasons to have the keys in the prefs header. 2006-09-21 Richard Hughes * src/gpm-prefs.h: * data/gnome-power-manager.schemas.in: Add statistics_show_legend and statistics_show_events so we have persistent settings for the statistics program. * src/Makefile.am: * src/gpm-info-data.c: * src/gpm-info-data.h: * src/gpm-statistics-core.c: Add gpm_info_data_clear() so we can re-init the data. Use GpmInfoData as a datastore in the statistics module so we leak a lot less memory. Also clean up this module. gnome-power-statistics now works as well as the "Information" screen that we used before and is out of process. * src/gpm-info.c: Send the correct format information for the event log dbus method. 2006-09-21 Richard Hughes * TODO: Remove dbus-send cruft. * src/gpm-graph-widget.c: * src/gpm-graph-widget.h: Add a new function gpm_graph_widget_string_to_axis_type(). * src/gpm-hal-power.c: (gpm_hal_handle_error): Check another possible execption. It may make the suspend-failed warning go away. * src/gpm-info.c: * src/gpm-info.h: * src/gpm-interface-statistics.xml: * src/gpm-statistics-core.c: * src/gpm-statistics-core.h: Do some more to the statistics interface. It actually sort-of runs but it's pretty rough code. And it leaks memory like a bitch. 2006-09-19 Richard Hughes * po/POTFILES.in: * src/Makefile.am: * src/gpm-graph-core.c: * src/gpm-graph-core.h: * src/gpm-graph.c: * src/gpm-statistics-core.c: * src/gpm-statistics-core.h: * src/gpm-statistics.c: Rename graph->statistics as it's too confusing with the graph-widget. 2006-09-19 Richard Hughes * help/C/figures/gpm-charged.png: Update with the new tango icons and the 2-16 colours. 2006-09-19 Richard Hughes * configure.in: Remove -Wshadow as it causes compilation failure on YDL-4.1. Fixes #356667. 2006-09-19 Richard Hughes * src/gpm-hal-monitor.c: * src/gpm-hal.c: * src/gpm-hal.h: Bullet-proof the hal interface so we automatically connect up the device DeviceCondition and PropertyChanged on HAL restart. This fixes #349842 where HAL wasn't detecting the charge correctly on resume. Thanks to Pascal Terjan for help with the bug. * src/gpm-proxy.c: Fix a silly typo where we were emmiting PROXY_STATUS FALSE on both connection and disconnection. 2006-09-19 Richard Hughes * src/gpm-dbus-monitor.c: Reduce the debugging level, it's a bit verbose. * src/gpm-main.c: Remove a potential null-dereference, spotted by Joseph Sacco. This fixes #356667 where g-p-m would crash on startup. 2006-09-18 Richard Hughes * src/gpm-hal-power.c: Remove erroneous HALD_SERVICE definitions. * src/gpm-manager.c: Don't watch to see if the tray icon is destroyed; it can't happen with GtkStatusIcon. Don't get the difference in charge and add it to the event log on resume as HAL has not refreshed and this will never succeed. 2006-08-20 Richard Hughes * configure.in: Post release bump to 2.17.2