summaryrefslogtreecommitdiff
path: root/src/gpm-main.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-07-11 17:06:15 +0200
committerraveit65 <[email protected]>2016-07-25 16:13:41 +0200
commitff8f84fbab62f3c3fdc875a2b61a6d8a0654b2dc (patch)
treea7ea4da804c5143462cc6df8d9176d91b7737889 /src/gpm-main.c
parent85afd16cee70390540d73e0b66999b0d859d299e (diff)
downloadmate-power-manager-ff8f84fbab62f3c3fdc875a2b61a6d8a0654b2dc.tar.bz2
mate-power-manager-ff8f84fbab62f3c3fdc875a2b61a6d8a0654b2dc.tar.xz
Assign names to our idle sources when using newer versions of glib2
This makes it possible to profile more accurately using systemtap taken from: https://git.gnome.org/browse/gnome-power-manager/commit/?id=fbb075b5
Diffstat (limited to 'src/gpm-main.c')
-rw-r--r--src/gpm-main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpm-main.c b/src/gpm-main.c
index 6186d6e..3244e00 100644
--- a/src/gpm-main.c
+++ b/src/gpm-main.c
@@ -165,6 +165,7 @@ main (int argc, char *argv[])
GError *error = NULL;
GOptionContext *context;
gint ret;
+ guint timer_id;
const GOptionEntry options[] = {
{ "verbose", '\0', 0, G_OPTION_ARG_NONE, &verbose,
@@ -264,7 +265,8 @@ main (int argc, char *argv[])
/* Only timeout and close the mainloop if we have specified it
* on the command line */
if (timed_exit) {
- g_timeout_add_seconds (20, (GSourceFunc) timed_exit_cb, loop);
+ timer_id = g_timeout_add_seconds (20, (GSourceFunc) timed_exit_cb, loop);
+ g_source_set_name_by_id (timer_id, "[GpmMain] timed-exit");
}
if (immediate_exit == FALSE) {