[Xfce4-commits] [xfce/xfce4-power-manager] 01/02: Use gint32 for brightness levels instead of gint where applicable
noreply at xfce.org
noreply at xfce.org
Tue Jun 24 18:37:04 CEST 2014
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.
commit ca67378e6fc91e421ae6d517606f574a9e4fbf66
Author: Harald Judt <h.judt at gmx.at>
Date: Tue Jun 24 15:00:17 2014 +0200
Use gint32 for brightness levels instead of gint where applicable
Probably these gints doesn't cause any problems, but perhaps it is safer to be more
exact here. I think I got all of them now.
Signed-off-by: Eric Koegel <eric.koegel at gmail.com>
---
common/xfpm-brightness.c | 20 ++++++++++----------
common/xfpm-brightness.h | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/common/xfpm-brightness.c b/common/xfpm-brightness.c
index e49338e..4dbf519 100644
--- a/common/xfpm-brightness.c
+++ b/common/xfpm-brightness.c
@@ -52,10 +52,10 @@ struct XfpmBrightnessPrivate
gboolean xrandr_has_hw;
gboolean helper_has_hw;
- gint max_level;
- gint current_level;
- gint min_level;
- gint step;
+ gint32 max_level;
+ gint32 current_level;
+ gint32 min_level;
+ gint32 step;
};
G_DEFINE_TYPE (XfpmBrightness, xfpm_brightness, G_TYPE_OBJECT)
@@ -152,7 +152,7 @@ xfpm_brightness_setup_xrandr (XfpmBrightness *brightness)
Window window;
gint major, minor, screen_num;
int event_base, error_base;
- gint min, max;
+ gint32 min, max;
gboolean ret = FALSE;
gint i;
@@ -344,9 +344,9 @@ out:
static gboolean
xfpm_brightness_setup_helper (XfpmBrightness *brightness)
{
- int ret;
+ gint32 ret;
- ret = xfpm_brightness_helper_get_value ("get-max-brightness");
+ ret = (gint32) xfpm_brightness_helper_get_value ("get-max-brightness");
g_debug ("xfpm_brightness_setup_helper: get-max-brightness returned %i", ret);
if ( ret < 0 ) {
brightness->priv->helper_has_hw = FALSE;
@@ -363,12 +363,12 @@ xfpm_brightness_setup_helper (XfpmBrightness *brightness)
static gboolean
xfpm_brightness_helper_get_level (XfpmBrightness *brg, gint32 *level)
{
- int ret;
+ gint32 ret;
if ( ! brg->priv->helper_has_hw )
return FALSE;
- ret = xfpm_brightness_helper_get_value ("get-brightness");
+ ret = (gint32) xfpm_brightness_helper_get_value ("get-brightness");
g_debug ("xfpm_brightness_helper_get_level: get-brightness returned %i", ret);
@@ -613,7 +613,7 @@ gboolean xfpm_brightness_has_hw (XfpmBrightness *brightness)
return brightness->priv->xrandr_has_hw || brightness->priv->helper_has_hw;
}
-gint xfpm_brightness_get_max_level (XfpmBrightness *brightness)
+gint32 xfpm_brightness_get_max_level (XfpmBrightness *brightness)
{
return brightness->priv->max_level;
}
diff --git a/common/xfpm-brightness.h b/common/xfpm-brightness.h
index 26b3dbe..9cb7a02 100644
--- a/common/xfpm-brightness.h
+++ b/common/xfpm-brightness.h
@@ -58,7 +58,7 @@ gboolean xfpm_brightness_down (XfpmBrightness *brightness,
gboolean xfpm_brightness_has_hw (XfpmBrightness *brightness);
-gint xfpm_brightness_get_max_level (XfpmBrightness *brightness);
+gint32 xfpm_brightness_get_max_level (XfpmBrightness *brightness);
gboolean xfpm_brightness_get_level (XfpmBrightness *brightness,
gint32 *level);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list