[gnome-control-center] wacom: Simplify run_calibration()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] wacom: Simplify run_calibration()
- Date: Tue, 10 Jan 2012 20:39:27 +0000 (UTC)
commit 815635a3c26387beb24aec7e6b2b53ff876c53ff
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jan 10 20:16:33 2012 +0000
wacom: Simplify run_calibration()
panels/wacom/cc-wacom-page.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/panels/wacom/cc-wacom-page.c b/panels/wacom/cc-wacom-page.c
index 22b04eb..761ae9d 100644
--- a/panels/wacom/cc-wacom-page.c
+++ b/panels/wacom/cc-wacom-page.c
@@ -160,7 +160,6 @@ static gboolean
run_calibration (gint *cal,
gsize ncal)
{
- gboolean success = FALSE;
XYinfo axis;
gboolean swap_xy;
struct Calib calibrator;
@@ -168,7 +167,7 @@ run_calibration (gint *cal,
if (ncal != 4)
{
g_warning("Unable to run calibration. Got %"G_GSIZE_FORMAT" items; expected %d.\n", ncal, 4);
- goto quit_calibration;
+ return FALSE;
}
calibrator.threshold_misclick = 15;
@@ -184,18 +183,15 @@ run_calibration (gint *cal,
* !!NOTE!! before this returns.
*/
if(run_gui(&calibrator, &axis, &swap_xy))
- success = TRUE;
-
-quit_calibration:
- if (success)
{
cal[0] = axis.x_min;
cal[1] = axis.y_min;
cal[2] = axis.x_max;
cal[3] = axis.y_max;
+ return TRUE;
}
- return success;
+ return FALSE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]