commentIndex = index;
MarkMenu("View.Comments", CommentDlg);
if(GenericPopUp(commentOptions, title, CommentDlg, BoardWindow, NONMODAL, 1))
- AddHandler(&commentOptions[0], 1);
+ AddHandler(&commentOptions[0], CommentDlg, 1);
}
void
{
MarkMenu("View.ICSInputBox", InputBoxDlg);
if(GenericPopUp(boxOptions, _("ICS input box"), InputBoxDlg, BoardWindow, NONMODAL, 0))
- AddHandler(&boxOptions[0], 3);
+ AddHandler(&boxOptions[0], InputBoxDlg, 3);
}
void
static char buf[2];
buf[0] = firstchar; ASSIGN(icsText, buf);
if(GenericPopUp(typeOptions, _("Type a move"), TransientDlg, BoardWindow, MODAL, 0))
- AddHandler(&typeOptions[0], 2);
+ AddHandler(&typeOptions[0], TransientDlg, 2);
}
void
ASSIGN(answer, "");
askOptions[0].name = question;
if(GenericPopUp(askOptions, title, AskDlg, BoardWindow, MODAL, 0))
- AddHandler(&askOptions[1], 2);
+ AddHandler(&askOptions[1], AskDlg, 2);
}
//---------------------------- Promotion Popup --------------------------------------
ChatProc ()
{
if(GenericPopUp(chatOptions, _("Chat box"), ChatDlg, BoardWindow, NONMODAL, 0))
- AddHandler(&chatOptions[0], 2), AddHandler(&chatOptions[6], 2); // treats return as OK
+ AddHandler(&chatOptions[0], ChatDlg, 2), AddHandler(&chatOptions[6], ChatDlg, 2); // treats return as OK
MarkMenu("View.OpenChatWindow", ChatDlg);
}
static int GLT_OK P((int n));
static Option listOptions[] = {
-{300, LR|TB, 200, NULL, (void*) strings, "", NULL, ListBox, "" },
+{300, LR|TB, 200, NULL, (void*) strings, "", NULL, ListBox, "" }, // For GTK we need to specify a height, as default would just show 3 lines
{ 0, 0, 0, NULL, (void*) &GLT_Button, NULL, NULL, Button, N_("factory") },
{ 0, SAME_ROW, 0, NULL, (void*) &GLT_Button, NULL, NULL, Button, N_("up") },
{ 0, SAME_ROW, 0, NULL, (void*) &GLT_Button, NULL, NULL, Button, N_("down") },
if(index >= strlen(GLT_ALL_TAGS)) return;
strings[index] = strings[index+1];
strings[++index] = p;
- LoadListBox(&listOptions[0], "?", index, index-1); // only change the two specified entries
+ LoadListBox(&listOptions[0], "?", index, index-1); // only change the two specified entries
} else
if (n == 2) {
if(index == 0) return;
strings[index] = strings[index-1];
strings[--index] = p;
- LoadListBox(&listOptions[0], "?", index, index+1);
+ LoadListBox(&listOptions[0], "?", index, index+1);
} else
if (n == 1) {
safeStrCpy(lpUserGLT, GLT_DEFAULT_TAGS, LPUSERGLT_SIZE);
{ 0, 0, 0, NULL, (void*)&SizeKludge, "", NULL, BarEnd, "" },
{ 0, LR|T2T|BORDER|SAME_ROW, 0, NULL, NULL, "", NULL, Label, "1" }, // optional title in window
{ 50, LL|TT, 100, NULL, (void*) &LogoW, NULL, NULL, -1, "LogoW" }, // white logo
-{ 0, L2L|T2T, 200, NULL, (void*) &CCB, NULL, NULL, Label, "White" }, // white clock
-{ 0, R2R|T2T|SAME_ROW, 200, NULL, (void*) &CCB, NULL, NULL, Label, "Black" }, // black clock
+{ 12, L2L|T2T, 200, NULL, (void*) &CCB, NULL, NULL, Label, "White" }, // white clock
+{ 13, R2R|T2T|SAME_ROW, 200, NULL, (void*) &CCB, NULL, NULL, Label, "Black" }, // black clock
{ 50, RR|TT|SAME_ROW, 100, NULL, (void*) &LogoB, NULL, NULL, -1, "LogoB" }, // black logo
{ 0, LR|T2T|BORDER, 401, NULL, NULL, "", NULL, -1, "2" }, // backup for title in window (if no room for other)
{ 0, LR|T2T|BORDER, 270, NULL, NULL, "", NULL, Label, "message" }, // message field
{
fileProc = proc; /* I can't see a way not */
fileOpenMode = openMode; /* to use globals here */
+#ifdef TODO_GTK
{ // [HGM] use file-selector dialog stolen from Ghostview
// int index; // this is not supported yet
Browse(BoardWindow, label, (def[0] ? def : NULL), filter, False, openMode, &openName, &openFP);
}
+#else
+ FileNamePopUpGTK(label, def, filter, proc, False, openMode, &openName, &openFP);
+#endif
}