From 5719eaa35b3a2d828263246ea62af45aa2def800 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Fri, 5 May 2023 11:58:29 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BB=D0=BE=D0=BA=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ubl-settings-diskquota.cc | 32 ++--- source/ubl-settings-diskquota.h | 14 ++- ubl-settings-diskquota.glade | 210 +++++++++++++++---------------- 3 files changed, 129 insertions(+), 127 deletions(-) diff --git a/source/ubl-settings-diskquota.cc b/source/ubl-settings-diskquota.cc index 35c46b2..83caa56 100755 --- a/source/ubl-settings-diskquota.cc +++ b/source/ubl-settings-diskquota.cc @@ -155,10 +155,23 @@ void MainWindow::init_tree_view_general() { GeneralQuotasTree->append_column(str_tw_severe_limitation, m_columnsGeneral.hard_limit_size); GeneralQuotasTree->append_column(str_tw_soft_limit_files, m_columnsGeneral.soft_limit_files); GeneralQuotasTree->append_column(str_tw_severe_limitation_files, m_columnsGeneral.hard_limit_files); - GeneralQuotasTree->append_column(str_tw_deferring_size, m_columnsGeneral.deferring_size); - GeneralQuotasTree->append_column(str_tw_deferring_files, m_columnsGeneral.deferring_files); - + GeneralQuotasTree->append_column(str_tw_general_deferring_size, m_columnsGeneral.deferring_size); + GeneralQuotasTree->append_column(str_tw_general_deferring_files, m_columnsGeneral.deferring_files); +} + +void MainWindow::view_add_columns(Gtk::TreeView &treeView) { + treeView.append_column(str_name, m_columns.name); + treeView.append_column_editable(str_quotas, m_columns.quotas); + treeView.append_column(str_size, m_columns.size); + treeView.append_column(str_tw_soft_limit, m_columns.soft_limit_size); + treeView.append_column(str_tw_severe_limitation, m_columns.hard_limit_size); + treeView.append_column(str_tw_deferring_size, m_columns.deferring_size); + treeView.append_column(str_files, m_columns.files); + treeView.append_column(str_tw_soft_limit_files, m_columns.soft_limit_files); + treeView.append_column(str_tw_severe_limitation_files, m_columns.hard_limit_delay); + treeView.append_column(str_tw_deferring_files, m_columns.deferring_files); } + void MainWindow::lacalization() { time_t now = time(0); tm *ltm = localtime(&now); @@ -257,19 +270,6 @@ void MainWindow::lacalization() { } -void MainWindow::view_add_columns(Gtk::TreeView &treeView) { - treeView.append_column(str_name, m_columns.name); - treeView.append_column_editable(str_quotas, m_columns.quotas); - treeView.append_column(str_size, m_columns.size); - treeView.append_column(str_tw_soft_limit, m_columns.soft_limit_size); - treeView.append_column(str_tw_severe_limitation, m_columns.hard_limit_size); - treeView.append_column(str_tw_deferring_size, m_columns.hard_limit_size_delay); - treeView.append_column(str_files, m_columns.files); - treeView.append_column(str_tw_soft_limit_files, m_columns.soft_limit_files); - treeView.append_column(str_tw_severe_limitation_files, m_columns.hard_limit_files); - treeView.append_column(str_tw_severe_limitation_files, m_columns.hard_limit_delay); -} - void MainWindow::filling_device_combo_box_template(Gtk::ComboBoxText *combo_box, map_str_str &map_device) { if (map_device.size() != 0) { for (const auto &device : map_device) { diff --git a/source/ubl-settings-diskquota.h b/source/ubl-settings-diskquota.h index 283a25b..14d0382 100644 --- a/source/ubl-settings-diskquota.h +++ b/source/ubl-settings-diskquota.h @@ -114,8 +114,10 @@ #define str_general_settings _("General settings") #define str_tw_severe_limitation _("Severe\nlimitation\n(size)") -#define str_tw_deferring_size _("Deferring\n(size)") -#define str_tw_deferring_files _("Deferring\n(files)") +#define str_tw_general_deferring_size _("Deferring\n(size)") +#define str_tw_general_deferring_files _("Deferring\n(files)") +#define str_tw_deferring_size _("Deferring\na hard\nlimit\n(files)") +#define str_tw_deferring_files _("Deferring\na hard\nlimit\n(files)") #define str_tw_soft_limit_files _("Soft limit\n(files)") #define str_tw_severe_limitation_files _("Severe\nlimitation\n(files)") #define str_soft_restriction_files _("Soft Restriction (files)") @@ -153,19 +155,19 @@ class MainWindow : public Gtk::ApplicationWindow { class ModelColumns : public Gtk::TreeModel::ColumnRecord { public: ModelColumns() {add(name), add(quotas); add(size), - add(soft_limit_size), add(hard_limit_size); add(hard_limit_size_delay), + add(soft_limit_size), add(hard_limit_size); add(deferring_size), add(files); add(soft_limit_files), - add(hard_limit_delay), add(hard_limit_files); } + add(hard_limit_delay), add(deferring_files); } Gtk::TreeModelColumn name; Gtk::TreeModelColumn quotas; Gtk::TreeModelColumn size; Gtk::TreeModelColumn soft_limit_size; Gtk::TreeModelColumn hard_limit_size; - Gtk::TreeModelColumn hard_limit_size_delay; + Gtk::TreeModelColumn deferring_size; Gtk::TreeModelColumn files; Gtk::TreeModelColumn soft_limit_files; Gtk::TreeModelColumn hard_limit_delay; - Gtk::TreeModelColumn hard_limit_files; + Gtk::TreeModelColumn deferring_files; }; class ModelColumnsGeneral : public Gtk::TreeModel::ColumnRecord { public: diff --git a/ubl-settings-diskquota.glade b/ubl-settings-diskquota.glade index be2d973..ea7b17c 100644 --- a/ubl-settings-diskquota.glade +++ b/ubl-settings-diskquota.glade @@ -30,7 +30,7 @@ True False start - 6 + 5 True @@ -100,8 +100,53 @@ - - Hard limit (size) delay + + True + False + end + 5 + 5 + True + + + gtk-cancel + True + True + True + center + True + + + False + True + 0 + + + + + gtk-save + True + True + True + center + True + + + False + True + 1 + + + + + False + True + 5 + + + + + Hard limit (size) activation time True True False @@ -115,8 +160,8 @@ - - Hard limit (size) activation time + + Hard limit (size) delay True True False @@ -126,7 +171,7 @@ False True - 6 + 5 @@ -204,51 +249,6 @@ 11 - - - True - False - end - 5 - 5 - True - - - gtk-cancel - True - True - True - center - True - - - False - True - 0 - - - - - gtk-save - True - True - True - center - True - - - False - True - 1 - - - - - False - True - 12 - - @@ -376,8 +376,8 @@ 5 5 5 - 6 - 6 + 5 + 5 69 com.ublinux.ubl-settings-diskquota @@ -443,7 +443,7 @@ - 6 + 5 1 10 @@ -463,7 +463,7 @@ 10 - 6 + 5 1 10 @@ -483,7 +483,7 @@ 10 - 6 + 5 1 10 @@ -503,7 +503,7 @@ 10 - 6 + 5 1 10 @@ -648,8 +648,8 @@ 5 5 5 - 6 - 6 + 5 + 5 25 1 @@ -668,8 +668,8 @@ 5 5 5 - 6 - 6 + 5 + 5 @@ -1265,7 +1265,7 @@ False 5 5 - gtk-missing-image + gtk-goto-first False @@ -2782,8 +2782,8 @@ 5 5 5 - 6 - 6 + 5 + 5 32 com.ublinux.ubl-settings-diskquota @@ -3032,8 +3032,8 @@ 5 5 5 - 6 - 6 + 5 + 5 Device: @@ -3046,12 +3046,12 @@ True False - 6 + 5 5 5 5 - 6 - 6 + 5 + 5 True @@ -3064,12 +3064,12 @@ True False start - 6 + 5 5 5 5 - 6 - 6 + 5 + 5 File system: 0 @@ -3087,8 +3087,8 @@ 5 5 5 - 6 - 6 + 5 + 5 False @@ -3107,12 +3107,12 @@ True False - 6 + 5 5 5 5 - 6 - 6 + 5 + 5 Disk quotas for this device: 0 @@ -3126,12 +3126,12 @@ True False - 6 + 5 5 5 5 - 6 - 6 + 5 + 5 Group quotas for this device: 0 @@ -3170,7 +3170,7 @@ False 5 5 - 12 + 5 5 @@ -3185,8 +3185,8 @@ 5 5 5 - 6 - 6 + 5 + 5 Currently using: @@ -3199,12 +3199,12 @@ True False - 6 + 5 5 5 5 - 6 - 6 + 5 + 5 Soft limit 0 @@ -3273,12 +3273,12 @@ True False - 6 + 5 5 5 5 - 6 - 6 + 5 + 5 Hard limit 0 @@ -3352,12 +3352,12 @@ True False - 6 + 5 5 5 5 - 6 - 6 + 5 + 5 Size @@ -3385,7 +3385,7 @@ False 5 5 - 12 + 5 5 @@ -3398,10 +3398,10 @@ False 5 5 - 6 + 5 5 - 6 - 6 + 5 + 5 Currently using: @@ -3418,8 +3418,8 @@ 5 5 5 - 6 - 6 + 5 + 5 Soft limit 0 @@ -3487,8 +3487,8 @@ 5 5 5 - 6 - 6 + 5 + 5 Hard limit 0 @@ -3560,8 +3560,8 @@ 5 5 5 - 6 - 6 + 5 + 5 Files @@ -3806,7 +3806,7 @@ False 5 5 - 12 + 5 5 @@ -3997,7 +3997,7 @@ False 5 5 - 12 + 5 5 @@ -4280,7 +4280,7 @@ 20 20 dialog-question-symbolic - 6 + 5 False