diff --git a/#ubl-settings-diskquota.glade# b/#ubl-settings-diskquota.glade# new file mode 100644 index 0000000..d9c3497 --- /dev/null +++ b/#ubl-settings-diskquota.glade# @@ -0,0 +1,3867 @@ + + + + + + + + + + + + False + start + False + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + vertical + + + Name + True + True + False + start + 5 + True + + + False + True + 0 + + + + + Quotas + True + True + False + start + True + + + False + True + 1 + + + + + Size + True + True + False + start + True + + + False + True + 2 + + + + + Soft limit (size) + True + True + False + start + True + + + False + True + 3 + + + + + Hard limit (size) + True + True + False + start + True + + + False + True + 4 + + + + + 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 + end + 5 + + + + + Hard limit (size) delay + True + True + False + start + True + + + False + True + 5 + + + + + Files + True + True + False + start + True + + + False + True + 7 + + + + + Soft limit (files) + True + True + False + start + True + + + False + True + 8 + + + + + Hard limit (files) + True + True + False + start + True + + + False + True + 9 + + + + + Hard limit (files) delay + True + True + False + start + True + + + False + True + 10 + + + + + + + True + False + True + + + True + False + System quotas + + + + + + + + True + False + 32 + com.ublinux.ubl-settings-diskquota + 5 + + + + + + + + + + + + + Byte + + + Kb + + + Mb + + + Gb + + + Tb + + + + + False + False + True + center + com.ublinux.ubl-settings-diskquota + dialog + True + ubl-settings-diskquota + 1.0 + Copyright © 2022 - 2023, UBSoft LLC + Setting user quotas + https://ublinux.ru/ + Project Home Page + Это приложение распространяется без каких-либо гарантий. +Подробнее в <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, версии 2 или позднее</a>. + UBGroup + UBGroup + com.ublinux.ubl-settings-diskquota + True + gpl-2-0 + + + True + False + vertical + 2 + + + False + end + + + False + False + 1 + + + + + + + True + False + True + + + True + False + 5 + 5 + 5 + 5 + 2 + System quotas + + + + + + + + + + True + False + + + 90 + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 69 + com.ublinux.ubl-settings-diskquota + + + False + True + 0 + + + + + True + False + + + True + False + + + True + False + vertical + + + 255 + True + False + Configuration of disk quotas parameters for system groups and users + + + + + + + + True + True + 0 + + + + + False + True + 0 + + + + + True + True + 0 + + + + + True + True + 1 + + + + + 5 + 1 + 10 + + + 23 + 1 + 10 + + + 59 + 1 + 10 + + + 100 + 1 + 10 + + + 5 + 1 + 10 + + + 23 + 1 + 10 + + + 59 + 1 + 10 + + + 100 + 1 + 10 + + + 5 + 1 + 10 + + + 23 + 1 + 10 + + + 59 + 1 + 10 + + + 100 + 1 + 10 + + + 5 + 1 + 10 + + + 23 + 1 + 10 + + + 59 + 1 + 10 + + + 100 + 1 + 10 + + + + True + False + False + False + + + True + False + 7 + 7 + Direct control of the file system + True + + + + + True + False + Help + + + + + + True + False + About + True + + + + + + True + False + + + True + False + Load from global configuration + True + + + + + + True + False + Load from local configuration + True + + + + + + True + False + + + True + False + Save to global and local configuration + True + + + + + + True + False + Save to global configuration + True + + + + + + True + False + Save to local configuration + True + + + + + + False + center + com.ublinux.ubl-settings-diskquota + center + + + True + False + vertical + + + True + False + vertical + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 25 + 1 + + + False + True + 0 + + + + + True + False + start + 5 + 5 + 5 + 5 + 5 + 5 + + + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + vertical + + + 81 + True + False + + + True + False + start + + + -1 + + + + + False + True + 0 + + + + + False + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + True + True + vertical + + + True + True + + + True + False + vertical + + + True + True + liststore1 + + + + + + True + True + 0 + + + + + + + True + False + General settings + + + False + + + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + + + True + False + Device: + + + False + True + 0 + + + + + True + False + + + True + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + False + 20 + + + True + False + vertical + True + + + True + False + Excess size delay period + 0 + + + False + True + 0 + + + + + True + False + Excess files delay period + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalGroupsSizeWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalGroupsFilesWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalGroupsSizeDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalGroupsFilesDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 2 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalGroupsSizeHoursSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalGroupsFilesHoursSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 3 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalGroupsSizeMinutesSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalGroupsFilesMinutesSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 4 + + + + + False + True + 1 + + + + + True + True + liststore1 + + + + + + True + True + 2 + + + + + True + False + + + True + True + True + 5 + 5 + 5 + 5 + + + True + False + + + True + False + 5 + 5 + gtk-goto-first + + + False + True + 0 + + + + + True + False + 5 + 5 + Filters + + + False + True + 1 + + + + + + + False + True + 0 + + + + + True + False + + + gtk-delete + True + True + True + 5 + 5 + 5 + 5 + True + + + False + True + 0 + + + + + True + True + True + 5 + 5 + 5 + 5 + + + True + False + + + True + False + 5 + 5 + gtk-edit + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + Edit + + + False + True + 1 + + + + + + + False + True + 1 + + + + + gtk-add + True + True + True + 5 + 5 + 5 + 5 + True + + + False + True + 2 + + + + + False + True + end + 1 + + + + + False + True + 3 + + + + + 1 + + + + + True + False + Groups + + + 1 + False + + + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + + + True + False + Device: + + + False + True + 0 + + + + + True + False + + + True + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + 20 + + + True + False + vertical + True + + + True + False + Excess size delay period + 0 + + + False + True + 0 + + + + + True + False + Excess files delay period + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 2 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeHoursSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesHourSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 3 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeMinutesSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesMinuteSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 4 + + + + + False + True + 1 + + + + + True + True + liststore1 + + + + + + True + True + 2 + + + + + True + False + + + True + True + True + 5 + 5 + 5 + 5 + + + True + False + + + True + False + 5 + 5 + gtk-missing-image + + + False + True + 0 + + + + + True + False + 5 + 5 + Filters + + + False + True + 1 + + + + + + + False + True + 0 + + + + + True + False + + + gtk-delete + True + True + True + 5 + 5 + 5 + 5 + True + + + False + True + 0 + + + + + True + True + True + 5 + 5 + 5 + 5 + + + True + False + + + True + False + 5 + 5 + gtk-edit + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + Edit + + + False + True + 1 + + + + + + + False + True + 1 + + + + + gtk-add + True + True + True + 5 + 5 + 5 + 5 + True + + + False + True + 2 + + + + + False + True + end + 1 + + + + + False + True + 3 + + + + + 2 + + + + + True + False + Users + + + 2 + False + + + + + True + False + vertical + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + + + True + False + Device: + + + False + True + 0 + + + + + True + False + + + True + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + 20 + + + True + False + vertical + True + + + True + False + Excess size delay period + 0 + + + False + True + 0 + + + + + True + False + Excess files delay period + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 2 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeHoursSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesHourSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 3 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeMinutesSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesMinuteSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 4 + + + + + False + True + 1 + + + + + True + True + liststore1 + + + + + + True + True + 2 + + + + + False + True + 0 + + + + + True + False + + + True + True + True + 5 + 5 + 5 + 5 + + + True + False + + + True + False + 5 + 5 + gtk-missing-image + + + False + True + 0 + + + + + True + False + 5 + 5 + Filters + + + False + True + 1 + + + + + + + False + True + 0 + + + + + True + False + + + gtk-delete + True + True + True + 5 + 5 + 5 + True + + + False + True + 0 + + + + + True + True + True + 5 + 5 + 5 + 5 + + + True + False + + + True + False + 5 + 5 + gtk-edit + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + Edit + + + False + True + 1 + + + + + + + False + True + 1 + + + + + gtk-add + True + True + True + 5 + 5 + 5 + 5 + True + + + False + True + 2 + + + + + False + True + end + 1 + + + + + False + True + end + 1 + + + + + 3 + + + + + True + False + Project + + + 3 + False + + + + + True + True + 0 + + + + + False + True + 2 + + + + + True + True + 0 + + + + + + + True + False + True + + + True + False + 5 + 5 + 5 + 5 + 2 + UBConfig - Quotas + + + + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 32 + com.ublinux.ubl-settings-diskquota + + + + + True + False + + + True + True + False + True + menuLoad + + + True + False + + + True + False + Load + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + + + + + + False + True + 0 + + + + + + 2 + + + + + True + False + + + True + True + False + True + menuSave + + + True + False + + + True + False + Save + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + + + + + + False + True + 0 + + + + + True + True + True + False + True + True + menuAbout + none + + + True + False + open-menu-symbolic + + + + + False + True + 1 + + + + + + end + 3 + + + + + + + + + + + + + vertical + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1000000 + 1 + 10 + + + 1000000 + 1 + 10 + + + 1024 + 1 + 10 + + + 1024 + 1 + 10 + + + False + start + False + + + True + False + 5 + 5 + 5 + 5 + vertical + + + True + False + vertical + + + True + False + + + True + False + Device: + + + False + True + 0 + + + + + True + False + 5 + 5 + + + True + True + 1 + + + + + True + True + 0 + + + + + True + False + + + True + False + Quota use status: + 0 + + + False + True + 0 + + + + + True + False + 5 + 5 + 0 + + + True + True + 1 + + + + + True + True + 1 + + + + + True + False + + + True + False + UserGropProject: + 0 + + + False + True + 0 + + + + + True + False + 5 + 5 + 0 + + + True + True + 1 + + + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + True + + + True + False + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 + 5 + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Currently using: + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Soft limit + 0 + + + False + True + 1 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quotegroupSizeSoftLimitAdjustment + + + True + True + 1 + + + + + True + False + + + False + True + 2 + + + + + True + True + 2 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Hard limit + 0 + + + False + True + 3 + + + + + True + False + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quotegroupSizeHardLimitAdjustment + + + True + True + 1 + + + + + True + False + + + False + True + 2 + + + + + True + True + 4 + + + + + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Size + + + + + True + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 + 5 + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Currently using: + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Soft limit + 0 + + + False + True + 1 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quotegroupFilesSoftLimitAdjustment + + + True + True + 1 + + + + + True + False + files + + + False + True + 2 + + + + + True + True + 2 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Hard limit + 0 + + + False + True + 3 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quotegroupFilesHardLimitAdjustment + + + True + True + 1 + + + + + True + False + files + + + False + True + 2 + + + + + True + True + 4 + + + + + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Files + + + + + True + True + 1 + + + + + False + True + 1 + + + + + True + False + 5 + vertical + True + + + True + False + end + 5 + True + + + gtk-cancel + True + True + True + True + + + False + True + 0 + + + + + gtk-save + True + True + True + True + + + False + True + 1 + + + + + False + True + 0 + + + + + False + True + 2 + + + + + + + True + False + + + True + False + UBConfig - Quotas + + + + + True + False + 32 + com.ublinux.ubl-settings-diskquota + 5 + + + + + + + 1000000 + 1 + 10 + + + 1000000 + 1 + 10 + + + 1024 + 1 + 10 + + + 1024 + 1 + 10 + + + False + start + start + False + 450 + 250 + dialog-question-symbolic + + + True + False + vertical + + + True + False + + + True + False + start + 20 + 20 + dialog-question-symbolic + 5 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + start + 10 + 5 + Would you like to read documentation in the Web? + True + 0 + + + + + + + False + True + 0 + + + + + True + False + start + start + 10 + 10 + You will be redirected to documentation website where documentation is translated and supported by community. + True + 0 + + + + True + True + 1 + + + + + Always redirect to online documentation + True + True + False + end + 10 + True + + + + False + True + 2 + + + + + + True + True + 1 + + + + + + True + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 30 + True + + + Cancel + True + True + True + + + + True + True + 0 + + + + + Read Online + True + True + True + + + + True + True + 1 + + + + + False + True + 1 + + + + + + + True + False + True + + + True + False + ubl-settings-datetime + + + + + + + + True + False + 32 + dialog-question-symbolic + + + + + + + 800 + 600 + False + True + True + com.ublinux.ubl-settings-datetime + + + + + + True + False + True + + + True + False + ubl-settings-datetime + + + + + True + False + 32 + com.ublinux.ubl-settings-datetime + 5 + + + + + + diff --git a/source/ubl-settings-diskquota.cc b/source/ubl-settings-diskquota.cc index e335c66..3d1fa3d 100755 --- a/source/ubl-settings-diskquota.cc +++ b/source/ubl-settings-diskquota.cc @@ -79,7 +79,13 @@ void MainWindow::settings() { builder->get_widget("boxColor", boxWidget); HeadOverlay->add_overlay(*boxWidget); ubl_make_plugs(boxSave, boxButton, socket_ext_id_I, socket_trd_id_I); - +} + +void MainWindow::fill_in_pow_memory(Gtk::ComboBoxText *cb_text) { + cb_text->append(str_prefix_KB); + cb_text->append(str_prefix_MB); + cb_text->append(str_prefix_GB); + cb_text->append(str_prefix_TB); } void MainWindow::init_spin_all() { @@ -256,6 +262,11 @@ void MainWindow::lacalization() { chkAlwaysOpenHelp->set_label(always_redirect); lblwebHeaderName->set_label(name_app); chbMangSystemFile->set_label(str_quotas_mode); + lblSetDevice->set_text(str_device); + lblQuotasStatus->set_text(str_quota_status); + lblSetUGP->set_text(""); + this->fill_in_pow_memory(quotegroupSizeSoftLimitCombo); + this->fill_in_pow_memory(quotegroupSizeHardLimitCombo); } @@ -472,7 +483,13 @@ void MainWindow::get_builder() { builder->get_widget("btnEditProject", btnEditProject); builder->get_widget("btnEditUsers", btnEditUsers); builder->get_widget("btnEditGroups", btnEditGroups); - + builder->get_widget("lblSetDevice", lblSetDevice); + builder->get_widget("lblQuotasStatus", lblQuotasStatus); + builder->get_widget("lblSetUGP", lblSetUGP); + builder->get_widget("lblSetNameDevice", lblSetNameDevice); + builder->get_widget("lblSetQuotasStatus", lblSetQuotasStatus); + builder->get_widget("lblSetNameUGP", lblSetNameUGP); + builder->get_widget("usersProjectCombo", usersProjectCombo); } void MainWindow::event() { @@ -534,21 +551,45 @@ void MainWindow::event() { filtersNameFilterCheckbox->signal_toggled().connect(sigc::mem_fun( *this, &MainWindow::del_columns)); - // btnEditProject->signal_clicked().connect(); - // btnEditUsers->signal_clicked().connect(); - // btnEditGroups->signal_clicked().connect(); + btnEditGroups->signal_clicked().connect( + sigc::bind*, const Gtk::TreeModel::iterator*, bool&> (sigc::mem_fun( *this, + &MainWindow::edit_tree_view_G), &list_store_groups, &iter_groups, flag_validate_del_groups)); + btnEditUsers->signal_clicked().connect( + sigc::bind*, const Gtk::TreeModel::iterator*, bool&> (sigc::mem_fun( *this, + &MainWindow::edit_tree_view_U), &list_store_users, &iter_users, flag_validate_del_users)); + btnEditProject->signal_clicked().connect( + sigc::bind*, const Gtk::TreeModel::iterator*, bool&> (sigc::mem_fun( *this, + &MainWindow::edit_tree_view_P), &list_store_project, &iter_project, flag_validate_del_project)); } -/* -void MainWindow::set_tree_view(Gtk::TreeView *tree_view, Glib::RefPtr* list_store, bool& flag_validate_del) { - if (flag_validate_del && (*list_store)->iter_is_valid(*(iter))) { + +void MainWindow::set_change_gui(Glib::RefPtr* list_store, const Gtk::TreeModel::iterator* iter, bool& flag_validate, Gtk::ComboBoxText *combo_box) { + if (flag_validate && (*list_store)->iter_is_valid(*(iter))) { Gtk::TreeModel::Row row = *(*iter); - if (row) { - row[m_columns.name] = + if(row) { + string name = row[m_columns.name] + ""; + lblSetNameDevice->set_text(combo_box->get_active_text()); + lblSetNameUGP->set_text(name); + QuotasEditWindow->show(); } } + flag_validate = false; +} + +void MainWindow::edit_tree_view_U(Glib::RefPtr* list_store, const Gtk::TreeModel::iterator* iter, bool& flag_validate) { + lblSetUGP->set_text(str_users); + set_change_gui(list_store, iter, flag_validate, usersDeviceCombo); +} + +void MainWindow::edit_tree_view_G(Glib::RefPtr* list_store, const Gtk::TreeModel::iterator* iter, bool& flag_validate) { + lblSetUGP->set_text(str_groups); + set_change_gui(list_store, iter, flag_validate, groupsDeviceCombo); +} + +void MainWindow::edit_tree_view_P(Glib::RefPtr* list_store, const Gtk::TreeModel::iterator* iter, bool& flag_validate) { + lblSetUGP->set_text(str_projects); + set_change_gui(list_store, iter, flag_validate, usersProjectCombo); } -*/ void MainWindow::del_columns() { //std::vector vec_columns = tree_view_select->get_columns(); } diff --git a/source/ubl-settings-diskquota.h b/source/ubl-settings-diskquota.h index 876f75b..e4edc1c 100644 --- a/source/ubl-settings-diskquota.h +++ b/source/ubl-settings-diskquota.h @@ -145,7 +145,11 @@ #define system_save "ubconfig --target system set boot " #define global_remove "ubconfig --target global --noexecute set/remove boot " #define system_remove "ubconfig --target system --noexecute set/remove boot " - +#define str_quota_status "Quota use status:" +#define str_prefix_KB _("Kb") +#define str_prefix_MB _("Mb") +#define str_prefix_GB _("Gb") +#define str_prefix_TB _("Tb") using namespace std; extern string version_application; @@ -286,6 +290,7 @@ class MainWindow : public Gtk::ApplicationWindow { Gtk::ComboBoxText *usersDeviceCombo; Gtk::ComboBoxText *groupsDeviceCombo; Gtk::ComboBoxText *generalDeviceCombo; + Gtk::ComboBoxText *usersProjectCombo; Gtk::Label *lblFstypeGroups; Gtk::SpinButton *generalGroupsSizeWeeksSpi; Gtk::SpinButton *generalGroupsFileWeeksSpin; @@ -338,6 +343,12 @@ class MainWindow : public Gtk::ApplicationWindow { Gtk::Button* btnEditProject; Gtk::Button* btnEditUsers; Gtk::Button* btnEditGroups; + Gtk::Label* lblSetDevice; + Gtk::Label* lblQuotasStatus; + Gtk::Label* lblSetUGP; + Gtk::Label* lblSetNameDevice; + Gtk::Label* lblSetQuotasStatus; + Gtk::Label* lblSetNameUGP; #ifdef WEBKIT_FOUND Gtk::Window *wndWeb; Gtk::Widget *three; @@ -390,6 +401,7 @@ class MainWindow : public Gtk::ApplicationWindow { void init_tree_view_general(); void entry_combo_box_temp(Gtk::ComboBoxText *combo_box, Gtk::Label *label); void synopsis_show(); + void fill_in_pow_memory(Gtk::ComboBoxText *cb_text); void info_status_app(string stule); void filters_show(); void init_tree_view(); @@ -405,12 +417,15 @@ class MainWindow : public Gtk::ApplicationWindow { void wrapper_save_all_cfg(); void init_dict(string flag_load); void set_data_cfg(); - void set_tree_view(Gtk::TreeView *tree_view, Glib::RefPtr* list_store, bool& flag_validate_del); + void set_change_gui(Glib::RefPtr* list_store, const Gtk::TreeModel::iterator* iter, bool& flag_validate, Gtk::ComboBoxText *combo_box); void mode_switch_quota(); void save_quotegroupSaveButton(); void wrapper_settings_quotas_temp(string save_user_or_group); void off_quota_ubconfig(Gtk::ComboBoxText* combo_box, string quota_type); void init_spin_all(); + void edit_tree_view_U(Glib::RefPtr* list_store, const Gtk::TreeModel::iterator* iter, bool& flag_validate); + void edit_tree_view_G(Glib::RefPtr* list_store, const Gtk::TreeModel::iterator* iter, bool& flag_validate); + void edit_tree_view_P(Glib::RefPtr* list_store, const Gtk::TreeModel::iterator* iter, bool& flag_validate); void format_cmd_quotas_system(struct struct_quotas& _struct_quota); void format_cmd_quotas_ubconfig(struct struct_quotas& _struct_quota); void load_global_cfg(); diff --git a/ubl-settings-diskquota.glade b/ubl-settings-diskquota.glade index bceb8ad..d9c3497 100644 --- a/ubl-settings-diskquota.glade +++ b/ubl-settings-diskquota.glade @@ -3000,19 +3000,19 @@ True False Device: - 0 - True + False True 0 - + True False - label + 5 + 5 True @@ -3039,7 +3039,7 @@ 0 - True + False True 0 @@ -3048,7 +3048,9 @@ True False - label + 5 + 5 + 0 True @@ -3075,7 +3077,7 @@ 0 - True + False True 0 @@ -3084,7 +3086,9 @@ True False - label + 5 + 5 + 0 True @@ -3207,12 +3211,6 @@ True False - - Kb - Mb - Gb - Tb - False @@ -3282,12 +3280,6 @@ True False - - Kb - Mb - Gb - Tb - False diff --git a/ubl-settings-diskquota.pot b/ubl-settings-diskquota.pot index 54d8ef3..f05bc83 100644 --- a/ubl-settings-diskquota.pot +++ b/ubl-settings-diskquota.pot @@ -17,6 +17,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +msgid "Kb" +msgstr "" + +msgid "Mb" +msgstr "" + +msgid "Gb" +msgstr "" + +msgid "Tb" +msgstr "" + +msgid "Quota use status:" +msgstr "" + #: source/ubl-settings-diskquota.cc:224 source/ubl-settings-diskquota.cc:154 #: source/ubl-settings-diskquota.cc:144 msgid "About" diff --git a/ubl-settings-diskquota_ru.po b/ubl-settings-diskquota_ru.po index 8b9b0ac..eb421b8 100644 --- a/ubl-settings-diskquota_ru.po +++ b/ubl-settings-diskquota_ru.po @@ -17,6 +17,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +msgid "Kb" +msgstr "Кб" + +msgid "Mb" +msgstr "Мб" + +msgid "Gb" +msgstr "Гб" + +msgid "Tb" +msgstr "Тб" + +msgid "Quota use status:" +msgstr "Статус использования квот" + msgid "Would you like to read documentation in the Web?" msgstr "Вы хотите прочитать справку в Сети?"