Compare commits

..

No commits in common. "master" and "v1.2.0" have entirely different histories.

3 changed files with 6 additions and 43 deletions

View File

@ -80,9 +80,6 @@ static int guiConnect(Ihandle *self)
printf("%s\n", args.argv[i]); printf("%s\n", args.argv[i]);
} }
// Добавление в историю любой попытки подключиться к удаленному серверу
dbInsertHistory(login, host);
enum XF_EXIT_CODE xCode = free_rdp_connect(args.argc, args.argv); 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)) if (!(xCode == XF_EXIT_DNS_NAME_NOT_FOUND || xCode == XF_EXIT_CONNECT_FAILED || xCode == XF_EXIT_TLS_CONNECT_FAILED))
@ -91,6 +88,7 @@ static int guiConnect(Ihandle *self)
if (!dbAddServer(result, host)) if (!dbAddServer(result, host))
{ {
dbInsertHistory(login, host);
IupSetAttribute(IupGetDialogChild(self, "SERVER"), "APPENDITEM", host); IupSetAttribute(IupGetDialogChild(self, "SERVER"), "APPENDITEM", host);
} }
dbSetUserNameCurrent(login); dbSetUserNameCurrent(login);
@ -101,7 +99,7 @@ static int guiConnect(Ihandle *self)
return IUP_DEFAULT; return IUP_DEFAULT;
} }
static char* createHostsList(Ihandle *iupList) static void createHostsList(Ihandle *iupList)
{ {
Hosts *hosts = dbGetHostsList(); Hosts *hosts = dbGetHostsList();
char *indexItem = NULL; char *indexItem = NULL;
@ -122,8 +120,6 @@ static char* createHostsList(Ihandle *iupList)
IupSetAttribute(iupList, "VALUE", serverName); IupSetAttribute(iupList, "VALUE", serverName);
} }
dbFreeHosts(hosts); dbFreeHosts(hosts);
return serverName;
} }
#ifdef IUP_WITH_LANGUAGE_KEYBOARD_ICON #ifdef IUP_WITH_LANGUAGE_KEYBOARD_ICON
@ -170,7 +166,7 @@ Ihandle* guiStart()
inputServer = IupList(NULL); inputServer = IupList(NULL);
IupSetAttribute(inputServer, "NAME", "SERVER"); IupSetAttribute(inputServer, "NAME", "SERVER");
IupSetAttribute(inputServer, "TIP", "IP-адрес или имя удаленного сервера\n(обязательное для заполнения поле)"); IupSetAttribute(inputServer, "TIP", "IP-адрес или имя удаленного сервера\n(обязательное для заполнения поле)");
char *hostname = createHostsList(inputServer); createHostsList(inputServer);
IupSetAttribute(inputServer, "SIZE", "100"); IupSetAttribute(inputServer, "SIZE", "100");
IupSetAttribute(inputServer, "EDITBOX", "YES"); IupSetAttribute(inputServer, "EDITBOX", "YES");
IupSetAttribute(inputServer, "DROPDOWN", "YES"); IupSetAttribute(inputServer, "DROPDOWN", "YES");
@ -186,8 +182,7 @@ Ihandle* guiStart()
inputUser = IupText(NULL); inputUser = IupText(NULL);
IupSetAttribute(inputUser, "NAME", "USER"); IupSetAttribute(inputUser, "NAME", "USER");
IupSetAttribute(inputUser, "TIP", "<домен>\\<имя пользователя>\n<имя пользователя>@<домен>\n(обязательное для заполнения поле)"); IupSetAttribute(inputUser, "TIP", "<домен>\\<имя пользователя>\n<имя пользователя>@<домен>\n(обязательное для заполнения поле)");
char *username = getSetValueCurrent(PARAMETER_USERNAME); IupSetAttribute(inputUser, "VALUE", getSetValueCurrent(PARAMETER_USERNAME));
IupSetAttribute(inputUser, "VALUE", username);
IupSetAttribute(inputUser, "SIZE", "100"); IupSetAttribute(inputUser, "SIZE", "100");
IupSetAttribute(inputUser, "MASK", "(/w|[/./\\/@/-])*"); IupSetAttribute(inputUser, "MASK", "(/w|[/./\\/@/-])*");
IupSetCallback(inputUser, "ACTION", (Icallback) activeBtnConnect); IupSetCallback(inputUser, "ACTION", (Icallback) activeBtnConnect);
@ -227,10 +222,6 @@ Ihandle* guiStart()
IupSetHandle("CONNECT", btnConnect); IupSetHandle("CONNECT", btnConnect);
IupSetAttribute(btnConnect, "NAME", "CONNECT"); IupSetAttribute(btnConnect, "NAME", "CONNECT");
IupSetAttribute(btnConnect, "TIP", "Выполнить подключение"); IupSetAttribute(btnConnect, "TIP", "Выполнить подключение");
if (username && hostname)
IupSetAttribute(btnConnect, "ACTIVE", "YES");
else
IupSetAttribute(btnConnect, "ACTIVE", "NO");
#ifdef IUP_WITH_COLOR_BUTTONS #ifdef IUP_WITH_COLOR_BUTTONS
IupSetAttribute(btnConnect, "BGCOLOR", "0 179 0"); IupSetAttribute(btnConnect, "BGCOLOR", "0 179 0");
IupSetAttribute(btnConnect, "FGCOLOR", "255 255 255"); IupSetAttribute(btnConnect, "FGCOLOR", "255 255 255");

View File

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

View File

@ -1,26 +0,0 @@
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