Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
|
8b727c5f71 | |
|
fc2cb7ee29 | |
|
aba2893f98 | |
|
217ed1d0a5 |
|
@ -80,6 +80,9 @@ 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))
|
||||||
|
@ -88,7 +91,6 @@ 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);
|
||||||
|
@ -99,7 +101,7 @@ static int guiConnect(Ihandle *self)
|
||||||
return IUP_DEFAULT;
|
return IUP_DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void createHostsList(Ihandle *iupList)
|
static char* createHostsList(Ihandle *iupList)
|
||||||
{
|
{
|
||||||
Hosts *hosts = dbGetHostsList();
|
Hosts *hosts = dbGetHostsList();
|
||||||
char *indexItem = NULL;
|
char *indexItem = NULL;
|
||||||
|
@ -120,6 +122,8 @@ static void 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
|
||||||
|
@ -166,7 +170,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(обязательное для заполнения поле)");
|
||||||
createHostsList(inputServer);
|
char *hostname = 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");
|
||||||
|
@ -182,7 +186,8 @@ 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(обязательное для заполнения поле)");
|
||||||
IupSetAttribute(inputUser, "VALUE", getSetValueCurrent(PARAMETER_USERNAME));
|
char *username = 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);
|
||||||
|
@ -222,6 +227,10 @@ 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");
|
||||||
|
|
|
@ -368,6 +368,7 @@ 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);
|
||||||
|
@ -378,7 +379,7 @@ static Ihandle* settingsBoxAbout()
|
||||||
IupSetAttribute(inputAbout, "ADDFORMATTAG_HANDLE", (char*)formattag);
|
IupSetAttribute(inputAbout, "ADDFORMATTAG_HANDLE", (char*)formattag);
|
||||||
|
|
||||||
formattag = IupUser();
|
formattag = IupUser();
|
||||||
IupSetAttribute(formattag, "FONTSIZE", "11");
|
IupSetAttribute(formattag, "FONTSIZE", "9");
|
||||||
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);
|
||||||
|
|
||||||
|
@ -398,9 +399,10 @@ 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=10x10");
|
return IupSetAttributes(IupFrame(IupHbox(inputAbout, NULL)), "TITLE=\"О программе\", MARGIN=5x5");
|
||||||
}
|
}
|
||||||
|
|
||||||
static Ihandle* settingsHorizontalBox()
|
static Ihandle* settingsHorizontalBox()
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue