gnome-power-manager r3205 - in trunk: . src
- From: rhughes svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-power-manager r3205 - in trunk: . src
- Date: Fri, 30 Jan 2009 17:35:59 +0000 (UTC)
Author: rhughes
Date: Fri Jan 30 17:35:59 2009
New Revision: 3205
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=3205&view=rev
Log:
2009-01-30 Richard Hughes <richard hughsie com>
* src/gpm-statistics.c: (gpm_stats_add_wakeups_obj):
Move the translations here from Devicekit-power. They belong in the
client tool.
Modified:
trunk/ChangeLog
trunk/src/gpm-statistics.c
Modified: trunk/src/gpm-statistics.c
==============================================================================
--- trunk/src/gpm-statistics.c (original)
+++ trunk/src/gpm-statistics.c Fri Jan 30 17:35:59 2009
@@ -707,11 +707,46 @@
else
cmdline_ptr = cmdline;
+ if (strcmp (cmdline_ptr, "insmod") == 0)
+ cmdline_ptr = _("Kernel module");
+ else if (strcmp (cmdline_ptr, "modprobe") == 0)
+ cmdline_ptr = _("Kernel module");
+ else if (strcmp (cmdline_ptr, "swapper") == 0)
+ cmdline_ptr = _("Kernel core");
+ else if (strcmp (cmdline_ptr, "kernel-ipi") == 0)
+ cmdline_ptr = _("Interprocessor interrupt");
+ else if (strcmp (cmdline_ptr, "interrupt") == 0)
+ cmdline_ptr = _("Interrupt");
+
/* format command line */
- cmdline_escaped = g_markup_escape_text (cmdline_ptr, -1);
+ if (obj->is_userspace)
+ cmdline_escaped = g_markup_escape_text (cmdline_ptr, -1);
+ else
+ cmdline_escaped = g_markup_printf_escaped ("<i>%s</i>", cmdline_ptr);
- /* format details */
- details = g_markup_escape_text (obj->details, -1);
+ /* replace common driver names */
+ if (strcmp (obj->details, "i8042") == 0)
+ details = g_strdup (_("PS/2 keyboard/mouse/touchpad"));
+ else if (strcmp (obj->details, "acpi") == 0)
+ details = g_strdup (_("ACPI"));
+ else if (strcmp (obj->details, "ata_piix") == 0)
+ details = g_strdup (_("Serial ATA"));
+
+ /* try to make the wakeup type nicer */
+ else if (g_str_has_prefix (obj->details, "__mod_timer"))
+ details = g_strdup_printf ("Timer %s", obj->details+12);
+ else if (g_str_has_prefix (obj->details, "mod_timer"))
+ details = g_strdup_printf ("Timer %s", obj->details+10);
+ else if (g_str_has_prefix (obj->details, "do_setitimer"))
+ details = g_strdup_printf ("Timer %s", obj->details+10);
+ else if (g_str_has_prefix (obj->details, "do_nanosleep"))
+ details = g_strdup_printf ("Sleep %s", obj->details+13);
+ else if (g_str_has_prefix (obj->details, "futex_wait"))
+ details = g_strdup_printf ("Wait %s", obj->details+11);
+ else if (g_str_has_prefix (obj->details, "queue_delayed_work"))
+ details = g_strdup_printf ("Work queue %s", obj->details+11);
+ else
+ details = g_markup_escape_text (obj->details, -1);
gtk_list_store_append (list_store_wakeups, &iter);
gtk_list_store_set (list_store_wakeups, &iter,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]