Файлы распределены по папка

pull/13/head
Igor Belitskiy 2 years ago
parent be172479ac
commit a0256505e8

@ -1,13 +1,14 @@
cmake_minimum_required(VERSION 3.7) cmake_minimum_required(VERSION 3.7)
find_package(PkgConfig REQUIRED)
project(ubl-settings-diskquota) project(ubl-settings-diskquota)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED gtkmm-3.0) pkg_check_modules(GTK REQUIRED gtkmm-3.0)
include_directories(${GTK_INCLUDE_DIRS}) include_directories(${GTK_INCLUDE_DIRS})
link_directories(${GTK_LIBRARY_DIRS}) link_directories(${GTK_LIBRARY_DIRS})
add_definitions(${GTK_CFLAGS_OTHER}) add_definitions(${GTK_CFLAGS_OTHER})
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
option(WEBKIT_FOUND "No" OFF) option(WEBKIT_FOUND "No" OFF)
@ -30,29 +31,29 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissin
set(SOURCE_FILES set(SOURCE_FILES
ubl-settings-diskquota-cm.h ubl-settings-diskquota-cm.h
ubl-settings-diskquota.h view/ubl-settings-diskquota.h
ubl-settings-diskquota.cc view/ubl-settings-diskquota.cc
ubconfig_quotas.h model/ubconfig_quotas.cc
ubconfig_quotas.cc model/ubconfig_quotas.h
system_quotas.h model/system_quotas.h
system_quotas.cc model/system_quotas.cc
my_device.h model/my_device.h
my_device.cc model/my_device.cc
project_lib.h project_lib.h
my_type.h my_type.h
save.h model/save.h
save.cc model/save.cc
load.h model/load.h
load.cc model/load.cc
my_process.h model/my_process.h
my_process.cc model/my_process.cc
util.h model/util.h
util.cc model/util.cc
my_plug.h view/my_plug.h
my_plug.cc view/my_plug.cc
ubl-util-standard.h view/ubl-util-standard.h
ubl-util-standard.c view/ubl-util-standard.c
main.cc) main.cc)
set(LIBRARIES set(LIBRARIES
${GTK_LIBRARIES} ${GTK_LIBRARIES}

@ -1,4 +1,4 @@
#include "my_plug.h" #include "view/my_plug.h"
void pars_flag(int index_start, int argc, char* argv[]); void pars_flag(int index_start, int argc, char* argv[]);

@ -0,0 +1,19 @@
add_library(model
load.cc
load.h
my_device.cc
my_device.h
my_process.cc
my_process.h
save.cc
save.h
system_quotas.cc
system_quotas.h
ubconfig_quotas.cc
ubconfig_quotas.h
util.cc
util.h
wrapper_load_save.cc
wrapper_load_save.h
)
target_include_directories(model PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

@ -1,10 +1,10 @@
#ifndef MY_DEVICE_H #ifndef MY_DEVICE_H
#define MY_DEVICE_H #define MY_DEVICE_H
#include "project_lib.h" #include "../project_lib.h"
#include "my_process.h" #include "my_process.h"
#include "util.h" #include "util.h"
#include "my_type.h" #include "../my_type.h"
namespace Devices { namespace Devices {

@ -1,5 +1,4 @@
#include "system_quotas.h" #include "system_quotas.h"
#include "my_type.h"
namespace Quotas_sys { namespace Quotas_sys {

@ -1,7 +1,7 @@
#ifndef SYSTEM_CMD_QUOTAS #ifndef SYSTEM_CMD_QUOTAS
#define SYSTEM_CMD_QUOTAS #define SYSTEM_CMD_QUOTAS
#include "project_lib.h" #include "../project_lib.h"
#include "my_type.h" #include "../my_type.h"
#include "my_process.h" #include "my_process.h"
#include "util.h" #include "util.h"

@ -1,8 +1,8 @@
#ifndef UBCONFIG_QUOTAS #ifndef UBCONFIG_QUOTAS
#define UBCONFIG_QUOTAS #define UBCONFIG_QUOTAS
#include "project_lib.h" #include "../project_lib.h"
#include "my_type.h" #include "../my_type.h"
#include "my_process.h" #include "my_process.h"
#include "util.h" #include "util.h"

@ -1,6 +1,6 @@
#ifndef UTIL_H #ifndef UTIL_H
#define UTIL_H #define UTIL_H
#include "project_lib.h" #include "../project_lib.h"
using namespace std; using namespace std;

@ -1,7 +1,7 @@
#ifndef WRAPPER_LOAD_H #ifndef WRAPPER_LOAD_H
#define WRAPPER_LOAD_H #define WRAPPER_LOAD_H
#include "my_type.h" #include "../my_type.h"
#include "project_lib.h" #include "../project_lib.h"
#include "load.h" #include "load.h"
#include "save.h" #include "save.h"
#include "my_process.h" #include "my_process.h"

@ -22,6 +22,6 @@
#include <libintl.h> #include <libintl.h>
#include <glibmm/i18n.h> #include <glibmm/i18n.h>
#include <map> #include <map>
#include "ubl-util-standard.c"
#include "ubl-settings-diskquota-cm.h" #include "ubl-settings-diskquota-cm.h"
#endif #endif

@ -0,0 +1,16 @@
add_library(view
my_plug.cc
my_plug.h
ubl-settings-diskquota.h
ubl-settings-diskquota.cc
ubl-util-standard.h
view_about.cc
view_about.h
view_filters.h
view_filters.cc
view_open_browser.h
view_open_browser.cc
view_set_user_group.h
view_set_user_group.cc
)
target_include_directories(view PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

@ -1,6 +1,7 @@
#include "project_lib.h" #include "../project_lib.h"
#include "ubl-settings-diskquota.h" #include "ubl-settings-diskquota.h"
class CmdArgParser : public Glib::OptionGroup { class CmdArgParser : public Glib::OptionGroup {
public: public:
CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help); CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help);

@ -26,10 +26,10 @@ void MainWindow::settings() {
this->lacalization(); this->lacalization();
this->add_CSS(); this->add_CSS();
this->flag_block_gui(); this->flag_block_gui();
map_device = obj_device.get_parted(); //map_device = obj_device.get_parted();
this->filling_device_combo_box_template(groupsDeviceCombo, map_device); //this->filling_device_combo_box_template(groupsDeviceCombo, map_device);
this->filling_device_combo_box_template(usersDeviceCombo, map_device); //this->filling_device_combo_box_template(usersDeviceCombo, map_device);
this->filling_device_combo_box_template(usersProjectCombo, map_device); //this->filling_device_combo_box_template(usersProjectCombo, map_device);
this->init_tree_view(); this->init_tree_view();
this->init_spin_all(); this->init_spin_all();
if (geteuid() == 0) { if (geteuid() == 0) {

@ -1,14 +1,11 @@
#ifndef UBL_SETTINGS_QUOTAS_H #ifndef UBL_SETTINGS_QUOTAS_H
#define UBL_SETTINGS_QUOTAS_H #define UBL_SETTINGS_QUOTAS_H
#include "util.h"
#include "my_type.h"
#include "my_device.h"
#include "system_quotas.h"
#include "ubconfig_quotas.h"
#include <dlfcn.h> #include <dlfcn.h>
#include "../project_lib.h"
#include "../my_type.h"
#include "ubl-util-standard.c"
#ifdef WEBKIT_FOUND #ifdef WEBKIT_FOUND
#include <webkit2/webkit2.h> #include <webkit2/webkit2.h>
#endif #endif
@ -287,9 +284,9 @@ class MainWindow : public Gtk::ApplicationWindow {
map_str_str map_gui_cfg; map_str_str map_gui_cfg;
map_str_str map_global_cfg; map_str_str map_global_cfg;
map_str_str map_system_cfg; map_str_str map_system_cfg;
Devices::Parted obj_device = Devices::Parted(); //Devices::Parted obj_device = Devices::Parted();
Quotas_sys::Quotas_sys obj_quotas_sys = Quotas_sys::Quotas_sys(); //Quotas_sys::Quotas_sys obj_quotas_sys = Quotas_sys::Quotas_sys();
Quotas_ubconfig::Quotas_ubconfig obj_quotas_ubconfig = Quotas_ubconfig::Quotas_ubconfig(); //Quotas_ubconfig::Quotas_ubconfig obj_quotas_ubconfig = Quotas_ubconfig::Quotas_ubconfig();
vector<string> vec_param_names; vector<string> vec_param_names;
map_str_str map_device; map_str_str map_device;
string str_cmd_error; string str_cmd_error;

@ -1,6 +1,6 @@
#ifndef VIEW_ABOUT_H #ifndef VIEW_ABOUT_H
#define VIEW_ABOUT_H #define VIEW_ABOUT_H
#include "project_lib.h" #include "../project_lib.h"
#define copyright _("Copyright © UBSoft LLC, 2022 - ") #define copyright _("Copyright © UBSoft LLC, 2022 - ")
#define str_setting_user _("Setting user quotas") #define str_setting_user _("Setting user quotas")
#define website _("https://wiki.ublinux.com") #define website _("https://wiki.ublinux.com")

@ -1,6 +1,6 @@
#ifndef VIEW_FILTERS_H #ifndef VIEW_FILTERS_H
#define VIEW_FILTERS_H #define VIEW_FILTERS_H
#include "project_lib.h" #include "../project_lib.h"
#define str_name _("Name") #define str_name _("Name")
#define str_size _("Size") #define str_size _("Size")

@ -1,6 +1,6 @@
#ifndef VIEW_OPEN_BROWSER_H #ifndef VIEW_OPEN_BROWSER_H
#define VIEW_OPEN_BROWSER_H #define VIEW_OPEN_BROWSER_H
#include "project_lib.h" #include "../project_lib.h"
#define link_doc "https://wiki.ublinux.com/ru/Программное_обеспечениерограммы_и_утилиты/Все/ubl-settings-diskquota" #define link_doc "https://wiki.ublinux.com/ru/Программное_обеспечениерограммы_и_утилиты/Все/ubl-settings-diskquota"
#define cmd_xdg "xdg-open " #define cmd_xdg "xdg-open "

@ -1,6 +1,6 @@
#ifndef VIEW_SET_USER_GROUP_H #ifndef VIEW_SET_USER_GROUP_H
#define VIEW_SET_USER_GROUP_H #define VIEW_SET_USER_GROUP_H
#include "project_lib.h" #include "../project_lib.h"
#define str_device _("Device:") #define str_device _("Device:")
#define str_quota_status _("Quota use status:") #define str_quota_status _("Quota use status:")
#define str_size _("Size") #define str_size _("Size")
Loading…
Cancel
Save