|
|
|
@ -15,10 +15,8 @@
|
|
|
|
|
#include "view_edit.h"
|
|
|
|
|
#include "my_device.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WEBKIT_FOUND
|
|
|
|
|
#include <webkit2/webkit2.h>
|
|
|
|
|
#include <webkit2/webkit2.h>
|
|
|
|
|
#endif
|
|
|
|
|
#include "ubl-strings.h"
|
|
|
|
|
|
|
|
|
@ -37,12 +35,14 @@
|
|
|
|
|
#define CMD_SAVE_GLOBAL "ubconfig --default --source global set security"
|
|
|
|
|
#define CMD_SAVE_SYSTEM "ubconfig --default --source system set security"
|
|
|
|
|
#define CMD_GET_SLICE_SERVICE "systemd-cgls --no-page"
|
|
|
|
|
typedef char* string;
|
|
|
|
|
#define CMD_GET_GROUP "cut -d: -f1 /etc/group"
|
|
|
|
|
typedef char *string;
|
|
|
|
|
string version_application = "";
|
|
|
|
|
|
|
|
|
|
static char *local;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
int always_open_documentation;
|
|
|
|
|
int win_pos_x;
|
|
|
|
|
int win_pos_y;
|
|
|
|
@ -77,21 +77,22 @@ typedef struct {
|
|
|
|
|
config_str i_o_limit_write;
|
|
|
|
|
config_str disk;
|
|
|
|
|
|
|
|
|
|
int* type_quota_size;
|
|
|
|
|
int* quota_volume_size;
|
|
|
|
|
int* soft_raw_limit_size;
|
|
|
|
|
int* hard_raw_limit_size;
|
|
|
|
|
int* swap_size;
|
|
|
|
|
int* cpu_limit_size;
|
|
|
|
|
int* i_o_limit_read_size;
|
|
|
|
|
int* i_o_limit_write_size;
|
|
|
|
|
int *type_quota_size;
|
|
|
|
|
int *quota_volume_size;
|
|
|
|
|
int *soft_raw_limit_size;
|
|
|
|
|
int *hard_raw_limit_size;
|
|
|
|
|
int *swap_size;
|
|
|
|
|
int *cpu_limit_size;
|
|
|
|
|
int *i_o_limit_read_size;
|
|
|
|
|
int *i_o_limit_write_size;
|
|
|
|
|
int size_tree_view;
|
|
|
|
|
dictionary* load_global_cfg;
|
|
|
|
|
dictionary* load_system_cfg;
|
|
|
|
|
dictionary* save_cfg_gui;
|
|
|
|
|
dictionary *load_global_cfg;
|
|
|
|
|
dictionary *load_system_cfg;
|
|
|
|
|
dictionary *save_cfg_gui;
|
|
|
|
|
} config;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *Window;
|
|
|
|
|
|
|
|
|
|
GtkTreeViewColumn *tvc0;
|
|
|
|
@ -148,8 +149,8 @@ typedef struct {
|
|
|
|
|
GtkWidget *AboutMenuItem;
|
|
|
|
|
} main_window;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
GtkWidget *Window;
|
|
|
|
|
|
|
|
|
|
GtkWidget *HatText;
|
|
|
|
@ -185,16 +186,15 @@ void tree_view_del_line();
|
|
|
|
|
void main_fill_tree_view_after_remove();
|
|
|
|
|
void load_system_cfg();
|
|
|
|
|
void load_global_cfg();
|
|
|
|
|
void template_cfg(char* cmd, dictionary* load_cfg);
|
|
|
|
|
void str_split_value(char* values, int index);
|
|
|
|
|
void set_pow_size(char* str_find, int** array_size, char*** array_data, int index);
|
|
|
|
|
void str_split_key(char* source_value, int index);
|
|
|
|
|
void template_cfg(char *cmd, dictionary *load_cfg);
|
|
|
|
|
void str_split_value(char *values, int index);
|
|
|
|
|
void set_pow_size(char *str_find, int **array_size, char ***array_data, int index);
|
|
|
|
|
void str_split_key(char *source_value, int index);
|
|
|
|
|
void fill_tree_view(int start, int size, int flag_gui_add);
|
|
|
|
|
void clear_array();
|
|
|
|
|
void init_cfg_array(int index);
|
|
|
|
|
void wrapper_template_save(char* check_flag);
|
|
|
|
|
void wrapper_template_save(char *check_flag);
|
|
|
|
|
void wrapper_system_save();
|
|
|
|
|
void wrapper_global_save();
|
|
|
|
|
void wrapper_all_save();
|
|
|
|
|
void template_format_str_save(dictionary* load_cfg, char* source_cmd);
|
|
|
|
|
|
|
|
|
|
void template_format_str_save(dictionary *load_cfg, char *source_cmd);
|
|
|
|
|