Merge pull request 'master' (#48) from YanTheKaller/ubl-settings-resourcequota:master into master
Reviewed-on: #48master v2.31
commit
98bc50d165
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@ -1,90 +0,0 @@
|
|||||||
#include "filters.h"
|
|
||||||
|
|
||||||
filters_window *filters_widgets = NULL;
|
|
||||||
gboolean flag_filters[8];
|
|
||||||
filters_window *filters_setup_window(char* glade_path){
|
|
||||||
if (filters_widgets == NULL) {
|
|
||||||
filters_widgets = malloc(sizeof(filters_window));
|
|
||||||
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path);
|
|
||||||
filters_widgets->Window = yon_gtk_builder_get_widget(builder,"wndFilters");
|
|
||||||
filters_widgets->chbFilterTypeQouota = yon_gtk_builder_get_widget(builder,"chbFilterTypeQouota");
|
|
||||||
filters_widgets->chbQuotaVolume = yon_gtk_builder_get_widget(builder,"chbQuotaVolume");
|
|
||||||
filters_widgets->chbSoftLimit = yon_gtk_builder_get_widget(builder,"chbSoftLimit");
|
|
||||||
filters_widgets->chbHardLimit = yon_gtk_builder_get_widget(builder,"chbHardLimit");
|
|
||||||
filters_widgets->chbSwapFileLimit = yon_gtk_builder_get_widget(builder,"chbSwapFileLimit");
|
|
||||||
filters_widgets->chbIOLimitWrite = yon_gtk_builder_get_widget(builder,"chbIOLimitWrite");
|
|
||||||
filters_widgets->chbCPULimit = yon_gtk_builder_get_widget(builder,"chbCPULimit");
|
|
||||||
filters_widgets->chbIOLimitRead = yon_gtk_builder_get_widget(builder,"chbIOLimitRead");
|
|
||||||
filters_widgets->btnFiltersCancel = yon_gtk_builder_get_widget(builder,"btnFiltersCancel");
|
|
||||||
filters_widgets->btnFiltersSave = yon_gtk_builder_get_widget(builder,"btnFiltersSave");
|
|
||||||
filters_event(filters_widgets);
|
|
||||||
}
|
|
||||||
filters_set_flag();
|
|
||||||
return filters_widgets;
|
|
||||||
}
|
|
||||||
|
|
||||||
void filters_event(filters_window *widgets) {
|
|
||||||
g_signal_connect(G_OBJECT(widgets->btnFiltersCancel), "clicked",G_CALLBACK(filters_on_hide_subwindow),NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->Window), "destroy", G_CALLBACK(filters_destroy), NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void filters_destroy(GtkWidget *self) {
|
|
||||||
filters_widgets = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void filters_localization(filters_window *widgets) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void filters_on_hide_subwindow(GtkWidget *self) {
|
|
||||||
gtk_widget_destroy(gtk_widget_get_toplevel(self));
|
|
||||||
filters_widgets = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
filters_window *get_widget_filters() {
|
|
||||||
return filters_widgets;
|
|
||||||
}
|
|
||||||
|
|
||||||
void filters_show(GtkWidget *self, char* glade_path) {
|
|
||||||
if (filters_widgets != NULL) {
|
|
||||||
gtk_widget_show_all(filters_widgets->Window);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
filters_setup_window(glade_path);
|
|
||||||
gtk_widget_show_all(filters_widgets->Window);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean* filters_get_flag() {
|
|
||||||
flag_filters[0] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterTypeQouota));
|
|
||||||
flag_filters[1] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbQuotaVolume));
|
|
||||||
flag_filters[2] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbSoftLimit));
|
|
||||||
flag_filters[3] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbHardLimit));
|
|
||||||
flag_filters[4] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbSwapFileLimit));
|
|
||||||
flag_filters[5] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbCPULimit));
|
|
||||||
flag_filters[6] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbIOLimitWrite));
|
|
||||||
flag_filters[7] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbIOLimitRead));
|
|
||||||
return flag_filters;
|
|
||||||
}
|
|
||||||
|
|
||||||
void filters_init_flag() {
|
|
||||||
flag_filters[0] = 1;
|
|
||||||
flag_filters[1] = 1;
|
|
||||||
flag_filters[2] = 1;
|
|
||||||
flag_filters[3] = 1;
|
|
||||||
flag_filters[4] = 1;
|
|
||||||
flag_filters[5] = 1;
|
|
||||||
flag_filters[6] = 1;
|
|
||||||
flag_filters[7] = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void filters_set_flag() {
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterTypeQouota),flag_filters[0] );
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbQuotaVolume), flag_filters[1]);
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbSoftLimit), flag_filters[2]);
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbHardLimit), flag_filters[3]);
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbSwapFileLimit), flag_filters[4]);
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbCPULimit), flag_filters[5]);
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbIOLimitWrite), flag_filters[6]);
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbIOLimitRead), flag_filters[7]);
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
#ifndef FILTERS_H
|
|
||||||
#define FILTERS_H
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include <gtk/gtkx.h>
|
|
||||||
#include "ubl-utils.h"
|
|
||||||
#include "ubl-strings.h"
|
|
||||||
#include <locale.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <getopt.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include "philos_utils.h"
|
|
||||||
|
|
||||||
// Переменные
|
|
||||||
typedef struct {
|
|
||||||
GtkWidget* Window;
|
|
||||||
GtkWidget* btnFiltersSave;
|
|
||||||
GtkWidget* btnFiltersCancel;
|
|
||||||
GtkWidget* chbFilterTypeQouota;
|
|
||||||
GtkWidget* chbCPULimit;
|
|
||||||
GtkWidget* chbIOLimitRead;
|
|
||||||
GtkWidget* chbIOLimitWrite;
|
|
||||||
GtkWidget* chbSwapFileLimit;
|
|
||||||
GtkWidget* chbHardLimit;
|
|
||||||
GtkWidget* chbSoftLimit;
|
|
||||||
GtkWidget* chbQuotaVolume;
|
|
||||||
} filters_window;
|
|
||||||
|
|
||||||
// Функции
|
|
||||||
filters_window *filters_setup_window(char* glade_path);
|
|
||||||
void filters_event(filters_window *widgets);
|
|
||||||
void filters_localization(filters_window *widgets);
|
|
||||||
void filters_on_hide_subwindow(GtkWidget *self);
|
|
||||||
filters_window *get_widget_filters();
|
|
||||||
void filters_show(GtkWidget *self, char* glade_path);
|
|
||||||
void filters_destroy(GtkWidget *self);
|
|
||||||
int* filters_get_flag();
|
|
||||||
void filters_init_flag();
|
|
||||||
void filters_set_flag();
|
|
||||||
#endif
|
|
@ -1,50 +0,0 @@
|
|||||||
#include "my_device.h"
|
|
||||||
|
|
||||||
device_config obj_device_config;
|
|
||||||
|
|
||||||
device_config* get_device_cfg() {
|
|
||||||
return &obj_device_config;
|
|
||||||
}
|
|
||||||
|
|
||||||
void device_disk_parsed() {
|
|
||||||
char* cmd = "lsblk --fs --raw --output PATH,FSTYPE --exclude 7,11,253";
|
|
||||||
int size = 0;
|
|
||||||
char** responce = yon_config_load(cmd, &size);
|
|
||||||
obj_device_config.size_disk = 0;
|
|
||||||
char* split_simvol = " ";
|
|
||||||
for (int index = 1; index < size; index++ ) {
|
|
||||||
char* disk = yon_char_divide_search(responce[index], "\n", -1);
|
|
||||||
if (yon_char_find_count(disk, " ") != 0) {
|
|
||||||
char* name_disk = yon_char_divide_search(disk, " ", -1);
|
|
||||||
obj_device_config.name_disk = yon_char_parsed_append(obj_device_config.name_disk, &obj_device_config.size_disk, name_disk);
|
|
||||||
obj_device_config.size_disk--;
|
|
||||||
obj_device_config.file_system = yon_char_parsed_append(obj_device_config.file_system, &obj_device_config.size_disk, disk);
|
|
||||||
obj_device_config.size_disk--;
|
|
||||||
obj_device_config.mounted = yon_char_parsed_append(obj_device_config.mounted, &obj_device_config.size_disk, "");
|
|
||||||
obj_device_config.size_disk--;
|
|
||||||
obj_device_config.type_dick = yon_char_parsed_append(obj_device_config.type_dick, &obj_device_config.size_disk, "");
|
|
||||||
obj_device_config.size_disk--;
|
|
||||||
disk = yon_char_replace(disk," ", "");
|
|
||||||
if (strlen(disk)!=0) {
|
|
||||||
char* description_disk = yon_char_unite(name_disk,
|
|
||||||
split_simvol,
|
|
||||||
disk,
|
|
||||||
NULL);
|
|
||||||
obj_device_config.description_disk = yon_char_parsed_append(obj_device_config.description_disk, &obj_device_config.size_disk, description_disk);
|
|
||||||
free(description_disk);
|
|
||||||
|
|
||||||
}
|
|
||||||
free(name_disk);
|
|
||||||
}
|
|
||||||
free(disk);
|
|
||||||
}
|
|
||||||
philos_free_string_array(&responce, size);
|
|
||||||
|
|
||||||
}
|
|
||||||
void device_fill_disk(GtkWidget* combo_box_text) {
|
|
||||||
for (int index = 0; index < obj_device_config.size_disk; index++) {
|
|
||||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box_text), obj_device_config.description_disk[index]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
#ifndef MY_DEVICE_H
|
|
||||||
#define MY_DEVICE_H
|
|
||||||
#include "ubl-utils.h"
|
|
||||||
#include <locale.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include "philos_utils.h"
|
|
||||||
typedef struct {
|
|
||||||
char** name_disk;
|
|
||||||
char** file_system;
|
|
||||||
char** mounted;
|
|
||||||
char** type_dick;
|
|
||||||
char** description_disk;
|
|
||||||
int size_disk;
|
|
||||||
} device_config;
|
|
||||||
|
|
||||||
void device_disk_parsed();
|
|
||||||
device_config* get_device_cfg();
|
|
||||||
void device_fill_disk(GtkWidget* combo_box_text);
|
|
||||||
size_t get_mem_total();
|
|
||||||
float get_size_pow_memory(size_t size_memory, int size);
|
|
||||||
size_t get_resurs_total(char* cmd);
|
|
||||||
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load Diff
@ -1,121 +0,0 @@
|
|||||||
#ifndef PHILOS_UTILS_H
|
|
||||||
#define PHILOS_UTILS_H
|
|
||||||
#include "ubl-utils.h"
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include <gtk/gtkx.h>
|
|
||||||
#include <vte/vte.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include "my_device.h"
|
|
||||||
|
|
||||||
#define catch(x) ExitJmp:if(__HadError)
|
|
||||||
#define throw(x) {__HadError=true;goto ExitJmp;}
|
|
||||||
#define file_source_login_min_max "/etc/login.defs"
|
|
||||||
static char** array_size_pow;
|
|
||||||
typedef struct {
|
|
||||||
char** disk_read;
|
|
||||||
char** disk_write;
|
|
||||||
int* i_o_limit_read;
|
|
||||||
int* i_o_limit_write;
|
|
||||||
int* i_o_limit_read_size;
|
|
||||||
int* i_o_limit_write_size;
|
|
||||||
int size;
|
|
||||||
int size_disk;
|
|
||||||
} temp_config;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
|
|
||||||
GtkWidget* Window;
|
|
||||||
GtkWidget* btnSaveTempSave;
|
|
||||||
GtkWidget* btnTempCancel;
|
|
||||||
|
|
||||||
GtkWidget* entryTempCmd;
|
|
||||||
GtkWidget* chbTempRead;
|
|
||||||
GtkWidget* spinTempRead;
|
|
||||||
GtkWidget* cbtTempRead;
|
|
||||||
|
|
||||||
GtkWidget* chbTempWrite;
|
|
||||||
GtkWidget* spinTempWrite;
|
|
||||||
GtkWidget* cbtTempWrite;
|
|
||||||
|
|
||||||
GtkWidget* chkSoftRestrictionTemp;
|
|
||||||
GtkWidget* spiSevereRestrictionTemp;
|
|
||||||
GtkWidget* cmSevereRestrictionTemp;
|
|
||||||
|
|
||||||
GtkWidget* chkSevereRestrictionTemp;
|
|
||||||
GtkWidget* spinSevereRestrictionTemp;
|
|
||||||
GtkWidget* cmbSevereRestrictionTemp;
|
|
||||||
|
|
||||||
GtkWidget* chkPaddingFLTemp;
|
|
||||||
GtkWidget* spinPaddingFLTemp;
|
|
||||||
GtkWidget* cmbPaddingFLTemp;
|
|
||||||
|
|
||||||
GtkWidget* chkCPULimitTemp;
|
|
||||||
GtkWidget* spinCPULimitTemp;
|
|
||||||
GtkWidget* lblCPULimitTemp;
|
|
||||||
|
|
||||||
GtkWidget* cbtTempDevice;
|
|
||||||
GtkWidget* cbxTempQuotaObj;
|
|
||||||
GtkWidget* cbxTempQuotaLevel2;
|
|
||||||
GtkWidget* boxBlockGui;
|
|
||||||
GtkWidget* lblInfoObjQuotas;
|
|
||||||
} temp_set_window;
|
|
||||||
void philos_array_string_remove_char(char*** array, char* str_remove, int size);
|
|
||||||
void philos_set_pow_size_memory(char* str_find, int** array_size,int index, char** array_size_pow);
|
|
||||||
void philos_set_size_memory_integer_char(char* str_find, char*** array_data, int index);
|
|
||||||
void philos_free_string_array(char ***array, int size);
|
|
||||||
void philos_free_string_array_n3(char ****array, int size);
|
|
||||||
void philos_free_int_array(int **array, int size);
|
|
||||||
void philos_free_int_array_n2(int ***array, int size);
|
|
||||||
config_str philos_list_group(int* size);
|
|
||||||
unsigned short philos_read_uid_min_max(char* filename, char* search);
|
|
||||||
config_str philos_list_user(int* size);
|
|
||||||
char* philos_str_size_pow_byte(GtkWidget *combo_box_text);
|
|
||||||
char* philos_str_remove(char *str, const char *sub);
|
|
||||||
void philos_split_size_memory(char* str_value, int* size, char* pow_memory);
|
|
||||||
char* philos_format_cfg_str_size_memory(char* str_key, int value, int pow_size_memory);
|
|
||||||
char** philos_str_split(char *parameters, int *size, char *divider);
|
|
||||||
void philos_array_str_copy(char*** source, char*** copy);
|
|
||||||
void philos_set_pow_size_memory_device(char* str_find, int** array_size,int index, char** array_size_pow);
|
|
||||||
void philos_array_int_copy(int** source, int** copy);
|
|
||||||
char** philos_pars_terminal_systemd_cgls(char* CMD_GET_SLICE_SERVICE, char* str_find, int* size_array_data);
|
|
||||||
char* philos_pard_array_add_cmd(char* cmd, temp_config* _config, char* key, int* array_io, int* array_io_pow_size, char** disk, int size);
|
|
||||||
int philos_check_activ_disk(temp_set_window *widgets, temp_config* _config);
|
|
||||||
void philos_temp_generate_cmd(temp_set_window *widgets, temp_config* _config);
|
|
||||||
void philos_temp_del_disk(temp_set_window *widgets, temp_config* _config, int flag_check_array);
|
|
||||||
void philos_temp_config_init(temp_config* _config);
|
|
||||||
void philos_update_device_to_entry(temp_set_window *widgets, temp_config* _config, int flag_check_array);
|
|
||||||
void philos_temp_add_disk(temp_set_window *widgets, temp_config* _config, int flag_check_array);
|
|
||||||
int* philos_int_append(int* array, int* size, int value);
|
|
||||||
int* remove_element_int_array(int* array, int* size, int item_to_delete);
|
|
||||||
int** remove_element_int_array_n3(int** array, int* size, int item_to_delete);
|
|
||||||
char* philos_get_size_bite(GtkWidget* chk_button, GtkWidget* spin, GtkWidget* combo_box_text);
|
|
||||||
void philos_fill_combo_box_text(GtkWidget *cbt, config_str list_data, int size);
|
|
||||||
void philos_set_spin_adjustment(GtkWidget *check, GtkWidget *spin, GtkWidget *combo, size_t value);
|
|
||||||
void philos_set_active_widgets(GtkWidget *check, GtkWidget *spin, GtkWidget *combo, int flag_cpu, char* cmd);
|
|
||||||
size_t get_resurs_total(char* cmd);
|
|
||||||
float get_size_pow_memory(size_t size_memory, int size);
|
|
||||||
void philos_set_active_widgets_device_io(GtkWidget* combo_to_l2,GtkWidget *check, GtkWidget *spin, GtkWidget *combo);
|
|
||||||
char *yon_char_get_augumented(char *source, char *append);
|
|
||||||
dictionary *yon_dictionary_create_with_data_connected(dictionary *dict, char *key, void *data);
|
|
||||||
char **yon_char_parsed_shrink(char **char_string, int *size, int item_to_delete);
|
|
||||||
char*** yon_char_parsed_shrink_n3(char ***char_string, int *size, int item_to_delete);
|
|
||||||
dictionary *yon_dictionary_create_empty();
|
|
||||||
void yon_terminal_integrated_launch(GtkWidget *terminal, char* command, void *endwork_function, void* endwork_function_argument);
|
|
||||||
dictionary *yon_dictionary_create_conneced(dictionary *targetdict);
|
|
||||||
void yon_int_array_append(int **source, int append);
|
|
||||||
static void child_ready(VteTerminal *terminal, GPid pid, GError *error, gpointer user_data);
|
|
||||||
int philos_config_save(char *command);
|
|
||||||
void philos_array_int_pars_to(int** array, int to);
|
|
||||||
void philos_array_char_pars_to(char*** array, char* to);
|
|
||||||
int find_null_array(temp_config* _config);
|
|
||||||
void init_device_disk(temp_config* _config);
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load Diff
@ -1,287 +0,0 @@
|
|||||||
#include "view_add.h"
|
|
||||||
|
|
||||||
temp_set_window *add_widgets = NULL;
|
|
||||||
temp_config obj_add_config;
|
|
||||||
|
|
||||||
temp_config* get_add_config() {
|
|
||||||
return &obj_add_config;
|
|
||||||
}
|
|
||||||
|
|
||||||
temp_set_window *add_setup_window(char* glade_path) {
|
|
||||||
if (add_widgets == NULL) {
|
|
||||||
add_widgets = malloc(sizeof(temp_set_window));
|
|
||||||
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path);
|
|
||||||
add_widgets->Window = yon_gtk_builder_get_widget(builder,"wndQuotasAdding");
|
|
||||||
add_widgets->btnSaveTempSave = yon_gtk_builder_get_widget(builder,"btnSaveAddSave");
|
|
||||||
add_widgets->btnTempCancel = yon_gtk_builder_get_widget(builder,"btnAddCancel");
|
|
||||||
|
|
||||||
add_widgets->entryTempCmd = yon_gtk_builder_get_widget(builder,"entryAddCmd");
|
|
||||||
add_widgets->cbxTempQuotaObj = yon_gtk_builder_get_widget(builder,"cbxAddQuotaObj");
|
|
||||||
add_widgets->cbxTempQuotaLevel2 = yon_gtk_builder_get_widget(builder,"cbxAddQuotaLevel2");
|
|
||||||
add_widgets->cbtTempDevice = yon_gtk_builder_get_widget(builder,"cbtAddDevice");
|
|
||||||
add_widgets->lblCPULimitTemp = yon_gtk_builder_get_widget(builder,"lblCPULimitAdd");
|
|
||||||
add_widgets->spinCPULimitTemp = yon_gtk_builder_get_widget(builder,"spinCPULimitAdd");
|
|
||||||
add_widgets->chkCPULimitTemp = yon_gtk_builder_get_widget(builder,"chkCPULimitAdd");
|
|
||||||
|
|
||||||
add_widgets->chkPaddingFLTemp = yon_gtk_builder_get_widget(builder,"chkPaddingFLAdd");
|
|
||||||
add_widgets->spinPaddingFLTemp = yon_gtk_builder_get_widget(builder,"spinPaddingFLAdd");
|
|
||||||
add_widgets->cmbPaddingFLTemp = yon_gtk_builder_get_widget(builder,"cmbPaddingFLAdd");
|
|
||||||
|
|
||||||
add_widgets->chkSevereRestrictionTemp = yon_gtk_builder_get_widget(builder,"chkSevereRestrictionAdd");
|
|
||||||
add_widgets->spinSevereRestrictionTemp = yon_gtk_builder_get_widget(builder,"spinSevereRestrictionAdd");
|
|
||||||
add_widgets->cmbSevereRestrictionTemp = yon_gtk_builder_get_widget(builder,"cmbSevereRestrictionAdd");
|
|
||||||
|
|
||||||
add_widgets->chkSoftRestrictionTemp = yon_gtk_builder_get_widget(builder,"chkSoftRestrictionAdd");
|
|
||||||
add_widgets->spiSevereRestrictionTemp = yon_gtk_builder_get_widget(builder,"spiSevereRestrictionAdd");
|
|
||||||
add_widgets->cmSevereRestrictionTemp = yon_gtk_builder_get_widget(builder,"cmSevereRestrictionAdd");
|
|
||||||
|
|
||||||
add_widgets->chbTempRead = yon_gtk_builder_get_widget(builder,"chbAddRead");
|
|
||||||
add_widgets->spinTempRead = yon_gtk_builder_get_widget(builder,"spinAddRead");
|
|
||||||
add_widgets->cbtTempRead = yon_gtk_builder_get_widget(builder,"cbtAddRead");
|
|
||||||
|
|
||||||
add_widgets->spinTempWrite = yon_gtk_builder_get_widget(builder,"spinAddWrite");
|
|
||||||
add_widgets->chbTempWrite = yon_gtk_builder_get_widget(builder,"chbAddWrite");
|
|
||||||
add_widgets->cbtTempWrite = yon_gtk_builder_get_widget(builder,"cbtAddWrite");
|
|
||||||
add_widgets->boxBlockGui = yon_gtk_builder_get_widget(builder,"boxBlockGui");
|
|
||||||
device_fill_disk(add_widgets->cbtTempDevice);
|
|
||||||
add_event(add_widgets);
|
|
||||||
add_init_windows();
|
|
||||||
add_localization(add_widgets);
|
|
||||||
philos_temp_config_init(&obj_add_config);
|
|
||||||
init_device_disk(&obj_add_config);
|
|
||||||
}
|
|
||||||
return add_widgets;
|
|
||||||
}
|
|
||||||
|
|
||||||
void add_init_windows() {
|
|
||||||
if (gtk_combo_box_get_active(GTK_COMBO_BOX(add_widgets->cbxTempQuotaLevel2)) != -1) {
|
|
||||||
gtk_widget_set_sensitive(add_widgets->boxBlockGui, 1);
|
|
||||||
gtk_widget_set_sensitive(add_widgets->btnSaveTempSave, 1);
|
|
||||||
philos_set_active_widgets(add_widgets->chkSoftRestrictionTemp, add_widgets->spiSevereRestrictionTemp, add_widgets->cmSevereRestrictionTemp, 0 , CMD_RAW);
|
|
||||||
philos_set_active_widgets(add_widgets->chkSevereRestrictionTemp, add_widgets->spinSevereRestrictionTemp, add_widgets->cmbSevereRestrictionTemp,0 , CMD_RAW);
|
|
||||||
philos_set_active_widgets(add_widgets->chkPaddingFLTemp, add_widgets->spinPaddingFLTemp, add_widgets->cmbPaddingFLTemp,0 , CMD_SWAP);
|
|
||||||
philos_set_active_widgets(add_widgets->chkCPULimitTemp, add_widgets->spinCPULimitTemp, add_widgets->lblCPULimitTemp,1 , CMD_CPU);
|
|
||||||
philos_set_active_widgets_device_io(add_widgets->cbtTempDevice,add_widgets->chbTempWrite, add_widgets->spinTempWrite, add_widgets->cbtTempWrite);
|
|
||||||
philos_set_active_widgets_device_io(add_widgets->cbtTempDevice,add_widgets->chbTempRead, add_widgets->spinTempRead, add_widgets->cbtTempRead);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
gtk_widget_set_sensitive(add_widgets->boxBlockGui, 0);
|
|
||||||
gtk_widget_set_sensitive(add_widgets->btnSaveTempSave, 0);
|
|
||||||
}
|
|
||||||
philos_temp_generate_cmd(add_widgets, &obj_add_config);
|
|
||||||
}
|
|
||||||
|
|
||||||
void event_check_io_device() {
|
|
||||||
add_init_windows();
|
|
||||||
philos_temp_add_disk(add_widgets, &obj_add_config, 0);
|
|
||||||
philos_temp_add_disk(add_widgets, &obj_add_config, 1);
|
|
||||||
philos_temp_generate_cmd(add_widgets, &obj_add_config);
|
|
||||||
}
|
|
||||||
|
|
||||||
void combo_box_device() {
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(add_widgets->cbtTempDevice), G_CALLBACK(combo_box_device), NULL);
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(add_widgets->cbtTempRead), G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(add_widgets->cbtTempWrite), G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(add_widgets->spinTempRead), G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(add_widgets->spinTempWrite), G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(add_widgets->chbTempRead), G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(add_widgets->chbTempWrite), G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
philos_update_device_to_entry(add_widgets, &obj_add_config, 0);
|
|
||||||
philos_update_device_to_entry(add_widgets, &obj_add_config, 1);
|
|
||||||
add_init_windows();
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(add_widgets->cbtTempDevice), G_CALLBACK(combo_box_device), NULL);
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(add_widgets->cbtTempRead), G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(add_widgets->cbtTempWrite), G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(add_widgets->spinTempRead), G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(add_widgets->spinTempWrite), G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(add_widgets->chbTempRead), G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(add_widgets->chbTempWrite), G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void add_event(temp_set_window *widgets) {
|
|
||||||
g_signal_connect(G_OBJECT(widgets->btnTempCancel),"clicked",G_CALLBACK(add_on_destroy_subwindow),NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->Window), "destroy", G_CALLBACK(add_destroy), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->chkSoftRestrictionTemp), "toggled", G_CALLBACK(add_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->chkSevereRestrictionTemp), "toggled", G_CALLBACK(add_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->chkPaddingFLTemp), "toggled", G_CALLBACK(add_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->chkCPULimitTemp), "toggled", G_CALLBACK(add_init_windows), NULL);
|
|
||||||
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cbxTempQuotaObj),"changed",G_CALLBACK(add_update_combo_box), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cbxTempQuotaLevel2),"changed",G_CALLBACK(add_init_windows), NULL);
|
|
||||||
|
|
||||||
g_signal_connect(G_OBJECT(widgets->spiSevereRestrictionTemp),"value-changed",G_CALLBACK(add_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->spinSevereRestrictionTemp),"value-changed",G_CALLBACK(add_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->spinPaddingFLTemp),"value-changed",G_CALLBACK(add_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->spinCPULimitTemp),"value-changed",G_CALLBACK(add_init_windows), NULL);
|
|
||||||
|
|
||||||
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cmSevereRestrictionTemp),"changed",G_CALLBACK(add_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cmbSevereRestrictionTemp),"changed",G_CALLBACK(add_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cmbPaddingFLTemp),"changed",G_CALLBACK(add_init_windows), NULL);
|
|
||||||
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cbtTempDevice),"changed",G_CALLBACK(combo_box_device), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cbtTempRead),"changed",G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cbtTempWrite),"changed",G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->spinTempRead),"value-changed",G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->spinTempWrite),"value-changed",G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->chbTempRead), "toggled", G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->chbTempWrite), "toggled", G_CALLBACK(event_check_io_device), NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void add_get_systemd_cgls(char* cmd_systemd_cgls) {
|
|
||||||
CMD_GET_SLICE_SERVICE = cmd_systemd_cgls;
|
|
||||||
}
|
|
||||||
|
|
||||||
void add_destroy(GtkWidget *self) {
|
|
||||||
add_widgets = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void add_localization(temp_set_window *widgets) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void add_on_destroy_subwindow(GtkWidget *self) {
|
|
||||||
gtk_widget_destroy(gtk_widget_get_toplevel(self));
|
|
||||||
add_widgets = NULL;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
temp_set_window *get_widget_add() {
|
|
||||||
return add_widgets;
|
|
||||||
}
|
|
||||||
|
|
||||||
void add_show(GtkWidget *self, char* glade_path) {
|
|
||||||
if (add_widgets != NULL) {
|
|
||||||
add_update_combo_box();
|
|
||||||
gtk_widget_show_all(add_widgets->Window);
|
|
||||||
add_init_windows();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
add_setup_window(glade_path);
|
|
||||||
add_update_combo_box();
|
|
||||||
gtk_widget_show_all(add_widgets->Window);
|
|
||||||
add_init_windows();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
char* add_get_select_device_to_level_2() {
|
|
||||||
char* text = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(add_widgets->cbxTempQuotaLevel2));
|
|
||||||
int disk_id = gtk_combo_box_get_active(GTK_COMBO_BOX(add_widgets->cbxTempQuotaLevel2));
|
|
||||||
if (disk_id >= 0) {
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
char* str = (char*)malloc(sizeof(char*)*2);
|
|
||||||
str[0] = '-';
|
|
||||||
str[1] = '\0';
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int add_get_index_type_quota() {
|
|
||||||
return gtk_combo_box_get_active(GTK_COMBO_BOX(add_widgets->cbxTempQuotaObj));
|
|
||||||
}
|
|
||||||
int add_get_index_volume_quota() {
|
|
||||||
return gtk_combo_box_get_active(GTK_COMBO_BOX(add_widgets->cbxTempQuotaLevel2));
|
|
||||||
}
|
|
||||||
|
|
||||||
int add_get_soft_size() {
|
|
||||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(add_widgets->chkSoftRestrictionTemp))) {
|
|
||||||
return gtk_combo_box_get_active(GTK_COMBO_BOX(add_widgets->cmSevereRestrictionTemp));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return -3;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
int add_get_hard_size() {
|
|
||||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(add_widgets->chkSevereRestrictionTemp))) {
|
|
||||||
return gtk_combo_box_get_active(GTK_COMBO_BOX(add_widgets->cmbSevereRestrictionTemp));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return -3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int add_get_limit_cpu_size() {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
int add_get_limit_swap_size() {
|
|
||||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(add_widgets->chkPaddingFLTemp))) {
|
|
||||||
return gtk_combo_box_get_active(GTK_COMBO_BOX(add_widgets->cmbPaddingFLTemp));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return -3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int add_get_quota_object_size() {
|
|
||||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(add_widgets->chkPaddingFLTemp))) {
|
|
||||||
return gtk_combo_box_get_active(GTK_COMBO_BOX(add_widgets->cbxTempQuotaObj));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return -3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int add_get_soft() {
|
|
||||||
return gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(add_widgets->spiSevereRestrictionTemp));
|
|
||||||
}
|
|
||||||
int add_get_hard() {
|
|
||||||
return gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(add_widgets->spinSevereRestrictionTemp));
|
|
||||||
}
|
|
||||||
int add_get_limit_cpu() {
|
|
||||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(add_widgets->chkCPULimitTemp))) {
|
|
||||||
return gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(add_widgets->spinCPULimitTemp));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return -3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int add_get_limit_swap() {
|
|
||||||
return gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(add_widgets->spinPaddingFLTemp));
|
|
||||||
}
|
|
||||||
char* add_get_quota_object() {
|
|
||||||
return gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(add_widgets->cbxTempQuotaObj));
|
|
||||||
}
|
|
||||||
void add_update_combo_box() {
|
|
||||||
int menu_id = gtk_combo_box_get_active(GTK_COMBO_BOX(add_widgets->cbxTempQuotaObj));
|
|
||||||
char* cmd = NULL;
|
|
||||||
config_str fill_cmb_2 = NULL;
|
|
||||||
int size = 0;
|
|
||||||
if (menu_id == 0) {
|
|
||||||
fill_cmb_2 = philos_list_user(&size);
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (menu_id == 1) {
|
|
||||||
fill_cmb_2 = philos_pars_terminal_systemd_cgls(CMD_GET_SLICE_SERVICE, ".service", &size);
|
|
||||||
philos_array_string_remove_char(&fill_cmb_2, "\n", size);
|
|
||||||
}
|
|
||||||
else if (menu_id == 2) {
|
|
||||||
fill_cmb_2 = philos_pars_terminal_systemd_cgls(CMD_GET_SLICE_SERVICE, ".slice", &size);
|
|
||||||
philos_array_string_remove_char(&fill_cmb_2, "\n", size);
|
|
||||||
}
|
|
||||||
if (menu_id >= 0) {
|
|
||||||
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(add_widgets->cbxTempQuotaLevel2));
|
|
||||||
philos_fill_combo_box_text(add_widgets->cbxTempQuotaLevel2, fill_cmb_2, size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int** add_get_read_device() {
|
|
||||||
return &obj_add_config.i_o_limit_read;
|
|
||||||
}
|
|
||||||
|
|
||||||
int** add_get_read_device_size_pow() {
|
|
||||||
return &obj_add_config.i_o_limit_read_size;
|
|
||||||
}
|
|
||||||
int** add_get_write_device() {
|
|
||||||
return &obj_add_config.i_o_limit_write;
|
|
||||||
}
|
|
||||||
int** add_get_write_device_size_pow() {
|
|
||||||
return &obj_add_config.i_o_limit_write_size;
|
|
||||||
}
|
|
||||||
char*** add_get_select_read_device() {
|
|
||||||
return &obj_add_config.disk_read;
|
|
||||||
}
|
|
||||||
char*** add_get_select_write_device() {
|
|
||||||
return &obj_add_config.disk_write;
|
|
||||||
}
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
|||||||
#ifndef VIEW_ADD_H
|
|
||||||
#define VIEW_ADD_H
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include <gtk/gtkx.h>
|
|
||||||
#include "ubl-utils.h"
|
|
||||||
#include "ubl-strings.h"
|
|
||||||
#include <locale.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <getopt.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include "my_device.h"
|
|
||||||
#include "philos_utils.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define CMD_CPU "lscpu | grep \"CPU(s):\" |grep -oE \"[0-9]{1,}\""
|
|
||||||
#define CMD_SWAP "grep '^Swap' /proc/meminfo | grep \"SwapTotal\" |grep -oE \"[0-9]{1,}\""
|
|
||||||
#define CMD_RAW "cat /proc/meminfo | grep \"MemTotal\" |grep -oE \"[0-9]{1,}\""
|
|
||||||
|
|
||||||
static char* CMD_GET_GROUP;
|
|
||||||
static char* CMD_GET_SLICE_SERVICE;
|
|
||||||
|
|
||||||
|
|
||||||
temp_set_window *add_setup_window(char* glade_path);
|
|
||||||
void add_event(temp_set_window *widgets);
|
|
||||||
void add_localization(temp_set_window *widgets);
|
|
||||||
void add_on_destroy_subwindow(GtkWidget *self);
|
|
||||||
temp_set_window *get_widget_add();
|
|
||||||
void add_show(GtkWidget *self, char* glade_path);
|
|
||||||
void add_destroy(GtkWidget *self);
|
|
||||||
void add_set_active_widgets(GtkWidget *check, GtkWidget *spin, GtkWidget *combo, int flag_cpu, char* cmd);
|
|
||||||
void add_init_windows();
|
|
||||||
void add_update_combo_box();
|
|
||||||
char*** add_get_select_read_device();
|
|
||||||
int** add_get_read_device();
|
|
||||||
int** add_get_write_device();
|
|
||||||
int add_get_soft();
|
|
||||||
int add_get_hard();
|
|
||||||
int add_get_limit_cpu();
|
|
||||||
int add_get_limit_swap();
|
|
||||||
char* add_get_quota_object();
|
|
||||||
char*** add_get_select_write_device();
|
|
||||||
char*** add_get_select_read_device();
|
|
||||||
void combo_box_device();
|
|
||||||
int** add_get_write_device_size_pow();
|
|
||||||
int** add_get_read_device_size_pow();
|
|
||||||
int add_get_soft_size();
|
|
||||||
int add_get_hard_size();
|
|
||||||
int add_get_limit_cpu_size();
|
|
||||||
int add_get_limit_swap_size();
|
|
||||||
int add_get_quota_object_size();
|
|
||||||
temp_config* get_add_config();
|
|
||||||
void add_set_active_widgets_device_io(GtkWidget *check, GtkWidget *spin, GtkWidget *combo);
|
|
||||||
void add_get_cmd_group(char* cmd_get_group);
|
|
||||||
char* add_get_select_device_to_level_2();
|
|
||||||
int add_get_index_volume_quota();
|
|
||||||
int add_get_index_type_quota();
|
|
||||||
void add_get_systemd_cgls(char* cmd_systemd_cgls);
|
|
||||||
void add_set_spin_adjustment(GtkWidget *check, GtkWidget *spin, GtkWidget *combo, size_t value);
|
|
||||||
#endif
|
|
@ -1,314 +0,0 @@
|
|||||||
#include "view_edit.h"
|
|
||||||
|
|
||||||
temp_set_window *edit_widgets = NULL;
|
|
||||||
temp_config obj_edit_config;
|
|
||||||
|
|
||||||
temp_config* get_edit_config() {
|
|
||||||
return &obj_edit_config;
|
|
||||||
}
|
|
||||||
temp_set_window *edit_setup_window(char* glade_path){
|
|
||||||
if (edit_widgets == NULL) {
|
|
||||||
edit_widgets = malloc(sizeof(temp_set_window));
|
|
||||||
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path);
|
|
||||||
edit_widgets->Window = yon_gtk_builder_get_widget(builder,"wndQuotasEdit");
|
|
||||||
edit_widgets->btnTempCancel = yon_gtk_builder_get_widget(builder,"btnEditCancel");
|
|
||||||
edit_widgets->btnSaveTempSave = yon_gtk_builder_get_widget(builder,"btnSaveEditSave");
|
|
||||||
|
|
||||||
edit_widgets->cbtTempDevice = yon_gtk_builder_get_widget(builder,"cbtEditDevice");
|
|
||||||
edit_widgets->lblCPULimitTemp = yon_gtk_builder_get_widget(builder,"lblCPULimitEdit");
|
|
||||||
edit_widgets->spinCPULimitTemp = yon_gtk_builder_get_widget(builder,"spinCPULimitEdit");
|
|
||||||
edit_widgets->chkCPULimitTemp = yon_gtk_builder_get_widget(builder,"chkCPULimitEdit");
|
|
||||||
|
|
||||||
edit_widgets->chkPaddingFLTemp = yon_gtk_builder_get_widget(builder,"chkPaddingFLEdit");
|
|
||||||
edit_widgets->spinPaddingFLTemp = yon_gtk_builder_get_widget(builder,"spinPaddingFLEdit");
|
|
||||||
edit_widgets->cmbPaddingFLTemp = yon_gtk_builder_get_widget(builder,"cmbPaddingFLEdit");
|
|
||||||
|
|
||||||
edit_widgets->chkSevereRestrictionTemp = yon_gtk_builder_get_widget(builder,"chkSevereRestrictionEdit");
|
|
||||||
edit_widgets->spinSevereRestrictionTemp = yon_gtk_builder_get_widget(builder,"spinSevereRestrictionEdit");
|
|
||||||
edit_widgets->cmbSevereRestrictionTemp = yon_gtk_builder_get_widget(builder,"cmbSevereRestrictionEdit");
|
|
||||||
|
|
||||||
edit_widgets->chkSoftRestrictionTemp = yon_gtk_builder_get_widget(builder,"chkSoftRestrictionEdit");
|
|
||||||
edit_widgets->spiSevereRestrictionTemp = yon_gtk_builder_get_widget(builder,"spiSevereRestrictionEdit");
|
|
||||||
edit_widgets->cmSevereRestrictionTemp = yon_gtk_builder_get_widget(builder,"cmSevereRestrictionEdit");
|
|
||||||
|
|
||||||
edit_widgets->chbTempRead = yon_gtk_builder_get_widget(builder,"chbEditRead");
|
|
||||||
edit_widgets->spinTempRead = yon_gtk_builder_get_widget(builder,"spinEditRead");
|
|
||||||
edit_widgets->cbtTempRead = yon_gtk_builder_get_widget(builder,"cbtEditRead");
|
|
||||||
|
|
||||||
edit_widgets->spinTempWrite = yon_gtk_builder_get_widget(builder,"spinEditWrite");
|
|
||||||
edit_widgets->chbTempWrite = yon_gtk_builder_get_widget(builder,"chbEditWrite");
|
|
||||||
edit_widgets->cbtTempWrite = yon_gtk_builder_get_widget(builder,"cbtEditWrite");
|
|
||||||
edit_widgets->entryTempCmd = yon_gtk_builder_get_widget(builder,"entryEditCmd");
|
|
||||||
edit_widgets->lblInfoObjQuotas = yon_gtk_builder_get_widget(builder,"lblInfoObjQuotas");
|
|
||||||
device_fill_disk(edit_widgets->cbtTempDevice);
|
|
||||||
edit_localization(edit_widgets);
|
|
||||||
philos_temp_config_init(&obj_edit_config);
|
|
||||||
}
|
|
||||||
return edit_widgets;
|
|
||||||
}
|
|
||||||
|
|
||||||
void edit_event(temp_set_window *widgets) {
|
|
||||||
g_signal_connect(G_OBJECT(widgets->btnTempCancel),"clicked",G_CALLBACK(edit_on_hide_subwindow),NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->Window), "destroy", G_CALLBACK(edit_destroy), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->chkSoftRestrictionTemp), "toggled", G_CALLBACK(edit_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->chkSevereRestrictionTemp), "toggled", G_CALLBACK(edit_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->chkPaddingFLTemp), "toggled", G_CALLBACK(edit_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->chkCPULimitTemp), "toggled", G_CALLBACK(edit_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->chbTempRead), "toggled", G_CALLBACK(edit_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->chbTempWrite), "toggled", G_CALLBACK(edit_init_windows), NULL);
|
|
||||||
|
|
||||||
g_signal_connect(G_OBJECT(widgets->spiSevereRestrictionTemp),"value-changed",G_CALLBACK(edit_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->spinSevereRestrictionTemp),"value-changed",G_CALLBACK(edit_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->spinPaddingFLTemp),"value-changed",G_CALLBACK(edit_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->spinCPULimitTemp),"value-changed",G_CALLBACK(edit_init_windows), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->spinTempRead),"value-changed",G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->spinTempWrite),"value-changed",G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cmSevereRestrictionTemp),"changed",G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cmbSevereRestrictionTemp),"changed",G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cmbPaddingFLTemp),"changed",G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cbtTempRead),"changed",G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cbtTempWrite),"changed",G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_connect(G_OBJECT(widgets->cbtTempDevice),"changed",G_CALLBACK(combo_box_device_edit), NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void edit_destroy(GtkWidget *self) {
|
|
||||||
edit_widgets = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void edit_localization(temp_set_window *widgets) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void edit_on_hide_subwindow(GtkWidget *self) {
|
|
||||||
gtk_widget_destroy(gtk_widget_get_toplevel(self));
|
|
||||||
edit_widgets = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
temp_set_window *get_widget_edit() {
|
|
||||||
return edit_widgets;
|
|
||||||
}
|
|
||||||
|
|
||||||
void edit_show(GtkWidget *self, char* glade_path) {
|
|
||||||
if (edit_widgets != NULL) {
|
|
||||||
gtk_widget_show_all(edit_widgets->Window);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
edit_setup_window(glade_path);
|
|
||||||
gtk_widget_show_all(edit_widgets->Window);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
void wrapper_edit_init_windows_size_memory() {
|
|
||||||
philos_temp_add_disk(edit_widgets, &obj_edit_config, 0);
|
|
||||||
philos_temp_add_disk(edit_widgets, &obj_edit_config, 1);
|
|
||||||
edit_init_windows();
|
|
||||||
}
|
|
||||||
|
|
||||||
void edit_init_windows() {
|
|
||||||
philos_set_active_widgets(edit_widgets->chkSoftRestrictionTemp, edit_widgets->spiSevereRestrictionTemp, edit_widgets->cmSevereRestrictionTemp,0 ,CMD_RAW);
|
|
||||||
philos_set_active_widgets(edit_widgets->chkSevereRestrictionTemp, edit_widgets->spinSevereRestrictionTemp, edit_widgets->cmbSevereRestrictionTemp,0 , CMD_RAW);
|
|
||||||
philos_set_active_widgets(edit_widgets->chkPaddingFLTemp, edit_widgets->spinPaddingFLTemp, edit_widgets->cmbPaddingFLTemp,0 , CMD_SWAP);
|
|
||||||
philos_set_active_widgets(edit_widgets->chkCPULimitTemp, edit_widgets->spinCPULimitTemp, edit_widgets->lblCPULimitTemp,1 ,CMD_CPU);
|
|
||||||
philos_set_active_widgets_device_io(edit_widgets->cbtTempDevice,edit_widgets->chbTempWrite, edit_widgets->spinTempWrite, edit_widgets->cbtTempWrite);
|
|
||||||
philos_set_active_widgets_device_io(edit_widgets->cbtTempDevice,edit_widgets->chbTempRead, edit_widgets->spinTempRead, edit_widgets->cbtTempRead);
|
|
||||||
philos_temp_generate_cmd(edit_widgets, &obj_edit_config);
|
|
||||||
}
|
|
||||||
|
|
||||||
void combo_box_device_edit() {
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(edit_widgets->cbtTempDevice), G_CALLBACK(combo_box_device_edit), NULL);
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(edit_widgets->cbtTempRead), G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(edit_widgets->cbtTempWrite), G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(edit_widgets->spinTempRead), G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(edit_widgets->spinTempWrite), G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(edit_widgets->chbTempRead), G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_handlers_block_by_func(G_OBJECT(edit_widgets->chbTempWrite), G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
philos_update_device_to_entry(edit_widgets, &obj_edit_config, 0);
|
|
||||||
philos_update_device_to_entry(edit_widgets, &obj_edit_config, 1);
|
|
||||||
edit_init_windows();
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(edit_widgets->cbtTempDevice), G_CALLBACK(combo_box_device_edit), NULL);
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(edit_widgets->cbtTempRead), G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(edit_widgets->cbtTempWrite), G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(edit_widgets->spinTempRead), G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(edit_widgets->spinTempWrite), G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(edit_widgets->chbTempRead), G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
g_signal_handlers_unblock_by_func(G_OBJECT(edit_widgets->chbTempWrite), G_CALLBACK(wrapper_edit_init_windows_size_memory), NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
int edit_get_soft_size() {
|
|
||||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(edit_widgets->chkSoftRestrictionTemp))) {
|
|
||||||
return gtk_combo_box_get_active(GTK_COMBO_BOX(edit_widgets->cmSevereRestrictionTemp));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return -3;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
int edit_get_hard_size() {
|
|
||||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(edit_widgets->chkSevereRestrictionTemp))) {
|
|
||||||
return gtk_combo_box_get_active(GTK_COMBO_BOX(edit_widgets->cmbSevereRestrictionTemp));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return -3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int edit_get_limit_cpu_size() {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
int edit_get_limit_swap_size() {
|
|
||||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(edit_widgets->chkPaddingFLTemp))) {
|
|
||||||
return gtk_combo_box_get_active(GTK_COMBO_BOX(edit_widgets->cmbPaddingFLTemp));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return -3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int edit_get_quota_object_size() {
|
|
||||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(edit_widgets->chkPaddingFLTemp))) {
|
|
||||||
return gtk_combo_box_get_active(GTK_COMBO_BOX(edit_widgets->cbxTempQuotaObj));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return -3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int** edit_get_read_device() {
|
|
||||||
return &obj_edit_config.i_o_limit_read;
|
|
||||||
}
|
|
||||||
int** edit_get_read_device_size_pow() {
|
|
||||||
return &obj_edit_config.i_o_limit_read_size;
|
|
||||||
}
|
|
||||||
int** edit_get_write_device() {
|
|
||||||
return &obj_edit_config.i_o_limit_write;
|
|
||||||
}
|
|
||||||
int** edit_get_write_device_size_pow() {
|
|
||||||
return &obj_edit_config.i_o_limit_write_size;
|
|
||||||
}
|
|
||||||
char*** edit_get_select_write_device() {
|
|
||||||
return &obj_edit_config.disk_write;
|
|
||||||
}
|
|
||||||
char*** edit_get_select_read_device() {
|
|
||||||
return &obj_edit_config.disk_read;
|
|
||||||
}
|
|
||||||
int edit_get_soft() {
|
|
||||||
return gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(edit_widgets->spiSevereRestrictionTemp));
|
|
||||||
}
|
|
||||||
int edit_get_hard() {
|
|
||||||
return gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(edit_widgets->spinSevereRestrictionTemp));
|
|
||||||
}
|
|
||||||
int edit_get_limit_cpu() {
|
|
||||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(edit_widgets->chkCPULimitTemp))) {
|
|
||||||
return gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(edit_widgets->spinCPULimitTemp));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return -3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int edit_get_limit_swap() {
|
|
||||||
return gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(edit_widgets->spinPaddingFLTemp));
|
|
||||||
}
|
|
||||||
|
|
||||||
void edit_set_select_read_device(char*** str_value) {
|
|
||||||
if (str_value) {
|
|
||||||
if ((*str_value)) {
|
|
||||||
yon_char_parsed_copy(&obj_edit_config.disk_read, str_value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void edit_set_select_write_device(char*** str_value) {
|
|
||||||
if (str_value) {
|
|
||||||
if ((*str_value)) {
|
|
||||||
yon_char_parsed_copy(&obj_edit_config.disk_write, str_value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int set_template_gui_device(int flag_check_array) {
|
|
||||||
int index = -1;
|
|
||||||
if (flag_check_array==0) {
|
|
||||||
index = yon_gtk_combo_box_text_find(edit_widgets->cbtTempDevice, obj_edit_config.disk_read[0]);
|
|
||||||
gtk_combo_box_set_active(GTK_COMBO_BOX(edit_widgets->cbtTempDevice), index);
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(edit_widgets->chbTempRead), 1);
|
|
||||||
edit_temp_set(obj_edit_config.i_o_limit_read[0],
|
|
||||||
obj_edit_config.i_o_limit_read_size[0], edit_widgets->chbTempRead,
|
|
||||||
edit_widgets->spinTempRead,
|
|
||||||
edit_widgets->cbtTempRead);
|
|
||||||
}
|
|
||||||
else if (flag_check_array==1) {
|
|
||||||
index = yon_gtk_combo_box_text_find(edit_widgets->cbtTempDevice, obj_edit_config.disk_write[0]);
|
|
||||||
gtk_combo_box_set_active(GTK_COMBO_BOX(edit_widgets->cbtTempDevice), index);
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(edit_widgets->chbTempWrite), 1);
|
|
||||||
edit_temp_set(obj_edit_config.i_o_limit_write[0],
|
|
||||||
obj_edit_config.i_o_limit_write_size[0],
|
|
||||||
edit_widgets->chbTempWrite,
|
|
||||||
edit_widgets->spinTempWrite,
|
|
||||||
edit_widgets->cbtTempWrite);
|
|
||||||
}
|
|
||||||
return index;
|
|
||||||
}
|
|
||||||
void set_gui_device() {
|
|
||||||
int flag = -1;
|
|
||||||
if (obj_edit_config.disk_read) {
|
|
||||||
if (obj_edit_config.disk_read[0] != NULL && strstr(obj_edit_config.disk_read[0], "-") == NULL) {
|
|
||||||
flag = set_template_gui_device(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (obj_edit_config.disk_write) {
|
|
||||||
if (obj_edit_config.disk_write[0] != NULL && strstr(obj_edit_config.disk_write[0], "-") == NULL) {
|
|
||||||
flag = set_template_gui_device(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void edit_set_read_device(int* str_value, int* pow_mem) {
|
|
||||||
if (str_value && pow_mem) {
|
|
||||||
philos_array_int_copy(&obj_edit_config.i_o_limit_read, &str_value);
|
|
||||||
philos_array_int_copy(&obj_edit_config.i_o_limit_read_size, &pow_mem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void edit_set_write_device(int* str_value, int* pow_mem) {
|
|
||||||
if (str_value && pow_mem) {
|
|
||||||
philos_array_int_copy(&obj_edit_config.i_o_limit_write, &str_value);
|
|
||||||
philos_array_int_copy(&obj_edit_config.i_o_limit_write_size, &pow_mem);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
void edit_set_size_arrays(size_t size_array) {
|
|
||||||
obj_edit_config.size_disk = size_array;
|
|
||||||
}
|
|
||||||
|
|
||||||
void edit_set_soft(int value, int pow_mem) {
|
|
||||||
edit_temp_set(value,pow_mem, edit_widgets->chkSoftRestrictionTemp,
|
|
||||||
edit_widgets->spiSevereRestrictionTemp,
|
|
||||||
edit_widgets->cmSevereRestrictionTemp);
|
|
||||||
}
|
|
||||||
void edit_set_hard(int value, int pow_mem) {
|
|
||||||
edit_temp_set(value,pow_mem, edit_widgets->chkSevereRestrictionTemp,
|
|
||||||
edit_widgets->spinSevereRestrictionTemp,
|
|
||||||
edit_widgets->cmbSevereRestrictionTemp);
|
|
||||||
}
|
|
||||||
void edit_set_limit_cpu(int value, int pow_mem) {
|
|
||||||
edit_temp_set(value,pow_mem, edit_widgets->chkCPULimitTemp,
|
|
||||||
edit_widgets->spinCPULimitTemp,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
void edit_set_limit_swap(int value, int pow_mem) {
|
|
||||||
edit_temp_set(value,pow_mem, edit_widgets->chkPaddingFLTemp,
|
|
||||||
edit_widgets->spinPaddingFLTemp,
|
|
||||||
edit_widgets->cmbPaddingFLTemp);
|
|
||||||
}
|
|
||||||
void edit_temp_set(int value, int pow_mem, GtkWidget* cheek, GtkWidget* spin, GtkWidget* combo_box_text) {
|
|
||||||
if (pow_mem>=-1 && value>=0) {
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin), value);
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cheek), 1);
|
|
||||||
if (combo_box_text) {
|
|
||||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box_text), pow_mem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cheek), 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void edit_temp_set_obj_quota(char* type, char* value) {
|
|
||||||
gtk_label_set_label(GTK_LABEL(edit_widgets->lblInfoObjQuotas), yon_char_unite(type, " " ,value, NULL));
|
|
||||||
}
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
|||||||
#ifndef VIEW_EDIT_H
|
|
||||||
#define VIEW_EDIT_H
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include <gtk/gtkx.h>
|
|
||||||
#include "ubl-utils.h"
|
|
||||||
#include "ubl-strings.h"
|
|
||||||
#include <locale.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <getopt.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include "my_device.h"
|
|
||||||
#include "philos_utils.h"
|
|
||||||
|
|
||||||
#define CMD_CPU "lscpu | grep \"CPU(s):\" |grep -oE \"[0-9]{1,}\""
|
|
||||||
#define CMD_SWAP "grep '^Swap' /proc/meminfo | grep \"SwapTotal\" |grep -oE \"[0-9]{1,}\""
|
|
||||||
#define CMD_RAW "cat /proc/meminfo | grep \"MemTotal\" |grep -oE \"[0-9]{1,}\""
|
|
||||||
|
|
||||||
// Функции
|
|
||||||
temp_set_window *edit_setup_window(char* glade_path);
|
|
||||||
void edit_event(temp_set_window *widgets);
|
|
||||||
void edit_localization(temp_set_window *widgets);
|
|
||||||
void edit_on_hide_subwindow(GtkWidget *self);
|
|
||||||
temp_set_window *get_widget_edit();
|
|
||||||
void combo_box_device_edit();
|
|
||||||
void edit_show(GtkWidget *self, char* glade_path);
|
|
||||||
void edit_destroy(GtkWidget *self);
|
|
||||||
void edit_init_windows();
|
|
||||||
void wrapper_edit_init_windows_size_memory();
|
|
||||||
void edit_set_active_widgets(GtkWidget *check, GtkWidget *spin, GtkWidget *combo, int flag_cpu, char* cmd);
|
|
||||||
char*** edit_get_select_read_device();
|
|
||||||
char*** edit_get_select_write_device();
|
|
||||||
int** edit_get_read_device();
|
|
||||||
int** edit_get_write_device();
|
|
||||||
int edit_get_soft();
|
|
||||||
int edit_get_hard();
|
|
||||||
int edit_get_limit_cpu();
|
|
||||||
int edit_get_limit_swap();
|
|
||||||
void wrapper_edit_show();
|
|
||||||
void edit_set_select_write_device(char*** str_value);
|
|
||||||
void edit_set_select_read_device(char*** str_value);
|
|
||||||
void edit_set_read_device(int* str_value, int* pow_mem);
|
|
||||||
void edit_set_write_device(int* str_value, int* pow_mem);
|
|
||||||
void edit_set_soft(int value, int pow_mem);
|
|
||||||
void edit_set_hard(int value, int pow_mem);
|
|
||||||
void edit_set_limit_cpu(int value, int pow_mem);
|
|
||||||
void edit_set_limit_swap(int value, int pow_mem);
|
|
||||||
void edit_temp_set(int value, int pow_mem, GtkWidget* cheek, GtkWidget* spin, GtkWidget* combo_box_text);
|
|
||||||
int** edit_get_read_device_size_pow();
|
|
||||||
int** edit_get_write_device_size_pow();
|
|
||||||
|
|
||||||
void edit_set_size_arrays(size_t size_array);
|
|
||||||
int edit_get_soft_size();
|
|
||||||
int edit_get_hard_size();
|
|
||||||
int edit_get_limit_cpu_size();
|
|
||||||
int edit_get_limit_swap_size();
|
|
||||||
void edit_config_init();
|
|
||||||
void set_gui_device();
|
|
||||||
temp_config* get_edit_config();
|
|
||||||
void edit_temp_set_obj_quota(char* type, char* value);
|
|
||||||
void edit_set_active_widgets_device_io(GtkWidget *check, GtkWidget *spin, GtkWidget *combo);
|
|
||||||
void edit_set_spin_adjustment(GtkWidget *check, GtkWidget *spin, GtkWidget *combo, size_t value);
|
|
||||||
#endif
|
|
@ -0,0 +1,239 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.38.2 -->
|
||||||
|
<interface domain="ubl-settings-resourcequota">
|
||||||
|
<requires lib="gtk+" version="3.24"/>
|
||||||
|
<!-- interface-css-provider-path ubl-settings-resourcequota.css -->
|
||||||
|
<object class="GtkImage" id="image1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="icon-name">emblem-ok-symbolic</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="image2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="icon-name">process-stop-symbolic</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkWindow" id="FiltersWindow">
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="valign">start</property>
|
||||||
|
<property name="resizable">False</property>
|
||||||
|
<property name="icon-name">com.ublinux.ubl-settings-resourcequota</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-left">5</property>
|
||||||
|
<property name="margin-right">5</property>
|
||||||
|
<property name="margin-start">5</property>
|
||||||
|
<property name="margin-end">5</property>
|
||||||
|
<property name="margin-top">5</property>
|
||||||
|
<property name="margin-bottom">5</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="QuotaTypeCheck">
|
||||||
|
<property name="label" translatable="yes">Quota type</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="QuotaTargetCheck">
|
||||||
|
<property name="label" translatable="yes">Quota target</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="SoftRamLimitCheck">
|
||||||
|
<property name="label" translatable="yes">Soft RAM limit, (volume)</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="HardRamLimitCheck">
|
||||||
|
<property name="label" translatable="yes">Hard RAM limit, (volume)</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="PagingLimitCheck">
|
||||||
|
<property name="label" translatable="yes">Swap file limit (volume)</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="CpuLimitCheck">
|
||||||
|
<property name="label" translatable="yes">CPU limit (%)</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="ReadLimitCheck">
|
||||||
|
<property name="label" translatable="yes">I/O limit (read)</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="WriteLimitCheck">
|
||||||
|
<property name="label" translatable="yes">I/O limit (write)</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">7</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="halign">end</property>
|
||||||
|
<property name="margin-top">5</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="CancelButton">
|
||||||
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="image">image2</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="AcceptButton">
|
||||||
|
<property name="label" translatable="yes">Accept</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="image">image1</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="pack-type">end</property>
|
||||||
|
<property name="position">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="titlebar">
|
||||||
|
<object class="GtkHeaderBar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="show-close-button">True</property>
|
||||||
|
<child type="title">
|
||||||
|
<object class="GtkLabel" id="lblFiltersHead">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Filters</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="pixel-size">32</property>
|
||||||
|
<property name="icon-name">com.ublinux.ubl-settings-resourcequota</property>
|
||||||
|
<property name="icon_size">5</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
@ -0,0 +1,938 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.38.2 -->
|
||||||
|
<interface domain="ubl-settings-resourcequota">
|
||||||
|
<requires lib="gtk+" version="3.24"/>
|
||||||
|
<!-- interface-css-provider-path ubl-settings-resourcequota.css -->
|
||||||
|
<object class="GtkAdjustment" id="adjustment1">
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adjustment2">
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adjustment3">
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adjustment4">
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adjustment5">
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="adjustment6">
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="image1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="icon-name">process-stop-symbolic</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="image2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="icon-name">emblem-ok-symbolic</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkWindow" id="QuotasWindow">
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="valign">start</property>
|
||||||
|
<property name="resizable">False</property>
|
||||||
|
<property name="modal">True</property>
|
||||||
|
<property name="icon-name">com.ublinux.ubl-settings-resourcequota</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-start">5</property>
|
||||||
|
<property name="margin-end">5</property>
|
||||||
|
<property name="margin-top">5</property>
|
||||||
|
<property name="margin-bottom">5</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="AddQuotaTargetBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Quota object:</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBoxText" id="TargetTypeCombo">
|
||||||
|
<property name="width-request">100</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="active">0</property>
|
||||||
|
<property name="active-id">0</property>
|
||||||
|
<items>
|
||||||
|
<item translatable="yes">User</item>
|
||||||
|
<item translatable="yes">Process</item>
|
||||||
|
<item translatable="yes">Slice</item>
|
||||||
|
</items>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBoxText" id="TargetCombo">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="EditQuotaTargetBox">
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Quota object:</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="TargetLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="BlockUiBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label-xalign">0.019999999552965164</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkAlignment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="bottom-padding">5</property>
|
||||||
|
<property name="left-padding">5</property>
|
||||||
|
<property name="right-padding">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Soft restriction</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="SoftRestrictionCheck">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="SoftRestrictionSpin">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="width-chars">7</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adjustment3</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBoxText" id="SoftRestrictionCombo">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="active">0</property>
|
||||||
|
<property name="active-id">0</property>
|
||||||
|
<items>
|
||||||
|
<item translatable="yes">Kb</item>
|
||||||
|
<item translatable="yes">Mb</item>
|
||||||
|
<item translatable="yes">Gb</item>
|
||||||
|
<item translatable="yes">Tb</item>
|
||||||
|
</items>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Hard restriction</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="HardRestrictionCheck">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="HardRestrictionSpin">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="width-chars">7</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adjustment4</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBoxText" id="HardRestrictionCombo">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="active">0</property>
|
||||||
|
<property name="active-id">0</property>
|
||||||
|
<items>
|
||||||
|
<item translatable="yes">Kb</item>
|
||||||
|
<item translatable="yes">Mb</item>
|
||||||
|
<item translatable="yes">Gb</item>
|
||||||
|
<item translatable="yes">Tb</item>
|
||||||
|
</items>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">RAM limit</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame" id="frame1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label-xalign">0.019999999552965164</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkAlignment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="bottom-padding">5</property>
|
||||||
|
<property name="left-padding">5</property>
|
||||||
|
<property name="right-padding">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="PagingLimitCheck">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="PagingLimitSpin">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="width-chars">7</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adjustment5</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBoxText" id="PagingLimitCombo">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="active">0</property>
|
||||||
|
<property name="active-id">0</property>
|
||||||
|
<items>
|
||||||
|
<item translatable="yes">Kb</item>
|
||||||
|
<item translatable="yes">Mb</item>
|
||||||
|
<item translatable="yes">Gb</item>
|
||||||
|
<item translatable="yes">Tb</item>
|
||||||
|
</items>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Paging file limit</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label-xalign">0.019999999552965164</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkAlignment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="bottom-padding">5</property>
|
||||||
|
<property name="left-padding">5</property>
|
||||||
|
<property name="right-padding">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="lblCPULimit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="CpuLimitCheck">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="CpuLimitSpin">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="width-chars">7</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adjustment6</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">%</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">CPU limit</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label-xalign">0.019999999552965164</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkAlignment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="bottom-padding">5</property>
|
||||||
|
<property name="left-padding">5</property>
|
||||||
|
<property name="right-padding">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Device:</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBoxText" id="DeviceLimitCombo">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Read</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="DeviceLimitReadCheck">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="DeviceLimitReadSpin">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="width-chars">7</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adjustment1</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBoxText" id="DeviceLimitReadCombo">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="active">0</property>
|
||||||
|
<property name="active-id">0</property>
|
||||||
|
<items>
|
||||||
|
<item translatable="yes">Kb</item>
|
||||||
|
<item translatable="yes">Mb</item>
|
||||||
|
<item translatable="yes">Gb</item>
|
||||||
|
<item translatable="yes">Tb</item>
|
||||||
|
</items>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="margin-left">5</property>
|
||||||
|
<property name="margin-right">5</property>
|
||||||
|
<property name="margin-start">5</property>
|
||||||
|
<property name="margin-end">5</property>
|
||||||
|
<property name="label" translatable="yes">Write</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="DeviceLimitWriteCheck">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">False</property>
|
||||||
|
<property name="draw-indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="DeviceLimitWriteSpin">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="width-chars">7</property>
|
||||||
|
<property name="text" translatable="yes">0</property>
|
||||||
|
<property name="adjustment">adjustment2</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBoxText" id="DeviceLimitWriteCombo">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="active">0</property>
|
||||||
|
<property name="active-id">0</property>
|
||||||
|
<items>
|
||||||
|
<item translatable="yes">Kb</item>
|
||||||
|
<item translatable="yes">Mb</item>
|
||||||
|
<item translatable="yes">Gb</item>
|
||||||
|
<item translatable="yes">Tb</item>
|
||||||
|
</items>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Input/Output limit of block devices</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label-xalign">0.019999999552965164</property>
|
||||||
|
<property name="shadow-type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkAlignment">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="bottom-padding">5</property>
|
||||||
|
<property name="left-padding">5</property>
|
||||||
|
<property name="right-padding">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="ManualInputEntry">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Manual input (for advanced users)</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="lblEditSpace1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="CancelButton">
|
||||||
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<property name="image">image1</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="pack-type">end</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="SaveButton">
|
||||||
|
<property name="label" translatable="yes">Save</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="receives-default">True</property>
|
||||||
|
<property name="image">image2</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="pack-type">end</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="titlebar">
|
||||||
|
<object class="GtkHeaderBar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="show-close-button">True</property>
|
||||||
|
<child type="title">
|
||||||
|
<object class="GtkLabel" id="TitleLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">CPU and RAM quotas - Adding</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="pixel-size">32</property>
|
||||||
|
<property name="icon-name">com.ublinux.ubl-settings-resourcequota</property>
|
||||||
|
<property name="icon_size">5</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<object class="GtkSizeGroup">
|
||||||
|
<widgets>
|
||||||
|
<widget name="box2"/>
|
||||||
|
<widget name="frame1"/>
|
||||||
|
<widget name="box1"/>
|
||||||
|
</widgets>
|
||||||
|
</object>
|
||||||
|
</interface>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue