~ubuntu-branches/ubuntu/lucid/gnome-power-manager/lucid-updates

« back to all changes in this revision

Viewing changes to src/gpm-statistics.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2010-02-05 13:28:09 UTC
  • mfrom: (2.1.49 upstream)
  • Revision ID: james.westby@ubuntu.com-20100205132809-jfmqtr00ri6flcv2
Tags: 2.29.2-0ubuntu1
* New upstream release:
  - Move the power management preferences into the hardware section of the
    control center.
  - Use the name of 'Power' for the power management preferences capplet
  - Don't rely on the cached value of the lid status, to fix a double
    suspend issue (LP: #425411)
  - Add a flag to inhibit consolekit events just after we resumed
  - Don't automatically suspend if there are suspend inhibits
  - Do not exit if hal is not available
  - Only connect to HAL if there is no xrandr backlight hardware
  - Fix compile when using an ld that defaults to --as-needed
  - Enable the help action in gnome-power-statistics. Fixes #607005
  - Ensure the window is realized before we invalidate it. Fixes #604918
  - Don't show the user a sleep failed link pointing to the quirk site
  - Show the device name even when using UPower
  - Translation updates.
* Drop patches accepted upstream: 
  + 03-run-without-hal.patch
  + 04-dont-connect-to-hal-with-xrandr.patch
  + 09-fix-double-suspend.patch
* Regenerate 90-autotools.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 *
17
17
 * You should have received a copy of the GNU General Public License
18
18
 * along with this program; if not, write to the Free Software
19
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
20
 */
21
21
 
22
22
#include "config.h"
113
113
static void
114
114
gpm_stats_button_help_cb (GtkWidget *widget, gboolean data)
115
115
{
116
 
        //gpm_gnome_help ("update-log");
 
116
        gpm_help_display ("statistics");
117
117
}
118
118
 
119
119
/**
308
308
static gchar *
309
309
gpm_stats_get_printable_device_path (DkpDevice *device)
310
310
{
311
 
        const gchar *prefix = "/org/freedesktop/DeviceKit/Power/devices/";
312
311
        const gchar *object_path;
313
312
        gchar *device_path = NULL;
314
 
        guint len;
315
313
 
316
314
        /* get object path */
317
315
        object_path = dkp_device_get_object_path (device);
318
 
        if (object_path == NULL)
319
 
                goto out;
320
 
        if (!g_str_has_prefix (object_path, prefix))
321
 
                goto out;
 
316
        if (object_path != NULL)
 
317
                device_path = g_filename_display_basename (object_path);
322
318
 
323
 
        /* trim */
324
 
        len = strlen (prefix);
325
 
        device_path = g_strdup (object_path+len);
326
 
out:
327
319
        return device_path;
328
320
}
329
321