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