Moved find all domains button, added check connection button

pull/51/head
parent a9c53c044c
commit bd7b79fda2

@ -525,7 +525,7 @@ void on_status_clicked(GtkWidget *self, connection_window *window){
} }
} }
void on_find_domains_clicked(GtkWidget *self, connection_window *window){ void on_find_domains_clicked(GtkWidget *self, main_window *window){
yon_debug_output("%s\n",domains_seek_command); yon_debug_output("%s\n",domains_seek_command);
domain_info_window *dialog = yon_information_window_new(); domain_info_window *dialog = yon_information_window_new();
yon_terminal_integrated_start(dialog->ExecuteTerminal,domains_seek_command); yon_terminal_integrated_start(dialog->ExecuteTerminal,domains_seek_command);
@ -566,7 +566,7 @@ gboolean on_main_window_domain_status_update(connection_window *window){
} }
// gboolean yon_update_thread(GtkWidget *self, GdkEvent *event, connection_window *window){ // gboolean yon_update_thread(GtkWidget *self, GdkEvent *event, connection_window *window){
gboolean yon_update_thread(connection_window *window){ gboolean yon_update_thread(GtkWidget *self, connection_window *window){
if (!update_thread_buzy){ if (!update_thread_buzy){
update_thread_buzy=1; update_thread_buzy=1;
pthread_t thread_id; pthread_t thread_id;
@ -574,9 +574,6 @@ gboolean on_main_window_domain_status_update(connection_window *window){
} }
return 1; return 1;
} }
void remove_checking(GtkWidget *self, connection_window *window){
g_source_remove(window->timer_id);
}
connection_window *yon_connection_window_new(){ connection_window *yon_connection_window_new(){
GtkBuilder *builder = gtk_builder_new_from_resource(glade_connection_path); GtkBuilder *builder = gtk_builder_new_from_resource(glade_connection_path);
@ -585,7 +582,6 @@ connection_window *yon_connection_window_new(){
window->AdressEntry = yon_gtk_builder_get_widget(builder,"AdressEntry"); window->AdressEntry = yon_gtk_builder_get_widget(builder,"AdressEntry");
window->HeadLabel = yon_gtk_builder_get_widget(builder,"HeadLabel"); window->HeadLabel = yon_gtk_builder_get_widget(builder,"HeadLabel");
window->StatusEntry = yon_gtk_builder_get_widget(builder,"StatusEntry"); window->StatusEntry = yon_gtk_builder_get_widget(builder,"StatusEntry");
window->FindEntry = yon_gtk_builder_get_widget(builder,"FindEntry");
window->LoginEntry = yon_gtk_builder_get_widget(builder,"LoginEntry"); window->LoginEntry = yon_gtk_builder_get_widget(builder,"LoginEntry");
window->PasswordEntry = yon_gtk_builder_get_widget(builder,"PasswordEntry"); window->PasswordEntry = yon_gtk_builder_get_widget(builder,"PasswordEntry");
window->KerberosServerEntry = yon_gtk_builder_get_widget(builder,"KerberosServerEntry"); window->KerberosServerEntry = yon_gtk_builder_get_widget(builder,"KerberosServerEntry");
@ -596,14 +592,11 @@ connection_window *yon_connection_window_new(){
window->SettingsTree = yon_gtk_builder_get_widget(builder,"SettingsTree"); window->SettingsTree = yon_gtk_builder_get_widget(builder,"SettingsTree");
window->SaveButton = yon_gtk_builder_get_widget(builder,"SaveButton"); window->SaveButton = yon_gtk_builder_get_widget(builder,"SaveButton");
window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton"); window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
window->CheckButton = yon_gtk_builder_get_widget(builder,"CheckButton");
window->list = GTK_LIST_STORE(gtk_builder_get_object(builder,"liststore1")); window->list = GTK_LIST_STORE(gtk_builder_get_object(builder,"liststore1"));
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_signal_connect(G_OBJECT(window->StatusEntry),"clicked",G_CALLBACK(on_status_clicked),window); g_signal_connect(G_OBJECT(window->StatusEntry),"clicked",G_CALLBACK(on_status_clicked),window);
g_signal_connect(G_OBJECT(window->FindEntry),"clicked",G_CALLBACK(on_find_domains_clicked),window); g_signal_connect(G_OBJECT(window->CheckButton),"clicked",G_CALLBACK(yon_update_thread),window);
g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(remove_checking),window);
// g_signal_connect(G_OBJECT(window->AdressEntry),"focus-out-event",G_CALLBACK(yon_update_thread),window);
// yon_update_thread(NULL,NULL,window);
window->timer_id = g_timeout_add(1000,(GSourceFunc)yon_update_thread,window);
return window; return window;
} }
@ -769,6 +762,7 @@ main_window *yon_main_window_complete(main_window *widgets){
widgets->LocaleButton = yon_gtk_builder_get_widget(builder,"getLocalesButton"); widgets->LocaleButton = yon_gtk_builder_get_widget(builder,"getLocalesButton");
widgets->LocaleEntry = yon_gtk_builder_get_widget(builder,"localeEntry"); widgets->LocaleEntry = yon_gtk_builder_get_widget(builder,"localeEntry");
widgets->FindButton = yon_gtk_builder_get_widget(builder,"FindButton");
widgets->DomainButton = yon_gtk_builder_get_widget(builder,"DomainButton"); widgets->DomainButton = yon_gtk_builder_get_widget(builder,"DomainButton");
widgets->DomainEntry = yon_gtk_builder_get_widget(builder,"DomainEntry"); widgets->DomainEntry = yon_gtk_builder_get_widget(builder,"DomainEntry");
@ -814,6 +808,8 @@ main_window *yon_main_window_complete(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->DomainEntry),"focus-out-event",G_CALLBACK(on_domain_address_save),NULL); g_signal_connect(G_OBJECT(widgets->DomainEntry),"focus-out-event",G_CALLBACK(on_domain_address_save),NULL);
g_signal_connect(G_OBJECT(widgets->FindButton),"clicked",G_CALLBACK(on_find_domains_clicked),widgets);
gtk_widget_set_size_request(widgets->Window,800,440); gtk_widget_set_size_request(widgets->Window,800,440);
// g_timeout_add(1000,(GSourceFunc)on_check_domain_connected,widgets); // g_timeout_add(1000,(GSourceFunc)on_check_domain_connected,widgets);

@ -116,6 +116,7 @@ typedef struct {
GtkWidget *DomainEntry; GtkWidget *DomainEntry;
GtkWidget *DomainButton; GtkWidget *DomainButton;
GtkWidget *FindButton;
GtkListStore *fontlist; GtkListStore *fontlist;
GtkListStore *languagelist; GtkListStore *languagelist;
@ -172,7 +173,7 @@ typedef struct {
GtkWidget *PasswordEntry; GtkWidget *PasswordEntry;
GtkWidget *DNSEntry; GtkWidget *DNSEntry;
GtkWidget *StatusEntry; GtkWidget *StatusEntry;
GtkWidget *FindEntry; GtkWidget *CheckButton;
GtkWidget *KerberosServerEntry; GtkWidget *KerberosServerEntry;
GtkWidget *ClientCombo; GtkWidget *ClientCombo;
GtkWidget *AdditionalCombo; GtkWidget *AdditionalCombo;

@ -59,4 +59,5 @@
#define DOMAIN_CONNECTED_LABEL _("Connected to domain") #define DOMAIN_CONNECTED_LABEL _("Connected to domain")
#define DOMAIN_DISCONNECTED_LABEL _("Disconnected from domain") #define DOMAIN_DISCONNECTED_LABEL _("Disconnected from domain")
#define LOADING_LABEL _("Loading...") #define LOADING_LABEL _("Loading...")
#define CHECK_CONNECTION_LABEL _("Check connection")

@ -8,11 +8,6 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.important-symbolic</property> <property name="icon-name">com.ublinux.libublsettingsui-gtk3.important-symbolic</property>
</object> </object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.zoom-symbolic</property>
</object>
<object class="GtkImage" id="image3"> <object class="GtkImage" id="image3">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
@ -107,15 +102,11 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton" id="StatusEntry"> <object class="GtkButton" id="CheckButton">
<property name="label" translatable="yes">Check connection</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Check domain name</property>
<property name="image">image1</property>
<style>
<class name="thin"/>
</style>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -124,12 +115,12 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton" id="FindEntry"> <object class="GtkButton" id="StatusEntry">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">List all domains</property> <property name="tooltip-text" translatable="yes">Check domain name</property>
<property name="image">image2</property> <property name="image">image1</property>
<style> <style>
<class name="thin"/> <class name="thin"/>
</style> </style>

@ -54,6 +54,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.arrows-left-right-symbolic</property> <property name="icon-name">com.ublinux.libublsettingsui-gtk3.arrows-left-right-symbolic</property>
</object> </object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.zoom-symbolic</property>
</object>
<object class="GtkListStore" id="languagelist"> <object class="GtkListStore" id="languagelist">
<columns> <columns>
<!-- column-name LocaleName --> <!-- column-name LocaleName -->
@ -155,6 +160,23 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkButton" id="FindButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">List all domains</property>
<property name="image">image4</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child> <child>
<object class="GtkButton" id="DomainButton"> <object class="GtkButton" id="DomainButton">
<property name="label" translatable="yes">Join</property> <property name="label" translatable="yes">Join</property>
@ -167,7 +189,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
</object> </object>

@ -216,3 +216,7 @@ msgstr ""
#: source/ubl-strings.h:62 #: source/ubl-strings.h:62
msgid "Loading..." msgid "Loading..."
msgstr "" msgstr ""
#: source/ubl-strings.h:63
msgid "Check connection"
msgstr ""

@ -94,130 +94,134 @@ msgstr "По умолчанию"
msgid "Cancel" msgid "Cancel"
msgstr "Отмена" msgstr "Отмена"
#: source/ubl-strings.h:23 #: source/ubl-strings.h:24
msgid "Machine ID has been copied" msgid "Machine ID has been copied"
msgstr "ID рабочей станции скопирован" msgstr "ID рабочей станции скопирован"
#: source/ubl-strings.h:25 #: source/ubl-strings.h:26
msgid "ID field can't be empty!" msgid "ID field can't be empty!"
msgstr "Поле ID не может быть пустым!" msgstr "Поле ID не может быть пустым!"
#: source/ubl-strings.h:27 #: source/ubl-strings.h:28
msgid "Insert data" msgid "Insert data"
msgstr "Введите данные" msgstr "Введите данные"
#: source/ubl-strings.h:29 #: source/ubl-strings.h:30
msgid "Accept" msgid "Accept"
msgstr "Принять" msgstr "Принять"
#: source/ubl-strings.h:31 #: source/ubl-strings.h:32
msgid "Important field is empty" msgid "Important field is empty"
msgstr "Пустое важное поле" msgstr "Пустое важное поле"
#: source/ubl-strings.h:33 #: source/ubl-strings.h:34
msgid "Connect" msgid "Connect"
msgstr "Подключиться" msgstr "Подключиться"
#: source/ubl-strings.h:34 #: source/ubl-strings.h:35
msgid "Disconnect" msgid "Disconnect"
msgstr "Отключиться" msgstr "Отключиться"
#: source/ubl-strings.h:35 #: source/ubl-strings.h:36
msgid "Domain address" msgid "Domain address"
msgstr "Адрес домена" msgstr "Адрес домена"
#: source/ubl-strings.h:36 #: source/ubl-strings.h:37
msgid "Domain address:" msgid "Domain address:"
msgstr "Адрес домена:" msgstr "Адрес домена:"
#: source/ubl-strings.h:37 #: source/ubl-strings.h:38
msgid "Domain administrator name:" msgid "Domain administrator name:"
msgstr "Имя администратора домена:" msgstr "Имя администратора домена:"
#: source/ubl-strings.h:38 #: source/ubl-strings.h:39
msgid "Domain administrator password:" msgid "Domain administrator password:"
msgstr "Пароль администратора домена:" msgstr "Пароль администратора домена:"
#: source/ubl-strings.h:39 #: source/ubl-strings.h:40
msgid "Main" msgid "Main"
msgstr "Основные" msgstr "Основные"
#: source/ubl-strings.h:40 #: source/ubl-strings.h:41
msgid "Additional" msgid "Additional"
msgstr "Дополнительные" msgstr "Дополнительные"
#: source/ubl-strings.h:41 #: source/ubl-strings.h:42
msgid "Kerberos/AD domain server:" msgid "Kerberos/AD domain server:"
msgstr "Сервер домена Kerberos/AD" msgstr "Сервер домена Kerberos/AD"
#: source/ubl-strings.h:42 #: source/ubl-strings.h:43
msgid "DNS server:" msgid "DNS server:"
msgstr "DNS сервер:" msgstr "DNS сервер:"
#: source/ubl-strings.h:43 #: source/ubl-strings.h:44
msgid "Domain connection client" msgid "Domain connection client"
msgstr "Клиент подключения к домену" msgstr "Клиент подключения к домену"
#: source/ubl-strings.h:44 #: source/ubl-strings.h:45
msgid "Sssd client" msgid "Sssd client"
msgstr "Клиент sssd" msgstr "Клиент sssd"
#: source/ubl-strings.h:45 #: source/ubl-strings.h:46
msgid "Winbind client" msgid "Winbind client"
msgstr "Клиент windbind" msgstr "Клиент windbind"
#: source/ubl-strings.h:46 #: source/ubl-strings.h:47
msgid "Samba client" msgid "Samba client"
msgstr "Клиент samba" msgstr "Клиент samba"
#: source/ubl-strings.h:47 #: source/ubl-strings.h:48
msgid "Switch client off or automatically" msgid "Switch client off or automatically"
msgstr "Выключить клиент или автоматически" msgstr "Выключить клиент или автоматически"
#: source/ubl-strings.h:48 #: source/ubl-strings.h:49
msgid "Domain information" msgid "Domain information"
msgstr "Информация о домене" msgstr "Информация о домене"
#: source/ubl-strings.h:49 #: source/ubl-strings.h:50
msgid "Domain connection" msgid "Domain connection"
msgstr "Соединение домена" msgstr "Соединение домена"
#: source/ubl-strings.h:50 #: source/ubl-strings.h:51
msgid "Check domain name" msgid "Check domain name"
msgstr "Проверить домен" msgstr "Проверить домен"
#: source/ubl-strings.h:51 #: source/ubl-strings.h:52
msgid "List all domains" msgid "List all domains"
msgstr "Показать все домены" msgstr "Показать все домены"
#: source/ubl-strings.h:53 #: source/ubl-strings.h:54
msgid "Connecting to domain" msgid "Connecting to domain"
msgstr "Подключение к домену" msgstr "Подключение к домену"
#: source/ubl-strings.h:54 #: source/ubl-strings.h:55
msgid "Disconnecting from domain" msgid "Disconnecting from domain"
msgstr "Отключение от домена" msgstr "Отключение от домена"
#: source/ubl-strings.h:55 #: source/ubl-strings.h:56
msgid "Join" msgid "Join"
msgstr "Присоединиться" msgstr "Присоединиться"
#: source/ubl-strings.h:56 #: source/ubl-strings.h:57
msgid "Leave" msgid "Leave"
msgstr "Отсоединиться" msgstr "Отсоединиться"
#: source/ubl-strings.h:58 #: source/ubl-strings.h:59
msgid "Connected to domain" msgid "Connected to domain"
msgstr "Подключен к домену" msgstr "Подключен к домену"
#: source/ubl-strings.h:59 #: source/ubl-strings.h:60
msgid "Disconnected from domain" msgid "Disconnected from domain"
msgstr "Не подключен к домену" msgstr "Не подключен к домену"
#: source/ubl-strings.h:61 #: source/ubl-strings.h:62
msgid "Loading..." msgid "Loading..."
msgstr "Загрузка..." msgstr "Загрузка..."
#: source/ubl-strings.h:63
msgid "Check connection"
msgstr "Проверка доступности"
msgid "Afrikaans, South Africa" msgid "Afrikaans, South Africa"
msgstr "Африканский, Южная Африка" msgstr "Африканский, Южная Африка"

Loading…
Cancel
Save