[improvements for configuration dialog
Andreas Röver <roever@users.sourceforge.net>**20050831153408] {
hunk ./src/gui/configuration.cpp 24
+#include "WindowWidgets.h"
+
hunk ./src/gui/configuration.cpp 125
-void configuration::register_entry(char *cnf_name, cnf_type  cnf_typ, void *cnf_var, long maxlen, bool dialog) {
+void configuration::register_entry(char *cnf_name, cnf_type  cnf_typ, void *cnf_var, long maxlen, bool dialog, char * dtext) {
hunk ./src/gui/configuration.cpp 136
+  t->dialogText = dtext;
hunk ./src/gui/configuration.cpp 139
-#define CNF_BOOL(a,b) register_entry(a, CT_BOOL, b, 0, false)
-#define CNF_CHAR(a,b,c) register_entry(a, CT_STRING, b, c, false)
-#define CNF_INT(a,b) register_entry(a, CT_INT, b, 0, false)
+#define CNF_BOOL(a,b) register_entry(a, CT_BOOL, b, 0, false, 0)
+#define CNF_CHAR(a,b,c) register_entry(a, CT_STRING, b, c, false, 0)
+#define CNF_INT(a,b) register_entry(a, CT_INT, b, 0, false, 0)
hunk ./src/gui/configuration.cpp 143
-#define CNF_BOOL_D(a,b) register_entry(a, CT_BOOL, b, 0, true)
-#define CNF_CHAR_D(a,b,c) register_entry(a, CT_STRING, b, c, true)
-#define CNF_INT_D(a,b) register_entry(a, CT_INT, b, 0, true)
+#define CNF_BOOL_D(a,b,text) register_entry(a, CT_BOOL, b, 0, true, text)
+#define CNF_CHAR_D(a,b,c,text) register_entry(a, CT_STRING, b, c, true, text)
+#define CNF_INT_D(a,b,text) register_entry(a, CT_INT, b, 0, true, text)
hunk ./src/gui/configuration.cpp 163
-  CNF_BOOL_D("tooltips",            &i_use_tooltips);
-  CNF_BOOL_D("lightning",           &i_use_lightning);
+  CNF_BOOL_D("tooltips",            &i_use_tooltips, "Use Tooltips");
+  CNF_BOOL_D("lightning",           &i_use_lightning, "Use lights in 3D view");
hunk ./src/gui/configuration.cpp 219
+static void cb_ConfigDialog_stub(Fl_Widget* o, void* v) { ((Fl_Double_Window*)v)->hide(); }
+
hunk ./src/gui/configuration.cpp 224
-  Fl_Pack * pack = new Fl_Pack(0, 0, 200, 500);
hunk ./src/gui/configuration.cpp 225
-
hunk ./src/gui/configuration.cpp 226
-  int y = 0;
+  int y = 10;
hunk ./src/gui/configuration.cpp 234
-            Fl_Check_Button *w = new Fl_Check_Button(0, y, 200, 20, t->cnf_name);
+          Fl_Check_Button *w = new Fl_Check_Button(10, y, 180, 20, t->dialogText);
hunk ./src/gui/configuration.cpp 255
-  pack->end();
+  new FlatButton(10, y+10, 180, 20, "Close", "Close window", cb_ConfigDialog_stub, win);
+
hunk ./src/gui/configuration.cpp 258
+  win->resize(win->x(), win->y(), win->w(), y+40);
hunk ./src/gui/configuration.h 63
-  void register_entry(char *cnf_name, cnf_type  cnf_typ, void *cnf_var, long maxlen, bool dialog);
+  void register_entry(char *cnf_name, cnf_type  cnf_typ, void *cnf_var, long maxlen, bool dialog, char * dtext);
hunk ./src/gui/configuration.h 72
+    char *    dialogText;
}
