summaryrefslogtreecommitdiff
path: root/src/egg-discrete.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-02-14 07:54:19 +0100
committerraveit65 <[email protected]>2020-03-09 15:26:43 +0100
commit33e52564affb7fbc50ad68a08c43c9f70e7d1bb4 (patch)
tree9ac72ec71977ec83ab647b502dbf4bd4a9639a1f /src/egg-discrete.c
parent9f3d2d0986a6130b1cefc84caae161d75b4f56ba (diff)
downloadmate-power-manager-33e52564affb7fbc50ad68a08c43c9f70e7d1bb4.tar.bz2
mate-power-manager-33e52564affb7fbc50ad68a08c43c9f70e7d1bb4.tar.xz
Port from EggDebug to the built-in GLib logging framework
Diffstat (limited to 'src/egg-discrete.c')
-rw-r--r--src/egg-discrete.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/egg-discrete.c b/src/egg-discrete.c
index fe910cc..603217d 100644
--- a/src/egg-discrete.c
+++ b/src/egg-discrete.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
#include <glib.h>
-#include "egg-debug.h"
#include "egg-discrete.h"
/**
@@ -44,7 +43,7 @@ egg_discrete_from_percent (guint percentage, guint levels)
if (percentage > 100)
return levels;
if (levels == 0) {
- egg_warning ("levels is 0!");
+ g_warning ("levels is 0!");
return 0;
}
return (guint) ((((gfloat) percentage * (gfloat) (levels - 1)) / 100.0f) + 0.5f);
@@ -66,7 +65,7 @@ egg_discrete_to_percent (guint discrete, guint levels)
if (discrete > levels)
return 100;
if (levels == 0) {
- egg_warning ("levels is 0!");
+ g_warning ("levels is 0!");
return 0;
}
return (guint) (((gfloat) discrete * (100.0f / (gfloat) (levels - 1))) + 0.5f);
@@ -88,7 +87,7 @@ egg_discrete_to_fraction (guint discrete, guint levels)
if (discrete > levels)
return 1.0;
if (levels == 0) {
- egg_warning ("levels is 0!");
+ g_warning ("levels is 0!");
return 0.0;
}
return (guint) ((gfloat) discrete / ((gfloat) (levels - 1)));