Compare commits

...

4 Commits

Author SHA1 Message Date
Alexander Zhirov 8b727c5f71 Изменено
- уменьшен шрифт в "о программе"
- добавление в историю любой попытки подключиться к удаленному серверу
2023-02-23 18:30:16 +03:00
Alexander Zhirov fc2cb7ee29 исправлена работа кнопки подключения, патч для thinstation 2023-02-22 18:40:30 +03:00
Alexander Zhirov aba2893f98 fix patch 2023-02-20 19:34:28 +03:00
Alexander Zhirov 217ed1d0a5 Исправлено
- Фикс расширяемости фрейма в настройках

Выделен патч для фикса смены языка/расположения иконки для x32
2023-02-20 19:09:40 +03:00
3 changed files with 43 additions and 6 deletions

View File

@ -80,6 +80,9 @@ static int guiConnect(Ihandle *self)
printf("%s\n", args.argv[i]);
}
// Добавление в историю любой попытки подключиться к удаленному серверу
dbInsertHistory(login, host);
enum XF_EXIT_CODE xCode = free_rdp_connect(args.argc, args.argv);
if (!(xCode == XF_EXIT_DNS_NAME_NOT_FOUND || xCode == XF_EXIT_CONNECT_FAILED || xCode == XF_EXIT_TLS_CONNECT_FAILED))
@ -88,7 +91,6 @@ static int guiConnect(Ihandle *self)
if (!dbAddServer(result, host))
{
dbInsertHistory(login, host);
IupSetAttribute(IupGetDialogChild(self, "SERVER"), "APPENDITEM", host);
}
dbSetUserNameCurrent(login);
@ -99,7 +101,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 +122,8 @@ static void createHostsList(Ihandle *iupList)
IupSetAttribute(iupList, "VALUE", serverName);
}
dbFreeHosts(hosts);
return serverName;
}
#ifdef IUP_WITH_LANGUAGE_KEYBOARD_ICON
@ -166,7 +170,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 +186,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 +227,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");

View File

@ -368,6 +368,7 @@ static Ihandle* settingsBoxAbout()
inputAbout = IupText(NULL);
formattag = IupUser();
IupSetAttribute(formattag, "FONTSIZE", "8");
IupSetAttribute(formattag, "ALIGNMENT", "CENTER");
IupSetAttribute(formattag, "SELECTION", "1,1:7,50");
IupSetAttribute(inputAbout, "ADDFORMATTAG_HANDLE", (char*)formattag);
@ -378,7 +379,7 @@ static Ihandle* settingsBoxAbout()
IupSetAttribute(inputAbout, "ADDFORMATTAG_HANDLE", (char*)formattag);
formattag = IupUser();
IupSetAttribute(formattag, "FONTSIZE", "11");
IupSetAttribute(formattag, "FONTSIZE", "9");
IupSetAttribute(formattag, "SELECTION", "1,1:1,20");
IupSetAttribute(inputAbout, "ADDFORMATTAG_HANDLE", (char*)formattag);
@ -398,9 +399,10 @@ static Ihandle* settingsBoxAbout()
IupSetAttribute(inputAbout, "VISIBLELINES", "6");
IupSetAttribute(inputAbout, "PADDING", "5");
IupSetAttribute(inputAbout, "FORMATTING", "YES");
IupSetAttribute(inputAbout, "EXPAND", "YES");
IupSetAttribute(inputAbout, "VALUE", getAbout());
return IupSetAttributes(IupFrame(IupHbox(inputAbout, NULL)), "TITLE=\"О программе\", MARGIN=10x10");
return IupSetAttributes(IupFrame(IupHbox(inputAbout, NULL)), "TITLE=\"О программе\", MARGIN=5x5");
}
static Ihandle* settingsHorizontalBox()

26
thinstation.patch Normal file
View File

@ -0,0 +1,26 @@
diff --git a/client/X11/cli/gui.c b/client/X11/cli/gui.c
index e2147a4..9b97a83 100644
--- a/client/X11/cli/gui.c
+++ b/client/X11/cli/gui.c
@@ -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
@@ -275,7 +279,7 @@ Ihandle* guiStart()
IupSetAttribute(dlg, "DEFAULTENTER", "CONNECT");
IupSetAttribute(dlg, "DEFAULTESC", "CLOSE");
#ifdef IUP_WITH_LANGUAGE_KEYBOARD_ICON
- IupSetCallback(dlg, "iup_XkeyAlt(K_LSHIFT)", (Icallback) k_any);
+ IupSetCallback(dlg, "K_ANY", (Icallback) k_any);
IupSetCallback(dlg, "GETFOCUS_CB", (Icallback) k_any);
#endif