Comments?

Cheers,
kix

>From 5ef05664ee902bb5d303f2bc0c113315651bc7b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Thu, 16 Feb 2012 23:54:22 +0100
Subject: [PATCH] WindowMaker: setDoubleClick clean code

The function setDoubleClick has an extern that don't needs and comments about 
the function. Because the variable WINGsConfiguration.doubleClickDelay can be 
accesed without problems, we can remove the externs. About the comments, in the 
file window.c, we can find

 event->xbutton.button == WINGsConfiguration.mouseWheelUp

accessing directly to the configuration structure.

We can add some functions like setConfiguration, getConfiguration to WINGs, but 
is not needed.
---
 src/defaults.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/src/defaults.c b/src/defaults.c
index b5ea8e2..ae4b737 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -45,6 +45,7 @@
 #include <X11/keysym.h>
 
 #include <wraster.h>
+#include <WINGs/WINGsP.h>
 
 #include "WindowMaker.h"
 #include "framewin.h"
@@ -3018,18 +3019,8 @@ static int setModifierKeyLabels(WScreen * scr, 
WDefaultEntry * entry, WMPropList
        return 0;
 }
 
-/*
- * Very ugly kluge.
- * Need access to the double click variables, so that all widgets in
- * wmaker panels will have the same dbl-click values.
- * TODO: figure a better way of dealing with it.
- */
-#include <WINGs/WINGsP.h>
-
 static int setDoubleClick(WScreen * scr, WDefaultEntry * entry, int *value, 
void *foo)
 {
-       extern _WINGsConfiguration WINGsConfiguration;
-
        if (*value <= 0)
                *(int *)foo = 1;
 
-- 
1.7.7.3

-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/


-- 
To unsubscribe, send mail to [email protected].

Reply via email to