From fc2cb7ee2963561fc7d95b01e422efdaf5189876 Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Wed, 22 Feb 2023 18:40:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8=20=D0=BF=D0=BE=D0=B4=D0=BA?= =?UTF-8?q?=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D1=8F,=20=D0=BF=D0=B0?= =?UTF-8?q?=D1=82=D1=87=20=D0=B4=D0=BB=D1=8F=20thinstation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- freerdp/client/X11/cli/gui.c | 13 ++++++++++--- i586.patch => thinstation.patch | 10 +++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) rename i586.patch => thinstation.patch (79%) diff --git a/freerdp/client/X11/cli/gui.c b/freerdp/client/X11/cli/gui.c index 7cbd9aa..e2147a4 100644 --- a/freerdp/client/X11/cli/gui.c +++ b/freerdp/client/X11/cli/gui.c @@ -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"); diff --git a/i586.patch b/thinstation.patch similarity index 79% rename from i586.patch rename to thinstation.patch index 55b2e1d..3c7e3a0 100644 --- a/i586.patch +++ b/thinstation.patch @@ -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