summaryrefslogtreecommitdiff
path: root/editors/fxite/files/patch-src__fxasq.cpp
blob: a5f5c123439e82a2fe51d30f1bdd2fd034af89c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
--- src/fxasq.cpp.orig	2013-10-03 09:22:51 UTC
+++ src/fxasq.cpp
@@ -133,7 +133,7 @@ int FxAsqWin::Run(FxAsqItem**results)
   dlg->create();
   dlg->setWidth(dlg->getDefaultWidth());
   dlg->setHeight(dlg->getDefaultHeight());
-  for (FXint i=keylist.first(); i<=keylist.last(); i=keylist.next(i))
+  if (UsedSlotsInDict(&keylist)>0) for (FXint i=0; i<TotalSlotsInDict(&keylist); ++i)
   {
     focused_btn=-1; // Focusing a button doesn't make much sense for interactive dialogs.
     FXWindow*obj=(FXWindow*)(keylist.data(i));
@@ -186,8 +186,8 @@ int FxAsqWin::Run(FxAsqItem**results)
 
 void FxAsqWin::PutResults()
 {
-  for (FXint i=keylist.first(); i<=keylist.last(); i=keylist.next(i)) {
-    const char*k=keylist.key(i);
+  for (FXint i=0; i<TotalSlotsInDict(&keylist); ++i) {
+    const char*k=DictKeyName(keylist,i);
     FXWindow*obj=(FXWindow*)keylist.data(i);
     if (k&&obj) {
       if (IsGroup(obj)) {
@@ -299,7 +299,7 @@ void FxAsqWin::Select(const char*key, co
 {
   FXHorizontalFrame *frm = new FXHorizontalFrame(userbox,LAYOUT_FILL_X);
   new FXLabel(frm,label,NULL);
-  FXListBox*list=(FXListBox*)(keylist.find(key));
+  FXListBox*list=(FXListBox*)(LookupInDict(&keylist,key));
   if (list) {
     list->reparent(frm);
     void*p=list->getUserData();
@@ -315,7 +315,7 @@ void FxAsqWin::Select(const char*key, co
 
 void FxAsqWin::Option(const char*key, const char*value, const char*label)
 {
-  FXListBox*list=(FXListBox*)(keylist.find(key));
+  FXListBox*list=(FXListBox*)(LookupInDict(&keylist,key));
   if (!IsList(list)) {
     list=new FXListBox(userbox,NULL,0,LISTBOX_OPTS);
     keylist.insert(key,list);
@@ -327,7 +327,7 @@ void FxAsqWin::Option(const char*key, co
 
 void FxAsqWin::Group(const char*key, const char*value, const char*label)
 {
-  GroupBox*grp=(GroupBox*)(keylist.find(key));
+  GroupBox*grp=(GroupBox*)(LookupInDict(&keylist,key));
   if (grp) {
     ((FXWindow*)grp)->reparent(userbox);
     grp->setText(label);
@@ -341,7 +341,7 @@ void FxAsqWin::Group(const char*key, con
 
 void FxAsqWin::Radio(const char*key, const char*value, const char*label)
 {
-  GroupBox*grp=(GroupBox*)(keylist.find(key));
+  GroupBox*grp=(GroupBox*)(LookupInDict(&keylist,key));
   if (!IsGroup(grp)) {
     grp=new GroupBox(userbox,NULL);
     keylist.insert(key,grp);
@@ -505,7 +505,7 @@ void FxAsqWin::Font(const char*key, cons
 FxAsqWin::~FxAsqWin()
 {
   void*p=NULL;
-  for (FXint i=keylist.first(); i<=keylist.last(); i=keylist.next(i)) {
+  for (FXint i=0; i<TotalSlotsInDict(&keylist); ++i) {
     FXWindow*obj=(FXWindow*)(keylist.data(i));
     if (IsList(obj)) {
       FXListBox*listbox=(FXListBox*)obj;