Merge pull request 'Fixed documentation dialog double call fix' (#81) from YanTheKaller/ubl-settings-resourcequota:master into master

Reviewed-on: #81
master v2.40
Dmitry Razumov 2 weeks ago
commit 6cfbf56323

@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: source/ubl-strings.h:1 #: source/ubl-strings.h:1
msgid "Version:" msgid "https://wiki.ublinux.com/en/software/programs_and_utilities/all/ubl-settings-resourcequota"
msgstr "" msgstr ""
#: source/ubl-strings.h:2 #: source/ubl-strings.h:2

@ -18,8 +18,8 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: source/ubl-strings.h:1 #: source/ubl-strings.h:1
msgid "Version:" msgid "https://wiki.ublinux.com/en/software/programs_and_utilities/all/ubl-settings-resourcequota"
msgstr "Версия:" msgstr "https://wiki.ublinux.com/ru/software/programs_and_utilities/all/ubl-settings-resourcequota"
#: source/ubl-strings.h:2 #: source/ubl-strings.h:2
#, fuzzy #, fuzzy

@ -835,7 +835,9 @@ void on_quotas_edit(GtkWidget *self, dictionary *windows){
if (dict->data&&yon_dictionary_get_data(dict,device_limits*)->read) if (dict->data&&yon_dictionary_get_data(dict,device_limits*)->read)
read_devices = yon_char_unite(read_devices?read_devices:"","",dict->key," ",yon_dictionary_get_data(dict,device_limits*)->read,"\n",NULL); read_devices = yon_char_unite(read_devices?read_devices:"","",dict->key," ",yon_dictionary_get_data(dict,device_limits*)->read,"\n",NULL);
} }
if (read_devices[strlen(read_devices)-1]=='\n') read_devices[strlen(read_devices)-1]='\0'; if (!yon_char_is_empty(read_devices)){
yon_char_remove_last_symbol(read_devices,'\n');
}
read_limit = yon_char_unite(read_limit?read_limit:"",read_devices,NULL); read_limit = yon_char_unite(read_limit?read_limit:"",read_devices,NULL);
@ -845,7 +847,9 @@ void on_quotas_edit(GtkWidget *self, dictionary *windows){
if (dict->data&&yon_dictionary_get_data(dict,device_limits*)->write) if (dict->data&&yon_dictionary_get_data(dict,device_limits*)->write)
write_devices = yon_char_unite(write_devices?write_devices:"","",dict->key," ",yon_dictionary_get_data(dict,device_limits*)->write,"\n",NULL); write_devices = yon_char_unite(write_devices?write_devices:"","",dict->key," ",yon_dictionary_get_data(dict,device_limits*)->write,"\n",NULL);
} }
if (write_devices[strlen(write_devices)-1]=='\n') write_devices[strlen(write_devices)-1]='\0'; if (!yon_char_is_empty(write_devices)){
yon_char_remove_last_symbol(write_devices,'\n');
}
write_limit = yon_char_unite(write_limit?write_limit:"",write_devices,NULL); write_limit = yon_char_unite(write_limit?write_limit:"",write_devices,NULL);
gtk_list_store_set(main_config.list,&iter,1,target,2,soft,3,hard,4,paging,5,cpu,6,read_limit,7,write_limit,8,string,-1); gtk_list_store_set(main_config.list,&iter,1,target,2,soft,3,hard,4,paging,5,cpu,6,read_limit,7,write_limit,8,string,-1);
yon_config_register(CGROUP_QUOTA(target),CGROUP_QUOTA_comd(target),(char*)string); yon_config_register(CGROUP_QUOTA(target),CGROUP_QUOTA_comd(target),(char*)string);
@ -1260,7 +1264,6 @@ void yon_main_window_complete(main_window *widgets){
gtk_box_pack_start(GTK_BOX(widgets->InterfaceBox),yon_gtk_builder_get_widget(builder,"BoxMain"),1,1,0); gtk_box_pack_start(GTK_BOX(widgets->InterfaceBox),yon_gtk_builder_get_widget(builder,"BoxMain"),1,1,0);
// Custom widgets configuration // Custom widgets configuration
{ {
widgets->FiltersButton = yon_gtk_builder_get_widget(builder,"FiltersButton"); widgets->FiltersButton = yon_gtk_builder_get_widget(builder,"FiltersButton");
widgets->InformationButton = yon_gtk_builder_get_widget(builder,"InformationButton"); widgets->InformationButton = yon_gtk_builder_get_widget(builder,"InformationButton");
widgets->RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton"); widgets->RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton");
@ -1291,7 +1294,6 @@ void yon_main_window_complete(main_window *widgets){
// yon_window_config_add_custom_parameter(widgets->HeadInfoLabel,"head-text","label",YON_TYPE_STRING); // yon_window_config_add_custom_parameter(widgets->HeadInfoLabel,"head-text","label",YON_TYPE_STRING);
/* Signal connection | Присоединение сигналов */ /* Signal connection | Присоединение сигналов */
g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),WIKI_LINK);
g_signal_connect(G_OBJECT(widgets->FiltersButton),"clicked",G_CALLBACK(on_filters_opened),widgets); g_signal_connect(G_OBJECT(widgets->FiltersButton),"clicked",G_CALLBACK(on_filters_opened),widgets);
g_signal_connect(G_OBJECT(widgets->InformationButton),"clicked",G_CALLBACK(on_information),widgets); g_signal_connect(G_OBJECT(widgets->InformationButton),"clicked",G_CALLBACK(on_information),widgets);
g_signal_connect(G_OBJECT(widgets->RemoveButton),"clicked",G_CALLBACK(on_remove),widgets); g_signal_connect(G_OBJECT(widgets->RemoveButton),"clicked",G_CALLBACK(on_remove),widgets);
@ -1319,7 +1321,6 @@ void yon_main_window_complete(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->LoadLocalMenuItem),"activate",G_CALLBACK(on_config_local_load),widgets); g_signal_connect(G_OBJECT(widgets->LoadLocalMenuItem),"activate",G_CALLBACK(on_config_local_load),widgets);
g_signal_connect(G_OBJECT(widgets->LoadCustomMenuItem),"activate",G_CALLBACK(on_config_custom_load),widgets); g_signal_connect(G_OBJECT(widgets->LoadCustomMenuItem),"activate",G_CALLBACK(on_config_custom_load),widgets);
on_dispatcher_update(NULL,widgets); on_dispatcher_update(NULL,widgets);
on_processes_update(NULL,widgets); on_processes_update(NULL,widgets);
yon_window_config_add_listener(widgets->DispatcherUpdateCheck,"DispatcherAutoupdate","active",YON_TYPE_BOOLEAN); yon_window_config_add_listener(widgets->DispatcherUpdateCheck,"DispatcherAutoupdate","active",YON_TYPE_BOOLEAN);

@ -18,7 +18,6 @@
#endif #endif
#include "ubl-strings.h" #include "ubl-strings.h"
#define config_path yon_char_unite("/home/",yon_ubl_root_user_get(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL) #define config_path yon_char_unite("/home/",yon_ubl_root_user_get(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL)
#define WIKI_LINK "https://wiki.ublinux.ru/software/programs_and_utilities/all/ubl-settings-resourcequota"
#define _(String) gettext(String) #define _(String) gettext(String)

@ -1,29 +1,6 @@
// #define VERSION_LABEL yon_char_unite(_("Version:")," ",version_application,"\n",NULL)
// #define HELP_LABEL yon_char_unite(_("ubl-settings-resourcequota version:")," ", version_application,"\n",_("CPU and RAM quotas"),"\n",_("Usage:"), " ubl-settings-resourcequota ",_("[OPTIONS]"),"\n",_("Options:"),"\n\t--help, -h\t\t\t",_("Show this help"),"\n\t--version, -V\t\t\t",_("Show package version"),"\n\t--lock-help\t\t\t",_("Lock this help menu"),"\n\t--lock-save\t\t\t",_("Lock configuration saving"),"\n\t--lock-save-local\t\t",_("Lock local configration saving"),"\n\t--lock-save-global\t\t",_("Lock global configration saving"),"\n\t--lock-load-global\t\t",_("Lock global configration loading"),"\n",NULL)
// #define ROOT_WARNING_LABEL _("Warning! Application was launched without root - root-dependent actions are locked")
#define TITLE_LABEL _("CPU and RAM quotas") #define TITLE_LABEL _("CPU and RAM quotas")
#define TITLE_INFO_LABEL _("Configuring CPU and RAM quota settings for groups and users of the system") #define TITLE_INFO_LABEL _("Configuring CPU and RAM quota settings for groups and users of the system")
#define WIKI_LINK _("https://wiki.ublinux.com/en/software/programs_and_utilities/all/ubl-settings-resourcequota")
// #define SUCCESS_LABEL _("Operation succeeded")
// #define ABOUT_LABEL _("About")
// #define DOCUMENTATION_LABEL _("Documentation")
// #define SAVE_LOCAL_LABEL _("Save to local configuration")
// #define SAVE_GLOBAL_LABEL _("Save to global configuration")
// #define SAVE_CONFIGURATION_LABEL _("Save configuration")
// #define SAVE_LABEL _("Save")
// #define LOAD_LOCAL_LABEL _("Load local configuration")
// #define LOAD_GLOBAL_LABEL _("Load global configuration")
// #define LOAD_LABEL _("Load")
// #define LOAD_LABEL _("Load")
// #define CANCEL_LABEL _("Cancel")
// #define HELP_TITLE_LABEL _("Would you like to read documentation in the Web?")
// #define HELP_INFO_LABEL _("You will be redirected to documentation website, where documentation is\ntranslated and supported by community.")
// #define HELP_ALWAYS_OPEN_LABEL _("Always redirect to online documentation")
// #define OPEN_HELP_LABEL _("Open documentation")
// #define PROJECT_HOME_LABEL _("Project homepage")
// #define NOTHING_CHOSEN_LABEL _("Nothing were chosen")
#define STR_USER _("User") #define STR_USER _("User")
#define STR_GROUP _("Group") #define STR_GROUP _("Group")
@ -38,16 +15,11 @@
#define GLOBAL_LOAD_SUCCESS _("Global configuration loading succeeded.") #define GLOBAL_LOAD_SUCCESS _("Global configuration loading succeeded.")
#define LOCAL_LOAD_SUCCESS _("Local configuration loading succeeded.") #define LOCAL_LOAD_SUCCESS _("Local configuration loading succeeded.")
// #define GLOBAL_LOCAL_SAVE_SUCCESS _("Local and global configuration saving succeeded.")
// #define GLOBAL_SAVE_SUCCESS _("Global configuration saving succeeded.")
// #define LOCAL_SAVE_SUCCESS _("Local configuration saving succeeded.")
#define STR_DEL_TABLE _("Quota deleted") #define STR_DEL_TABLE _("Quota deleted")
#define STR_NO_SELECT_TABLE _("Quota deleted") #define STR_NO_SELECT_TABLE _("Quota deleted")
#define STR_QUOTAS_ADD _("Quota deleted") #define STR_QUOTAS_ADD _("Quota deleted")
#define ALL_SAVE_SUCCESS _("Save configuration") #define ALL_SAVE_SUCCESS _("Save configuration")
#define MESS_NOTHING_SAVE _("Nothing to save!") #define MESS_NOTHING_SAVE _("Nothing to save!")
// #define LOCAL_SAVE_SUCCESS_LABEL _("Local configuration saving succeeded.")
// #define LOAD_FAILED_LABEL _("Config loading failed")
#define LIST_QUOTAS_LABEL _("Quotas list") #define LIST_QUOTAS_LABEL _("Quotas list")
#define DISPATCHER_LABEL _("Dispatcher") #define DISPATCHER_LABEL _("Dispatcher")
@ -70,7 +42,6 @@
#define CPU_LIMIT_LABEL _("CPU limit (%)") #define CPU_LIMIT_LABEL _("CPU limit (%)")
#define READ_LIMIT_LABEL _("I/O limit (read)") #define READ_LIMIT_LABEL _("I/O limit (read)")
#define WRITE_LIMIT_LABEL _("I/O limit (write)") #define WRITE_LIMIT_LABEL _("I/O limit (write)")
// #define ACCEPT_LABEL _("Accept")
#define FILTERS_LABEL _("Filters") #define FILTERS_LABEL _("Filters")
#define INFORMATION_LABEL _("Information") #define INFORMATION_LABEL _("Information")

Loading…
Cancel
Save