исправлена работа кнопки подключения, патч для thinstation
This commit is contained in:
parent
aba2893f98
commit
fc2cb7ee29
|
@ -99,7 +99,7 @@ static int guiConnect(Ihandle *self)
|
|||
return IUP_DEFAULT;
|
||||
}
|
||||
|
||||
static void createHostsList(Ihandle *iupList)
|
||||
static char* createHostsList(Ihandle *iupList)
|
||||
{
|
||||
Hosts *hosts = dbGetHostsList();
|
||||
char *indexItem = NULL;
|
||||
|
@ -120,6 +120,8 @@ static void createHostsList(Ihandle *iupList)
|
|||
IupSetAttribute(iupList, "VALUE", serverName);
|
||||
}
|
||||
dbFreeHosts(hosts);
|
||||
|
||||
return serverName;
|
||||
}
|
||||
|
||||
#ifdef IUP_WITH_LANGUAGE_KEYBOARD_ICON
|
||||
|
@ -166,7 +168,7 @@ Ihandle* guiStart()
|
|||
inputServer = IupList(NULL);
|
||||
IupSetAttribute(inputServer, "NAME", "SERVER");
|
||||
IupSetAttribute(inputServer, "TIP", "IP-адрес или имя удаленного сервера\n(обязательное для заполнения поле)");
|
||||
createHostsList(inputServer);
|
||||
char *hostname = createHostsList(inputServer);
|
||||
IupSetAttribute(inputServer, "SIZE", "100");
|
||||
IupSetAttribute(inputServer, "EDITBOX", "YES");
|
||||
IupSetAttribute(inputServer, "DROPDOWN", "YES");
|
||||
|
@ -182,7 +184,8 @@ Ihandle* guiStart()
|
|||
inputUser = IupText(NULL);
|
||||
IupSetAttribute(inputUser, "NAME", "USER");
|
||||
IupSetAttribute(inputUser, "TIP", "<домен>\\<имя пользователя>\n<имя пользователя>@<домен>\n(обязательное для заполнения поле)");
|
||||
IupSetAttribute(inputUser, "VALUE", getSetValueCurrent(PARAMETER_USERNAME));
|
||||
char *username = getSetValueCurrent(PARAMETER_USERNAME);
|
||||
IupSetAttribute(inputUser, "VALUE", username);
|
||||
IupSetAttribute(inputUser, "SIZE", "100");
|
||||
IupSetAttribute(inputUser, "MASK", "(/w|[/./\\/@/-])*");
|
||||
IupSetCallback(inputUser, "ACTION", (Icallback) activeBtnConnect);
|
||||
|
@ -222,6 +225,10 @@ Ihandle* guiStart()
|
|||
IupSetHandle("CONNECT", btnConnect);
|
||||
IupSetAttribute(btnConnect, "NAME", "CONNECT");
|
||||
IupSetAttribute(btnConnect, "TIP", "Выполнить подключение");
|
||||
if (username && hostname)
|
||||
IupSetAttribute(btnConnect, "ACTIVE", "YES");
|
||||
else
|
||||
IupSetAttribute(btnConnect, "ACTIVE", "NO");
|
||||
#ifdef IUP_WITH_COLOR_BUTTONS
|
||||
IupSetAttribute(btnConnect, "BGCOLOR", "0 179 0");
|
||||
IupSetAttribute(btnConnect, "FGCOLOR", "255 255 255");
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
diff --git a/client/X11/cli/gui.c b/client/X11/cli/gui.c
|
||||
index 7cbd9aa..181a3cc 100644
|
||||
index e2147a4..9b97a83 100644
|
||||
--- a/client/X11/cli/gui.c
|
||||
+++ b/client/X11/cli/gui.c
|
||||
@@ -214,7 +214,7 @@ Ihandle* guiStart()
|
||||
@@ -217,7 +217,11 @@ Ihandle* guiStart()
|
||||
IupSetAttribute(iconLang, "NAME", "KEYBOARD");
|
||||
IupSetAttribute(iconLang, "IMAGE", "keyboardRu");
|
||||
IupSetAttribute(iconLang, "FLOATING", "YES");
|
||||
- IupSetAttribute(iconLang, "POSITION", "13,222");
|
||||
+#ifdef IUP_DESCRIPTION_ABOUT_ARCH_X32
|
||||
+ IupSetAttribute(iconLang, "POSITION", "13,235");
|
||||
+#else
|
||||
+ IupSetAttribute(iconLang, "POSITION", "13,228");
|
||||
+#endif
|
||||
IupSetAttribute(iconLang, "TIP", "Текущая раскладка клавиатуры (Alt+Shift)");
|
||||
#endif
|
||||
|
||||
@@ -268,7 +268,7 @@ Ihandle* guiStart()
|
||||
@@ -275,7 +279,7 @@ Ihandle* guiStart()
|
||||
IupSetAttribute(dlg, "DEFAULTENTER", "CONNECT");
|
||||
IupSetAttribute(dlg, "DEFAULTESC", "CLOSE");
|
||||
#ifdef IUP_WITH_LANGUAGE_KEYBOARD_ICON
|
Loading…
Reference in New Issue