diff --git a/src/ChangeLog b/src/ChangeLog index 36579e7b2..fb946771a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2005-02-08 Roland Illig + + * widget.h: Moved constants to the appropriate places (just + before the variable they will be used with). + * widget.c: HISTORY_FILE_NAME was not needed in widget.h, + so it has been made private to this file. + 2005-02-07 Roland Illig * unixcompat.h: Emit warnings for the fallback case of the diff --git a/src/widget.c b/src/widget.c index d5e88e93b..87085d774 100644 --- a/src/widget.c +++ b/src/widget.c @@ -44,6 +44,8 @@ #include "wtools.h" /* For common_dialog_repaint() */ #include "main.h" /* for `slow_terminal' */ +#define HISTORY_FILE_NAME ".mc/history" + static int button_event (Gpm_Event *event, WButton *b); int quote = 0; diff --git a/src/widget.h b/src/widget.h index e5bb83d14..67b23ef9f 100644 --- a/src/widget.h +++ b/src/widget.h @@ -3,17 +3,9 @@ #include "dialog.h" /* Widget */ -#define C_BOOL 1 -#define C_CHANGE 2 - /* Please note that the first element in all the widgets is a */ /* widget variable of type Widget. We abuse this fact everywhere */ -#define HIDDEN_BUTTON 0 -#define NARROW_BUTTON 1 -#define NORMAL_BUTTON 2 -#define DEFPUSH_BUTTON 3 - /* button callback */ typedef int (*bcback) (int); @@ -21,6 +13,11 @@ typedef struct WButton { Widget widget; int action; /* what to do when pressed */ int selected; /* button state */ + +#define HIDDEN_BUTTON 0 +#define NARROW_BUTTON 1 +#define NORMAL_BUTTON 2 +#define DEFPUSH_BUTTON 3 unsigned int flags; /* button flags */ char *text; /* text of button */ int hotkey; /* hot KEY */ @@ -39,6 +36,9 @@ typedef struct WRadio { typedef struct WCheck { Widget widget; + +#define C_BOOL 0x0001 +#define C_CHANGE 0x0002 unsigned int state; /* check button state */ char *text; /* text of check button */ int hotkey; /* hot KEY */ @@ -77,7 +77,6 @@ typedef struct { /* For history load-save functions */ #define INPUT_LAST_TEXT ((char *) 2) -#define HISTORY_FILE_NAME ".mc/history" typedef struct { Widget widget;