diff --git a/#ubl-settings-diskquota.glade# b/#ubl-settings-diskquota.glade# deleted file mode 100644 index e46a1b6..0000000 --- a/#ubl-settings-diskquota.glade# +++ /dev/null @@ -1,7415 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - ubl-settings-diskquota - - - - - - - - - - True - False - - - 90 - True - False - 5 - 5 - 5 - 5 - 6 - 6 - 69 - com.ublinux.ubl-settings-diskquota - - - False - True - 0 - - - - - True - False - - - True - False - - - True - False - vertical - - - 255 - True - False - end - Setting user quotas - 0 - - - - - - - - True - True - 0 - - - - - 255 - True - False - start - Configuring disk quota settings for system groups and users - True - 0 - - - - - - - - True - True - 1 - - - - - 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 - dialog-question-symbolic - - - True - False - ibus-panel - - - True - False - False - False - - - True - False - 4 - 4 - Direct control of the file system - True - - - - - Help - True - False - 5 - 5 - image2 - False - - - - - About - True - False - 5 - 5 - image3 - False - - - - - True - False - False - - - True - False - Load from global configuration - True - - - - - - True - False - Load from local configuration - True - - - - - - True - False - False - - - True - False - Save to global and local configuration - True - - - - - - True - False - Save to global configuration - True - - - - - - True - False - Save to local configuration - True - - - - - - 800 - 500 - 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 - - - 300 - True - True - in - - - True - False - - - True - True - ListGeneral - - - - - - Status - True - - - - - - - - Quota type - True - - - - - - - - Device -Project - True - - - - - - - - User - True - - - - - - - - Group - True - - - - - - - - Projects - True - - - - - - - - Soft -Restriction -(size) - True - - - - - - - - Severe -limitation -(size) - True - - - - - - - - Soft -Restriction -(files) - True - - - - - - - - Severe -limitation -(files) - True - - - - - - - - Deferring -(size) - True - - - - - - - - Deferring -(files) - True - - - - - - - - - - - - False - True - 0 - - - - - - - True - False - General statistics - - - False - - - - - True - False - vertical - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Device: - - - False - True - 0 - - - - - True - False - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - - Off - Not set - - - - False - True - 2 - - - - - False - True - 0 - - - - - True - False - - - True - False - vertical - 5 - True - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Excess size delay period - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Excess files delay period - - - False - True - end - 1 - - - - - False - True - 0 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - weeks - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - weeks - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - days - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - days - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 2 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - hours - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - hours - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 3 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - minutes - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - minutes - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 4 - - - - - False - True - 1 - - - - - 100 - True - True - in - - - True - False - - - True - True - ListUser - - - - - - Name - True - - - - - - - - Quota - True - - - - - - - - Size - True - - - - - - - - Soft -Restriction -(size) - True - - - - - - - - Severe -limitation -(size) - True - - - - - - - - Soft -Restriction -(files) - True - - - - - - - - Files - - - - - - - - Severe -limitation -(files) - True - - - - - - - - Deferring -(size) - True - - - - - - - - Deferring -(files) - True - - - - - - - - - - - - False - True - 2 - - - - - True - False - - - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - True - False - - - True - False - com.ublinux.ubl-settings-diskquota.funnel - - - 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 - 5 - 5 - True - - - False - True - 0 - - - - - True - True - True - 5 - 5 - 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 - 5 - 5 - True - - - False - True - 2 - - - - - False - True - end - 1 - - - - - False - True - end - 3 - - - - - 1 - - - - - True - False - Users - - - 1 - False - - - - - True - False - vertical - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Device: - - - False - True - 0 - - - - - True - False - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - - Off - Not set - - - - False - True - 2 - - - - - False - True - 0 - - - - - True - False - - - True - False - vertical - 5 - True - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Excess size delay period - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Excess files delay period - - - False - True - end - 1 - - - - - False - True - 0 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - weeks - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - weeks - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - days - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - days - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 2 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - hours - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - hours - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 3 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - minutes - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - minutes - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 4 - - - - - False - True - 1 - - - - - 100 - True - True - in - - - True - False - - - True - True - ListGroups - - - - - - Name - True - - - - - - - - Quota - True - - - - - - - - Size - True - - - - - - - - Soft -Restriction -(size) - True - - - - - - - - Severe -limitation -(size) - True - - - - - - - - Soft -Restriction -(files) - True - - - - - - - - Files - - - - - - - - Severe -limitation -(files) - True - - - - - - - - Deferring -(size) - True - - - - - - - - Deferring -(files) - True - - - - - - - - - - - - False - True - 2 - - - - - True - False - - - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - True - False - - - True - False - com.ublinux.ubl-settings-diskquota.funnel - - - 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 - 5 - 5 - True - - - False - True - 0 - - - - - True - True - True - 5 - 5 - 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 - 5 - 5 - True - - - False - True - 2 - - - - - False - True - end - 1 - - - - - False - True - end - 3 - - - - - 2 - - - - - True - False - Groups - - - 2 - False - - - - - True - False - vertical - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Device: - - - False - True - 0 - - - - - True - False - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - - Off - Not set - - - - False - True - 2 - - - - - False - True - 0 - - - - - True - False - - - True - False - vertical - 5 - True - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Excess size delay period - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Excess files delay period - - - False - True - end - 1 - - - - - False - True - 0 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - weeks - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - weeks - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - days - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - days - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 2 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - hours - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - hours - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 3 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - minutes - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - minutes - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 4 - - - - - False - True - 1 - - - - - 100 - True - True - in - - - True - False - - - True - True - ListProject - - - - - - ID - True - - - - - - - - Project Name - True - - - - - - - - Quota - True - - - - - - - - Size - True - - - - - - - - Soft -Restriction -(size) - True - - - - - - - - Severe -limitation -(size) - True - - - - - - - - Soft -Restriction -(files) - True - - - - - - - - Files - - - - - - - - Severe -limitation -(files) - True - - - - - - - - Deferring -(size) - True - - - - - - - - Deferring -(files) - True - - - - - - - - - - - - False - True - 2 - - - - - True - False - - - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - True - False - - - True - False - com.ublinux.ubl-settings-diskquota.funnel - - - 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 - 5 - 5 - True - - - False - True - 0 - - - - - True - True - True - 5 - 5 - 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 - 5 - 5 - True - - - False - True - 2 - - - - - False - True - end - 1 - - - - - False - True - end - 3 - - - - - 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 - ubl-settings-diskquota - - - - - - - - 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 - 5 - 5 - 5 - 5 - 5 - 5 - Device: - - - False - True - 0 - - - - - True - False - 5 - 5 - - - True - True - 1 - - - - - True - True - 0 - - - - - True - False - - - True - False - 5 - 5 - 5 - Quota use status: - 0 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 0 - - - True - True - 1 - - - - - True - True - 1 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - UserGropProject: - 0 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - - - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - quotegroupSizeSoftLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 0 - 0 - - Kb - Mb - Gb - Tb - - - - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - quotegroupSizeHardLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 0 - 0 - - Kb - Mb - Gb - Tb - - - - 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 - 5 - 5 - 5 - 5 - 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 - 5 - 5 - 5 - files - - - False - True - 2 - - - - - True - True - 4 - - - - - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Files - - - - - True - True - 1 - - - - - False - True - 1 - - - - - True - False - vertical - True - - - True - False - end - 5 - True - - - gtk-cancel - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - - - False - True - 0 - - - - - gtk-save - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - - - False - True - 1 - - - - - False - True - 0 - - - - - False - True - 2 - - - - - - - True - False - True - - - True - False - Settings disk quotas - Addition - - - - - - - - True - False - 32 - com.ublinux.ubl-settings-diskquota - 5 - - - - - - - False - start - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - vertical - - - True - False - vertical - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Device: - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - - - False - True - 1 - - - - - True - True - 0 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Quota use status: - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - - - False - True - 1 - - - - - True - True - 1 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Catalog - 0 - - - False - True - 0 - - - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - True - True - 1 - - - - - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - True - False - - - True - False - gtk-zoom-fit - - - False - True - 0 - - - - - True - False - Review - - - False - True - 1 - - - - - - - False - True - 2 - - - - - False - True - 2 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Project ID - 0 - - - False - True - 0 - - - - - Auto - True - True - False - 5 - 5 - 5 - 5 - 5 - 5 - True - - - False - True - 1 - - - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - True - True - 2 - - - - - Generate - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 3 - - - - - False - True - 3 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Project Name - - - False - True - 0 - - - - - True - True - 5 - 5 - 5 - 5 - - - True - True - 1 - - - - - False - True - 4 - - - - - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - 0 - quotegroupSizeSoftLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 0 - 0 - - Kb - Mb - Gb - Tb - - - - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - 0 - quotegroupSizeHardLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 0 - 0 - - Kb - Mb - Gb - Tb - - - - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - 0 - quotegroupFilesSoftLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 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 - 5 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - 0 - quotegroupFilesHardLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - files - - - False - True - 2 - - - - - True - True - 4 - - - - - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Files - - - - - True - True - 1 - - - - - False - True - 1 - - - - - True - False - vertical - True - - - True - False - end - 5 - True - - - gtk-cancel - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - - - False - True - 0 - - - - - gtk-save - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - - - False - True - 1 - - - - - False - True - 0 - - - - - False - True - 2 - - - - - - - True - False - True - - - True - False - Settings disk quotas - Addition - - - - - - - - True - False - 32 - com.ublinux.ubl-settings-diskquota - 5 - - - - - - - True - - - - - - - True - - - - - - - - False - start - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - vertical - - - True - False - vertical - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Device: - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - - - False - True - 1 - - - - - True - True - 0 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Quota use status: - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - - - False - True - 1 - - - - - True - True - 1 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Catalog - - - False - True - 0 - - - - - True - False - - - False - True - 1 - - - - - False - True - 2 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Project ID - - - False - True - 0 - - - - - True - False - - - False - True - 1 - - - - - False - True - 3 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Project Name - - - False - True - 0 - - - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - True - True - 1 - - - - - False - True - 4 - - - - - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - 0 - quotegroupSizeSoftLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 0 - 0 - - Kb - Mb - Gb - Tb - - - - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - 0 - quotegroupSizeHardLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 0 - 0 - - Kb - Mb - Gb - Tb - - - - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - 0 - quotegroupFilesSoftLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - 0 - quotegroupFilesHardLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - files - - - False - True - 2 - - - - - True - True - 4 - - - - - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Files - - - - - True - True - 1 - - - - - False - True - 1 - - - - - True - False - vertical - True - - - True - False - end - 5 - True - - - gtk-cancel - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - - - False - True - 0 - - - - - gtk-save - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - - - False - True - 1 - - - - - False - True - 0 - - - - - False - True - 2 - - - - - - - True - False - True - - - True - False - Settings disk quotas - Editing - - - - - - - - True - False - 32 - com.ublinux.ubl-settings-diskquota - 5 - - - - - - - False - start - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - vertical - - - True - False - vertical - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Device: - - - False - True - 0 - - - - - True - False - 5 - 5 - - - True - True - 1 - - - - - True - True - 0 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Quota use status: - 0 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 0 - - - True - True - 1 - - - - - True - True - 1 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - UserGropProject: - 0 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - - - False - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - 0 - quotegroupSizeSoftLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 0 - 0 - - Kb - Mb - Gb - Tb - - - - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - 0 - quotegroupSizeHardLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 0 - 0 - - Kb - Mb - Gb - Tb - - - - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - 0 - quotegroupFilesSoftLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - 0 - quotegroupFilesHardLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - files - - - False - True - 2 - - - - - True - True - 4 - - - - - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Files - - - - - True - True - 1 - - - - - False - True - 1 - - - - - True - False - vertical - True - - - True - False - end - 5 - True - - - gtk-cancel - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - - - False - True - 0 - - - - - gtk-save - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - - - False - True - 1 - - - - - False - True - 0 - - - - - False - True - 2 - - - - - - - True - False - True - - - True - False - Settings disk quotas - Editing - - - - - - - - True - False - 32 - com.ublinux.ubl-settings-diskquota - 5 - - - - - - - 1000000 - 1 - 10 - - - 1000000 - 1 - 10 - - - 1024 - 1 - 10 - - - 1024 - 1 - 10 - - - False - Please select File - True - center - 500 - 400 - True - com.ublinux.ublexec - dialog - True - True - select-folder - - - False - vertical - 2 - - - False - end - - - gtk-cancel - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - - - True - True - 0 - - - - - gtk-ok - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - - - True - True - 1 - - - - - False - False - 0 - - - - - - - - - - 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 - Filters - - - - - - - - True - False - 32 - com.ublinux.ubl-settings-diskquota - 5 - - - - - - - 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-diskquota - - - - - - - - True - False - 32 - dialog-question-symbolic - - - - - - - 800 - 600 - False - True - True - com.ublinux.ubl-settings-diskquota - - - - - - True - False - True - - - True - False - ubl-settings-diskquota - - - - - True - False - 32 - com.ublinux.ubl-settings-diskquota - 5 - - - - - - diff --git a/.gitignore b/.gitignore index d77f196..ed27715 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,9 @@ .vscode/ -ubl-settings-diskquota.glade~ -ubl-settings-diskquota_ru.po~ +ubl-settings-TEMPLATE +*~ +build/ +compile/ +*# +terminal-commands/ +source/ubl-cmake.h +vgcore* \ No newline at end of file diff --git a/Makefile b/Makefile index 5122442..838b50f 100644 --- a/Makefile +++ b/Makefile @@ -10,21 +10,25 @@ CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile #CMAKE_SOURCE_DIR = ./source #CMAKE_BUILD_DIR = ./compile -FILE_VERSION = VERSION.md DEPENDS = /bin/cmake PREFIX ?= /usr PKGNAME = $(MAKEFILE_DIR) -#PKGNAME = ubl-settings-diskquota - +#PKGNAME = ubl-settings-manager +LATEST_TAG= default_target: all -.PHONY: all init depend debug prepare check build uninstall install clean up_ver help +.PHONY: all init depend debug prepare check build uninstall install clean help all: init build init: @echo "Initialize ..."; \ - sed -r "s/(version_application = ).*/\1\"$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2)\";/" -i source/view/ubl-settings-diskquota.cc; \ + if [ -d ".git" ]; then \ + LATEST_TAG=$$(git describe --tags | sed 's/^v//'|grep -oE "^[0-9]{1,}.[0-9]{1,}"); \ + else \ + LATEST_TAG="0.0"; \ + fi; \ + sed -r "s/^(string version_application).*/\1=\"$${LATEST_TAG}\";/" -i source/${PKGNAME}.h; \ echo "-- Build path: ${CMAKE_BUILD_DIR}" depend: @@ -38,11 +42,13 @@ depend: echo "Check depends: OK" # $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -debug: - @echo "Debug ..." +debug: init build + @echo "Debug ..."; \ if [ ! -d ${CMAKE_BUILD_DIR} ]; then \ $(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ fi; \ + echo "${CMAKE_BUILD_DIR}/${PKGNAME}"; \ + cp ${CMAKE_BUILD_DIR}/${PKGNAME} ./; \ echo "Debug: OK" prepare: @@ -85,10 +91,10 @@ uninstall: done @$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}" @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" - @$(RM) "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/logo-background.png" - @$(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}.policy" @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg" - @$(RM) -rd "${DESTDIR}${PREFIX}/share/${PKGNAME}" + @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.checked.svg" + @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.warning.svg" + @$(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}.policy" @if [ -z ${DESTDIR} ]; then \ [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \ @@ -98,6 +104,9 @@ uninstall: install: check uninstall @echo "Install ..." +#################################################### УДАЛИТЬ ПЕРЕД КОММИТОМ ################################################################################ +# @g++ source/ubl-cmake.h compile/resources.cc compile/ubl-cmake.h source/ubl-settings-diskquota.cc source/ubl-settings-diskquota.h source/ubl-strings.h source/view/model/ubl-utils.cc source/view/model/ubl-utils.h -o ubl-settings-diskquota `pkg-config --cflags --libs gtk+-3.0 vte-2.91 webkit2gtk-4.0 webkit2gtk-web-extension-4.0` -g +#################################################### УДАЛИТЬ ПЕРЕД КОММИТОМ ################################################################################ @for FILE_PO in $(wildcard *.po); do \ LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \ @@ -108,28 +117,26 @@ install: check uninstall done @for SIZE in 16 32 48; do \ install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ - rsvg-convert -w $${SIZE} -h $${SIZE} -f png --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.png"; \ + rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ done @install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg" + @install -dm755 "${DESTDIR}${PREFIX}/share/polkit-1/actions" + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.policy" @install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" + @install -dm755 "${DESTDIR}/etc/xdg" @install -dm755 "${DESTDIR}${PREFIX}/share/applications" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" - @install -dm755 "${DESTDIR}${PREFIX}/share/polkit-1/actions" - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.policy" - @install -dm755 "${DESTDIR}${PREFIX}/share/${PKGNAME}"/{ui,css,images} - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/ui/" "${PKGNAME}.glade" - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/css/" "${PKGNAME}.css" - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/" "logo-background.png" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.checked.svg" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.warning.svg" - @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.ubl-settings-diskquota.funnel.svg" + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.funnel.svg" @if [ -z ${DESTDIR} ]; then \ [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \ [ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ fi @echo "Install: OK" + @sed -r "s/^(string version_application=\"*\").*/string version_application;/" -i source/${PKGNAME}.h; \ clean: @echo "Clean ..." @@ -149,12 +156,13 @@ up_ver: echo "Updated version to VERSION.md: $${CURRENT} to $${VER}" help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... init" - @echo "... debug" - @echo "... prepare" - @echo "... compile" - @echo "... install" - @echo "... uninstall" - @echo "... clean" + @echo "The following are some of the valid targets for this Makefile:"; \ + echo "... all (the default if no target is provided)"; \ + echo "... init"; \ + echo "... debug"; \ + echo "... prepare"; \ + echo "... compile"; \ + echo "... install"; \ + echo "... uninstall"; \ + echo "... clean"; \ + echo "... up_ver" diff --git a/README.md b/README.md index 56811b5..85aef32 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,12 @@ # ubl-settings-diskquota -# Настройки квот -[RU] Утилита для настройки дисковых квот - -Utility for setting the disk quotas - -![alt text](screenshot/screenshot.png) - +# Выполнить # Build In order to build ubl-settings-diskquota you will need: - CMake - C compiler - GTK+ 3 & dependencies +- webkit2gtk (optional) Once you have all the necessary dependencies, you can use: ```sh @@ -29,21 +24,6 @@ After a successful build, just use: ```sh $ sudo make uninstall ``` -# Usage -```sh -$ ubl-settings-diskquota --help -GTK settings disk quota for UBLinux - -Usage: ubl-settings-diskquota [OPTIONS...] -Options: - -h, --help Show this help - -V, --version Show package version - --lock-help Lock utility help - --lock-save Lock saving local and global configuration - --lock-save-local Lock save global configuration - --lock-save-global Lock load global configuration - --lock-load-global Lock load global configuration -$ ubl-settings-diskquota --version -ubl-settings-diskquota version: x.xx -``` +![alt text](screenshot/screenshot.png) + diff --git a/VERSION.md b/VERSION.md deleted file mode 100644 index d65a353..0000000 --- a/VERSION.md +++ /dev/null @@ -1 +0,0 @@ -VERSION 1.6 diff --git a/com.ublinux.ubl-settings-diskquota.policy b/com.ublinux.ubl-settings-diskquota.policy index 79dd276..de22da1 100644 --- a/com.ublinux.ubl-settings-diskquota.policy +++ b/com.ublinux.ubl-settings-diskquota.policy @@ -8,10 +8,10 @@ https://ublinux.ru - Run "ubl-settings-diskquota" as root - Запус ubl-settings-diskquota с правами root + Run ubl-settings-diskquota as root + Запуск утилиты ubl-settings-diskquota с правами root Authentication is required to run ubl-settings-diskquota - Требуется авторизация для запуска ubl-settings-diskquota с правами root + Требуется авторизация для запуска утилиты ubl-settings-diskquota с правами root auth_admin auth_admin diff --git a/com.ublinux.ubl-settings-diskquota.svg b/com.ublinux.ubl-settings-diskquota.svg index 708bd05..f636c26 100644 --- a/com.ublinux.ubl-settings-diskquota.svg +++ b/com.ublinux.ubl-settings-diskquota.svg @@ -4,8 +4,8 @@ height="180" version="1.0" id="svg8" - sodipodi:docname="ubl-settings-quotas.svg" - inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)" + sodipodi:docname="ublinux-ubconfig.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" inkscape:export-filename="/media/Data/ShareMX/temp/archtoub_icons/ublinux-logo.png" inkscape:export-xdpi="136.53334" inkscape:export-ydpi="136.53334" @@ -16,24 +16,6 @@ xmlns:svg="http://www.w3.org/2000/svg"> - - - - - - - - - - - - - - - - - - - - - - - - - - - + xlink:href="#linearGradient1124" + gradientTransform="matrix(0.49189181,0,0,0.49136051,-59.173196,-6.5682775)" /> + id="linearGradient1124"> + id="stop873" /> + id="stop875" /> - - - - + stdDeviation="0.31484797" + id="feGaussianBlur891" /> - - - - + xlink:href="#linearGradient1116" + gradientTransform="matrix(0.49189181,0,0,0.49136051,-54.424635,-4.7222539)" /> - + id="linearGradient1116"> - - - - - - - - - - - + id="stop878" /> - - - - - - - - - - - - - - - - - - - - - + id="stop880" /> - - - - - - - - - - - - - - - - - + id="filter35863" + x="-0.092128158" + y="-0.077188641" + width="1.1842563" + height="1.1543773" + color-interpolation-filters="sRGB"> + stdDeviation="0.31484797" + id="feGaussianBlur35861" /> - - - - - + xlink:href="#linearGradient1108" /> + id="linearGradient1108"> + id="stop883" /> + id="stop885" /> - + id="linearGradient1465" + x1="61.274837" + x2="86.483238" + y1="24.02087" + y2="47.898056" + gradientTransform="matrix(4.0459265,0,0,4.0459265,-209.07505,-54.236195)" + gradientUnits="userSpaceOnUse"> + id="stop150" + style="stop-color:#b9c9d5;stop-opacity:1" /> + id="stop152" + style="stop-color:#74929f;stop-opacity:1" /> - - - + gradientTransform="matrix(4.0459265,0,0,4.0459265,-213.71975,-13.885358)"> + id="stop155" /> + id="stop157" /> - - - - - + id="stop160" + style="stop-color:#82a8c8;stop-opacity:1" /> + id="stop162" + style="stop-color:#355995;stop-opacity:1" /> - - + id="filter4639" + x="-0.053781572" + y="-0.05736786" + width="1.1075631" + height="1.1147357"> - - - - - - - - - - - - - - + id="feFlood4629" /> + id="feComposite4631" /> + id="feGaussianBlur4633" /> + id="feOffset4635" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="feComposite4637" /> - - - - - - - - - @@ -5741,163 +4927,31 @@ id="circle1671" /> - - - - - - - - - - - - - - - - - + id="g2092" + transform="matrix(0.93417469,0,0,0.93417469,5.9242808,5.9242835)" + style="filter:url(#filter4639)"> + - - - - - - - - - - - - - + cx="90.007736" + cy="89.999939" + r="36.466343" + fill="url(#linearGradient1481)" + opacity="0.8" + id="circle547" + style="opacity:1;fill:url(#linearGradient1481);stroke-width:8.99537" /> + diff --git a/gresource.xml b/gresource.xml new file mode 100644 index 0000000..c640934 --- /dev/null +++ b/gresource.xml @@ -0,0 +1,12 @@ + + + + ubl-settings-diskquota.glade + + + ubl-settings-diskquota.css + + + ubl-settings-diskquota-banner.png + + \ No newline at end of file diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 4b3ebc2..e8b8f28 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -1,19 +1,21 @@ cmake_minimum_required(VERSION 3.7) -find_package(PkgConfig REQUIRED) project(ubl-settings-diskquota) +find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED gtkmm-3.0) +pkg_check_modules(GTK REQUIRED gtk+-3.0) include_directories(${GTK_INCLUDE_DIRS}) link_directories(${GTK_LIBRARY_DIRS}) add_definitions(${GTK_CFLAGS_OTHER}) +pkg_check_modules(VTE291 REQUIRED vte-2.91) +include_directories(${VTE291_INCLUDE_DIRS}) +link_directories(${VTE291_LIBRARY_DIRS}) +add_definitions(${VTE291_CFLAGS_OTHER}) find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) option(WEBKIT_FOUND "No" OFF) - -find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) if(WEBKIT_LIBRARIES_FOUND) option(WEBKIT_FOUND "Yes" ON) PKG_CHECK_MODULES(WEBKIT REQUIRED webkit2gtk-4.0 webkit2gtk-web-extension-4.0) @@ -21,64 +23,77 @@ if(WEBKIT_LIBRARIES_FOUND) link_directories(${WEBKIT_LIBRARY_DIRS}) add_definitions(${WEBKIT_CFLAGS_OTHER}) endif() -configure_file(ubl-settings-diskquota.h.in ubl-settings-diskquota-cm.h) -#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -std=c++2a -g") +configure_file(ubl-cmake.in ubl-cmake.h) + +file(COPY ${CMAKE_CURRENT_BINARY_DIR}/ubl-cmake.h DESTINATION ./) + +set(GRESOURCE_C resources.c) +set(GRESOURCE_XML gresource.xml) + +find_program(GLIB_COMPILE_RESOURCES NAMES glib-compile-resources REQUIRED) +add_custom_target(GLADE ubl-settings-diskquota.glade) + +set(DEPENDFILES + ../ubl-settings-diskquota.glade + ../gresource.xml + ../ubl-settings-diskquota-banner.png + ../ubl-settings-diskquota.css + ) + +file(COPY ${DEPENDFILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + +add_custom_command( + OUTPUT ${GRESOURCE_C} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${GLIB_COMPILE_RESOURCES} + ARGS + --generate-source + --target=${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C} + ${GRESOURCE_XML} + VERBATIM + MAIN_DEPENDENCY ${GRESOURCE_XML} + DEPENDS + ${GLADE} +) +add_custom_target( + dummy-resource + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C} +) + +#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -std=c++2a") +#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -lm") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ -O2 -pipe -fno-plt -fexceptions \ -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection -g") + set(SOURCE_FILES - view/view_edit_project.cc - view/view_edit_project.h - view/view_add_project.cc - view/view_add_project.h - view/view_edit_user_group.h - view/view_edit_user_group.cc - view/view_add_user_group.h - view/view_add_user_group.cc - view/view_edit_user_group.cc - view/view_edit_user_group.h - view/view_filters.cc - view/view_filters.h - view/ubl-settings-diskquota.h - view/ubl-settings-diskquota.cc - view/model/ubconfig_quota.cc - view/model/ubconfig_quota.h - view/model/save.h - view/model/save.cc - view/model/load.h - view/model/load.cc - view/model/my_process.h - view/model/my_process.cc - view/model/util.h - view/model/util.cc - view/ubl-util-standard.h - view/ubl-util-standard.c - view/model/wrapper_load_save.cc - view/model/wrapper_load_save.h - ubl-settings-diskquota-cm.h - view/view_open_browser.cc - view/view_open_browser.h - view/view_about.h - view/view_about.cc - controller.cc - controller.h - main.cc - var.h - project_lib.h - my_type.h) + view/model/ubl-utils.h + view/model/ubl-utils.cc + ubl-settings-diskquota.cc + ubl-settings-diskquota.h + ubl-strings.h + + + + ${CMAKE_CURRENT_BINARY_DIR}/ubl-cmake.h + ) set(LIBRARIES ${GTK_LIBRARIES} + ${WEBKIT_LIBRARIES} +# ${VTE291_LIBRARIES} pthread) -add_executable(ubl-settings-diskquota ${SOURCE_FILES}) -target_link_libraries(ubl-settings-diskquota PUBLIC ${WEBKIT_LIBRARIES} ${LIBRARIES}) -target_include_directories(ubl-settings-diskquota PUBLIC - "${PROJECT_BINARY_DIR}" - ${WEBKIT_INCLUDE_DIRS} - ) -install(TARGETS ubl-settings-diskquota DESTINATION bin) \ No newline at end of file +add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}) +target_link_libraries(${PROJECT_NAME} PUBLIC ${LIBRARIES}) +target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_BINARY_DIR}) +set_source_files_properties( + ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C} + PROPERTIES GENERATED TRUE +) +install(TARGETS ${PROJECT_NAME} DESTINATION bin) +add_dependencies(${PROJECT_NAME} dummy-resource) \ No newline at end of file diff --git a/source/controller.cc b/source/controller.cc deleted file mode 100644 index 81040e4..0000000 --- a/source/controller.cc +++ /dev/null @@ -1,68 +0,0 @@ -#include "controller.h" - -int socket_ext_id_I = 0; -int socket_trd_id_I = 0; - -Controller::Controller(BaseObjectType* obj, Glib::RefPtr const& builder) - :Gtk::ApplicationWindow(obj), builder{builder} { - this->builder = builder; - this->settings(); -} - -Controller::Controller(Glib::RefPtr const& builder) { - this->builder = builder; - this->settings(); -} - -Controller::~Controller() -{ -} - -void Controller::settings() { - obj_open_browser->set_obj_about(obj_view_about); - obj_main_window = new MainWindow(builder, obj_open_browser, &socket_ext_id_I, &socket_trd_id_I); - obj_main_window->set_obj_wrapper_load_save(obj_wrapper_load_save); - obj_open_browser->settings(); - obj_main_window->set_map_gui(&map_gui_cfg); - obj_main_window->set_map_global(&map_global_cfg); - obj_main_window->set_map_local(&map_system_cfg); - obj_main_window->set_obj_view_filters(&obj_view_filters); - obj_main_window->set_obj_view_edit(&obj_view_edit); - obj_main_window->set_obj_view_add(&obj_view_add); - obj_main_window->set_obj_view_add_project(&obj_view_add_project); - obj_main_window->set_obj_view_edit_project(&obj_view_edit_project); - obj_main_window->settings(); -} - -CmdArgParser::CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help) -: Glib::OptionGroup{p_name, p_description, p_help} { - Glib::OptionEntry socketIDArg; - socketIDArg.set_long_name("socket-id"); - socketIDArg.set_flags(Glib::OptionEntry::FLAG_IN_MAIN); - socketIDArg.set_description("Settings manager socket"); - Glib::OptionEntry socketExtId; - socketExtId.set_long_name("socket-ext-id"); - socketExtId.set_flags(Glib::OptionEntry::FLAG_IN_MAIN); - socketExtId.set_description("Settings manager secondary socket"); - Glib::OptionEntry socketTrdId; - socketTrdId.set_long_name("socket-trd-id"); - socketTrdId.set_flags(Glib::OptionEntry::FLAG_IN_MAIN); - socketTrdId.set_description("Settings manager secondary socket"); - add_entry(socketIDArg, m_socketID); - add_entry(socketExtId, socket_ext_id_I); - add_entry(socketTrdId, socket_trd_id_I); -} - -::Window CmdArgParser::GetSocketID() const{ - return m_socketID; -} - -SettingsPlug::SettingsPlug(::Window p_socketID, Glib::RefPtr builder) - :Gtk::Plug{p_socketID} { - Controller* wnd = nullptr; - builder->get_widget_derived("window", wnd); - builder->get_widget("plugBox", plugBox); - plugBox->get_parent()->remove(*plugBox); - add(*plugBox); - show_all_children(); -} \ No newline at end of file diff --git a/source/controller.h b/source/controller.h deleted file mode 100644 index b452ee4..0000000 --- a/source/controller.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef CONTROLLER_H -#define CONTROLLER_H -#include "my_type.h" -#include "view/view_open_browser.h" -#include "view/view_about.h" -#include "view/ubl-settings-diskquota.h" -#include "view/model/wrapper_load_save.h" -#include "view/view_filters.h" -#include "view/view_add_user_group.h" -#include "view/view_edit_user_group.h" -#include "view/view_edit_project.h" -#include "view/view_add_project.h" - -extern int socket_ext_id_I; -extern int socket_trd_id_I; - -class Controller : public Gtk::ApplicationWindow -{ -private: - Glib::RefPtr builder; - map_str_str map_gui_cfg; - map_str_str map_global_cfg; - map_str_str map_system_cfg; -public: - ~Controller(); - void settings(); - View_open_browser* obj_open_browser = new View_open_browser(); - View_about* obj_view_about = new View_about(); - MainWindow* obj_main_window; - Wrapper_load_save *obj_wrapper_load_save = new Wrapper_load_save(); - View_filters obj_view_filters = View_filters(); - View_add_user_group obj_view_add = View_add_user_group(); - View_edit_user_group obj_view_edit = View_edit_user_group(); - View_edit_project obj_view_edit_project = View_edit_project(); - View_add_project obj_view_add_project = View_add_project(); - Controller(BaseObjectType* obj, Glib::RefPtr const& builder); - Controller(Glib::RefPtr const& builder); - - -}; - -class CmdArgParser : public Glib::OptionGroup { -public: - CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help); - ::Window GetSocketID() const; -private: - int m_socketID = 0; - -}; -class SettingsPlug : public Gtk::Plug{ -public: - Gtk::Window *window; - SettingsPlug(::Window p_socketID, Glib::RefPtr builder); - -private: - Gtk::Widget *plugBox; - Gtk::Widget *parent; -}; -#endif \ No newline at end of file diff --git a/source/main.cc b/source/main.cc deleted file mode 100644 index 7c2362a..0000000 --- a/source/main.cc +++ /dev/null @@ -1,99 +0,0 @@ -#include "controller.h" -#include "var.h" - -void pars_flag(int index_start, int argc, char* argv[]); - -int main(int argc, char** argv) { - string str_argv= ""; - string str_cmd_argv = ""; - for (int i=1; i 1){ - str_argv = argv[1]; - } - bindtextdomain(app_name, "/usr/share/locale/"); - bind_textdomain_codeset(app_name, "UTF-8"); - textdomain(app_name); - if (str_argv.find("--socket-id") != std::string::npos) { - auto app = Gtk::Application::create(argc, argv, "org.gtkmm.example.plug"); - auto builder = Gtk::Builder::create_from_file(path_glade); - Glib::init(); - setlocale(LC_ALL, ""); - Glib::OptionContext context; - - CmdArgParser parser{ - "Socket ID", - "Command line argument for socket ID communication.", - "No help available, sorry" - }; - - context.set_main_group(parser); - context.parse(argc, argv); - - ::Window socketID = parser.GetSocketID(); - - // Handle plug: - SettingsPlug plug{socketID, builder}; - plug.show(); - - app->run(plug); - return 0; - } - else if (str_argv.find("-") != std::string::npos || argc == 1) { - int len_argv = 1; - auto app = Gtk::Application::create(len_argv, argv, "org.gtkmm.example.plug"); - auto builder = Gtk::Builder::create_from_file(path_glade); - pars_flag(1, argc, argv); - Controller* wnd = nullptr; - builder->get_widget_derived("window", wnd); - auto r = app->run(*wnd); - delete wnd; - return r; - } -} - -void pars_flag(int index_start, int argc, char* argv[]) { - string str_argv = ""; - for (int i = index_start; i - -using namespace std; - -typedef unsigned long max_num_T; - -struct users_grups{ - string name; - bool state; - max_num_T size_data; - max_num_T soft_limit_size; - max_num_T severe_restriction_size; - max_num_T postponement_size_brat; - max_num_T hard_limit_activation_time_size; - max_num_T file; - max_num_T soft_file_limitation; - max_num_T hard_file_restriction; - max_num_T postponement_hard_file_restriction; - max_num_T hard_limit_activation_time; - }; -struct Mount { - std::string device; - std::string destination; - std::string fstype; - std::string options; - std::string dump; - std::string pass; -}; -struct partition_cmd { - string device; - string cmd; -}; -struct struct_quotas { - string device; - string cmd; - string type_quotas; - string name; -}; -struct status_quotas { - bool user; - bool group; - bool project; - bool status; -}; -struct data_all_quotas { - string username; - string status; - string block_used; - string block_soft; - string block_hard; - string block_grace; - string file_used; - string file_soft; - string file_hard; - string file_grace; - bool is_validate; -}; -struct tv_g_u_p { - string name; - string quotas; - string size; - string soft_limit_size; - string hard_limit_size; - string deferring_size; - string files; - string soft_limit_files; - string hard_limit_delay; - string deferring_files; -}; - -typedef struct users_grups USER_GRUPS; -typedef map map_str_str; -typedef map * map_s_s_ptr; -typedef std::map map_str_device; -#endif \ No newline at end of file diff --git a/source/project_lib.h b/source/project_lib.h deleted file mode 100644 index 9bd1546..0000000 --- a/source/project_lib.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef PROJECT_LIB_H -#define PROJECT_LIB_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "ubl-settings-diskquota-cm.h" - -#endif \ No newline at end of file diff --git a/source/ubl-cmake.in b/source/ubl-cmake.in new file mode 100644 index 0000000..d4623a7 --- /dev/null +++ b/source/ubl-cmake.in @@ -0,0 +1 @@ +#cmakedefine WEBKIT_FOUND diff --git a/source/ubl-settings-diskquota.cc b/source/ubl-settings-diskquota.cc new file mode 100644 index 0000000..76e5942 --- /dev/null +++ b/source/ubl-settings-diskquota.cc @@ -0,0 +1,300 @@ +#include "ubl-settings-diskquota.h" + +config main_config; + +//signal emmit handlers - no header initialization + +/**on_close_subwindow(GtkWidget *self) + * [EN] + * Closes window in which [self] is contained. + * [RU] + * Закрывает окно, в котором расположен виджет [self]. +*/ +void on_close_subwindow(GtkWidget *self){ + gtk_widget_destroy(gtk_widget_get_toplevel(self)); +} + +/**yon_open_browser(GtkWidget *self, char *link) + * [EN] + * Opens browser with [link] link. + * [RU] + * Открывает браузер с [link] ссылкой. +*/ +void yon_open_browser(GtkWidget *, char *link){ + yon_ubl_browser_window_open(link,TITLE_LABEL); +} + +/**on_open_documentation_confirmation(GtkWidget *self, char *link) + * [EN] + * Opens confirmation window for [link] link. + * [RU] + * Открывает окно подтверждение перехода по ссылке [link]. +*/ +void on_open_documentation_confirmation(GtkWidget *self, char *link){ + if (main_config.always_open_documentation==0){ + GtkBuilder *builder = gtk_builder_new_from_resource(glade_path); + documentation_confirmation_window *widgets = (documentation_confirmation_window*)malloc(sizeof(documentation_confirmation_window)); + widgets->Window = yon_gtk_builder_get_widget(builder,"helpConfirmationWindow"); + widgets->AcceptButton = yon_gtk_builder_get_widget(builder,"ReadHelpButton"); + widgets->CloseButton = yon_gtk_builder_get_widget(builder,"CancelHelpButton"); + widgets->HatText = yon_gtk_builder_get_widget(builder,"webHeaderNameLabel"); + widgets->HeaderText = yon_gtk_builder_get_widget(builder,"helpHeader"); + widgets->InfoText = yon_gtk_builder_get_widget(builder,"helpText"); + widgets->AlwaysOpenCheck = yon_gtk_builder_get_widget(builder,"AlwaysOpenDocumentationCheckbox"); + gtk_label_set_text(GTK_LABEL(widgets->HatText),TITLE_LABEL); + gtk_label_set_text(GTK_LABEL(widgets->HeaderText),HELP_TITLE_LABEL); + gtk_label_set_text(GTK_LABEL(widgets->InfoText),HELP_INFO_LABEL); + gtk_button_set_label(GTK_BUTTON(widgets->AcceptButton),OPEN_HELP_LABEL); + gtk_button_set_label(GTK_BUTTON(widgets->AlwaysOpenCheck),HELP_ALWAYS_OPEN_LABEL); + gtk_button_set_label(GTK_BUTTON(widgets->CloseButton),CANCEL_LABEL); + gtk_widget_show_all(widgets->Window); + g_signal_connect(G_OBJECT(widgets->CloseButton),"clicked",G_CALLBACK(on_close_subwindow),NULL); + g_signal_connect(G_OBJECT(widgets->AcceptButton),"clicked",G_CALLBACK(yon_open_browser),yon_char_new(link)); + g_signal_connect(G_OBJECT(widgets->AcceptButton),"clicked",G_CALLBACK(on_close_subwindow),NULL); + + + } else { + yon_open_browser(self,link); + } +} + +/**on_link(GtkWidget *self, char* uri, gpointer user_data) + * [EN] + * Signal for hadnling AboutDialog links. + * Connect to "activate-link" signal. + * [self] is AboutDialog window; + * [uri] is activated link; + * [user_data] is pointer for user data, hasn't used in standard handler; + * [RU] + * Функция для обработки сигнала нажатия на ссылку окна AboutDialog. + * Присоединять к сигналу "activate-link". + * [self] - окно AboutDialog; + * [uri] - ссылка, по которой совершается переход; + * [user_data] - указатель на любые другие данные, не используется в стандартном обработчике; +*/ +void on_link(GtkWidget *self, char* uri, gpointer){ + gtk_widget_destroy(self); + on_open_documentation_confirmation(self,uri); +} + +/**on_about() + * [EN] + * Function for setting up and showing AboutDialog. + * Connect it to "activate" signal of Documentation MenuItem. + * [RU] + * Функиця для настройки и показа окна AboutDialog. + * Присоединять к сигналу "activate" кнопки справки типа MenuItem. +*/ +void on_about(){ + GtkBuilder *builder=gtk_builder_new_from_resource(glade_path); + GtkWidget *window=yon_gtk_builder_get_widget(builder,"AboutWindow"); + GtkWidget *title=yon_gtk_builder_get_widget(builder,"headerAboutTopic"); + GtkWidget *hideButtonBox=yon_gtk_builder_get_widget(builder,"buttonBoxHide"); + gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(window),version_application); + gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(window),PROJECT_HOME_LABEL); + gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(window),TITLE_LABEL); + gtk_label_set_text(GTK_LABEL(title),TITLE_LABEL); + g_signal_connect(G_OBJECT(window),"activate-link",G_CALLBACK(on_link),NULL); + gtk_widget_set_visible(hideButtonBox,0); + gtk_widget_destroy(hideButtonBox); + gtk_widget_show(window); +} + +//functions + +void yon_load_proceed(char *command){ + if (yon_config_load_register(command)) + yon_ubl_status_box_render(LOCAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + else + yon_ubl_status_box_render(LOAD_FAILED_LABEL,BACKGROUND_IMAGE_FAIL_TYPE); + +} + +// standard functions + +void config_init(){ + main_config.always_open_documentation=0; + main_config.win_height=0; + main_config.win_width=0; + main_config.win_pos_x=0; + main_config.win_pos_y=0; + main_config.socket_id=-1; + main_config.save_socket_id=-1; + main_config.load_socket_id=-1; + main_config.lock_help=0; + main_config.lock_help=0; + main_config.lock_load_global=0; + main_config.lock_save_global=0; + main_config.lock_save_local=0; +} + +main_window *setup_window(){ + /* Widgets getting | Получение виджетов */ + main_window *widgets = (main_window*)malloc(sizeof(main_window)); + GtkBuilder *builder = gtk_builder_new_from_resource(glade_path); + widgets->Window = yon_gtk_builder_get_widget(builder,"MainWindow"); + widgets->HatLabel = yon_gtk_builder_get_widget(builder,"headerTopic"); + widgets->PlugBox = yon_gtk_builder_get_widget(builder,"plugBox"); + + widgets->HeadOverlay = yon_gtk_builder_get_widget(builder,"HeadOverlay"); + widgets->HeadImage = yon_gtk_builder_get_widget(builder,"HeadBackgroundImage"); + widgets->HeadBox = yon_gtk_builder_get_widget(builder,"HeaderBox"); + widgets->HeadTitleLabel = yon_gtk_builder_get_widget(builder,"HeaderTitleLabel"); + widgets->HeadInfoLabel = yon_gtk_builder_get_widget(builder,"HeaderInfoLabel"); + + widgets->StatusBox = yon_gtk_builder_get_widget(builder,"mainStatusBox"); + widgets->StatusIcon = yon_gtk_builder_get_widget(builder,"mainStatusIcon"); + widgets->StatusLabel = yon_gtk_builder_get_widget(builder,"mainStatusLabel"); + + widgets->SaveLabel = yon_gtk_builder_get_widget(builder,"headerSaveConfigLabel"); + widgets->SaveMenuItem = yon_gtk_builder_get_widget(builder,"SaveGlobalLocalConfigurationMenuItem"); + widgets->SaveGlobalMenuItem = yon_gtk_builder_get_widget(builder,"SaveGlobalConfigurationMenuItem"); + widgets->SaveLocalMenuItem = yon_gtk_builder_get_widget(builder,"SaveLocalConfigurationMenuItem"); + widgets->RightBox = yon_gtk_builder_get_widget(builder,"HeaderRightBox"); + + widgets->LoadLabel = yon_gtk_builder_get_widget(builder,"headerLoadConfigLabel"); + widgets->LoadGlobalMenuItem = yon_gtk_builder_get_widget(builder,"LoadGlobalConfigurationMenuItem"); + widgets->LoadLocalMenuItem = yon_gtk_builder_get_widget(builder,"LoadLocalConfigurationMenuItem"); + widgets->LeftBox = yon_gtk_builder_get_widget(builder,"HeaderLeftBox"); + + widgets->DocumentationMenuItem = yon_gtk_builder_get_widget(builder,"DocumentationMenuItem"); + widgets->AboutMenuItem = yon_gtk_builder_get_widget(builder,"AboutMenuItem"); + + if (main_config.lock_load_global == 1){ + gtk_widget_set_sensitive(widgets->LoadGlobalMenuItem,0); + } + if (main_config.lock_save_global == 1){ + gtk_widget_set_sensitive(widgets->SaveGlobalMenuItem,0); + gtk_widget_set_sensitive(widgets->SaveMenuItem,0); + } + if (main_config.lock_save_local == 1){ + gtk_widget_set_sensitive(widgets->SaveLocalMenuItem,0); + gtk_widget_set_sensitive(widgets->SaveMenuItem,0); + } + + /* Signal connection | Присоединение сигналов */ + + event(widgets); + gtk_widget_show(widgets->Window); + return widgets; +} + +void event(main_window *widgets) { + g_signal_connect(G_OBJECT(widgets->Window), "destroy", G_CALLBACK(gtk_main_quit), NULL); + g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),(char*)WIKI_LINK); + g_signal_connect(G_OBJECT(widgets->AboutMenuItem),"activate",G_CALLBACK(on_about),NULL); + //g_signal_connect(G_OBJECT(widgets->btnShowFilters),"clicked",G_CALLBACK(wrapper_filters_show), NULL); +} +/* +void main_visible_columns(main_window *widgets) { + gboolean *flags_filters = filters_get_flag(); + gtk_tree_view_column_set_visible(widgets->tvc0, flags_filters[0]); + gtk_tree_view_column_set_visible(widgets->tvc1, flags_filters[1]); + gtk_tree_view_column_set_visible(widgets->tvc2, flags_filters[2]); + gtk_tree_view_column_set_visible(widgets->tvc3, flags_filters[3]); + gtk_tree_view_column_set_visible(widgets->tvc4, flags_filters[4]); + gtk_tree_view_column_set_visible(widgets->tvc5, flags_filters[5]); + gtk_tree_view_column_set_visible(widgets->tvc6, flags_filters[6]); + gtk_tree_view_column_set_visible(widgets->tvc7, flags_filters[7]); + filters_on_hide_subwindow(self); +} +void wrapper_filters_show(GtkWidget *self) { + filters_show(self, glade_path); + g_signal_connect(G_OBJECT(get_widget_filters()->btnFiltersSave),"clicked",G_CALLBACK(main_visible_columns), NULL); +} +*/ +int main(int argc, char *argv[]){ + config_path = yon_char_unite((char*)"/home",yon_ubl_root_user_get(),(char*)"/.config/",LocaleName,(char*)"/",LocaleName,(char*)".conf",NULL); + local=setlocale(LC_ALL, ""); + textdomain (LocaleName); + config_init(); + int option_index=0; + int show_help=0; + { + struct option long_options[] = { + {"help", 0, 0, 'h'}, + {"version", 0, 0, 'V'}, + {"lock-help", 0,0, 1}, + {"lock-save", 0,0, 2}, + {"lock-save-local", 0,0, 3}, + {"lock-save-global", 0,0, 4}, + {"lock-load-global", 0,0, 5}, + {"socket-id", 1, 0, 's'}, + {"socket-ext-id", 1,0, 'e'}, + {"socket-trd-id", 1,0, 't'}, + {"debug", 0,0, 'd'}, + { NULL, 0, NULL, 0 } + }; + for (int i=0;iHeadOverlay),GTK_WIDGET(widgets->HeadBox),GTK_WIDGET(widgets->HeadImage),(char*)banner_path); + + yon_ubl_status_box_setup(widgets->StatusIcon,widgets->StatusBox,widgets->StatusLabel); + if (getuid()!=0) + yon_ubl_status_box_render(TITLE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + else + yon_ubl_status_box_render(TITLE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + yon_ubl_setup_sockets(widgets->PlugBox,widgets->LeftBox,widgets->RightBox,main_config.socket_id,main_config.load_socket_id,main_config.save_socket_id); + yon_window_config_setup(GTK_WINDOW(widgets->Window)); + yon_window_config_load((char*)config_path.c_str()); + GtkCssProvider *css=gtk_css_provider_new(); + gtk_css_provider_load_from_resource(css,CssPath); + gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), + GTK_STYLE_PROVIDER(css), + -1); + gtk_main(); +} diff --git a/source/ubl-settings-diskquota.h b/source/ubl-settings-diskquota.h new file mode 100644 index 0000000..4462d2d --- /dev/null +++ b/source/ubl-settings-diskquota.h @@ -0,0 +1,111 @@ + + +#include +#include +#include +#include "view/model/ubl-utils.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ubl-cmake.h" +using namespace std; +#ifdef WEBKIT_FOUND + #include +#endif +#include "ubl-strings.h" + +#define WIKI_LINK "https://wiki.ublinux.ru/ru/Программное_обеспечение/Программы_и_утилиты/Все/ubl-settings-diskquota" + +#define _(String) gettext(String) + +#define glade_path "/com/ublinux/ui/ubl-settings-diskquota.glade" +#define banner_path "/com/ublinux/images/ubl-settings-diskquota-banner.png" +#define CssPath "/com/ublinux/css/ubl-settings-diskquota.css" +static string config_path; + + +#define LocalePath "/usr/share/locale" +#define LocaleName "ubl-settings-diskquota" + +char const* version_application=""; + +char *local; + +typedef struct { + int always_open_documentation; + int win_pos_x; + int win_pos_y; + int win_width; + int win_height; + + int socket_id; + int load_socket_id; + int save_socket_id; + + int lock_help; + int lock_save_local; + int lock_save_global; + int lock_load_global; +} config; + +typedef struct { + GtkWidget *Window; + GtkWidget *HatLabel; + GtkWidget *PlugBox; + + GtkWidget *HeadOverlay; + GtkWidget *HeadImage; + GtkWidget *HeadBox; + GtkWidget *HeadTitleLabel; + GtkWidget *HeadInfoLabel; + + GtkWidget *StatusBox; + GtkWidget *StatusIcon; + GtkWidget *StatusLabel; + + GtkWidget *SaveLabel; + GtkWidget *SaveMenuItem; + GtkWidget *SaveGlobalMenuItem; + GtkWidget *SaveLocalMenuItem; + GtkWidget *RightBox; + + GtkWidget *LoadLabel; + GtkWidget *LoadGlobalMenuItem; + GtkWidget *LoadLocalMenuItem; + GtkWidget *LeftBox; + + GtkWidget *DocumentationMenuItem; + GtkWidget *AboutMenuItem; +} main_window; + + +typedef struct { + GtkWidget *Window; + + GtkWidget *HatText; + GtkWidget *HeaderText; + GtkWidget *InfoText; + GtkWidget *AlwaysOpenCheck; + + GtkWidget *CloseButton; + GtkWidget *AcceptButton; +} documentation_confirmation_window; + + +main_window *setup_window(); +void on_about(); +void yon_open_browser(GtkWidget *self, char *link); +void on_close_subwindow(GtkWidget *self); +void on_link(GtkWidget *self, char* uri, gpointer user_data); +void on_open_documentation_confirmation(GtkWidget *self, char *link); +void yon_load_proceed(char *command); +void event(main_window *widgets); +int main(int argc, char *argv[]); +void on_link(GtkWidget *self, char* uri, gpointer user_data); +void config_init(); diff --git a/source/ubl-settings-diskquota.h.in b/source/ubl-settings-diskquota.h.in deleted file mode 100644 index 17ba454..0000000 --- a/source/ubl-settings-diskquota.h.in +++ /dev/null @@ -1 +0,0 @@ -#cmakedefine WEBKIT_FOUND \ No newline at end of file diff --git a/source/ubl-strings.h b/source/ubl-strings.h new file mode 100644 index 0000000..87d311e --- /dev/null +++ b/source/ubl-strings.h @@ -0,0 +1,39 @@ +#define VERSION_LABEL yon_char_unite(_("Version:")," ",version_application,"\n",NULL) +#define HELP_LABEL yon_char_unite(_("ubl-settings-diskquota version:")," ", version_application,"\n",_("TEMPLATE settings"),"\n",_("Usage:"), " ubl-settings-diskquota ",_("[OPTIONS]"),"\n",_("Options:"),"\n\t--help, -h\t\t\t",_("Show this help"),"\n\t--version, -V\t\t\t",_("Show package version"),"\n\t--lock-help\t\t\t",_("Lock this help menu"),"\n\t--lock-save\t\t\t",_("Lock configuration saving"),"\n\t--lock-save-local\t\t",_("Lock local configration saving"),"\n\t--lock-save-global\t\t",_("Lock global configration saving"),"\n\t--lock-load-global\t\t",_("Lock global configration loading"),"\n",NULL) + +#define TITLE_LABEL _("TEMPLATE Manager") +#define TITLE_INFO_LABEL _("System TEMPLATE settings management") + +#define SUCCESS_LABEL _("Operation succeeded") +#define ROOT_WARNING_LABEL _("Warning! Application was launched without root - root-dependent actions are locked") + +#define ABOUT_LABEL _("About") +#define DOCUMENTATION_LABEL _("Documentation") + +#define SAVE_LOCAL_LABEL _("Save to local configuration") +#define SAVE_GLOBAL_LABEL _("Save to global configuration") +#define SAVE_CONFIGURATION_LABEL _("Save configuration") +#define SAVE_LABEL _("Save") + +#define LOAD_LOCAL_LABEL _("Load local configuration") +#define LOAD_GLOBAL_LABEL _("Load global configuration") +#define LOAD_LABEL _("Load") + +#define CANCEL_LABEL _("Cancel") + +#define HELP_TITLE_LABEL _("Would you like to read documentation in the Web?") +#define HELP_INFO_LABEL _("You will be redirected to documentation website where documentation is\ntranslated and supported by community.") +#define HELP_ALWAYS_OPEN_LABEL _("Always redirect to online documentation") +#define OPEN_HELP_LABEL _("Open documentation") +#define PROJECT_HOME_LABEL _("Project Home Page") +#define NOTHING_CHOSEN_LABEL _("Nothing were chosen") + + +#define GLOBAL_LOAD_SUCCESS_LABEL _("Global configuration loading succseeded.") +#define LOCAL_LOAD_SUCCESS_LABEL _("Local configuration loading succseeded.") +#define LOAD_FAILED_LABEL _("Config loading failed") + +#define GLOBAL_LOCAL_SAVE_SUCCESS_LABEL _("Local and global configuration saving succseeded.") +#define GLOBAL_SAVE_SUCCESS_LABEL _("Global configuration saving succseeded.") +#define LOCAL_SAVE_SUCCESS_LABEL _("Local configuration saving succseeded.") +#define SAVE_FAILED_LABEL \ No newline at end of file diff --git a/source/var.h b/source/var.h deleted file mode 100644 index f26c1ff..0000000 --- a/source/var.h +++ /dev/null @@ -1,161 +0,0 @@ -#ifndef VAE_H -#define VAE_H -#include "project_lib.h" -using namespace std; -extern string version_application; -#define name_app _("ubl-settings-diskquota") -#define configuring_system_boot _("Configuring system boot parameters") -#define system_boot _("System boot") -#define str_about _("About ubl-settings-diskquota") -#define command_line_parameters _("Command line parameters:") -#define load_default _("Load default:") -#define seconds _("seconds") -#define download_menu _("Download menu") -#define terminal_for_input _("Terminal for input") -#define terminal_for_output _("Terminal for output") -#define boot_selection_menu_timer _("Boot selection menu timer") -#define str_help _("Help") -#define str_about_1 _("About") -#define str_save_local _("Save") -#define str_load_local _("Load") -#define save_all _("Save in global and local configuration") -#define save_local _("Save in local configuration") -#define save_global _("Save in global configuration") -#define load_global _("Load global configuration") -#define load_local _("Load local configuration") -#define read_online _("Read online") -#define cancel _("Cancel") -#define always_redirect _("Always redirect") -#define boot_screen_display_mode _("Boot screen display mode:") -#define no_loading_animation _("No loading animation, full log") -#define boot_menu_user_name _("Boot menu user name:") -#define boot_menu_user_password _("Boot menu user password:") -#define last_successful_upload _("Last successful upload") -#define read_documentation_web _("Would you like to read documentation in the Web?") -#define redirected_documentation _("You will be redirected to documentation website where documentation is\ntranslated and supported by community.") -#define local_read_error _("Local configuration reading error") -#define global_read_error _("Global configuration read error") -#define local_write_error _("Local configuration write error") -#define global_write_error _("Global configuration write error") -#define error_save_all _("Error saved local and global configuration") -#define local_load_ok _("Local configuration downloaded successfully") -#define global_load_ok _("Global configuration downloaded successfully") -#define local_ok_written _("Local configuration successfully written") -#define global_ok_written _("Global configuration successfully written") -#define successfully_save_all _("Successfully saved local and global configuration") -#define nothing_save _("Nothing to save!") -#define program_as_root _("The program must be run as root") - -#define str_weeks _("weeks") -#define str_days _("days") -#define str_hours _("hours") -#define str_minutes _("minutes") -#define str_device _("Device:") -#define str_users _("Users") -#define str_groups _("Groups") -#define str_files _("files") -#define str_hard_limit _("Hard limit") -#define str_file_system _("File system:") -#define str_name _("Name") -#define str_size _("Size") -#define str_quotas_mode _("Direct control of the file system") -#define str_lb_head _("Setting user quotas") -#define str_soft_limit _("Soft limit") -#define str_currently_using _("Currently using:") -#define str_currently_using_space _("Currently using: ") -#define str_filters _("Filters") -#define str_quotas _("Quotas") -#define str_help_h _("GTK settings disk quota for UBLinux\n" \ - "\n" \ - "Usage: ubl-settings-diskquota [OPTIONS...]\n" \ - "Options:\n" \ - " -h, --help\t Show this help\n" \ - " -V, --version\t Show package version\n" \ - " --lock-help Lock utility help\n" \ - " --lock-save Lock saving local and global configuration\n" \ - " --lock-save-local Lock save global configuration\n" \ - " --lock-save-global Lock load global configuration\n" \ - " --lock-load-global Lock load global configuration\n") - -#define str_user _("User") -#define str_group _("Group") -#define str_projects _("Projects") -#define str_user_1 _("User:") -#define str_group_1 _("Group:") -#define str_project_1 _("Projects:") -#define str_device_project _("Device\nProject") -#define str_quota _("Quota type") -#define str_status _("Status") -#define str_excess_size_delay _("Excess size delay period") -#define str_excess_files_delay _("Excess files delay period") -#define str_disk_quotas_device _("Disk quotas for this device:") -#define str_user_quotas_device _("User quotas for this device: ") - -#define str_soft_limit_size _("Soft limit (size)") -#define str_tw_soft_limit _("Soft limit\n(size)") -#define str_hard_limit_size _("Hard limit (size)") -#define str_deferring_hard_limit_size _("Deferring a hard limit (size)") -#define str_hard_activation_size _("Hard limit activation time (size)") -#define str_hard_limit_time _("Hard limit (file) activation time") -#define str_group_quotas_device _("Group quotas for this device:") - -#define str_tw_severe_limitation _("Severe\nlimitation\n(size)") -#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)") -#define str_severe_limitation_files _("Severe limitation (files)") -#define str_deferring_limit_files _("Deferring a hard limit (files)") -#define info_box_ok_css "boxInfoMessOK" -#define info_box_error_css "boxInfoMessError" -#define icon_checked "com.ublinux.ubl-settings-diskquota.checked" -#define icon_warning "com.ublinux.ubl-settings-diskquota.warning" - -#define str_version _("ubl-settings-diskquota version: ") -#define path_app "/usr/bin/" -#define path_glade "/usr/share/ubl-settings-diskquota/ui/ubl-settings-diskquota.glade" -#define path_css "/usr/share/ubl-settings-diskquota/css/ubl-settings-diskquota.css" -#define app_name "ubl-settings-diskquota" -#define path_resources "/usr/share/ubl-settings-diskquota" -#define path_img_head_background "/usr/share/ubl-settings-diskquota/images/logo-background.png" -#define no_recognized _("Argument not recognized\n") - -#define str_device _("Device:") -#define str_quota_status _("Quota use status:") -#define str_size _("Size") -#define str_files _("files") -#define str_currently_using _("Currently using:") -#define str_soft_limit _("Soft limit") -#define str_hard_limit _("Hard limit") -#define str_hard_limit _("Hard limit") -#define str_prefix_KB _("Kb") -#define str_prefix_MB _("Mb") -#define str_prefix_GB _("Gb") -#define str_prefix_TB _("Tb") - -#define const_link_doc "https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/ubl-settings-diskquota" -#define cmd_xdg "xdg-open " -#define cmd_execute "su -l %s -c \" DISPLAY=$DISPLAY %s \"" - - -#define str_name _("Name") -#define str_size _("Size") -#define str_filters _("Filters") -#define str_quotas _("Quotas") -#define str_soft_limit_size _("Soft limit (size)") -#define str_hard_limit_size _("Hard limit (size)") -#define str_hard_limit_size_delay _("Hard limit (size) delay") -#define str_soft_limit_files _("Soft limit (files)") - -#define copyright _("Copyright © UBSoft LLC, 2022 - ") -#define str_setting_user _("Setting user quotas") -#define website _("https://wiki.ublinux.com") -#define project_Home_page _("Project Home Page") - -#define open_dir_file_manager "/home/" - - -#endif \ No newline at end of file diff --git a/source/view/model/ubconfig_quota.cc b/source/view/model/ubconfig_quota.cc deleted file mode 100644 index 653ff88..0000000 --- a/source/view/model/ubconfig_quota.cc +++ /dev/null @@ -1,39 +0,0 @@ -#include "ubconfig_quota.h" - - - -Ubconfig_quota::Ubconfig_quota(/* args */) -{ -} - -Ubconfig_quota::~Ubconfig_quota() -{ -} - -void Ubconfig_quota::set_map_global(map_str_str* map_global_cfg) { - this->map_global_cfg = map_global_cfg; -} - -void Ubconfig_quota::set_map_local(map_str_str* map_system_cfg) { - this->map_system_cfg = map_system_cfg; -} - -void Ubconfig_quota::remove_key_to_vec(string key) { - cout << key << endl; -} - -void Ubconfig_quota::add_key_to_vec(string key) { - cout << key << endl; -} - -void Ubconfig_quota::set_vec_key(vector* vec_param_names) { - this->vec_param_names = vec_param_names; -} - -void Ubconfig_quota::format_data() { - -} - - - - diff --git a/source/view/model/ubconfig_quota.h b/source/view/model/ubconfig_quota.h deleted file mode 100644 index 08d63ce..0000000 --- a/source/view/model/ubconfig_quota.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef UBCONFIG_QUOTAS_H -#define UBCONFIG_QUOTAS_H - -#include "../../my_type.h" -#include "../../project_lib.h" - -class Ubconfig_quota -{ -private: - map_str_str* map_gui_cfg = NULL; - map_str_str* map_global_cfg = NULL; - map_str_str* map_system_cfg = NULL; - vector* vec_param_names = NULL; - struct Size { - int size_0; - int size_1; - int size_2; - int size_3; - int size_4; - int size_5; - }; - struct User { - bool active; - string device; - vector users; - struct Size obj_size; - }; - struct Group { - bool active; - string device; - vector groups; - struct Size obj_size; - }; - struct Prjquota { - bool active; - string device; - vector prjquota_name; - struct Size obj_size; - }; - struct Quotas { - struct User obj_user; - struct Group obj_group; - struct Prjquota obj_prjquota; - }; -public: - Ubconfig_quota(/* args */); - ~Ubconfig_quota(); - void set_map_gui(map_str_str* map_gui_cfg); - void set_map_global(map_str_str* map_global_cfg); - void set_map_local(map_str_str* map_system_cfg); - void set_vec_key(vector* vec_param_names); - void remove_key_to_vec(string key); - void add_key_to_vec(string key); - void format_data(); - -}; - -#endif \ No newline at end of file diff --git a/source/view/model/ubl-utils.cc b/source/view/model/ubl-utils.cc new file mode 100644 index 0000000..6768f9e --- /dev/null +++ b/source/view/model/ubl-utils.cc @@ -0,0 +1,1663 @@ + +#include "ubl-utils.h" +static dictionary* __yon__config__strings = NULL; +#define check_config if(__yon__config__strings&&__yon__config__strings->data_type==DICTIONARY_CHAR_TYPE) + +// dictionary functions + +/**yon_dictionary_create_empty(): + * [EN] + * Creates and returns empty dictionary + * [RU] + * Создаёт и возвращает пустой словарь. + */ + + + +dictionary *yon_dictionary_new() +{ + dictionary *dict = (dictionary *)malloc(sizeof(dictionary)); + dict->data = NULL; + dict->key = NULL; + dict->next = NULL; + dict->prev = NULL; + dict->first = dict; + dict->data_type = DICTIONARY_OTHER_TYPE; + return dict; +} + +/**yon_dictionary_copy_deep(dictionary *dict) + * [EN] + * + * [RU] + * Создаёт и возвращает копию элемента словаря [dict] +*/ +dictionary *yon_dictinoary_copy(dictionary *dict){ + dictionary *dct = yon_dictionary_new_with_data(dict->key,dict->data); + dct->data_type= dict->data_type; + return dct; +} + +/**yon_dictionary_copy_deep(dictionary *dict) + * [EN] + * + * [RU] + * Создаёт полную копию словаря [dict] и возвращает первый элемент +*/ +dictionary *yon_dictionary_copy_deep(dictionary *dict){ + dictionary *dct = NULL; + dictionary *newone=NULL; + for_dictionaries(dct,dict){ + yon_dictionary_add_or_create_if_exists_with_data(newone,dct->key,dct->data); + newone->data_type=dct->data_type; + } + return newone->first; +} + +void yon_dictionary_set_data(dictionary *dict, void *data){ + dict->data=data; +} + +void yon_dictionary_set_key(dictionary *dict, char *key){ + dict->key=key; +} + +void yon_dictionary_set(dictionary *dict, char *key, void *data){ + dict->key=key; + dict->data=data; +} + +void yon_dictionary_empty(dictionary *dict){ + dict->data=NULL; + dict->data_type=DICTIONARY_OTHER_TYPE; +} + +/**yon_dictionary_switch_to_last(dictionary **dict) + * [EN] + * + * [RU] + * Переключает словарь [dict] на последний элемент. +*/ +void yon_dictionary_switch_to_last(dictionary **dict) +{ + dictionary *dct=NULL, *dact=*dict; + for_dictionaries(dct,dact); +} + +/**yon_dictionary_create_conneced(dictionary *targetdict) + * [EN] + * + * [RU] + * Создаёт новый элемент словаря [targetdict] +*/ +dictionary *yon_dictionary_append(dictionary *targetdict) +{ + targetdict = yon_dictionary_get_last(targetdict); + targetdict->next = yon_dictionary_new(); + targetdict->next->prev = targetdict; + targetdict->next->first = targetdict->first; + targetdict->next->data_type = DICTIONARY_OTHER_TYPE; + return targetdict->next; +} + +/**yon_dictionary_get_last(dictionary *dict) + * [EN] + * + * [RU] + * Возвращает последний элемент словаря [dict]. + * В отличае от yon_dictionary_switch_to_last() + * словарь [dict] остаётся на прежнем элементе. +*/ +dictionary *yon_dictionary_get_last(dictionary *dict) +{ + if (dict->next){ + dictionary *dct = NULL; + for_dictionaries(dct,dict); + return dct; + } else return dict; +} + +/**yon_dictionary_switch_places(dictionary *dict, int aim) + * [EN] + * + * [RU] + * Меняет элемент словаря [dict] местами с другим элементом. + * если [aim]<0 элемент меняется местами с левым элементом; + * если [aim]>0 элемент меняется местами с правым элементом; +*/ +dictionary *yon_dictionary_swap(dictionary *dict, int aim) +{ + if (aim < 0) + { + if (dict->prev) + { + if (dict->prev->prev) + { + dictionary *next = dict->next, *prev = dict->prev, *preprev = prev->prev; + if (next) + { + preprev->next = dict; + dict->prev = preprev; + dict->next = prev; + prev->prev = dict; + prev->next = next; + next->prev = prev; + } + else + { + preprev->next = dict; + dict->prev = preprev; + dict->next = prev; + prev->prev = dict; + prev->next = NULL; + } + return prev; + } + else + { + dictionary *next = dict->next, *prev = dict->prev; + if (next) + { + yon_dictionary_make_first(dict); + dict->prev = NULL; + dict->next = prev; + prev->prev = dict; + prev->next = next; + next->prev = prev; + } + else + { + dict->prev = NULL; + dict->next = prev; + prev->prev = dict; + prev->next = NULL; + } + return prev; + } + } + } + else if (aim > 0) + { + if (dict->next) + { + if (dict->next->next) + { + dictionary *next = dict->next, *prev = dict->prev, *afnext = next->next; + if (prev) + { + prev->next = next; + next->prev = prev; + next->next = dict; + dict->prev = next; + dict->next = afnext; + afnext->prev = dict; + } + else + { + yon_dictionary_make_first(next); + next->prev = NULL; + next->next = dict; + dict->prev = next; + dict->next = afnext; + afnext->prev = dict; + } + return next; + } + else + { + dictionary *next = dict->next, *prev = dict->prev; + if (prev) + { + prev->next = next; + next->prev = prev; + next->next = dict; + dict->prev = next; + dict->next = NULL; + } + else + { + next->prev = NULL; + next->next = dict; + dict->prev = next; + dict->next = NULL; + } + } + } + } + return dict; +} + +/**yon_dictionary_make_first(dictionary *dict) + * [EN] + * + * [RU] + * Устанавливает указатель первого элемента словаря [dict] + * на текущий элемент. Не использовать. +*/ +void yon_dictionary_make_first(dictionary *dict) +{ + for (dictionary *dct = dict->first; dct != NULL; dct = dct->next) + { + dct->first = dict; + } +} + +/**yon_dictionary_make_nth(dictionary *dict, int nth) + * [EN] + * + * [RU] + * Перемещает элемент словаря [dict] на позицию [nth]. +*/ +void yon_dictionary_make_nth(dictionary *dict, int nth) +{ + dictionary *dct = dict->first; + for (int i = 0; i < nth; i++) + { + if (dct == NULL) + return; + else + dct = dct->next; + } + yon_dictionary_rip(dict); + dictionary *prev = dct->prev; + prev->next = dict; + dict->prev = prev; + dict->next = dct; + dct->prev = dict; +} + +/**yon_dictionary_create_with_data(char *key, void *data) + * [EN] + * + * [RU] + * Создаёт новый словарь с ключом [key] и указателем на данные [data] +*/ +dictionary *yon_dictionary_new_with_data(char *key, void *data) +{ + dictionary *dct = yon_dictionary_new(); + dct->key = yon_char_new(key); + dct->data = data; + dct->data_type = DICTIONARY_OTHER_TYPE; + return dct; +} + +/** void *yon_dictionary_free_all(dictionary *dictionary,void *data_manipulation) + * [EN] + * Frees whole [dictionary] and activates [data_manipulation] function if not NULL with [dictionary]->data argument for each dictionary. + * [RU] + * Освобождает память для всех элементов словаря [dictionary] и активирует функцию [data_manipulation], если она была передана, с аргументом [dictionary]->data на каждый элемент словаря. +*/ +void *yon_dictionary_free_all(dictionary *dictionary_to_free,void (*data_manipulation)(void*)){ + dictionary *dict=NULL; + for_dictionaries(dict,dictionary_to_free){ + if(data_manipulation) + data_manipulation(dict->data); + if(dict->prev) + free(dict->prev); + } + free(dict); + return NULL; +} + +/**yon_dictionary_create_with_data_connected(dictionary *dict, char *key, void *data) + * [EN] + * + * [RU] + * Создаёт новый элемент словаря, присоединяемый в конец словаря [dict] + * с ключом [key] и указателем на данные [data] +*/ +dictionary *yon_dictionary_append_with_data(dictionary *dict, char *key, void *data) +{ + dictionary *dct = yon_dictionary_append(dict); + dct->key = yon_char_new(key); + dct->data = data; + dct->data_type = DICTIONARY_OTHER_TYPE; + return dct; +} + +/**yon_dictionary_connect(dictionary *old, dictionary *toconnect) + * [EN] + * + * [RU] + * Присоединяет словарь [toconnect] в конец словаря [old]. +*/ +dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect) +{ + dictionary *dict = yon_dictionary_get_last(old); + dict->next = toconnect; + toconnect->prev = dict; + toconnect->first = dict->first; + return toconnect; +} + +/**yon_dictionary_get(dictionary **dict, char *key) + * [EN] + * + * [RU] + * Возвращает элемент словаря [dict] с ключом [key]. + * Если такого элемента не было обнаружено, возвращается NULL +*/ +dictionary *yon_dictionary_get(dictionary **dict, char *key) +{ + dictionary *dct = *dict; + for (dictionary *pointer = dct->first; pointer != NULL; pointer = pointer->next) + { + if (strcmp(pointer->key, key) == 0) + { + *dict = pointer; + return pointer; + } + } + return NULL; +} + +/**yon_dictionary_rip(dictionary *dict) + * [EN] + * + * [RU] + * Вырезает элемент из словаря и возвращает вырезанный элемент. +*/ +dictionary *yon_dictionary_rip(dictionary *dict) +{ + if (!dict->next&&!dict->prev) return NULL; + else if (!dict->next) + { + dictionary *prev = dict->prev; + if (prev) + { + prev->next = NULL; + return prev; + } + else + return dict; + } + else if (!dict->prev) + { + dictionary *next = dict->next; + if (next) + { + yon_dictionary_make_first(next); + next->prev = NULL; + return next; + } + else + return dict; + } + else + { + dictionary *next = dict->next, *prev = dict->prev; + next->prev = prev; + prev->next = next; + return next; + } +} + +/**yon_dictionary_get_nth(dictionary *dict, int place) + * [EN] + * + * [RU] + * Возвращает [place]-й элемент словаря [dict] +*/ +dictionary *yon_dictionary_get_nth(dictionary *dict, int place) +{ + if (dict){ + dict = dict->first; + int i = 0; + for (i = 0; i < place; i++) + if (dict->next) + dict = dict->next; + else + break; + if (i == place) + return dict; + else + return NULL; + } else return NULL; +} + +// char functions + +/**[EN] + * + * creates new char string by combining two char strings. + */ +char *yon_char_append(char *source, char *append) +{ + if (source && append) + { + int size = strlen(source) + strlen(append) + 1; + char *final = (char*)malloc(size); + memset(final, 0, size); + if (strstr(source, "%%")) + sprintf(final, source, append); + else + sprintf(final, "%s%s", source, append); + return final; + } + else + return NULL; +} + +/**[EN] + * + * creates new char string by copying another char. + */ +char *yon_char_new(char *chr) +{ + if (chr){ + char *newchar = (char*)malloc(strlen(chr) + 1); + memset(newchar, 0, strlen(chr) + 1); + memcpy(newchar, chr, strlen(chr)); + return newchar; + } else + return NULL; +} + +// char *yon_char_unite(char *source, ...) + +char *yon_char_unite(char *source, ...){ + va_list arglist; + char *new_char=NULL; + char *unite_char=NULL; + new_char=yon_char_new(source); + va_start(arglist,source); + unite_char = va_arg(arglist,char*); + while(unite_char){ + new_char = yon_char_append(new_char,unite_char); + unite_char = va_arg(arglist,char*); + } + va_end(arglist); + return new_char; +} + +/**yon_cut(char *source, int size, int startpos) + * [EN] + * cuts source string by size length from startpos position. + */ +char *yon_cut(char *source, int size, int startpos) +{ + char *cut = NULL; + cut = (char*)malloc(size + 1); + memset(cut, 0, size + 1); + memcpy(cut, source + startpos, size); + return cut; +} + +/**yon_char_divide(char *source, int dividepos) + * [EN] + * divides source string in dividepos position, + * returning left part of divided string and + * inserting right part to source string. + */ +char *yon_char_divide(char *source, int dividepos) +{ + char *cut = (char*)malloc(dividepos + 1); + memset(cut, 0, dividepos + 1); + memcpy(cut, source, dividepos); + char *left = (char*)malloc(strlen(source) - strlen(cut)); + memset(left, 0, strlen(source) - strlen(cut)); + memcpy(left, source + dividepos + 1, (strlen(source) - dividepos)); + memset(source, 0, strlen(source)); + memcpy(source, left, strlen(left)); + return cut; +} + +int yon_char_find_count(char *source, char *find){ + char *working_string=yon_char_new(source); + int i=0; + int size=0; + config_str rtn = yon_char_parse(working_string,&size,(char*)"\n"); + for (int j=0;j= 10; i++) + { + convert_check = convert_check / 10; + } + char *ch = (char*)g_malloc0(i * sizeof(char) + 1); + sprintf(ch, "%d", int_to_convert); + return ch; +} + +/**yon_char_replace(char *source, char *find, char*replace) + * [EN] + * + * [RU] + * Заменяет в строке [source] все вхождения строки [find] на [replace] +*/ +char *yon_char_replace(char *source, char *find, char*replace){ + char *final=NULL; + char *temp=NULL; + if(!strstr(replace,find)){ + while ((final=strstr(source,find))){ + temp=(char*)malloc(strlen(source)-strlen(final)); + memset(temp,0,strlen(source)-strlen(final)+strlen(replace)); + memcpy(temp,source,strlen(source)-strlen(final)); + temp=yon_char_append(temp,replace); + source=yon_char_append(temp,final+1); + } + return source; + } + return source; +} + +/**[EN] + * char **yon_char_parse(char *parameters, int *size, char *divider) + * Parses string [parameters], divided by [divider], + * then returns parsed string array and sets [size] to + * size of returned array +*/ +char **yon_char_parse(char *parameters, int *size, char *divider){ + char **string=NULL; + int i=1; + string=(char**)malloc(sizeof(char*)); + char *paramline=yon_char_new(parameters); + char *param; + while ((param=yon_char_divide_search(paramline,divider,1))){ + string=(char**)realloc(string,sizeof(char*)*i); + string[i-1]=yon_char_new(param); + i++; + if (strcmp(param,paramline)==0) break; + } + string=(char**)realloc(string,sizeof(char*)*i); + string[i-1]=yon_char_new(paramline); + i++; + // printf("%d\n",i); + *size=i-1; + return string; + +} + +/**yon_char_parsed_rip(char **char_string, int *size, int item_to_delete) + * [EN] + * + * [RU] + * Удаляет элемент [item_to_delete] из массива строк [char_string], размера [size] + * Возвращает получившийся массив, в [size] загружается размер нового массива. +*/ +char **yon_char_parsed_rip(char **char_string, int *size, int item_to_delete){ + char **new_char_parsed=NULL; + new_char_parsed=(char**)malloc(sizeof(char*)*((*size)-1)); + int flag = 0; + for (int i=0;i < (*size);i++){ + if (i==item_to_delete) { + flag = 1; + } + if (flag == 0) { + new_char_parsed[i]=yon_char_new(char_string[i]); + } + else if (flag == 1 && i!=item_to_delete) { + new_char_parsed[i-1]=yon_char_new(char_string[i]); + } + } + (*size)=(*size)-1; + return new_char_parsed; +} + +/**yon_char_parsed_check_exist(char **parameters, int size, char *param) + * [EN] + * Checks if [parameters] string array of length [size] + * has [param] element; + * [RU] + * Проверяет есть ли в массиве строк [parameters], размера [size] + * элемент [param] +*/ +int yon_char_parsed_check_exist(char **parameters, int size, char *param){ + + for (int i=0;id_name); +// if (strlen(de->d_name) > 9) +// { +// char *extension = strstr(path, "."); +// if (extension != NULL) +// { +// if (strcmp(extension, ".desktop") == 0) +// { +// apps tempapp; +// GKeyFile *gfile = g_key_file_new(); +// GError *err = NULL; +// g_key_file_load_from_file(gfile, path, G_KEY_FILE_KEEP_TRANSLATIONS, NULL); +// char *Type = g_key_file_get_string(gfile, "Desktop Entry", "Type", &err); +// if (err) +// { +// printf("%s\n", err->message); +// } +// if (strcmp(Type, "Application") == 0) +// tempapp.Type = 1; +// else if (strcmp(Type, "pyApplication") == 0) +// tempapp.Type = 2; +// else +// continue; +// tempapp.Name = g_key_file_get_locale_string(gfile, "Desktop Entry", "Name", setlocale(LC_ALL, NULL), NULL); +// if (tempapp.Name == NULL) +// continue; +// tempapp.Categories = g_key_file_get_string(gfile, "Desktop Entry", "Categories", NULL); +// if (tempapp.Categories == NULL) +// continue; +// tempapp.Exec = g_key_file_get_string(gfile, "Desktop Entry", "Exec", NULL); +// if (tempapp.Exec == NULL) +// continue; +// tempapp.Icon = g_key_file_get_string(gfile, "Desktop Entry", "Icon", NULL); +// if (tempapp.Icon == NULL) +// continue; +// tempapp.Pluggable = g_key_file_get_boolean(gfile, "Desktop Entry", "Pluggable", NULL); +// if (!tempapp.Pluggable) +// tempapp.Pluggable = g_key_file_get_boolean(gfile, "Desktop Entry", "X-XfcePluggable", NULL); +// if (tempapp.Pluggable) +// tempapp.DualPluggable = g_key_file_get_boolean(gfile, "Desktop Entry", "X-UBLPluggable", NULL); +// if (g_key_file_get_boolean(gfile, "Desktop Entry", "X-UBL-SettingsManager-Hidden", NULL) == 0){ +// if (size == 0) +// { +// applist = (apps *)malloc(size + 1 * sizeof(apps)); +// applist[0].Name = yon_char_new(tempapp.Name); +// applist[0].Categories = yon_char_new(tempapp.Categories); +// applist[0].Exec = yon_char_new(tempapp.Exec); +// applist[0].Icon = yon_char_new(tempapp.Icon); +// applist[0].Type = tempapp.Type; +// applist[0].Pluggable = tempapp.Pluggable; +// applist[0].DualPluggable = tempapp.DualPluggable; +// size++; +// } +// else +// { +// applist = (apps *)realloc(applist, (size + 1) * sizeof(apps)); +// applist[size].Name = yon_char_new(tempapp.Name); +// applist[size].Categories = yon_char_new(tempapp.Categories); +// applist[size].Exec = yon_char_new(tempapp.Exec); +// applist[size].Icon = yon_char_new(tempapp.Icon); +// applist[size].Pluggable = tempapp.Pluggable; +// applist[size].DualPluggable = tempapp.DualPluggable; +// applist[size].Type = tempapp.Type; +// size++; +// } +// } +// } +// } +// } +// } +// } +// *sizef = size; +// return applist; +// }; + +void yon_apps_sort(apps *applist, int size) +{ + apps tmp; + if (size > 2) + { + for (int i = 1; i < size; i++) + { + for (int j = 1; j < size; j++) + { + if (strcmp(applist[j].Name, applist[j - 1].Name) < 0) + { + tmp = applist[j]; + applist[j] = applist[j - 1]; + applist[j - 1] = tmp; + }; + } + }; + } +}; + +apps *yon_apps_get_by_name(apps *applist, char *name, int size) +{ + for (int i = 0; i < size; i++) + { + if (strcmp(applist[i].Name, name) == 0) + return &applist[i]; + } + return NULL; +}; + +//config functions + +/**yon_config_load_register(char *command) + * [EN] + * + * [RU] + * Выполняет команду [command]. + * Полученные данные парсятся и регистрируются в конфиг. +*/ + +int yon_config_load_register(char *command){ + if (__yon__config__strings){ + __yon__config__strings = (dictionary *)yon_dictionary_free_all(__yon__config__strings,NULL); + } + FILE *output = popen(command, "r"); + //char **output_strings = (char **)malloc(sizeof(char)); + // int i = 0; + char str[4096]; + memset(str, 0, 4096); + while (fgets(str, 4096, output)) + { + if (strcmp(str, "") != 0&& strcmp(str,"(null)\n")!=0) + { + char *key = yon_char_divide_search(str,(char*)"=",-1); + yon_dictionary_add_or_create_if_exists_with_data(__yon__config__strings,key,str); + __yon__config__strings->data_type=DICTIONARY_CHAR_TYPE; + } + } + check_config + return 0; + else return 1; +} + +/**yon_config_remove_by_key(char *key) + * [EN] + * + * [RU] + * Удаляет параметр конфига по ключу [key] +*/ +int yon_config_remove_by_key(char *key){ + check_config{ + dictionary *dict = yon_dictionary_get(&__yon__config__strings,key); + if (dict){ + yon_dictionary_rip(dict); + return 1; + }else return 0; + } + return 0; +} + +/**yon_config_remove_by_data(void *data) + * [EN] + * + * [RU] + * Производит поиск по конфигу на наличие параметра со значением [data] и удаляет найденное значение из конфига. +*/ +int yon_config_remove_by_data(void *data){ + check_config{ + dictionary *dict = NULL; + for_dictionaries(dict,__yon__config__strings){ + if (dict->data==data){ + yon_dictionary_rip(dict); + return 1; + } + } + return 0; + } + return 0; +} + +/**yon_config_remove_element(char *key, char *deleted) + * [EN] + * + * [RU] + * Удаляет элемент [deleted] из массива параметров с ключом [key] +*/ +int yon_config_remove_element(char *key, char *deleted){ + check_config{ + dictionary *dict = yon_dictionary_get(&__yon__config__strings,key); + char *data = (char*)dict->data; + char *found = strstr(data,deleted); + int size=strlen(data)-strlen(found)+1; + char *new_data = (char*)malloc(size); + memset(new_data,0,size); + if (strlen(found)!=strlen(deleted)){ + memcpy(new_data,data,size-1); + new_data = yon_char_append(new_data,found+strlen(deleted)+1); + } else { + memcpy(new_data,data,size-2); + new_data = yon_char_append(new_data,found+strlen(deleted)); + } + dict->data=(void*)(new_data); + free(data); + dict->flag1=1; + return 1; + } else return 0; +} + +/**yon_config_get_by_key(char *key) + * [EN] + * + * [RU] + * Возвращает значение параметра конфига с ключом [key] +*/ +void *yon_config_get_by_key(char *key){ + check_config{ + dictionary *dict = NULL; + for_dictionaries(dict, __yon__config__strings){ + if (strcmp(dict->key,key)==0){ + return dict->data; + } + } + } + return NULL; +} + +/**yon_config_get_key_by_data(char *data) + * [EN] + * + * [RU] + * Возвращает ключ параметра конфига со значением [data]. + * Если параметр с таким значением не найден, возвращается NULL +*/ +char *yon_config_get_key_by_data(char *data){ + check_config{ + dictionary *dict = NULL; + for_dictionaries(dict, __yon__config__strings){ + if (strcmp(((char*)dict->data),data)==0){ + return dict->key; + } + } + } + return NULL; +} + +/**yon_config_set(char *key, void *data) + * [EN] + * + * [RU] + * Производит поиск по конфигу и заменяет значение параметра с ключом [key] на новое значение [data]; +*/ +int yon_config_set(char *key, void *data){ + check_config{ + dictionary *dict = yon_dictionary_get(&__yon__config__strings,key); + dict->data=data; + return 1; + } else return 0; +} + +/**yon_config_clean() + * [EN] + * Erase all parameters from config; + * [RU] + * Удаляет все параметры из конфига; +*/ +int yon_config_clean(){ + check_config{ + __yon__config__strings = (dictionary *)yon_dictionary_free_all(__yon__config__strings, NULL); + return 1; + } + else return 0; +} + +/**yon_config_register(char *key, void *data) + * [EN] + * + * [RU] + * Регистрирует новый параметр конфига. + * [key] - ключ параметра; + * [data] - значение параметра; +*/ +void yon_config_register(char *key, void *data){ + yon_dictionary_add_or_create_if_exists_with_data(__yon__config__strings,key,data); + __yon__config__strings->data_type=DICTIONARY_CHAR_TYPE; +} + +/**yon_config_load(char *command, int *str_len) + * [EN] + * + * [RU] + * Выполняет команду [command] и возвращает распаршеный результат выполнения команды. + * В [str_len] возвращается длина возвращаемого массива +*/ +config_str yon_config_load(char *command, int *str_len){ + FILE *output = popen(command, "r"); + char **output_strings = NULL; + output_strings = (char**)malloc(sizeof(char)); + int i = 0; + char str[4096]; + memset(str, 0, 4096); + while (fgets(str, 4096, output)) + { + if (strcmp(str, "") != 0) + { + output_strings = (char**)realloc(output_strings, sizeof(char *) * (i + 1)); + // printf("%s\n", str); + output_strings[i] = NULL; + output_strings[i] = yon_char_new(str); + memset(str, 0, 4096); + i++; + } + } + if (i>0){ + *str_len = i; + return output_strings; + } else{ + *str_len=-1; + return NULL; + } +} + +/**int yon_config_save(char *command) + * [EN] + * Saves config with [command] + * [RU] + * Выполняет команду [command], добавляя в конец все записи конфига в таком виде: + * [ПАРАМЕТР1]="[значения1]" [ПАРАМЕТР2]="[значения2]" +*/ +int yon_config_save(char *command){ + check_config{ + dictionary *dict = NULL; + for_dictionaries(dict,__yon__config__strings){ + command = yon_char_unite(command, (char*)" ", yon_dictionary_get_data(dict,char*), NULL); + } + if (popen(command, "r")) return 1; + else return 0; + } else return 0; +} + +// /**yon_config_get_all(int *size) +// * [EN] +// * +// * [RU] +// * Возвращает массив со всеми параметрами конфига, оканчивающаяся NULL +// * [size] - указатель, в который выгружается длина массива +// */ +// config_str yon_config_get_all(int *size){ +// if (size) {} +// check_config{ +// *size = 1; +// config_str conf = NULL; +// dictionary *dict = NULL; +// for_dictionaries(dict,__yon__config__strings){ +// conf = yon_remalloc(conf,sizeof(char*)*(*size)); +// conf[(*size)-1] = yon_char_unite(dict->key,"=",(char*)dict->data,NULL); +// size++; +// } +// conf = yon_remalloc(conf,sizeof(char*)*(*size+1)); +// conf[*size] = NULL; +// return conf; +// } else return NULL; +// } + +/**[EN] + * int yon_config_save(char *command) + * Saves config with [command] + * [RU] + * Выполняет команду [command] +*/ +// int yon_config_save(char *command) +// { +// FILE *output = popen(command, "r"); +// return 1; +// } + +/**char *yon_config_get_parameter(config parameter" "s, int size, char *param) + * [EN] + * Gets parameter [param] from parameter list [parameters] of size [size]; + * or NULL if nothing were found + * [RU] + * Возвращает параметр [param] из массива строк [parameters] размером [size] + * или NULL если такой не был найден +*/ +char *yon_config_get_parameter(config_str parameters, int size, char *param) +{ + if (param[0]==' ') + yon_char_divide_search(param,(char*)" ",-1); + param=yon_char_divide_search(yon_char_new(param),(char*)" ",-1); + + char *str = NULL; + for (int j = 0; j < size; j++) + { + char *name = yon_char_divide_search(yon_char_new(parameters[j]), (char*)"=", 1); + if (name) + { + if (strcmp(name, param) == 0) + { + str = yon_char_divide_search(yon_char_new(parameters[j]), (char*)"\n", 1); + if (strcmp(str, "") != 0 && strcmp(str, (char*)"(null)") != 0) + return str; + else + return NULL; + } + } + } + return NULL; +} + + + +// terminal-using functions + +/**yon_launch_app_with_arguments(char *name, char *args) + * [EN] + * Execute [command] in separate thread; + * [RU] + * Выполнить команду [command] в отдельном потоке; +*/ +void yon_launch_app_with_arguments(char *name, char *args) +{ + char *path = yon_char_unite((char*)"/usr/bin/", name, (char*)" ", args,NULL); + pthread_t thread_id; + char *command = NULL; + command = path; + pthread_create(&thread_id, NULL, (void* (*)(void *))yon_launch, command); +}; + +/**yon_launch(char *command) + * [EN] + * Execute command [command] + * [RU] + * Выполнить команду [command] +*/ +void* yon_launch(void *command) +{ + if (system((char*)command)){} + return NULL; +} + +// Gtk functions + + +#ifdef __GTK_H__ + + +static render_data render; + +#ifdef VTE_TERMINAL + +static void child_ready(VteTerminal *terminal, GPid pid, GError *error, gpointer user_data) +{ + if (!terminal) return; + if (pid == -1) printf("Error\n\n\n"); + else vte_terminal_feed_child(VTE_TERMINAL(terminal),(char*)user_data,strlen((char*)user_data)); +} + +/** + * void yon_terminal_integrated_launch(GtkWidget *place_to_show, void *endwork_function, void* endwork_function_argument) + * [EN] + * launches terminal with specific [command], + * terminal is shown in [place_to_show] container, + * after terminal done its work [endwork_function] is called with [endwork_function_argument] argument. + * [RU] + * Запускает терминал с командой [command], + * терминал добавляется в контейнер [place_to_show] виджета, + * после завершения работы терминала вызывается функция [endwork_function] с аргументом [endwork_function_argument]. +*/ +void yon_terminal_integrated_launch(GtkWidget *place_to_show, char* command, void *endwork_function, void* endwork_function_argument){ + char **commands=new_arr(char*,2); + gchar **envp = g_get_environ(); + commands[0]=(gchar *)g_strdup(g_environ_getenv(envp, "SHELL")); + commands[1]=NULL; + char **env=new_arr(char*,2); + env[0]=""; + env[1]=NULL; + GtkWidget *terminal = vte_terminal_new(); + vte_terminal_set_size(VTE_TERMINAL(terminal),10,15); + VtePty *pty = vte_pty_new_sync(VTE_PTY_DEFAULT,NULL,NULL); + vte_terminal_set_pty(VTE_TERMINAL(terminal),pty); + gtk_container_add(GTK_CONTAINER(place_to_show),terminal); + char *install_command=yon_char_unite("tput cup 0 0 && tput ed; ",command," ; sleep 5;exit 0","\n",NULL); + printf("%s\n",install_command); + if(endwork_function) + g_signal_connect(G_OBJECT(terminal), "child-exited", G_CALLBACK(endwork_function), endwork_function_argument); + vte_terminal_spawn_async(VTE_TERMINAL(terminal), + VTE_PTY_DEFAULT, + NULL, + commands, + NULL, + 0, + NULL, NULL, + NULL, + -1, + NULL, + child_ready, + install_command); + vte_pty_spawn_async(pty, + NULL, + commands, + NULL, + 0, + NULL, NULL, + NULL, + -1, + NULL, + NULL, + NULL); + vte_terminal_set_scrollback_lines(VTE_TERMINAL(terminal), -1); + vte_terminal_set_scroll_on_output(VTE_TERMINAL(terminal), TRUE); + vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(terminal), TRUE); + gtk_widget_show_all(terminal); + } + +/**yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *endwork_function, void* endwork_function_argument) + * [EN] + * launches terminal with specific [command], + * terminal is shown in [place_to_show] container, + * after terminal done its work [endwork_function] is called with [endwork_function_argument] argument. + * [RU] + * Запускает терминал с командой [command], + * терминал добавляется в контейнер [place_to_show] виджета, + * после завершения работы терминала вызывается функция [endwork_function] с аргументом [endwork_function_argument]. +*/ +void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *endwork_function, void* endwork_function_argument){ + char **commands=new_arr(char*,2); + gchar **envp = g_get_environ(); + commands[0]=(gchar *)g_strdup(g_environ_getenv(envp, "SHELL")); + commands[1]=NULL; + char **env=new_arr(char*,2); + env[0]=""; + env[1]=NULL; + vte_terminal_set_size(VTE_TERMINAL(terminal),10,15); + VtePty *pty = vte_pty_new_sync(VTE_PTY_DEFAULT,NULL,NULL); + vte_terminal_set_pty(VTE_TERMINAL(terminal),pty); + char *install_command=yon_char_unite("tput cup 0 0 && tput ed; ",command," ; sleep 5;exit 0","\n",NULL); + if(endwork_function) + g_signal_connect(G_OBJECT(terminal), "child-exited", G_CALLBACK(endwork_function), endwork_function_argument); + vte_terminal_spawn_async(VTE_TERMINAL(terminal), + VTE_PTY_DEFAULT, + NULL, + commands, + NULL, + 0, + NULL, NULL, + NULL, + -1, + NULL, + child_ready, + install_command); + vte_pty_spawn_async(pty, + NULL, + commands, + NULL, + 0, + NULL, NULL, + NULL, + -1, + NULL, + NULL, + NULL); + vte_terminal_set_scrollback_lines(VTE_TERMINAL(terminal), 100); + vte_terminal_set_scroll_on_output(VTE_TERMINAL(terminal), TRUE); + vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(terminal), TRUE); + gtk_widget_show_all(terminal); + } +#endif + // Window config functions + #define check_window_config_setup if(__yon_window_config_target_window) + struct { + int x; + int y; + int width; + int height; + int fullscreen; + } __yon_main_window_config; + static GtkWindow *__yon_window_config_target_window = NULL; + static GKeyFile *__yon_window_config_file = NULL; + static char *__yon_window_config_path = NULL; + + void yon_window_config_save(){ + g_key_file_set_integer(__yon_window_config_file,"window","WindowPosX",__yon_main_window_config.x); + g_key_file_set_integer(__yon_window_config_file,"window","WindowPosY",__yon_main_window_config.y); + g_key_file_set_integer(__yon_window_config_file,"window","WindowWidth",__yon_main_window_config.width); + g_key_file_set_integer(__yon_window_config_file,"window","WindowHeight",__yon_main_window_config.height); + g_key_file_set_integer(__yon_window_config_file,"window","fullscreen",__yon_main_window_config.fullscreen); + g_key_file_save_to_file(__yon_window_config_file,__yon_window_config_path,NULL); + } + + void yon_get_is_fullscreen(){ + gtk_window_is_maximized(__yon_window_config_target_window); + __yon_main_window_config.fullscreen = gtk_window_is_maximized(__yon_window_config_target_window); + } + + + void yon_on_configured_window_destroy(GtkWidget* self,GdkEvent* event){ + if (self && event){} + check_window_config_setup{ + yon_get_is_fullscreen(); + yon_window_config_save(); + } + gtk_main_quit(); + } + + void __yon_window_config_on_resize(){ + int max=0; + max=gtk_window_is_maximized(__yon_window_config_target_window); + if(max==0){ + gtk_window_get_size(__yon_window_config_target_window,&__yon_main_window_config.width,&__yon_main_window_config.height); + gtk_window_get_position(__yon_window_config_target_window,&__yon_main_window_config.x,&__yon_main_window_config.y); + } + } + + void yon_window_config_setup(GtkWindow *window){ + __yon_window_config_target_window = window; + g_signal_connect(G_OBJECT(window),"delete-event",G_CALLBACK(yon_on_configured_window_destroy),NULL); + g_signal_connect(G_OBJECT(window),"check-resize"/*"configure-event"*/,G_CALLBACK(__yon_window_config_on_resize),NULL); + } + + void* _yon_maximize(void *data){ + if (data){} + g_usleep(G_USEC_PER_SEC/10); + if(__yon_main_window_config.fullscreen ==1) gtk_window_maximize(__yon_window_config_target_window); + return NULL; + } + + int yon_window_config_load(char *path){ + __yon_window_config_file = g_key_file_new(); + __yon_window_config_path=yon_char_new(path); + if (!g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL)){ + struct stat st; + int size; + config_str conf = yon_char_parse(yon_char_new(__yon_window_config_path),&size,(char*)"/"); + char *path = yon_char_unite(conf[0],"/",conf[1],"/",conf[2],"/",conf[3],"/",conf[4],"/",NULL); + if (stat(path, &st) == -1) { + mkdir(path, 0777); + } + FILE *fp; + fp=fopen(__yon_window_config_path,"w"); + fclose(fp); + g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL); + } + __yon_main_window_config.x = g_key_file_get_integer(__yon_window_config_file,"window","WindowPosX",NULL); + __yon_main_window_config.y = g_key_file_get_integer(__yon_window_config_file,"window","WindowPosY",NULL); + __yon_main_window_config.width = g_key_file_get_integer(__yon_window_config_file,"window","WindowWidth",NULL); + __yon_main_window_config.height = g_key_file_get_integer(__yon_window_config_file,"window","WindowHeight",NULL); + __yon_main_window_config.fullscreen = g_key_file_get_integer(__yon_window_config_file,"window","fullscreen",NULL); + if (__yon_main_window_config.width==0) __yon_main_window_config.width=800; + if (__yon_main_window_config.height==0) __yon_main_window_config.height=600; + gtk_window_resize(__yon_window_config_target_window,__yon_main_window_config.width,__yon_main_window_config.height); + gtk_window_move(__yon_window_config_target_window,__yon_main_window_config.x,__yon_main_window_config.y); + pthread_t tid; + pthread_create(&tid,NULL,&_yon_maximize,NULL); + return 1; + } + + void yon_window_config_apply(){ + // dictionary *dict=NULL; + gtk_window_move(__yon_window_config_target_window,__yon_main_window_config.x,__yon_main_window_config.y); + gtk_window_resize(__yon_window_config_target_window,__yon_main_window_config.width,__yon_main_window_config.height); + } + +int yon_gtk_combo_box_text_fill(GtkWidget *combo, config_str parameters,int size){ + if (combo&¶meters){ + for (int i=0;imessage); + g_error_free(err); + } + if (type == BACKGROUND_IMAGE_SUCCESS_TYPE||! type) + { + gtk_style_context_remove_class(gtk_widget_get_style_context(data.box), "boxInfoMessError"); + gtk_style_context_add_class(gtk_widget_get_style_context(data.box), "boxInfoMessOK"); + gtk_image_set_from_pixbuf(GTK_IMAGE(data.icon), gtk_icon_theme_load_icon_for_scale(ictheme, "com.ublinux.ubl-settings-video.checked", 25, 1, GTK_ICON_LOOKUP_FORCE_SIZE, &err)); + } + else if (type == BACKGROUND_IMAGE_FAIL_TYPE) + { + gtk_style_context_remove_class(gtk_widget_get_style_context(data.box), "boxInfoMessOK"); + gtk_style_context_add_class(gtk_widget_get_style_context(data.box), "boxInfoMessError"); + gtk_image_set_from_pixbuf(GTK_IMAGE(data.icon), gtk_icon_theme_load_icon_for_scale(ictheme, "com.ublinux.ubl-settings-video.warning", 25, 1, GTK_ICON_LOOKUP_FORCE_SIZE, &err)); + } + if (text) + gtk_label_set_text(GTK_LABEL(data.label), text); +} + +void yon_ubl_status_box_render(char *text, BACKGROUND_IMAGE_TYPE type){ + _yon_ubl_status_box_render(text,type); +} + +/**yon_ubl_setup_sockets(GtkWidget *main_window, GtkWidget *left_window, GtkWidget *right_window, int socket_main_id, int socket_left_id, int socket_right_id) + * [EN] + * Set up plugs for using with GtkSockets insine ubl-settings-manager. + * [main_window] is container widget, which holds main application functionality. + * [left_window] is container widget, which holds widgets, have to be shown at left part of ubl-settings-manager header. + * [right_window] is container widget, which holds widgets, have to be shown at right part of ubl-settings-manager header. + * [socket_main_id] is id of socket for [main_window]. + * [socket_left_id] is id of socket for [left_window]. + * [socket_right_id] is id of socket for [right_window]. + * [RU] + * Настраивает плаги для работы с сокетами в утилите ubl-settings-manager. + * [main_window] - контейнер основного интерфейса приложения. + * [left_window] - контейнер для виджетов которые должны отображаться в левой части шапки ubl-settings-manager. + * [right_window] - контейнер для виджетов которые должны отображаться в правой части шапки ubl-settings-manager. + * [socket_main_id] - id сокета для [main_window]. + * [socket_left_id] - id сокета для [left_window]. + * [socket_right_id] - id сокета для [right_window]. +*/ +void yon_ubl_setup_sockets(GtkWidget *main_window, GtkWidget *left_window, GtkWidget *right_window, int socket_main_id, int socket_left_id, int socket_right_id){ + if (main_window&&socket_main_id>-1){ + gtk_widget_hide(gtk_widget_get_toplevel(main_window)); + GtkWidget *plug_main=gtk_plug_new(socket_main_id); + GtkWidget *plug_left=NULL; + GtkWidget *plug_right=NULL; + GtkWidget *box=NULL; + g_signal_connect(G_OBJECT(plug_main), "destroy", G_CALLBACK(gtk_main_quit),NULL); + if (socket_left_id>-1&&left_window){ + plug_left=gtk_plug_new(socket_left_id); + g_object_ref(left_window); + gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(left_window)),left_window); + gtk_container_add(GTK_CONTAINER(plug_left),left_window); + gtk_style_context_add_class(gtk_widget_get_style_context(plug_left),"primary-toolbar"); + gtk_style_context_add_class(gtk_widget_get_style_context(left_window),"button"); + gtk_style_context_add_class(gtk_widget_get_style_context(left_window),"opacited"); + gtk_style_context_add_class(gtk_widget_get_style_context(left_window),"color"); + gtk_style_context_add_class(gtk_widget_get_style_context(plug_left),"noborder"); + gtk_widget_show(plug_left); + } + else if (left_window){ + if (box==NULL){ + box=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5); + gtk_box_pack_start(GTK_BOX(main_window),box,0,0,5); + gtk_box_reorder_child(GTK_BOX(main_window),box,0); + gtk_widget_show(box); + } + gtk_style_context_add_class(gtk_widget_get_style_context(left_window),"inherited"); + gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(left_window)),left_window); + gtk_box_pack_end(GTK_BOX(box),left_window,0,0,5); + } + if (socket_right_id>-1&&right_window){ + plug_right=gtk_plug_new(socket_right_id); + g_object_ref(right_window); + gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(right_window)),right_window); + gtk_container_add(GTK_CONTAINER(plug_right),right_window); + gtk_style_context_add_class(gtk_widget_get_style_context(plug_right),"primary-toolbar"); + gtk_style_context_add_class(gtk_widget_get_style_context(right_window),"button"); + gtk_style_context_add_class(gtk_widget_get_style_context(right_window),"opacited"); + gtk_style_context_add_class(gtk_widget_get_style_context(right_window),"color"); + gtk_style_context_add_class(gtk_widget_get_style_context(plug_right),"noborder"); + gtk_widget_show(plug_right); + } + else if (right_window){ + if (box==NULL){ + box=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5); + gtk_box_pack_start(GTK_BOX(main_window),box,0,0,5); + gtk_box_reorder_child(GTK_BOX(main_window),box,0); + gtk_widget_show(box); + } + gtk_style_context_add_class(gtk_widget_get_style_context(right_window),"inherited"); + gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(right_window)),right_window); + gtk_box_pack_start(GTK_BOX(box),right_window,0,0,5); + } + g_object_ref(main_window); + gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(main_window)),main_window); + gtk_container_add(GTK_CONTAINER(plug_main),main_window); + gtk_widget_show(plug_main); + } +} + +#ifdef WEBKIT_FOUND + +/**yon_ubl_browser_window_open(char *link, char *browser_window_name) + * [EN] + * Launches integrated browser window, named [browser_window_name] at header with [link]. + * [RU] + * Открывает встроенный браузер с именем [browser_window_name] и показываемой страницей по ссылке [link] +*/ +void yon_ubl_browser_window_open(char *link, char *browser_window_name){ + GtkWidget *browser=gtk_window_new(GTK_WINDOW_TOPLEVEL); + GtkWidget *web_place=gtk_box_new(GTK_ORIENTATION_VERTICAL,0); + GtkWidget *header=gtk_header_bar_new(); + GtkWidget *header_label=gtk_label_new(browser_window_name); + GtkWidget *WebView=webkit_web_view_new(); + gtk_container_add(GTK_CONTAINER(browser),web_place); + gtk_window_set_titlebar(GTK_WINDOW(browser),header); + gtk_window_set_title(GTK_WINDOW(browser),browser_window_name); + gtk_widget_set_size_request(browser,800,600); + gtk_header_bar_set_custom_title(GTK_HEADER_BAR(header),header_label); + gtk_header_bar_set_show_close_button(GTK_HEADER_BAR(header),1); + webkit_web_view_load_uri(WEBKIT_WEB_VIEW(WebView),link); + gtk_box_pack_start(GTK_BOX(web_place),WebView,1,1,0); + gtk_widget_show_all(browser); +} +#else + +/**yon_ubl_browser_window_open(char *link, char *browser_window_name) + * [EN] + * Launches browser with [link]. + * [browser_window_name] is't used. It's needed for compatibility with webkit version of that function. + * [RU] + * Открывает браузер со страницей по ссылке [link] + * [browser_window_name] не используется. Нужна для совместимости с webkit версией этой функции. +*/ +void yon_ubl_browser_window_open(char *link, char *browser_window_name){ + if (browser_window_name) {} + char *user=getenv("SUDO_USER"); + if (!user) + user=getlogin(); + char *command=yon_char_unite((char*)"sudo -u ",user,(char*)" xdg-open ", link,NULL); + yon_launch(command); +} +#endif + +#endif diff --git a/source/view/model/ubl-utils.h b/source/view/model/ubl-utils.h new file mode 100644 index 0000000..61869a6 --- /dev/null +++ b/source/view/model/ubl-utils.h @@ -0,0 +1,375 @@ +#ifndef UBL_UTILS +#define UBL_UTILS + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include "../../ubl-cmake.h" +#ifdef WEBKIT_FOUND + #include +#endif +#define DesktopPath "/usr/share/applications/" + +#define for_dictionaries(obj, obj1) for (obj = obj1->first; obj != NULL; obj = obj->next) + +//#define new(type) malloc(sizeof(type)) +#define new_arr(type,size) malloc(sizeof(type)*size) + + +typedef enum +{ + #ifdef __GTK_H__ + DICTIONARY_GTK_WIDGETS_TYPE, + #endif + DICTIONARY_OTHER_TYPE=0, + DICTIONARY_CHAR_TYPE, + DICTIONARY_INT_TYPE, + DICTIONARY_BOOL_TYPE, + +} DICT_TYPE; + +typedef struct dictionary +{ + char *key; + void *data; + struct dictionary *next; + struct dictionary *prev; + struct dictionary *first; + DICT_TYPE data_type; + int flag1; +} dictionary; + +typedef struct apps +{ + char *Name; + int Type; + char *Categories; + char *Exec; + char *Icon; + int Pluggable; + int DualPluggable; +} apps; + +typedef char** config_str; + + +#define config(key) yon_config_get_by_key(key) + +#define for_config dictionary temp = NULL; for_dictionary(temp,__yon__config__strings) + +#define yon_remalloc(pointer, size) (!pointer) ? malloc(size) : realloc(pointer, size) +// dictionary functions + +/**yon_dictionary_get_data(dictionary, type) + * [EN] + * Gets data from dictionary. + * [dictionary] is dictionary, from which data should be extracted; + * [type] is type of data, [dictionary] contains. + * [RU] + * Возвращает данные из словаря. + * [dictionary] - словарь из которого достаются данные. + * [type] - тип данных, хранящихся в словаре [dictionary]. +*/ +#define yon_dictionary_get_data(dictionary, type) ((type)dictionary->data) + +/**yon_dictionary_add_or_create_if_exists_with_data(dict,key,data) + * [EN] + * + * [RU] + * Добавляет элемент словаря в конец словаря [dict] c ключом [key] и данными [data]. + * Если словарь не существует, создаёт его +*/ +#define yon_dictionary_add_or_create_if_exists_with_data(dict,key,data) {if (!dict) dict=yon_dictionary_new_with_data(key,data); \ + else dict=yon_dictionary_append_with_data(dict,key,data);} + +dictionary *yon_dictionary_new(); + +dictionary *yon_dictinoary_copy(dictionary *dict); + +dictionary *yon_dictionary_copy_deep(dictionary *dict); + +void yon_dictionary_set_data(dictionary *dict, void *data); + +void yon_dictionary_set_key(dictionary *dict, char *key); + +void yon_dictionary_set(dictionary *dict, char *key, void *data); + +void yon_dictionary_empty(dictionary *dict); + +void yon_dictionary_switch_to_last(dictionary **dict); + +dictionary *yon_dictionary_append(dictionary *targetdict); + +dictionary *yon_dictionary_get_last(dictionary *dict); + +dictionary *yon_dictionary_swap(dictionary *dict, int aim); + +void yon_dictionary_make_first(dictionary *dict); + +void yon_dictionary_make_nth(dictionary *dict, int nth); + +dictionary *yon_dictionary_new_with_data(char *key, void *data); + +dictionary *yon_dictionary_append_with_data(dictionary *dict, char *key, void *data); + +dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect); + +dictionary *yon_dictionary_get(dictionary **dict, char *key); + +dictionary *yon_dictionary_rip(dictionary *dict); + +dictionary *yon_dictionary_get_nth(dictionary *dict, int place); + +void *yon_dictionary_free_all(dictionary *dictionary,void (data_manipulation)(void*)); + +// char functions + +char *yon_char_append(char *source, char *append); + +char *yon_char_new(char *chr); + +char *yon_char_unite(char *source, ...); + +char *yon_cut(char *source, int size, int startpos); + +char *yon_char_divide(char *source, int dividepos); + +char *yon_char_divide_search(char *source, char *dividepos, int delete_divider); + +char *yon_char_from_int(int int_to_convert); + +char *yon_char_replace(char *source, char *find, char*replace); + +char **yon_char_parse(char *parameters, int *size, char *divider); + +char **yon_char_parsed_rip(char **char_string, int *size, int item_to_delete); + +int yon_char_parsed_check_exist(char **parameters, int size, char *param); + +int yon_char_find_count(char *source, char *find); + +int yon_char_parsed_includes_char_parsed (config_str source, config_str to_check, int source_size, int check_size); + +config_str yon_char_parsed_new (int *size, ...); + +void yon_char_parsed_copy(config_str *source, config_str *to_copy); + +config_str yon_char_parsed_append(config_str parsed, int *size, char *string); + +int yon_ubl_check_root(); + +char *yon_ubl_root_user_get(); + +// parsing functions + +config_str philos_list_user(int* size); + +apps *yon_apps_scan_and_parse_desktops(int *sizef); + +void yon_apps_sort(apps *applist, int size); + +apps *yon_apps_get_by_name(apps *applist, char *name, int size); + +config_str yon_config_load(char *command, int *str_len); + +int yon_config_save(char *command); + +char *yon_config_get_parameter(config_str parameters, int size, char *param); + +int yon_config_load_register(char *command); + +int yon_config_remove_by_key(char *key); + +int yon_config_remove_by_data(void *data); + +int yon_config_remove_element(char *key, char *deleted); + +void *yon_config_get_by_key(char *key); + +char *yon_config_get_key_by_data(char *data); + +int yon_config_set(char *key, void *data); + +int yon_config_clean(); + +void yon_config_register(char *key, void *data); + +config_str yon_config_get_all(); + +// terminal-using functions + +void yon_launch_app_with_arguments(char *name, char *args); + +void* yon_launch(void *command); + +// Gtk functions + +#ifdef __GTK_H__ +#ifdef VTE_TERMINAL +void yon_terminal_integrated_launch(GtkWidget *place_to_show, char* command, void *endwork_function, void* endwork_function_argument); + +void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *endwork_function, void* endwork_function_argument); + + + +void __yon_window_config_on_resize(); + +void yon_get_is_fullscreen(); + + +void yon_on_configured_window_destroy(GtkWidget* self,GdkEvent* event); +#endif +void yon_on_configured_window_destroy(GtkWidget* self,GdkEvent* event); +void yon_window_config_save(); +void __yon_window_config_on_resize(); +void yon_get_is_fullscreen(); +/**yon_gtk_builder_get_widget(builder, widget_name) + * [EN] + * Returns GtkWidget from GtkBuilder *[builder]. + * [builder] is GtkBuilder*; + * [widget_name] is id of widget; +*/ +#define yon_gtk_builder_get_widget(builder, widget_name) GTK_WIDGET(gtk_builder_get_object(builder, widget_name)) + +typedef struct +{ + GtkWidget *Icon; + GtkWidget *Label; + GtkWidget *IconView; + GtkListStore *List; +} expander_icon_view; + +void yon_window_config_setup(GtkWindow *window); + +void* _yon_maximize(void *data); + +void yon_window_config_apply(); + +int yon_window_config_load(char *path); + +int yon_gtk_combo_box_text_fill(GtkWidget *combo, config_str parameters,int size); + +int yon_gtk_combo_box_fill(GtkWidget *combo, char **parameters,int size); + +int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find); + +int yon_gtk_icon_view_hide_empty(dictionary *icon_view_segment); + +int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...); + +int yon_dictionary_gtk_pack_end_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...); + + + +typedef enum +{ + BACKGROUND_IMAGE_SUCCESS_TYPE, + BACKGROUND_IMAGE_FAIL_TYPE +} BACKGROUND_IMAGE_TYPE; + +typedef struct { + BACKGROUND_IMAGE_TYPE type; + GtkWidget *icon; + GtkWidget *box; + GtkWidget *label; + char* text_to_render; +} render_data; + + +/**yon_ubl_status_box_setup(render,icon,box,label) + * [EN] + * Sets up [render] structure of type render_data. + * [icon] is GtkImage widget of status box for showing status icons; + * [box] is GtkBox widget of status box for showing status color; + * [label] is GtkLabel widget of status box for showing status text; + * [RU] + * Настраивает структуру [render] типа render_data. + * [icon] - виджет типа GtkIcon в котором будут отображаться статусные иконки; + * [box] - виджет типа GtkBox в котором будет отображаться цвет статуса; + * [label] - виджет типа GtkLabel в котором будет отображаться текст статусного сообщения; +*/ +int yon_ubl_status_box_setup(GtkWidget *icon, GtkWidget *box, GtkWidget *label); + +/**yon_ubl_status_box_render(render,text,type) + * [EN] + * Renders message in status box; + * [render] is render_data structure of status box; + * [text] is text to be shown in status box; + * [type] if type of message. Can be BACKGROUND_IMAGE_FAIL_TYPE or BACKGROUND_IMAGE_SUCCESS_TYPE + * [RU] + * Отображает сообщение в статусном окне. + * [render] - структура типа render_data для нужного статусного окна; + * [text] - текст, отображаемый в статусном окне; + * [type] - тип сообщения. Может быть: + * BACKGROUND_IMAGE_FAIL_TYPE (красный фон,иконка - восклицательный знак) + * или + * BACKGROUND_IMAGE_SUCCESS_TYPE (Жёлтный фон, иконка - галка) +*/ + +void _yon_ubl_status_box_render(char *text, BACKGROUND_IMAGE_TYPE type); + +void yon_ubl_status_box_render(char *text, BACKGROUND_IMAGE_TYPE type); + +#ifdef __cplusplus + +/**yon_ubl_header_setup(overlay, head, image, imag_path) + * [EN] + * Sets up header of app. + * [overlay] is overlay for app header; + * [head] is box of header, which connects to [overlay] + * [image] is header background image; + * [imag_path] is path of image, shown in [image] + * [RU] + * Настраивает заголовок приложения. + * [overlay] - оверлей заголовка приложения; + * [head] - шапка заголовка, присоединяемая к [overlay] + * [image] - виджет картинки для заднего фона; + * [imag_path] - путь до картинки, загружаемой в [image] +*/ +#define yon_ubl_header_setup(overlay, head, image, imag_path) _yon_ubl_header_setup(GTK_WIDGET(overlay.gobj()), GTK_WIDGET(head.gobj()), GTK_WIDGET(image.gobj()), (char *)imag_path) +#else + +/**yon_ubl_header_setup(overlay, head, image, imag_path) + * [EN] + * Sets up header of app. + * [overlay] is overlay for app header; + * [head] is box of header, which connects to [overlay] + * [image] is header background image; + * [imag_path] is path of image, shown in [image] + * [RU] + * Настраивает заголовок приложения. + * [overlay] - оверлей заголовка приложения; + * [head] - шапка заголовка, присоединяемая к [overlay] + * [image] - виджет картинки для заднего фона; + * [imag_path] - путь до картинки, загружаемой в [image] +*/ +#define yon_ubl_header_setup(overlay, head, image, imag_path) _yon_ubl_header_setup(GTK_WIDGET(overlay), GTK_WIDGET(head), GTK_WIDGET(image), (char *)imag_path) +#define yon_ubl_header_setup_resource(overlay, head, image, imag_path) _yon_ubl_header_setup_resource(GTK_WIDGET(overlay), GTK_WIDGET(head), GTK_WIDGET(image), (char *)imag_path) +#endif + +void _yon_ubl_header_setup(GtkWidget *Overlay, GtkWidget *Head, GtkWidget *Image, char *image_path); + +void _yon_ubl_header_setup_resource(GtkWidget *Overlay, GtkWidget *Head, GtkWidget *Image, char *image_path); + +void yon_ubl_setup_sockets(GtkWidget *main_window, GtkWidget *left_window, GtkWidget *right_window, int socket_main_id, int socket_left_id, int socket_right_id); +#ifdef WEBKIT_FOUND + +void yon_ubl_browser_window_open(char *link, char *browser_window_name); +#else +void yon_ubl_browser_window_open(char *link, char *browser_window_name); +#endif +#endif +#endif diff --git a/source/view/ubl-settings-diskquota.cc b/source/view/ubl-settings-diskquota.cc deleted file mode 100755 index 24907d3..0000000 --- a/source/view/ubl-settings-diskquota.cc +++ /dev/null @@ -1,653 +0,0 @@ -#ifndef UBL_SETTINGS_DISKQUOTA_H -#define UBL_SETTINGS_DISKQUOTA_H -#include "ubl-settings-diskquota.h" - -string version_application = "1.6"; -bool flag_save = false; -bool flag_save_local = false; -bool flag_save_global = false; -bool flag_load_global = false; -bool flag_lock_help = false; - -MainWindow::MainWindow(Glib::RefPtr builder, View_open_browser* obj_open_browser, int* socket_ext_id_I, int* socket_trd_id_I) { - this->builder = builder; - this->socket_ext_id_I = socket_ext_id_I; - this->socket_trd_id_I = socket_trd_id_I; - this->set_obj_browser(obj_open_browser); - // this->settings(); -} - -void MainWindow::set_map_gui(map_str_str* map_gui_cfg) { - this->map_gui_cfg = map_gui_cfg; - obj_wrapper_load_save->set_map_gui(map_gui_cfg); -} - -void MainWindow::set_map_global(map_str_str* map_global_cfg) { - this->map_global_cfg = map_global_cfg; - obj_wrapper_load_save->set_map_global(map_global_cfg); -} - -void MainWindow::set_map_local(map_str_str* map_system_cfg) { - this->map_system_cfg = map_system_cfg; - obj_wrapper_load_save->set_map_local(map_system_cfg); -} - -void MainWindow::set_obj_wrapper_load_save(Wrapper_load_save* obj_wrapper_load_save) { - this->obj_wrapper_load_save = obj_wrapper_load_save; -} - -void MainWindow::set_obj_view_filters(View_filters* obj_view_filters) { - this->obj_view_filters = obj_view_filters; -} - -void MainWindow::set_obj_view_add(View_add_user_group* obj_view_add) { - this->obj_view_add = obj_view_add; -} - -void MainWindow::set_obj_view_edit(View_edit_user_group* obj_view_edit) { - this->obj_view_edit = obj_view_edit; -} -void MainWindow::set_obj_view_add_project(View_add_project* obj_view_add_project) { - this->obj_view_add_project = obj_view_add_project; -} -void MainWindow::set_obj_view_edit_project(View_edit_project* obj_view_edit_project) { - this->obj_view_edit_project = obj_view_edit_project; -} - -void MainWindow::settings() { - this->get_builder(); - this->lacalization(); - Gtk::Widget *boxWidget; - builder->get_widget("boxColor", boxWidget); - HeadOverlay->add_overlay(*boxWidget); - ubl_make_plugs(boxSave, boxButton, (*socket_ext_id_I), (*socket_trd_id_I)); - this->add_CSS(); - this->flag_block_gui(); - this->init_spin_all(); - if (geteuid() == 0) { - this->wrapper_load_system(); - this->wrapper_load_global(); - this->event(); - } - else { - boxFuncs->set_sensitive(false); - btnSave->set_sensitive(false); - btnLoad->set_sensitive(false); - imgInfo->set_from_icon_name(icon_warning, Gtk::ICON_SIZE_MENU); - info_status_app(info_box_error_css); - lblWarning->set_text(program_as_root); - } - -} - - - -void MainWindow::set_obj_browser(View_open_browser* obj_open_browser) { - this->obj_open_browser = obj_open_browser; - obj_open_browser->get_about()->set_version(version_application); -} - -void MainWindow::init_spin_all() { - generalGroupsSizeWeeksSpi->set_range(0, 52); - generalGroupsSizeWeeksSpi->set_increments(1.0, 1.0); - generalGroupsSizeWeeksSpi->set_value(0); - generalGroupsFileWeeksSpin->set_range(0, 52); - generalGroupsFileWeeksSpin->set_increments(1.0, 1.0); - generalGroupsFileWeeksSpin->set_value(0); - generalUsersSizWeeksSpin->set_range(0, 52); - generalUsersSizWeeksSpin->set_increments(1.0, 1.0); - generalUsersSizWeeksSpin->set_value(0); - generalUsersFileWeeksSpin->set_range(0, 52); - generalUsersFileWeeksSpin->set_increments(1.0, 1.0); - generalUsersFileWeeksSpin->set_value(0); - generalGroupsSizeDaySpin->set_range(0, 31); - generalGroupsSizeDaySpin->set_increments(1.0, 1.0); - generalGroupsSizeDaySpin->set_value(0); - generalGroupsFilesDaySpin->set_range(0, 31); - generalGroupsFilesDaySpin->set_increments(1.0, 1.0); - generalGroupsFilesDaySpin->set_value(0); - generalUsersSizeDaySpin->set_range(0, 31); - generalUsersSizeDaySpin->set_increments(1.0, 1.0); - generalUsersSizeDaySpin->set_value(0); - generalUsersFilesDaySpin->set_range(0, 31); - generalUsersFilesDaySpin->set_increments(1.0, 1.0); - generalUsersFilesDaySpin->set_value(0); - generalGroupsSizeHourSpin->set_range(0, 23); - generalGroupsSizeHourSpin->set_increments(1.0, 1.0); - generalGroupsSizeHourSpin->set_value(0); - generalGroupsFilesHourSpin->set_range(0, 23); - generalGroupsFilesHourSpin->set_increments(1.0, 1.0); - generalGroupsFilesHourSpin->set_value(0); - generalUsersSizeHourSpin->set_range(0, 23); - generalUsersSizeHourSpin->set_increments(1.0, 1.0); - generalUsersSizeHourSpin->set_value(0); - generalUsersFilesHoursSpin->set_range(0, 23); - generalUsersFilesHoursSpin->set_increments(1.0, 1.0); - generalUsersFilesHoursSpin->set_value(0); - generalGroupsSizeMinuteSpin->set_range(0, 59); - generalGroupsSizeMinuteSpin->set_increments(1.0, 1.0); - generalGroupsSizeMinuteSpin->set_value(0); - generalGroupsFilesMinuteSpin->set_range(0, 59); - generalGroupsFilesMinuteSpin->set_increments(1.0, 1.0); - generalGroupsFilesMinuteSpin->set_value(0); - generalUsersSizeMinuteSpin->set_range(0, 59); - generalUsersSizeMinuteSpin->set_increments(1.0, 1.0); - generalUsersSizeMinuteSpin->set_value(0); - generalUsersFilesMinutesSpin->set_range(0, 59); - generalUsersFilesMinutesSpin->set_increments(1.0, 1.0); - generalUsersFilesMinutesSpin->set_value(0); -} - -void MainWindow::lacalization() { - -} - -void MainWindow::info_warning_error(int mess, int error_save, int error_load) { - if (error_save > 0 || error_load > 0) { - info_status_app(info_box_error_css); - imgInfo->set_from_icon_name(icon_warning, Gtk::ICON_SIZE_MENU); - string mess_error = ""; - if (mess == 0) { - mess_error = string(local_read_error) + str_cmd_error; - lblWarning->set_text(mess_error); - } - else if (mess == 1) { - mess_error = string(global_read_error) + str_cmd_error; - lblWarning->set_text(mess_error); - } - else if (mess == 2) { - mess_error = string(local_write_error) + str_cmd_error; - lblWarning->set_text(mess_error); - } - else if (mess == 3) { - mess_error = string(global_write_error) + str_cmd_error; - lblWarning->set_text(mess_error); - } - else if (mess == 4) { - mess_error = string(error_save_all) + str_cmd_error; - lblWarning->set_text(mess_error); - } - str_cmd_error = ""; - } - else { - info_status_app(info_box_ok_css); - imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU); - if (mess == 0) { - lblWarning->set_text(local_load_ok); - } - else if (mess == 1) { - lblWarning->set_text(global_load_ok); - } - else if (mess == 2) { - lblWarning->set_text(local_ok_written); - } - else if (mess == 3) { - lblWarning->set_text(global_ok_written); - } - else if (mess == 4) { - lblWarning->set_text(successfully_save_all); - } - else if (mess == 5) { - lblWarning->set_text(nothing_save); - } - } -} - -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) { - combo_box->append(device.first.c_str()); - } - combo_box->set_active(0); - } -} - -void MainWindow::flag_block_gui() { - if (flag_load_global == true) { - btnLoadGlob->set_sensitive(false); - } - if (flag_save_local == true && flag_save_global == true) { - btnSave->set_sensitive(false); - } - if (flag_save == true) { - btnSave->set_sensitive(false); - } - if (flag_save_local == true) { - btnSaveLocal->set_sensitive(false); - btnSaveLocalGlob->set_sensitive(false); - } - if (flag_save_global == true) { - btnSaveGlob->set_sensitive(false); - btnSaveLocalGlob->set_sensitive(false); - } - if (flag_lock_help == true) { - btnSynopsis->set_sensitive(false); - } -} - -/* -void MainWindow::entry_combo_box_temp(Gtk::ComboBoxText *combo_box, Gtk::Label *label) { - string text = combo_box->get_active_text(); - if (map_device.find(text) != map_device.end()){ - label->set_text(map_device[text]); - } -} -*/ - -void MainWindow::add_CSS() { - Glib::RefPtr cssProvider = Gtk::CssProvider::create(); - cssProvider->load_from_path(path_css); - Glib::RefPtr styleContext = Gtk::StyleContext::create(); - Glib::RefPtr screen = Gdk::Screen::get_default();//get default screen - styleContext->add_provider_for_screen(screen, cssProvider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);//add provider for screen in all application - HeadBackgroundImage->set(path_img_head_background); - Glib::RefPtr headLabel_css = headLabel->get_style_context(); - Glib::RefPtr boxButton_css = boxButton->get_style_context(); - Glib::RefPtr boxSave_css = boxSave->get_style_context(); - Glib::RefPtr headerBar_css = headerBar->get_style_context(); - if ((*socket_trd_id_I) == 0 && (*socket_ext_id_I) == 0){ - boxButton_css->add_class("bkim_no_plug"); - boxSave_css->add_class("bkim_no_plug"); - } - headLabel_css->add_class("textHead"); -} - -void MainWindow::get_builder() { - builder->set_translation_domain(path_app); - builder->get_widget("headerTopic", headerTopic); - builder->get_widget("boxButton", boxButton); - builder->get_widget("boxSave", boxSave); - builder->get_widget("HeadOverlay", HeadOverlay); - builder->get_widget("headerBar", headerBar); - builder->get_widget("boxFuncs", boxFuncs); - builder->get_widget("btnLoad", btnLoad); - builder->get_widget("btnSave", btnSave); - builder->get_widget("HeadBackgroundImage", HeadBackgroundImage); - builder->get_widget("imgInfo", imgInfo); - builder->get_widget("lblWarning", lblWarning); - builder->get_widget("boxInfoError", boxInfoError); - builder->get_widget("imgInfo", imgInfo); - builder->get_widget("generalTabLabel", generalTabLabel); - builder->get_widget("GroupsTabLabel", GroupsTabLabel); - builder->get_widget("UsersTabLabel", UsersTabLabel); - builder->get_widget("generalGroupsFilesLabel", generalGroupsFilesLabel); - builder->get_widget("generalUsersSizeLabel", generalUsersSizeLabel); - builder->get_widget("generalUsersFilesLabel", generalUsersFilesLabel); - builder->get_widget("generalGroupsSizeWeeksLabel", generalGroupsSizeWeeksLabel); - builder->get_widget("generalGroupsFilesWeeksLabel", generalGroupsFilesWeeksLabel); - builder->get_widget("generalUsersSizeWeeksLabel", generalUsersSizeWeeksLabel); - builder->get_widget("generalUsersFilesWeeksLabel", generalUsersFilesWeeksLabel); - builder->get_widget("generalGroupsSizeDaysLabel", generalGroupsSizeDaysLabel); - builder->get_widget("generalGroupsFilesDaysLabel", generalGroupsFilesDaysLabel); - builder->get_widget("generalUsersSizeDaysLabel", generalUsersSizeDaysLabel); - builder->get_widget("generalUsersFilesDaysLabel", generalUsersFilesDaysLabel); - builder->get_widget("generalGroupsSizeHoursLabel", generalGroupsSizeHoursLabel); - builder->get_widget("generalGroupsFilesHoursLabel", generalGroupsFilesHoursLabel); - builder->get_widget("generalUsersSizeHoursLabel", generalUsersSizeHoursLabel); - builder->get_widget("generalUsersFilesHoursLabel", generalUsersFilesHoursLabel); - builder->get_widget("generalGroupsSizeMinutesLabel", generalGroupsSizeMinutesLabel); - builder->get_widget("generalGroupsFilesMinutesLabel", generalGroupsFilesMinutesLabel); - builder->get_widget("generalUsersSizeMinutesLabel", generalUsersSizeMinutesLabel); - builder->get_widget("generalUsersFilesMinutesLabel", generalUsersFilesMinutesLabel); - builder->get_widget("lblLoad", lblLoad); - builder->get_widget("lblSave", lblSave); - builder->get_widget("btnSettings", btnSettings); - builder->get_widget("groupsDeviceLabel", groupsDeviceLabel); - builder->get_widget("usersDeviceLabel", usersDeviceLabel); - builder->get_widget("headLabel", headLabel); - builder->get_widget("btnLoadGlob", btnLoadGlob); - builder->get_widget("btnLoadLocal", btnLoadLocal); - builder->get_widget("btnSynopsis", btnSynopsis); - builder->get_widget("btnAbout", btnAbout); - builder->get_widget("btnSaveLocalGlob", btnSaveLocalGlob); - builder->get_widget("btnSaveGlob", btnSaveGlob); - builder->get_widget("btnSaveLocal", btnSaveLocal); - builder->get_widget("GroupsTabLabel", GroupsTabLabel); - builder->get_widget("groupsQuotasTree", groupsQuotasTree); - builder->get_widget("usersQuotasTree", usersQuotasTree); - builder->get_widget("usersDeviceCombo", usersDeviceCombo); - builder->get_widget("GroupsTabLabel", GroupsTabLabel); - builder->get_widget("generalTabLabel", generalTabLabel); - builder->get_widget("groupsDeviceCombo", groupsDeviceCombo); - builder->get_widget("generalGroupsSizeWeeksSpi", generalGroupsSizeWeeksSpi); - builder->get_widget("generalGroupsFileWeeksSpin", generalGroupsFileWeeksSpin); - builder->get_widget("generalGroupsSizeDaySpin", generalGroupsSizeDaySpin); - builder->get_widget("generalGroupsFilesDaySpin", generalGroupsFilesDaySpin); - builder->get_widget("generalGroupsSizeHourSpin", generalGroupsSizeHourSpin); - builder->get_widget("generalGroupsFilesHourSpin", generalGroupsFilesHourSpin); - builder->get_widget("generalGroupsSizeMinuteSpin", generalGroupsSizeMinuteSpin); - builder->get_widget("generalGroupsFilesMinuteSpin", generalGroupsFilesMinuteSpin); - builder->get_widget("generalUsersSizWeeksSpin", generalUsersSizWeeksSpin); - builder->get_widget("generalUsersFileWeeksSpin", generalUsersFileWeeksSpin); - builder->get_widget("generalUsersSizeDaySpin", generalUsersSizeDaySpin); - builder->get_widget("generalUsersFilesDaySpin", generalUsersFilesDaySpin); - builder->get_widget("generalUsersSizeHourSpin", generalUsersSizeHourSpin); - builder->get_widget("generalUsersFilesHoursSpin", generalUsersFilesHoursSpin); - builder->get_widget("generalUsersSizeMinuteSpin", generalUsersSizeMinuteSpin); - builder->get_widget("generalUsersFilesMinutesSpin", generalUsersFilesMinutesSpin); - builder->get_widget("GeneralQuotasTree", GeneralQuotasTree); - builder->get_widget("ProjectQuotasTree", ProjectQuotasTree); - builder->get_widget("ProjectTabLabel", ProjectTabLabel); - builder->get_widget("usersProjectLabel", usersProjectLabel); - builder->get_widget("btnFilterProject", btnFilterProject); - builder->get_widget("btnFilterUsers", btnFilterUsers); - builder->get_widget("btnFilterGroups", btnFilterGroups); - builder->get_widget("chbMangSystemFile", chbMangSystemFile); - builder->get_widget("btnDelGroups", btnDelGroups); - builder->get_widget("btnDelProject", btnDelProject); - builder->get_widget("btnDelUsers", btnDelUsers); - builder->get_widget("btnAddGroups", btnAddGroups); - builder->get_widget("btnAddUsers", btnAddUsers); - builder->get_widget("btnAddProject", btnAddProject); - builder->get_widget("btnEditProject", btnEditProject); - builder->get_widget("btnEditUsers", btnEditUsers); - builder->get_widget("btnEditGroups", btnEditGroups); - builder->get_widget("usersProjectCombo", usersProjectCombo); - builder->get_widget("boxResize", boxResize); - builder->get_widget("boxGroupsWeeks", boxGroupsWeeks); - builder->get_widget("boxGroupsDays", boxGroupsDays); - builder->get_widget("boxGroupsHours", boxGroupsHours); - builder->get_widget("boxGroupsMinutes", boxGroupsMinutes); - builder->get_widget("boxUsersWeeks", boxUsersWeeks); - builder->get_widget("boxUsersDays", boxUsersDays); - builder->get_widget("boxUsersHours", boxUsersHours); - builder->get_widget("boxUsersMinutes", boxUsersMinutes); - builder->get_widget("boxProjectWeeks", boxProjectWeeks); - builder->get_widget("boxProjectDays", boxProjectDays); - builder->get_widget("boxProjectHours", boxProjectHours); - builder->get_widget("boxProjectMinutes", boxProjectMinutes); - GtkBuilder *builder = gtk_builder_new_from_file(path_glade); - gtk_list_project = GTK_LIST_STORE(gtk_builder_get_object(builder, "ListProject")); - gtk_list_groups = GTK_LIST_STORE(gtk_builder_get_object(builder, "ListGroups")); - gtk_list_user = GTK_LIST_STORE(gtk_builder_get_object(builder, "ListUser")); - gtk_list_general = GTK_LIST_STORE(gtk_builder_get_object(builder, "ListGeneral")); -} -/* -void tree_view_del_line() { - int index = 0; - GtkTreeIter iter; - GtkTreeModel *model = GTK_TREE_MODEL(main_config.list); - GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->treeViewMain)); - if(gtk_tree_selection_get_selected(selection, &model, &iter)) { - char* str_iter = yon_char_new(gtk_tree_model_get_string_from_iter(model, &iter)); - index = atoi(str_iter); - g_object_ref(main_config.list); - gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->treeViewMain), NULL); - gtk_list_store_clear(main_config.list); - - main_fill_tree_view_after_remove(); - gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->treeViewMain), model); - free(str_iter); - } -} - -void MainWindow::tree_view_select() { - GtkTreeIter iter; - GtkTreeModel *model = GTK_TREE_MODEL(gtk_list_user); - GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(usersQuotasTree->gobj())); - if(gtk_tree_selection_get_selected(selection, &model, &iter)) { - gtk_widget_set_sensitive(GTK_WIDGET(btnAddUsers->gobj()),1); - gtk_widget_set_sensitive(GTK_WIDGET(btnEditUsers->gobj()),1); - gtk_widget_set_sensitive(GTK_WIDGET(btnDelUsers->gobj()),1); - } - else { - gtk_widget_set_sensitive(GTK_WIDGET(btnAddUsers->gobj()),1); - gtk_widget_set_sensitive(GTK_WIDGET(btnEditUsers->gobj()),1); - gtk_widget_set_sensitive(GTK_WIDGET(btnDelUsers->gobj()),0); - } -} -void fill_tree_view(int start, int size, int flag_gui_add) { - GtkTreeModel *model = GTK_TREE_MODEL(main_config.list); - if (flag_gui_add == 0) { - g_object_ref(main_config.list); - gtk_list_store_clear(main_config.list); - } - for (int index = start; index < size; index++) { - GtkTreeIter iter; - gtk_list_store_append(main_config.list,&iter); - char* str_io_read = format_io_limit_in_tree_view(main_config.disk, main_config.i_o_limit_read, main_config.i_o_limit_read_size, index); - char* str_io_write = format_io_limit_in_tree_view(main_config.disk, main_config.i_o_limit_write, main_config.i_o_limit_write_size, index); - gtk_list_store_set(main_config.list,&iter,0,main_config.type_quota[index], - 1,main_config.quota_volume[index], - 2,main_config.soft_raw_limit[index], - 3,main_config.hard_raw_limit[index], - 4,main_config.swap[index], - 5,main_config.cpu_limit[index], - 6,str_io_read, - 7,str_io_write,-1); - free(str_io_read); - free(str_io_write); - } - if (flag_gui_add != 0) { - gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->treeViewMain), model); - } -} - -int tree_view_edit() { - int index = 0; - GtkTreeIter iter; - GtkTreeModel *model = GTK_TREE_MODEL(main_config.list); - - GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->treeViewMain)); - if(gtk_tree_selection_get_selected(selection, &model, &iter)) { - char* str_iter = gtk_tree_model_get_string_from_iter(model, &iter); - index = atoi(str_iter); - gtk_list_store_set(main_config.list,&iter,0,main_config.type_quota[index], - 1,main_config.quota_volume[index], - 2,main_config.soft_raw_limit[index], - 3,main_config.hard_raw_limit[index], - 4,main_config.swap[index], - 5,main_config.cpu_limit[index], - 6,str_io_read, - 7,str_io_write,-1); - return 1; - } - else { - return 0; - } - -} -*/ - -void MainWindow::open_browser() { - obj_open_browser->open_help(); -} - -void MainWindow::wrapper_save_system() { - int id_mess = obj_wrapper_load_save->wrapper_save_system_cfg(); - int error_save = obj_wrapper_load_save->get_error_save(); - int error_load = obj_wrapper_load_save->get_error_load(); - this->info_warning_error(id_mess, error_save, error_load); -} -void MainWindow::wrapper_save_global() { - int id_mess = obj_wrapper_load_save->wrapper_save_global_cfg(); - int error_save = obj_wrapper_load_save->get_error_save(); - int error_load = obj_wrapper_load_save->get_error_load(); - this->info_warning_error(id_mess, error_save, error_load); -} - -void MainWindow::wrapper_save_all() { - int id_mess = obj_wrapper_load_save->wrapper_save_all_cfg(); - int error_save = obj_wrapper_load_save->get_error_save(); - int error_load = obj_wrapper_load_save->get_error_load(); - this->info_warning_error(id_mess, error_save, error_load); -} - -void MainWindow::wrapper_load_system() { - int id_mess = obj_wrapper_load_save->load_system_cfg(); - int error_save = obj_wrapper_load_save->get_error_save(); - int error_load = obj_wrapper_load_save->get_error_load(); - this->info_warning_error(id_mess, error_save, error_load); - this->init_work_tv_g_u_p(); -} - -void MainWindow::wrapper_load_global() { - int id_mess = obj_wrapper_load_save->load_global_cfg(); - int error_save = obj_wrapper_load_save->get_error_save(); - int error_load = obj_wrapper_load_save->get_error_load(); - this->info_warning_error(id_mess, error_save, error_load); - this->init_work_tv_g_u_p(); -} - -void MainWindow::event() { - boxResize->signal_check_resize().connect(sigc::mem_fun(*this, &MainWindow::resize_widget)); - btnFilterGroups->signal_clicked().connect([&]() {this->filters_show();}); - btnFilterUsers->signal_clicked().connect([&]() {this->filters_show();}); - btnFilterProject->signal_clicked().connect([&]() {this->filters_show();}); - btnSynopsis->signal_activate().connect([&]() {this->open_browser();}); - btnAbout->signal_activate().connect([&]() {obj_open_browser->get_about()->aboutWindows->show();}); - btnSaveLocalGlob->signal_activate().connect([&]() {this->wrapper_save_all();}); - btnSaveGlob->signal_activate().connect([&]() {this->wrapper_save_global();}); - btnSaveLocal->signal_activate().connect([&]() {this->wrapper_save_system();}); - btnLoadGlob->signal_activate().connect([&]() {this->wrapper_load_global();}); - btnLoadLocal->signal_activate().connect([&]() {this->wrapper_load_system();}); - btnEditGroups->signal_clicked().connect(sigc::bind (sigc::mem_fun( *this, - &MainWindow::edit_quota_show), str_groups)); - btnEditUsers->signal_clicked().connect(sigc::bind (sigc::mem_fun( *this, - &MainWindow::edit_quota_show), str_users)); - btnEditProject->signal_clicked().connect([&]() {this->edit_quota_project_show();}); - chbMangSystemFile->signal_toggled().connect([&]() {this->mode_switch_quota();}); - btnDelGroups->signal_clicked().connect( - sigc::bind*, const Gtk::TreeModel::iterator*, bool&> (sigc::mem_fun( *this, - &MainWindow::remove_template), &list_store_groups, &iter_groups, flag_validate_del_groups)); - btnDelUsers->signal_clicked().connect( - sigc::bind*, const Gtk::TreeModel::iterator*, bool&> (sigc::mem_fun( *this, - &MainWindow::remove_template), &list_store_users, &iter_users, flag_validate_del_users)); - btnDelProject->signal_clicked().connect( - sigc::bind*, const Gtk::TreeModel::iterator*, bool&> (sigc::mem_fun( *this, - &MainWindow::remove_template), &list_store_project, &iter_project, flag_validate_del_project)); - btnAddProject->signal_clicked().connect([&]() {this->obj_view_add_project->show();}); - btnAddUsers->signal_clicked().connect( - sigc::bind&, struct tv_g_u_p> (sigc::mem_fun( *this, - &MainWindow::set_add_tv_g_u_p), str_users, usersQuotasTree, row, list_store_users, obj_tv_g_u_p)); - btnAddGroups->signal_clicked().connect( - sigc::bind&, struct tv_g_u_p> (sigc::mem_fun( *this, - &MainWindow::set_add_tv_g_u_p), str_groups, groupsQuotasTree, row, list_store_groups, obj_tv_g_u_p)); - usersQuotasTree->signal_cursor_changed().connect([&]() {this->obj_view_add_project->show();}); -} - -void MainWindow::resize_widget() { - // boxGroupsWeeks = boxGroupsWeeks(Gtk::ORIENTATION_HORIZONTAL); -} - -void MainWindow::add_quota_show(string name) { - obj_view_add->set_label_type_quota(name); - obj_view_add->show(); -} - -void MainWindow::edit_quota_show(string name) { - obj_view_edit->set_label_type_quota(name); - obj_view_edit->show(); -} -void MainWindow::edit_quota_project_show() { - obj_view_edit_project->show(); -} -void MainWindow::remove_template(Glib::RefPtr* list_store, const Gtk::TreeModel::iterator* iter, bool& flag_validate_del) { - if (flag_validate_del && (*list_store)->iter_is_valid(*(iter))) { - Gtk::TreeModel::Row row = *(*iter); - if(row) { - // string name = row[m_columns.name] + ""; - // TODO: : check - // string key = "GRUB_PASSWORD[" + name + "]"; - // map_gui_cfg[key] = ""; - } - (*list_store)->erase((*iter)); - flag_validate_del = false; - info_status_app(info_box_ok_css); - imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU); - // lblWarning->set_text(""); - } - flag_validate_del = false; -} - -void MainWindow::set_add_tv_g_u_p(string name, Gtk::TreeView* tree_view, Gtk::TreeModel::Row &row, Glib::RefPtr& list_store, struct tv_g_u_p obj_tv_g_u_p) { - if (this->check_space(tree_view)) { - row = *(list_store->append()); - row[m_columns.name] = obj_tv_g_u_p.name; - row[m_columns.quotas] = obj_tv_g_u_p.quotas; - row[m_columns.size] = obj_tv_g_u_p.size; - row[m_columns.soft_limit_size] = obj_tv_g_u_p.soft_limit_size; - row[m_columns.hard_limit_size] = obj_tv_g_u_p.hard_limit_size; - row[m_columns.deferring_size] = obj_tv_g_u_p.deferring_size; - row[m_columns.files] = obj_tv_g_u_p.files; - row[m_columns.soft_limit_files] = obj_tv_g_u_p.soft_limit_files; - row[m_columns.hard_limit_delay] = obj_tv_g_u_p.hard_limit_delay; - row[m_columns.deferring_files] = obj_tv_g_u_p.deferring_files; - this->add_quota_show(name); - } -} - -void MainWindow::mode_switch_quota() { - // Todo: check - if (chbMangSystemFile->get_active()) { - mode_quota = "filesystem"; - } - else { - mode_quota = "ubconfig"; - } -} - -void MainWindow::filters_show() { - obj_view_filters->show(); -} - -bool MainWindow::check_space(Gtk::TreeView* tree_view) { - Glib::RefPtr tree_view_model = tree_view->get_model(); - Gtk::TreeModel::Children children = tree_view_model->children(); - string name = ""; - string quotas = ""; - for(Gtk::TreeModel::iterator iter = children.begin(); iter != children.end(); ++iter) { - Gtk::TreeModel::Row row = *iter; - name = row[m_columns.name] + ""; - quotas = row[m_columns.quotas] + ""; - if (name.length() == 0 || quotas.length() == 0) { - return false; - } - } - return true; -} - -void MainWindow::info_status_app(string stule) { - Glib::RefPtr boxInfo = boxInfoError->get_style_context(); - boxInfo->remove_class(info_box_ok_css); - boxInfo->remove_class(info_box_error_css); - boxInfo->add_class(stule); -} - -void MainWindow::init_work_tv_g_u_p() { - // Todo: remove - //groupsQuotasTree->remove_all_columns(); - //ProjectQuotasTree->remove_all_columns(); - //usersQuotasTree->remove_all_columns(); - list_store_groups = Gtk::ListStore::create(m_columns); - list_store_project = Gtk::ListStore::create(m_columns); - list_store_users = Gtk::ListStore::create(m_columns); - groupsQuotasTree->set_model(list_store_groups); - ProjectQuotasTree->set_model(list_store_project); - usersQuotasTree->set_model(list_store_users); - Glib::RefPtr groupsQuotasTreeModel = groupsQuotasTree->get_model(); - groupsQuotasTreeModel->signal_row_changed().connect(sigc::bind - (sigc::mem_fun(*this, &MainWindow::remove_line_template), iter_groups, flag_validate_del_groups)); - Glib::RefPtr ProjectQuotasTreeModel = ProjectQuotasTree->get_model(); - ProjectQuotasTreeModel->signal_row_changed().connect(sigc::bind - (sigc::mem_fun(*this, &MainWindow::remove_line_template), iter_project, flag_validate_del_project)); - Glib::RefPtr usersQuotasTreeModel = usersQuotasTree->get_model(); - usersQuotasTreeModel->signal_row_changed().connect(sigc::bind - (sigc::mem_fun(*this, &MainWindow::remove_line_template),iter_users, flag_validate_del_users)); -} - -void MainWindow::remove_line_template(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator& iter, Gtk::TreeModel::iterator& iter_del, bool& flag_del) { - iter_del = iter; - flag_del = true; -} - -void help() { - string version = string(str_version) + version_application + "\n"; - cout << version.c_str(); - cout << str_help_h; -} - -MainWindow::~MainWindow() {} - -#endif - diff --git a/source/view/ubl-settings-diskquota.h b/source/view/ubl-settings-diskquota.h deleted file mode 100644 index efb5bc9..0000000 --- a/source/view/ubl-settings-diskquota.h +++ /dev/null @@ -1,279 +0,0 @@ -#ifndef UBL_SETTINGS_QUOTAS_H -#define UBL_SETTINGS_QUOTAS_H - -#include -#include "view_open_browser.h" -#include "../project_lib.h" -#include "../my_type.h" -#include "ubl-util-standard.c" -#include "../var.h" -#include "model/wrapper_load_save.h" -#include "view_filters.h" -#include "view_add_user_group.h" -#include "view_edit_user_group.h" -#include "view_add_project.h" -#include "view_edit_project.h" - -using namespace std; - -#define yon_gtk_builder_get_widget(builder, widget_name) GTK_WIDGET(gtk_builder_get_object(builder, widget_name)) - - -extern bool flag_save; -extern bool flag_save_local; -extern bool flag_save_global; -extern bool flag_load_global; -extern bool flag_lock_help; - - - -class MainWindow { - public: - class ModelColumns : public Gtk::TreeModel::ColumnRecord { - public: - ModelColumns() {add(name), add(quotas); add(size), - add(soft_limit_size), add(hard_limit_size); add(deferring_size), - add(files); add(soft_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 deferring_size; - Gtk::TreeModelColumn files; - Gtk::TreeModelColumn soft_limit_files; - Gtk::TreeModelColumn hard_limit_delay; - Gtk::TreeModelColumn deferring_files; - }; - class ModelColumnsGeneral : public Gtk::TreeModel::ColumnRecord { - public: - ModelColumnsGeneral() {add(status), add(type_quotas); add(device), - add(user), add(group), add(projects); add(soft_limit_size), - add(hard_limit_size); add(soft_limit_files), add(hard_limit_files), add(deferring_size), - add(deferring_files); } - Gtk::TreeModelColumn status; - Gtk::TreeModelColumn type_quotas; - Gtk::TreeModelColumn device; - Gtk::TreeModelColumn user; - Gtk::TreeModelColumn group; - Gtk::TreeModelColumn projects; - Gtk::TreeModelColumn soft_limit_size; - Gtk::TreeModelColumn hard_limit_size; - Gtk::TreeModelColumn soft_limit_files; - Gtk::TreeModelColumn hard_limit_files; - Gtk::TreeModelColumn deferring_size; - Gtk::TreeModelColumn deferring_files; - }; - ModelColumns m_columns; - ModelColumnsGeneral m_columnsGeneral; - Glib::RefPtr builder; - template - struct Result{ - Type response; - int error; - }; - Gtk::Label *headerTopic; - Gtk::Overlay *HeadOverlay; - Gtk::HeaderBar *headerBar; - Gtk::Widget *boxSave; - Gtk::Widget *boxButton; - Gtk::Box *boxFuncs; - Gtk::Box* boxResize; - Gtk::MenuButton *btnSave; - Gtk::MenuButton *btnLoad; - Gtk::MenuButton *btnSettings; - Gtk::Image *HeadBackgroundImage; - Gtk::Image *imgInfo; - Gtk::Box *boxInfoError; - Gtk::Label *lblWarning; - Gtk::Label *generalTabLabel; - Gtk::Label *UsersTabLabel; - Gtk::Label *GroupsTabLabel; - Gtk::Label *generalGroupsFilesLabel; - Gtk::Label *generalUsersSizeLabel; - Gtk::Label *generalUsersFilesLabel; - Gtk::Label *generalGroupsSizeWeeksLabel; - Gtk::Label *generalGroupsFilesWeeksLabel; - Gtk::Label *generalUsersSizeWeeksLabel; - Gtk::Label *generalUsersFilesWeeksLabel; - Gtk::Label *generalGroupsSizeDaysLabel; - Gtk::Label *generalGroupsFilesDaysLabel; - Gtk::Label *generalUsersSizeDaysLabel; - Gtk::Label *generalUsersFilesDaysLabel; - Gtk::Label *generalGroupsSizeHoursLabel; - Gtk::Label *generalGroupsFilesHoursLabel; - Gtk::Label *generalUsersSizeHoursLabel; - Gtk::Label *generalUsersFilesHoursLabel; - Gtk::Label *generalGroupsSizeMinutesLabel; - Gtk::Label *generalGroupsFilesMinutesLabel; - Gtk::Label *generalUsersSizeMinutesLabel; - Gtk::Label *generalUsersFilesMinutesLabel; - Gtk::Label *ProjectTabLabel; - Gtk::Label *usersProjectLabel; - Gtk::Label *lblLoad; - Gtk::Label *lblSave; - Gtk::MenuItem *btnLoadGlob; - Gtk::MenuItem *btnLoadLocal; - Gtk::MenuItem *btnSynopsis; - Gtk::MenuItem *btnAbout; - Gtk::MenuItem *btnSaveLocalGlob; - Gtk::MenuItem *btnSaveGlob; - Gtk::MenuItem *btnSaveLocal; - Gtk::Label *groupsDeviceLabel; - Gtk::Label *usersDeviceLabel; - Gtk::Label *headLabel; - - Gtk::TreeView *groupsQuotasTree; - Gtk::TreeView *usersQuotasTree; - Gtk::TreeView *ProjectQuotasTree; - Gtk::TreeView *GeneralQuotasTree; - Gtk::Label *quotegroupGroupQuotasLabel; - - - Gtk::ComboBoxText *usersDeviceCombo; - Gtk::ComboBoxText *groupsDeviceCombo; - Gtk::ComboBoxText *generalDeviceCombo; - Gtk::ComboBoxText *usersProjectCombo; - Gtk::Label *lblFstypeGroups; - Gtk::SpinButton *generalGroupsSizeWeeksSpi; - Gtk::SpinButton *generalGroupsFileWeeksSpin; - Gtk::SpinButton *generalGroupsSizeDaySpin; - Gtk::SpinButton *generalGroupsFilesDaySpin; - Gtk::SpinButton *generalGroupsSizeHourSpin; - Gtk::SpinButton *generalGroupsFilesHourSpin; - Gtk::SpinButton *generalGroupsSizeMinuteSpin; - Gtk::SpinButton *generalGroupsFilesMinuteSpin; - Gtk::SpinButton *generalUsersSizWeeksSpin; - Gtk::SpinButton *generalUsersFileWeeksSpin; - Gtk::SpinButton *generalUsersSizeDaySpin; - Gtk::SpinButton *generalUsersFilesDaySpin; - Gtk::SpinButton *generalUsersSizeHourSpin; - Gtk::SpinButton *generalUsersFilesHoursSpin; - Gtk::SpinButton *generalUsersSizeMinuteSpin; - Gtk::SpinButton *generalUsersFilesMinutesSpin; - - - Gtk::Button *btnFilterGroups; - Gtk::Button *btnFilterUsers; - Gtk::Button *btnFilterProject; - Gtk::CheckMenuItem *chbMangSystemFile; - Gtk::Button* btnDelGroups; - Gtk::Button* btnDelProject; - Gtk::Button* btnDelUsers; - Gtk::Button* btnAddGroups; - Gtk::Button* btnAddUsers; - Gtk::Button* btnAddProject; - Gtk::Button* btnEditProject; - Gtk::Button* btnEditUsers; - Gtk::Button* btnEditGroups; - - Gtk::Box* boxGroupsWeeks; - Gtk::Box* boxGroupsDays; - Gtk::Box* boxGroupsHours; - Gtk::Box* boxGroupsMinutes; - Gtk::Box* boxUsersWeeks; - Gtk::Box* boxUsersDays; - Gtk::Box* boxUsersHours; - Gtk::Box* boxUsersMinutes; - Gtk::Box* boxProjectWeeks; - Gtk::Box* boxProjectDays; - Gtk::Box* boxProjectHours; - Gtk::Box* boxProjectMinutes; - GtkListStore* gtk_list_project; - GtkListStore* gtk_list_groups; - GtkListStore* gtk_list_user; - GtkListStore* gtk_list_general; - - public: - map_str_str* map_gui_cfg = NULL; - map_str_str* map_global_cfg = NULL; - map_str_str* map_system_cfg = NULL; - Wrapper_load_save* obj_wrapper_load_save = NULL; - View_edit_user_group* obj_view_edit = NULL; - View_filters* obj_view_filters = NULL; - View_add_user_group* obj_view_add = NULL; - View_add_project* obj_view_add_project = NULL; - View_edit_project* obj_view_edit_project = NULL; - //Devices::Parted obj_device = Devices::Parted(); - //Quotas_sys::Quotas_sys obj_quotas_sys = Quotas_sys::Quotas_sys(); - //Quotas_ubconfig::Quotas_ubconfig obj_quotas_ubconfig = Quotas_ubconfig::Quotas_ubconfig(); - vector vec_param_names; - map_str_str map_device; - string str_cmd_error; - string save_user_or_group; - string sys_or_ubconfig; - string hw_or_sw = ""; - string mode_quota = "ubconfig"; - Glib::RefPtr list_store_groups; - Glib::RefPtr list_store_users; - Glib::RefPtr list_store_project; - Gtk::TreeModel::iterator iter_groups; - Gtk::TreeModel::iterator iter_users; - Gtk::TreeModel::iterator iter_project; - bool flag_validate_del_groups = false; - bool flag_validate_del_users = false; - bool flag_validate_del_project = false; - Gtk::TreeModel::Row row; - int* socket_ext_id_I = NULL; - int* socket_trd_id_I = NULL; - View_open_browser* obj_open_browser; - const struct tv_g_u_p obj_tv_g_u_p {"", "", "", "", "", "", "", "", "",""}; - public: - // MainWindow(BaseObjectType* obj, Glib::RefPtr const& builder); - MainWindow(Glib::RefPtr builder, View_open_browser* obj_open_browser, int* socket_ext_id_I, int* socket_trd_id_I); - ~MainWindow(); - void settings(); - void flag_block_gui(); - void tree_view_select(); - void lacalization(); - void add_CSS(); - void resize_widget(); - void get_builder(); - void event(); - void open_browser(); - void info_warning_error(int mess, int error_save, int error_load); - void init_work_tv_g_u_p(); - void remove_line_template(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator& iter, Gtk::TreeModel::iterator& iter_del, bool& flag_del); - void remove_template(Glib::RefPtr* list_store, const Gtk::TreeModel::iterator* iter, bool& flag_validate_del); - void init_tree_view_general(); - void entry_combo_box_temp(Gtk::ComboBoxText *combo_box, Gtk::Label *label); - void info_status_app(string stule); - void filters_show(); - void set_obj_wrapper_load_save(Wrapper_load_save* obj_wrapper_load_save); - void init_tree_view(); - void del_columns(); - void set_obj_browser(View_open_browser* obj_open_browser); - void set_add_tv_g_u_p(string name, Gtk::TreeView* tree_view, Gtk::TreeModel::Row &row, Glib::RefPtr& list_store, struct tv_g_u_p obj_tv_g_u_p); - void off_quota_system(Gtk::ComboBoxText* combo_box, string quota_type); - void mode_switch_quota(); - void save_quotegroupSaveButton(); - void filling_device_combo_box_template(Gtk::ComboBoxText *combo_box, map_str_str &map_device); - 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 view_add_columns(Gtk::TreeView &treeView); - void format_cmd_quotas_system(struct struct_quotas& _struct_quota); - void format_cmd_quotas_ubconfig(struct struct_quotas& _struct_quota); - struct partition_cmd wrapper_settings_quotas(); - void set_map_gui(map_str_str* map_gui_cfg); - void set_map_global(map_str_str* map_global_cfg); - void set_map_local(map_str_str* map_system_cfg); - void wrapper_load_system(); - void wrapper_load_global(); - void wrapper_save_all(); - void wrapper_save_system(); - void wrapper_save_global(); - void set_obj_view_filters(View_filters* obj_view_filters); - bool check_space(Gtk::TreeView* tree_view); - void set_obj_view_add(View_add_user_group* obj_view_edit); - void add_quota_show(string name); - void edit_quota_show(string name); - void set_obj_view_edit(View_edit_user_group* obj_view_edit); - void set_obj_view_add_project(View_add_project* obj_view_add_project); - void set_obj_view_edit_project(View_edit_project* obj_view_edit_project); - void edit_quota_project_show(); -}; -void wrapper_help_show(GtkWidget *self, char* link, gpointer user_data); -void help(); -#endif diff --git a/source/view/ubl-util-standard.c b/source/view/ubl-util-standard.c deleted file mode 100644 index 3b753b1..0000000 --- a/source/view/ubl-util-standard.c +++ /dev/null @@ -1,91 +0,0 @@ -#include "ubl-util-standard.h" -#ifndef __cplusplus -#ifndef UBL_GET_STANDARD_UI -#define UBL_GET_STANDARD_UI - - -inline returnstruct *ubl_make_plugs(GtkWidget *LeftWidget, GtkWidget *RightWidget, int left_plug_id, int right_plug_id){ - returnstruct *ret=(returnstruct*)malloc(sizeof(returnstruct*)); - if (left_plug_id>0&&LeftWidget){ - GtkWidget *plug=gtk_plug_new(left_plug_id); - GtkWidget *toplug=LeftWidget; - if (gtk_widget_get_parent(GTK_WIDGET(toplug))){ - g_object_ref(G_OBJECT(toplug)); - GtkWidget *parent=gtk_widget_get_parent(toplug); - gtk_container_remove(GTK_CONTAINER(parent),toplug); - gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); - } else - gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); - gtk_widget_show(GTK_WIDGET(plug)); - ret->plugLeft=plug; - } - if (right_plug_id>0&&RightWidget){ - GtkWidget *plug=gtk_plug_new(right_plug_id); - GtkWidget *toplug=RightWidget; - if (gtk_widget_get_parent(GTK_WIDGET(toplug))){ - g_object_ref(G_OBJECT(toplug)); - GtkWidget *parent=gtk_widget_get_parent(toplug); - gtk_container_remove(GTK_CONTAINER(parent),toplug); - gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); - } else - gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); - gtk_widget_show(GTK_WIDGET(plug)); - ret->plugRight=plug; - } - return ret; -} - -#endif - -#else - - -inline void ubl_make_plugs(Gtk::Widget *LeftWidget, Gtk::Widget *RightWidget, int left_plug_id, int right_plug_id){ - if (left_plug_id>0&&LeftWidget){ - GtkWidget *plug=gtk_plug_new(left_plug_id); - GtkWidget *toplug=GTK_WIDGET(LeftWidget->gobj()); - {GdkScreen *screen = gtk_widget_get_screen(plug); - gtk_widget_set_app_paintable(plug,TRUE); - GdkVisual *colormap = gdk_screen_get_rgba_visual(screen); - gtk_widget_set_visual(plug, colormap);} - {GdkScreen *screen = gtk_widget_get_screen(toplug); - gtk_widget_set_app_paintable(toplug,TRUE); - GdkVisual *colormap = gdk_screen_get_rgba_visual(screen); - gtk_widget_set_visual(toplug, colormap);} - if (gtk_widget_get_parent(GTK_WIDGET(toplug))){ - g_object_ref(G_OBJECT(toplug)); - GtkWidget *parent=gtk_widget_get_parent(toplug); - gtk_container_remove(GTK_CONTAINER(parent),toplug); - gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); - } else - gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); - gtk_widget_show(GTK_WIDGET(plug)); - gtk_style_context_add_class(gtk_widget_get_style_context(plug),"bkim"); - gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"bkim"); - gtk_style_context_add_class(gtk_widget_get_style_context(plug),"primary-toolbar"); - } - if (right_plug_id>0&&RightWidget){ - GtkWidget *plug=gtk_plug_new(right_plug_id); - GtkWidget *toplug=GTK_WIDGET(RightWidget->gobj()); - {GdkScreen *screen = gtk_widget_get_screen(plug); - gtk_widget_set_app_paintable(plug,TRUE); - GdkVisual *colormap = gdk_screen_get_rgba_visual(screen); - gtk_widget_set_visual(plug, colormap);} - {GdkScreen *screen = gtk_widget_get_screen(toplug); - gtk_widget_set_app_paintable(toplug,TRUE); - GdkVisual *colormap = gdk_screen_get_rgba_visual(screen); - gtk_widget_set_visual(toplug, colormap);} - if (gtk_widget_get_parent(GTK_WIDGET(toplug))){ - g_object_ref(G_OBJECT(toplug)); - GtkWidget *parent=gtk_widget_get_parent(toplug); - gtk_container_remove(GTK_CONTAINER(parent),toplug); - gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); - } else - gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); - gtk_widget_show(GTK_WIDGET(plug)); - gtk_style_context_add_class(gtk_widget_get_style_context(plug),"bkim"); - gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"bkim"); - gtk_style_context_add_class(gtk_widget_get_style_context(plug),"primary-toolbar"); - } -} -#endif \ No newline at end of file diff --git a/source/view/ubl-util-standard.h b/source/view/ubl-util-standard.h deleted file mode 100644 index 3209625..0000000 --- a/source/view/ubl-util-standard.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __cplusplus -#include -#include - -typedef struct { - GtkWidget *plugLeft; - GtkWidget *plugRight; - - -} returnstruct; -static returnstruct *ubl_make_plugs(GtkWidget *LeftWidget, GtkWidget *RightWidget, int left_plug_id, int right_plug_id); -#else -#include -#include -#include -#include - - -static void ubl_make_plugs(Gtk::Widget *LeftWidget, Gtk::Widget *RightWidget, int left_plug_id, int right_plug_id); -#endif \ No newline at end of file diff --git a/source/view/view_about.cc b/source/view/view_about.cc deleted file mode 100644 index 23e00bb..0000000 --- a/source/view/view_about.cc +++ /dev/null @@ -1,47 +0,0 @@ -#include "view_about.h" - - - -View_about::View_about() { - builder = Gtk::Builder::create_from_file(path_glade); - this->settings(); -} - -View_about::~View_about() { -} - -void View_about::lacalization() { - time_t now = time(0); - tm *ltm = localtime(&now); - unsigned int year = 1900 + ltm->tm_year; - string str_authors = string(copyright) + to_string(year); - aboutWindows->set_copyright(str_authors); - aboutWindows->set_comments(str_setting_user); - aboutWindows->set_website(website); - aboutWindows->set_version(_(version_application.c_str())); - aboutWindows->set_website_label(project_Home_page); - headerAboutTopic->set_label(_(app_name)); -} - -void View_about::set_version(string version_application) { - version_application = version_application; -} - -void View_about::show() { - aboutWindows->show(); -} -void View_about::get_builder() { - builder->get_widget("btnBoxAboutDialog", btnBoxAboutDialog); - builder->get_widget("aboutWindows", aboutWindows); - builder->get_widget("headerAboutTopic", headerAboutTopic); -} - -void View_about::settings() { - this->get_builder(); - this->lacalization(); - btnBoxAboutDialog->set_visible(false); -} - -View_about* View_about::get_self() { - return this; -} \ No newline at end of file diff --git a/source/view/view_about.h b/source/view/view_about.h deleted file mode 100644 index c3b44ff..0000000 --- a/source/view/view_about.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef VIEW_ABOUT_H -#define VIEW_ABOUT_H -#include "../project_lib.h" -#include "model/util.h" -#include "../var.h" - -class View_about -{ -private: - string version_application; -private: - Glib::RefPtr builder; - Gtk::Label *headerAboutTopic; - Gtk::ButtonBox *btnBoxAboutDialog; -public: - Gtk::AboutDialog *aboutWindows; -public: - View_about(); - ~View_about(); - void lacalization(); - void event(); - View_about* get_self(); - void get_builder(); - void settings(); - void show(); - void set_path_glade(string str_path_glade); - void set_version(string version_application); -}; -#endif \ No newline at end of file diff --git a/source/view/view_add_project.cc b/source/view/view_add_project.cc index 0b1af25..b0a08e1 100644 --- a/source/view/view_add_project.cc +++ b/source/view/view_add_project.cc @@ -86,6 +86,10 @@ void View_add_project::show() { wndQuotasAddProject->show(); } +void View_add_project::lacalization() { + +} + void View_add_project::get_builder() { builder->get_widget("wndQuotasAddProject", wndQuotasAddProject); builder->get_widget("quotegroupSizeFrameLabelProject", quotegroupSizeFrameLabelProject); diff --git a/source/view/view_edit_project.cc b/source/view/view_edit_project.cc index 2302f27..5d7d579 100644 --- a/source/view/view_edit_project.cc +++ b/source/view/view_edit_project.cc @@ -102,7 +102,7 @@ void View_edit_project::get_builder() { } void View_edit_project::lacalization() { - + } diff --git a/source/view/view_filters.cc b/source/view/view_filters.cc index ee8d918..12ac641 100644 --- a/source/view/view_filters.cc +++ b/source/view/view_filters.cc @@ -1,123 +1,109 @@ -#include "view_filters.h" +#include "filters.h" -View_filters::View_filters(/* args */){ - builder = Gtk::Builder::create_from_file(path_glade); - this->settings(); +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->chbFilterName = yon_gtk_builder_get_widget(builder,"chbFilterName"); + filters_widgets->chbFilterSoftLimitFile = yon_gtk_builder_get_widget(builder,"chbFilterSoftLimitFile"); + filters_widgets->chbFilterFiles = yon_gtk_builder_get_widget(builder,"chbFilterFiles"); + filters_widgets->chbFilterHardLimitSizeDelay = yon_gtk_builder_get_widget(builder,"chbFilterHardLimitSizeDelay"); + filters_widgets->chbFilterHardLimitSize = yon_gtk_builder_get_widget(builder,"chbFilterHardLimitSize"); + filters_widgets->chbFilterSoftLimitSize = yon_gtk_builder_get_widget(builder,"chbFilterSoftLimitSize"); + filters_widgets->chbFilterQuotas = yon_gtk_builder_get_widget(builder,"chbFilterQuotas"); + filters_widgets->chbFilterSize = yon_gtk_builder_get_widget(builder,"chbFilterSize"); + filters_widgets->btnFiltersCancel = yon_gtk_builder_get_widget(builder,"btnFiltersCancel"); + filters_widgets->btnFiltersSave = yon_gtk_builder_get_widget(builder,"btnFiltersSave"); + filters_widgets->chbFilterHardLimitFile = yon_gtk_builder_get_widget(builder,"chbFilterHardLimitFile"); + filters_widgets->chbFilterHardLimitFileDelay = yon_gtk_builder_get_widget(builder,"chbFilterHardLimitFileDelay"); + filters_widgets->chbTemplate = yon_gtk_builder_get_widget(builder,"chbTemplate"); + if (filters_widgets->name == "Project") { + + } + + filters_event(filters_widgets); + } + filters_set_flag(); + return filters_widgets; } +void filters_set_name(string name) { + if (name == "Project") { + filters_widgets->name = name; + } -View_filters::~View_filters() -{ } -void View_filters::settings() { - this->get_builder(); - this->lacalization(); - this->set_map_flag(chbFilterName); - this->set_map_flag(chbFilterQuotas); - this->set_map_flag(chbFilterSize); - this->set_map_flag(chbFilterSoftLimitSize); - this->set_map_flag(chbFilterHardLimitSize); - this->set_map_flag(chbFilterHardLimitSizeDelay); - this->set_map_flag(chbFilterFiles); - this->set_map_flag(chbFilterSoftLimitFile); - this->set_map_flag(chbFilterHardLimitFile); - this->set_map_flag(chbFilterHardLimitFileDelay); - this->event(); +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 View_filters::get_builder() { - builder->get_widget("wndFilters", wndFilters); - builder->get_widget("chbFilterName", chbFilterName); - builder->get_widget("chbFilterQuotas", chbFilterQuotas); - builder->get_widget("chbFilterSize", chbFilterSize); - builder->get_widget("chbFilterSoftLimitSize", chbFilterSoftLimitSize); - builder->get_widget("chbFilterHardLimitSize", chbFilterHardLimitSize); - builder->get_widget("chbFilterHardLimitSizeDelay", chbFilterHardLimitSizeDelay); - builder->get_widget("chbFilterFiles", chbFilterFiles); - builder->get_widget("chbFilterSoftLimitFile", chbFilterSoftLimitFile); - builder->get_widget("chbFilterHardLimitFile", chbFilterHardLimitFile); - builder->get_widget("chbFilterHardLimitFileDelay", chbFilterHardLimitFileDelay); - builder->get_widget("lblFiltersHead", lblFiltersHead); - builder->get_widget("btnFiltersSave", btnFiltersSave); - builder->get_widget("btnFiltersCancel", btnFiltersCancel); - lblFiltersHead->set_label(str_filters); +void filters_destroy(GtkWidget *self) { + filters_widgets = NULL; } -void View_filters::show() { - this->set_map_flag_false(); - wndFilters->show(); -} +void filters_localization(filters_window *widgets) { -void View_filters::lacalization() { - /* - chbFilterName->set_label(str_name); - chbFilterQuotas->set_label(str_quotas); - chbFilterSize->set_label(str_size); - chbFilterSoftLimitSize->set_label(str_soft_limit_size); - chbFilterHardLimitSize->set_label(str_hard_limit_size); - chbFilterHardLimitSizeDelay->set_label(str_deferring_hard_limit_size); - chbFilterFiles->set_label(str_files); - chbFilterSoftLimitFile->set_label(str_soft_restriction_files); - chbFilterHardLimitFile->set_label(str_severe_limitation_files); - chbFilterHardLimitFileDelay->set_label(str_deferring_limit_files); - */ } -void View_filters::event() { - chbFilterName->signal_toggled().connect( - sigc::bind (sigc::mem_fun(*this, - &View_filters::set_map_flag), chbFilterName)); - chbFilterQuotas->signal_toggled().connect( - sigc::bind (sigc::mem_fun(*this, - &View_filters::set_map_flag), chbFilterQuotas)); - chbFilterSize->signal_toggled().connect( - sigc::bind (sigc::mem_fun(*this, - &View_filters::set_map_flag), chbFilterSize)); - chbFilterSoftLimitSize->signal_toggled().connect( - sigc::bind (sigc::mem_fun(*this, - &View_filters::set_map_flag), chbFilterSoftLimitSize)); - chbFilterHardLimitSize->signal_toggled().connect( - sigc::bind (sigc::mem_fun(*this, - &View_filters::set_map_flag), chbFilterHardLimitSize)); - chbFilterHardLimitSizeDelay->signal_toggled().connect( - sigc::bind (sigc::mem_fun(*this, - &View_filters::set_map_flag), chbFilterHardLimitSizeDelay)); - chbFilterFiles->signal_toggled().connect( - sigc::bind (sigc::mem_fun(*this, - &View_filters::set_map_flag), chbFilterFiles)); - chbFilterSoftLimitFile->signal_toggled().connect( - sigc::bind (sigc::mem_fun(*this, - &View_filters::set_map_flag), chbFilterSoftLimitFile)); - chbFilterHardLimitFile->signal_toggled().connect( - sigc::bind (sigc::mem_fun(*this, - &View_filters::set_map_flag), chbFilterHardLimitFile)); - chbFilterHardLimitFileDelay->signal_toggled().connect( - sigc::bind (sigc::mem_fun(*this, - &View_filters::set_map_flag), chbFilterHardLimitFileDelay)); - btnFiltersSave->signal_clicked().connect(sigc::mem_fun(*this, - &View_filters::btn_save)); - btnFiltersCancel->signal_clicked().connect(sigc::mem_fun(*this, - &View_filters::btn_cancel)); +void filters_on_hide_subwindow(GtkWidget *self) { + gtk_widget_destroy(gtk_widget_get_toplevel(self)); + filters_widgets = NULL; } -void View_filters::set_map_flag(Gtk::CheckButton* check_button) { - map_filters_flag[check_button->get_label()] = check_button->get_active(); +filters_window *get_widget_filters() { + return filters_widgets; } -void View_filters::btn_save() { - wndFilters->hide(); +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); + } } -void View_filters::btn_cancel() { - wndFilters->hide(); +gboolean* filters_get_flag() { + flag_filters[0] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterName)); + flag_filters[1] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterSoftLimitFile)); + flag_filters[2] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterFiles)); + flag_filters[3] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitSizeDelay)); + flag_filters[4] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitSize)); + flag_filters[5] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterQuotas)); + flag_filters[6] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterSoftLimitSize)); + flag_filters[7] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterSize)); + flag_filters[8] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitFile)); + flag_filters[9] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitFileDelay)); + return flag_filters; } -map View_filters::get_filters() { - return map_filters_flag; +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; + flag_filters[8] = 1; + flag_filters[9] = 1; } -void View_filters::set_map_flag_false() { - for (auto& [key, value]: map_filters_flag) { - map_filters_flag[key] = false; - } +void filters_set_flag() { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterName),flag_filters[0] ); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterSoftLimitFile), flag_filters[1]); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterFiles), flag_filters[2]); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitSizeDelay), flag_filters[3]); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitSize), flag_filters[4]); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterQuotas), flag_filters[5]); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterSoftLimitSize), flag_filters[6]); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterSize), flag_filters[7]); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitFile), flag_filters[8]); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitFileDelay), flag_filters[9]); } \ No newline at end of file diff --git a/source/view/view_filters.h b/source/view/view_filters.h index 58a026b..d8e6761 100644 --- a/source/view/view_filters.h +++ b/source/view/view_filters.h @@ -1,46 +1,48 @@ -#ifndef VIEW_FILTERS_H -#define VIEW_FILTERS_H -#include "../project_lib.h" -#include "../var.h" - -using namespace std; - -class View_filters -{ -private: - map map_filters_flag; -private: - Glib::RefPtr builder; - Gtk::Window *wndFilters; - Gtk::CheckButton *chbFilterName; - Gtk::CheckButton *chbFilterQuotas; - Gtk::CheckButton *chbFilterSize; - Gtk::CheckButton *chbFilterSoftLimitSize; - Gtk::CheckButton *chbFilterHardLimitSize; - Gtk::CheckButton *chbFilterHardLimitSizeDelay; - Gtk::CheckButton *filtersHardSizeActivationFilterCheckbox; - Gtk::CheckButton *chbFilterFiles; - Gtk::CheckButton *chbFilterSoftLimitFile; - Gtk::CheckButton *chbFilterHardLimitFile; - Gtk::CheckButton *chbFilterHardLimitFileDelay; - Gtk::Label *lblFiltersHead; - Gtk::Button *btnFiltersSave; - Gtk::Button *btnFiltersCancel; -public: - View_filters(/* args */); - ~View_filters(); - void lacalization(); - void event(); - void get_builder(); - void settings(); - void show(); -private: - void set_map_flag(Gtk::CheckButton* check_button); - void btn_save(); - void btn_cancel(); - void set_map_flag_false(); - map get_filters(); -}; -#endif +#ifndef FILTERS_H +#define FILTERS_H +#include +#include +#include "ubl-utils.h" +#include "ubl-strings.h" +#include +#include +#include +#include +#include +#include +#include +#include "philos_utils.h" +#include +// Переменные +typedef struct { + GtkWidget* Window; + GtkWidget* btnFiltersSave; + GtkWidget* btnFiltersCancel; + GtkWidget* chbFilterName; + GtkWidget* chbFilterQuotas; + GtkWidget* chbFilterSize; + GtkWidget* chbFilterSoftLimitSize; + GtkWidget* chbFilterHardLimitSize; + GtkWidget* chbFilterHardLimitSizeDelay; + GtkWidget* chbFilterFiles; + GtkWidget* chbFilterSoftLimitFile; + GtkWidget* chbFilterHardLimitFile; + GtkWidget* chbFilterHardLimitFileDelay; + GtkWidget* chbTemplate; + string *name; +} 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(); +void filters_set_name(char *name) +#endif \ No newline at end of file diff --git a/source/view/view_open_browser.cc b/source/view/view_open_browser.cc deleted file mode 100644 index 45963aa..0000000 --- a/source/view/view_open_browser.cc +++ /dev/null @@ -1,121 +0,0 @@ -#include "view_open_browser.h" - - -View_open_browser* obj_open_browser; -View_about* obj_about; - -void wrapper_help_show(GtkWidget *self, char* link, gpointer user_data) { - if (self && user_data) {} - obj_open_browser->global_lick_doc = link; - obj_about->aboutWindows->hide(); - obj_open_browser->temp_help_show(); -} - -View_open_browser::View_open_browser(/* args */) { - builder = Gtk::Builder::create_from_file(path_glade); -} - -View_open_browser::~View_open_browser() { -} - -void View_open_browser::settings() { - obj_open_browser = this; - this->get_builder(); - #ifdef WEBKIT_FOUND - my_web_kit = WEBKIT_WEB_VIEW( webkit_web_view_new() ); - three = Glib::wrap(GTK_WIDGET(my_web_kit)); - wndWeb->add(*three); - #endif - this->lacalization(); - this->event(); -} - -void View_open_browser::set_obj_about(View_about* obj_view_about) { - this->obj_view_about = obj_view_about; - obj_about = obj_view_about; -} - -void View_open_browser::show() { - this->wndShowWeb->show(); -} -void View_open_browser::get_builder() { - #ifdef WEBKIT_FOUND - builder->get_widget("wndWeb", wndWeb); - #endif - builder->get_widget("lblHeadeWndWeb", lblHeadeWndWeb); - builder->get_widget("lblwebHeaderName", lblwebHeaderName); - builder->get_widget("lblhelpText", lblhelpText); - builder->get_widget("lblhelpHeader", lblhelpHeader); - builder->get_widget("chkAlwaysOpenHelp", chkAlwaysOpenHelp); - builder->get_widget("btnReadHelp", btnReadHelp); - builder->get_widget("btnCancelHelp", btnCancelHelp); - builder->get_widget("wndShowWeb", wndShowWeb); - -} -void View_open_browser::lacalization() { - lblwebHeaderName->set_label(name_app); - lblhelpText->set_text(redirected_documentation); - btnReadHelp->set_label(read_online); - btnCancelHelp->set_label(cancel); - chkAlwaysOpenHelp->set_label(always_redirect); - lblhelpHeader->set_text(read_documentation_web); -} - -void View_open_browser::event() { - g_signal_connect(G_OBJECT(obj_view_about->aboutWindows->gobj()), "activate-link", G_CALLBACK(wrapper_help_show), NULL); - btnCancelHelp->signal_clicked().connect([&]() {wndShowWeb->hide();}); - chkAlwaysOpenHelp->signal_toggled().connect([&]() {flag_open_browser = true;}); - btnReadHelp->signal_clicked().connect(sigc::mem_fun(*this, &View_open_browser::open_browser)); -} - -void View_open_browser::temp_help_show() { - if (flag_open_browser == true) { - this->open_browser(); - } - else { - wndShowWeb->show_all(); - } -} - -void View_open_browser::open_browser() { - #ifdef WEBKIT_FOUND - if (my_web_kit) { - gtk_widget_destroy(GTK_WIDGET(my_web_kit)); - } - my_web_kit = WEBKIT_WEB_VIEW(webkit_web_view_new()); - three = Glib::wrap(GTK_WIDGET(my_web_kit)); - wndWeb->add(*three); - webkit_web_view_load_uri(my_web_kit, _(global_lick_doc.c_str())); - wndWeb->show_all(); - webkit_web_view_load_uri(my_web_kit, _(global_lick_doc.c_str())); - wndWeb->show_all(); - webkit_web_view_load_uri(my_web_kit, _(global_lick_doc.c_str())); - wndWeb->show_all(); - #else - this->template_open_browser(global_lick_doc); - #endif - this->wndShowWeb->hide(); -} - -int View_open_browser::template_open_browser(string str_link_doc) { - string cmd = cmd_xdg + string(_(str_link_doc.c_str())) + " &"; - string buf = ""; - if (geteuid() == 0) { - string response_user = getlogin(); - int size_s = std::snprintf(nullptr, 0, cmd_execute, response_user.c_str(), cmd.c_str()) + 1; - auto size = static_cast(size_s); - std::unique_ptr buf(new char[ size ]); - std::snprintf(buf.get(), size, cmd_execute, response_user.c_str(), cmd.c_str()); - cmd = string(buf.get(), buf.get() + size - 1); - } - return system(cmd.c_str()); - -} -void View_open_browser::open_help() { - global_lick_doc = const_link_doc; - temp_help_show(); -} - -View_about* View_open_browser::get_about() { - return obj_view_about; -} diff --git a/source/view/view_open_browser.h b/source/view/view_open_browser.h deleted file mode 100644 index 5f02ca6..0000000 --- a/source/view/view_open_browser.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef VIEW_OPEN_BROWSER_H -#define VIEW_OPEN_BROWSER_H - -#include "../project_lib.h" -#include "view_about.h" -#ifdef WEBKIT_FOUND -#include -#endif -#include "../var.h" - -class View_open_browser { -private: - bool flag_open_browser = false; - View_about* obj_view_about; -private: - Glib::RefPtr builder; - Gtk::Button *btnReadHelp; - Gtk::Button *btnCancelHelp; - Gtk::CheckButton *chkAlwaysOpenHelp; - Gtk::Label *lblwebHeaderName; - Gtk::Label *lblhelpText; - Gtk::Label *lblhelpHeader; - Gtk::Label *lblHeadeWndWeb; -public: - string global_lick_doc; - Gtk::Window *wndShowWeb; - #ifdef WEBKIT_FOUND - Gtk::Window *wndWeb; - Gtk::Widget *three; - WebKitWebView *my_web_kit = NULL; - #endif -public: - View_open_browser(/* args */); - ~View_open_browser(); - void lacalization(); - void event(); - void get_builder(); - void settings(); - void show(); - void open_help(); - void temp_help_show(); - void set_path_glade(string str_path_glade); - void set_obj_about(View_about* View_about); - View_about* get_about(); -private: - int template_open_browser(string str_link_doc); - void open_browser(); -}; -void wrapper_help_show(GtkWidget *self, char* link, gpointer user_data); -#endif \ No newline at end of file diff --git a/logo-background.png b/ubl-settings-diskquota-banner.png similarity index 100% rename from logo-background.png rename to ubl-settings-diskquota-banner.png diff --git a/ubl-settings-diskquota.css b/ubl-settings-diskquota.css index 6c44488..8687d4a 100644 --- a/ubl-settings-diskquota.css +++ b/ubl-settings-diskquota.css @@ -1,154 +1,108 @@ -.textHead{ - text-shadow: 2px 2px @theme_bg_color; - color: @theme_text_color; -} -.boxInfoMessError{ - background-color: #ea9999; -} -.boxInfoMessOK{ - background-color: #f3f0ac; -} -.bannerbackground { - background-color: #404040; -} -.view_app { - background-color: @theme_bg_color; -} -.view_app.view.cell:selected { - background-color:@theme_selected_bg_color; - color:@theme_selected_text_color; - transition: 10ms ease-out; - border-radius: 3px; -} -#GnomeIcon{ - border-style:solid; - border-bottom-width: 1px; - border-image: linear-gradient(90deg, alpha(@theme_text_color,0.4) 55%, alpha(@theme_bg_color, 0) 100%); - border-image-slice: 1; -} -#SepIcon{ - background-color: alpha(@theme_text_color, 0.6); -} - -#iconlabel { - font-size:14px; - font-weight: bold; - -} -.roundborder * { - border-width:0px; - border-radius:5px; +.thin { + margin:0px; + padding:0px; } .noborder { - border: none; + border:none; } -.menu:hover { - border-color:alpha(@theme_text_color, 0.01); +.nobackground { +background:transparent; } -.menu { - border-color:alpha(@theme_text_color, 0.01); +.nobackground:active { +background:transparent; } -.menu:hover >* { - border-color:alpha(@theme_text_color, 0.01); -} -.menuitembottom{ - margin-top:0px; - margin-bottom:3px; -} -.menuitemmiddle{ - margin-top:0px; - margin-bottom:0px; +.textHead{ + text-shadow: 2px 2px @theme_bg_color; + color: @theme_text_color; } -.menuitemtop{ - margin-bottom:0px; -} -.menuitemtop *{ - margin:2px 2px 0 2px; - padding: 5px 10px 3px 5px; -} -.menuitemmiddle *{ - margin:0 2px 0 2px; - padding: 3px 10px 3px 5px; +.inherited>* { + border:none; + background:inherit; } -.menuitembottom *{ - margin:0 2px 2px 2px; - padding: 3px 10px 5px 5px; +.workingbg { + background:@theme_base_color; } -.menuitemtop:hover { - background:@theme_bg_color; - border-color:inherit; - border-left-width:inherit; - border-right-width:inherit; -} -.menuitemmiddle:hover { - background:@theme_bg_color; - border-color:inherit; - border-left-width:inherit; - border-right-width:inherit; -} -.menuitembottom:hover { - background:@theme_bg_color; - border-color:inherit; - border-left-width:inherit; - border-right-width:inherit; +.menuitembottom{ + margin-top:0px; + margin-bottom:3px; + border-color:inherit; + border-left-width:inherit; + border-right-width:inherit; + } + .menuitemmiddle{ + margin-top:0px; + margin-bottom:0px; + border-color:inherit; + border-left-width:inherit; + border-right-width:inherit; + } -} -.menuitemtop:hover* { - margin:2px 2px 0 2px; - padding: 5px 10px 3px 5px; - background:@theme_selected_bg_color; - border-radius:2px; -} -.menuitemmiddle:hover* { - margin:0 2px 0 2px; - padding: 3px 10px 3px 5px; - background:@theme_selected_bg_color; - border-radius:2px; -} -.menuitembottom:hover* { - margin:0 2px 2px 2px; - padding: 3px 10px 5px 5px; - background:@theme_selected_bg_color; - border-radius:2px; -} - -.workingbg, #workingbg { - background-color:@theme_base_color; -} -.workingbg.view.cell:selected { - background-color:@theme_selected_bg_color; -} -.workingbg.view.cell:hover { - background-color:darker(@theme_selected_bg_color); - color:@theme_selected_text_color; - border-radius:3px; -} -.bkim { - transition: 200ms ease-out; - background-image: none; -} -.noborder{ -border:none; -} - -.bkim{ -opacity:0.99; -border:none; + .menuitemtop{ + margin-bottom:0px; + border-color:inherit; + border-top-width:inherit; + border-left-width:inherit; + border-right-width:inherit; + } + .menuitemtop *{ + margin:2px 2px 0 2px; + padding: 5px 10px 3px 5px; + border:transparent; + } + .menuitemmiddle *{ + margin:0 2px 0 2px; + padding: 3px 10px 3px 5px; + border:transparent; + } + .menuitembottom *{ + margin:0 2px 2px 2px; + padding: 3px 10px 5px 5px; + } + .menuitemtop:hover { + background:@theme_bg_color; + border-color:inherit; + border-top-width:inherit; + border-left-width:inherit; + border-right-width:inherit; + } + .menuitemmiddle:hover { + background:@theme_bg_color; + border-color:inherit; + border-left-width:inherit; + border-right-width:inherit; + } + .menuitembottom:hover { + background:@theme_bg_color; + border-color:inherit; + border-bottom-width:0px; + border-left-width:inherit; + border-right-width:inherit; + + } + .menuitemtop:hover* { + margin:2px 2px 0 2px; + padding: 5px 10px 3px 5px; + background:@theme_selected_bg_color; + border-radius:2px; + } + .menuitemmiddle:hover* { + margin:0 2px 0 2px; + padding: 3px 10px 3px 5px; + background:@theme_selected_bg_color; + border-radius:2px; + } + .menuitembottom:hover* { + margin:0 2px 2px 2px; + padding: 3px 10px 5px 5px; + background:@theme_selected_bg_color; + border-radius:2px; + } + .boxInfoMessError{ + background-color: #ea9999; } -.bkim_no_plug{ -background-color: transparent; -opacity:0.99; -} -.thin{ - margin:0px; - padding: 0px; -} -.nobg{ - background: none; -} -.addbg * { - background-color: @theme_bg_color; +.boxInfoMessOK{ + background-color: #f3f0ac; } \ No newline at end of file diff --git a/ubl-settings-diskquota.desktop b/ubl-settings-diskquota.desktop index 409842d..3343192 100644 --- a/ubl-settings-diskquota.desktop +++ b/ubl-settings-diskquota.desktop @@ -1,15 +1,15 @@ [Desktop Entry] Encoding=UTF-8 -Name=Setting user quotas -Name[ru]=Настройка квот пользователей -GenericName=Setting user quotas -GenericName[ru]=Настройка квот пользователей -Comment=Configuring disk quota settings for system groups and users -Comment[ru]=Настройка параметров дисковых квот для системных групп и пользователей системы +Name=ubl-settings-diskquota +Name[ru]=TEMPLATE +GenericName=ubl-settings-diskquota +GenericName[ru]=TEMPLATE +Comment=ubl-settings-diskquota +Comment[ru]=Приложение для TEMPLATE Type=Application Exec=pkexec ubl-settings-diskquota Icon=com.ublinux.ubl-settings-diskquota Terminal=false X-XfcePluggable=true X-UBLPluggable=true -Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;X-UBL-SettingsManager;X-UBL-SystemSettings; +Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;X-UBL-SettingsManager;X-UBL-Personal-Settings; diff --git a/ubl-settings-diskquota.glade b/ubl-settings-diskquota.glade index 27baa42..2108af7 100644 --- a/ubl-settings-diskquota.glade +++ b/ubl-settings-diskquota.glade @@ -1,139 +1,31 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Byte - - - Kb - - - Mb - - - Gb - - - Tb - - - - + + + + + False False True @@ -142,10 +34,10 @@ dialog True ubl-settings-diskquota - 1.0 + 1.1 Copyright © 2022 - 2023, UBSoft LLC Setting user quotas - https://ublinux.ru/ + https://wiki.ublinux.ru/ru/Программное_обеспечение/Программы_и_утилиты/Все/ubl-settings-diskquota Project Home Page Это приложение распространяется без каких-либо гарантий. Подробнее в <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, версии 2 или позднее</a>. @@ -161,7 +53,7 @@ vertical 2 - + False end @@ -187,7 +79,7 @@ 5 5 2 - ubl-settings-diskquota + TEMPLATE Manager @@ -196,12 +88,19 @@ - + + + + + + + + True False + center - 90 True False 5 @@ -210,7 +109,7 @@ 5 6 6 - 69 + 64 com.ublinux.ubl-settings-diskquota @@ -231,9 +130,10 @@ True False + center vertical - + 255 True False @@ -255,7 +155,7 @@ - + 255 True False @@ -299,222 +199,134 @@ - - 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 - dialog-question-symbolic - - - True - False - ibus-panel - - - True + False - False - False - - - True - False - 4 - 4 - Direct control of the file system - True - - - - - Help - True - False - 5 - 5 - image2 - False - - + start + False - - About + True False 5 + 5 5 - image3 - False - - - - - True - False - False - - - True - False - Load from global configuration - True - - - - - - True - False - Load from local configuration - True - - - - - - True - False - False - - - True - False - Save to global and local configuration - True - - - - - - True - False - Save to global configuration - True - - - - - - True - False - Save to local configuration - True - - - - - - 800 - 500 - False - center - com.ublinux.ubl-settings-diskquota - center - - - True - False + 5 + 5 + 5 vertical - + True False vertical - + True False - + True False 5 @@ -523,8 +335,7 @@ 5 5 5 - 25 - 1 + Device: False @@ -533,20 +344,11 @@ - + True False - start 5 - 5 5 - 5 - 5 - 5 - - - - True @@ -556,31 +358,23 @@ - False + True True 0 - + True False - vertical - - 81 + True False - - - True - False - start - - - -1 - - + 5 + 5 + Quota use status: + 0 False @@ -588,174 +382,121 @@ 0 + + + True + False + 5 + 5 + 5 + 5 + 0 + + + True + True + 1 + + - False + True True 1 - + True False - 5 - 5 - 5 - 5 - True - True - vertical - + True - True - - - True - False - vertical - - - 300 - True - True - in - - - True - False - - - True - True - ListGeneral - - - - - - Status - True - - - - - - - - Quota type - True - - - - - - - - Device -Project - True - - - - - - - - User - True - - - - - - - - Group - True - - - - - - - - Projects - True - - - - - - - - Soft -Restriction -(size) - True - - - - - - - - Severe -limitation -(size) - True - - - - - - - - Soft -Restriction -(files) - True - - - - - - - - Severe -limitation -(files) - True - - - - - - - - Deferring -(size) - True - - - - - - - - Deferring -(files) - True - - - - - - - - - + False + 5 + 5 + 5 + 5 + 5 + 5 + UserGropProject: + 0 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + + + 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 @@ -763,25 +504,8 @@ limitation 0 - - - - - True - False - General statistics - - - False - - - - - True - False - vertical - + True False 5 @@ -789,18 +513,32 @@ limitation 5 5 5 + 5 + Soft limit + 0 + + + False + True + 1 + + + + + True + False 5 - + True - False + True + False 5 5 5 5 - 5 - 5 - Device: + right + True False @@ -809,9 +547,10 @@ limitation - + True - False + True + 0 True @@ -820,17 +559,13 @@ limitation - + True False 5 5 5 5 - - Off - Not set - False @@ -839,60 +574,48 @@ limitation + + True + True + 2 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Hard limit + 0 + False True - 0 + 3 - + True False + False + 5 - + True - False - vertical - 5 - True - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Excess size delay period - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Excess files delay period - - - False - True - end - 1 - - + True + False + 5 + 5 + 5 + 5 + right + True False @@ -901,212 +624,25 @@ limitation - + True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - weeks - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - weeks - 0 - - - False - True - 1 - - - - - False - True - 1 - - + True + 0 - False + True True 1 - + True False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - days - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - days - 0 - - - False - True - 1 - - - - - False - True - 1 - - + 5 + 5 + 5 + 5 False @@ -1114,565 +650,183 @@ limitation 2 - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - hours - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - hours - 0 - - - False - True - 1 - - - - - False - True - 1 - - + + + 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 - 3 + 0 + + + + + True + True + 0 + + + True + True + 1 - + True False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - minutes - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - minutes - 0 - - - False - True - 1 - - - - - False - True - 1 - - + 5 + 5 + 5 + 5 + files False True - 4 + 2 + + True + True + 2 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Hard limit + 0 + False True - 1 + 3 - - 100 + True - True - in + False + 5 - - True - False - - - True - True - ListUser - - - - - - Name - True - - - - - - - - Quota - True - - - - - - - - Size - True - - - - - - - - Soft -Restriction -(size) - True - - - - - - - - Severe -limitation -(size) - True - - - - - - - - Soft -Restriction -(files) - True - - - - - - - - Files - - - - - - - - Severe -limitation -(files) - True - - - - - - - - Deferring -(size) - True - - - - - - - - Deferring -(files) - True - - - - - - - - - - - - False - True - 2 - - - - - True - False - - + True True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - True - False - - - True - False - com.ublinux.ubl-settings-diskquota.funnel - - - 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 - 5 - 5 - True - - - False - True - 0 - - - - - True - True - True - 5 - 5 - 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 - 5 - 5 - True - - - False - True - 2 - - - - - False - True - end - 1 - - - - - False - True - end - 3 - - - - - 1 - - - - - True - False - Users - - - 1 - False - - - - - True - False - vertical - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Device: + False + right + True False @@ -1681,9 +835,10 @@ limitation - + True - False + True + 0 True @@ -1692,17 +847,14 @@ limitation - + True False 5 5 5 5 - - Off - Not set - + files False @@ -1712,2524 +864,9 @@ limitation - False + True True - 0 - - - - - True - False - - - True - False - vertical - 5 - True - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Excess size delay period - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Excess files delay period - - - False - True - end - 1 - - - - - False - True - 0 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - weeks - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - weeks - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - days - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - days - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 2 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - hours - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - hours - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 3 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - minutes - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - minutes - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 4 - - - - - False - True - 1 - - - - - 100 - True - True - in - - - True - False - - - True - True - ListGroups - - - - - - Name - True - - - - - - - - Quota - True - - - - - - - - Size - True - - - - - - - - Soft -Restriction -(size) - True - - - - - - - - Severe -limitation -(size) - True - - - - - - - - Soft -Restriction -(files) - True - - - - - - - - Files - - - - - - - - Severe -limitation -(files) - True - - - - - - - - Deferring -(size) - True - - - - - - - - Deferring -(files) - True - - - - - - - - - - - - False - True - 2 - - - - - True - False - - - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - True - False - - - True - False - com.ublinux.ubl-settings-diskquota.funnel - - - 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 - 5 - 5 - True - - - False - True - 0 - - - - - True - True - True - 5 - 5 - 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 - 5 - 5 - True - - - False - True - 2 - - - - - False - True - end - 1 - - - - - False - True - end - 3 - - - - - 2 - - - - - True - False - Groups - - - 2 - False - - - - - True - False - vertical - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Device: - - - False - True - 0 - - - - - True - False - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - - Off - Not set - - - - False - True - 2 - - - - - False - True - 0 - - - - - True - False - - - True - False - vertical - 5 - True - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Excess size delay period - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Excess files delay period - - - False - True - end - 1 - - - - - False - True - 0 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - weeks - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - weeks - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - days - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - days - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 2 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - hours - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - hours - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 3 - - - - - True - False - vertical - 5 - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - minutes - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - minutes - 0 - - - False - True - 1 - - - - - False - True - 1 - - - - - False - True - 4 - - - - - False - True - 1 - - - - - 100 - True - True - in - - - True - False - - - True - True - ListProject - - - - - - ID - True - - - - - - - - Project Name - True - - - - - - - - Quota - True - - - - - - - - Size - True - - - - - - - - Soft -Restriction -(size) - True - - - - - - - - Severe -limitation -(size) - True - - - - - - - - Soft -Restriction -(files) - True - - - - - - - - Files - - - - - - - - Severe -limitation -(files) - True - - - - - - - - Deferring -(size) - True - - - - - - - - Deferring -(files) - True - - - - - - - - - - - - False - True - 2 - - - - - True - False - - - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - True - False - - - True - False - com.ublinux.ubl-settings-diskquota.funnel - - - 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 - 5 - 5 - True - - - False - True - 0 - - - - - True - True - True - 5 - 5 - 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 - 5 - 5 - True - - - False - True - 2 - - - - - False - True - end - 1 - - - - - False - True - end - 3 - - - - - 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 - ubl-settings-diskquota - - - - - - - - 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 - 5 - 5 - 5 - 5 - 5 - 5 - Device: - - - False - True - 0 - - - - - True - False - 5 - 5 - - - True - True - 1 - - - - - True - True - 0 - - - - - True - False - - - True - False - 5 - 5 - 5 - Quota use status: - 0 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 0 - - - True - True - 1 - - - - - True - True - 1 - - - - - True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - UserGropProject: - 0 - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - - - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - quotegroupSizeSoftLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - - - 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 - 5 - 5 - 5 - 5 - right - True - - - False - True - 0 - - - - - True - True - quotegroupSizeHardLimitAdjustment - - - True - True - 1 - - - - - True - False - 5 - 5 - 5 - 5 - - - 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 - 5 - 5 - 5 - 5 - 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 - 5 - 5 - 5 - files - - - False - True - 2 - - - - - True - True - 4 + 4 @@ -4336,7 +973,6 @@ limitation True False - True True @@ -4359,66 +995,160 @@ limitation - + + + + + + + + Byte + + + Kb + + + Mb + + + Gb + + + Tb + + + + + vertical + + + + True + + + True + + + 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 + process-stop-symbolic + + + True + False + emblem-ok-symbolic + + False - start False + 450 + dialog-question-symbolic True False - 5 - 5 5 5 5 5 vertical + 10 True False - vertical - + True False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Device: - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - - - False - True - 1 - - + start + 20 + 20 + dialog-question-symbolic + 6 - True + False True 0 @@ -4427,62 +1157,23 @@ limitation True False + vertical - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Quota use status: - - - False - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - - - False - True - 1 - - - - - True - True - 1 - - - - - True - False - - + True False - 5 - 5 - 5 - 5 - 5 + start + 10 5 - Catalog + Would you like to read documentation in the Web? + True 0 + + + + False @@ -4491,178 +1182,310 @@ limitation - + True - True - 5 - 5 - 5 - 5 - 5 - 5 + False + start + start + 10 + 10 + You will be redirected to documentation website where documentation is +translated and supported by community. + True + 0 + - True + False True 1 - + + Always redirect to online documentation True True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - True - False - - - True - False - gtk-zoom-fit - - - False - True - 0 - - - - - True - False - Review - - - False - True - 1 - - - - + False + end + True + False True + end 2 + - False + True True - 2 + 1 + + + + True + True + 0 + + + + + True + False + 30 + True - + + Cancel True - False - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Project ID - 0 - - - False - True - 0 - - + True + True + image8 + + + + True + True + 0 + + + + + Open documentation + True + True + True + image9 + + + + True + True + 1 + + + + + False + True + 1 + + + + + + + True + False + True + + + True + False + TEMPLATE Manager + + + + + + + + + + True + False + False + + + True + False + Load global configuration + + + + + + True + False + Load local configuration + + + + + + True + False + False + False + + + True + False + Documentation + True + + + + + + True + False + About + + + + + + True + False + False + + + True + False + Save configuration + + + + + + True + False + Save to global configuration + + + + + + True + False + Save to local configuration + + + + + + 800 + 600 + False + 800 + 600 + com.ublinux.ubl-settings-diskquota + + + True + False + vertical + + + True + False + vertical + + + True + False - - Auto + True - True - False + False 5 5 5 5 5 5 - True + 25 False True - 1 - - - - - True - True - 5 - 5 - 5 - 5 - 5 - 5 - - - True - True - 2 + 0 - - Generate + True - True - True + False + start 5 5 5 5 - 5 - 5 + 6 + 6 + True + + + + False True - 3 + 1 False True - 3 + 0 - + True False + vertical - + + 81 True False - 5 - 5 - 5 - 5 - 5 - 5 - Project Name + + + True + False + start + + + -1 + + False @@ -4670,42 +1493,15 @@ limitation 0 - - - True - True - 5 - 5 - 5 - 5 - - - True - True - 1 - - False True - 4 + 1 - - - False - True - 0 - - - - - True - False - True - + True False 5 @@ -4713,295 +1509,2002 @@ limitation 5 5 5 - 0.019999999552965164 - in + 5 + True + True + vertical - + True False - 5 - 5 - 5 - 5 + 5 + 5 + 5 + 5 + 5 + 5 + True + True + vertical - + True - False - vertical + True - + True False - 5 - 5 - 5 - 5 - 5 - 5 - Currently using: + vertical + + + 300 + True + True + in + + + True + False + + + True + True + ListGeneral + 0 + + + + + + Status + True + + + + + + + + Quota type + True + + + + + + + + Device +Project + True + + + + + + + + User + True + + + + + + + + Group + True + + + + + + + + Projects + True + + + + + + + + Soft +Restriction +(size) + True + + + + + + + + Severe +limitation +(size) + True + + + + + + + + Soft +Restriction +(files) + True + + + + + + + + Severe +limitation +(files) + True + + + + + + + + Deferring +(size) + True + + + + + + + + Deferring +(files) + True + + + + + + + + + + + + False + True + 0 + + + + + + + True + False + General statistics + + + False + + + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Device: + + + False + True + 0 + + + + + True + False + + + True + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + + Off + Not set + + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + + + True + False + vertical + 5 + True + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Excess size delay period + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Excess files delay period + + + False + True + end + 1 + + + + + False + True + 0 + + + + + True + False + vertical + 5 + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + weeks + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + weeks + 0 + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + vertical + 5 + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + days + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + days + 0 + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 2 + + + + + True + False + vertical + 5 + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + hours + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + hours + 0 + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 3 + + + + + True + False + vertical + 5 + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + minutes + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + minutes + 0 + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 4 + + + + + False + True + 1 + + + + + 100 + True + True + in + + + True + False + + + True + True + ListUser + 0 + + + + + + Name + True + + + + + + + + Quota + True + + + + + + + + Size + True + + + + + + + + Soft +Restriction +(size) + True + + + + + + + + Severe +limitation +(size) + True + + + + + + + + Soft +Restriction +(files) + True + + + + + + + + Files + + + + + + + + Severe +limitation +(files) + True + + + + + + + + Deferring +(size) + True + + + + + + + + Deferring +(files) + True + + + + + + + + + + + + False + True + 2 + + + + + True + False + + + True + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + True + False + + + True + False + com.ublinux.ubl-settings-diskquota.funnel + + + 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 + 5 + 5 + True + + + False + True + 0 + + + + + True + True + True + 5 + 5 + 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 + 5 + 5 + True + + + False + True + 2 + + + + + False + True + end + 1 + + + + + False + True + end + 3 + + - False - True - 0 + 1 - - + + True False - 5 - 5 - 5 - 5 - 5 - 5 - Soft limit - 0 + Users - False - True 1 + False True False - 5 + vertical - + True - True - False + False 5 5 5 5 - right - True + 5 + 5 + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Device: + + + False + True + 0 + + + + + True + False + + + True + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + + Off + Not set + + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + + + True + False + vertical + 5 + True + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Excess size delay period + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Excess files delay period + + + False + True + end + 1 + + + + + False + True + 0 + + + + + True + False + vertical + 5 + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + weeks + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + weeks + 0 + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + vertical + 5 + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + days + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + days + 0 + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 2 + + + + + True + False + vertical + 5 + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + hours + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + hours + 0 + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 3 + + + + + True + False + vertical + 5 + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + minutes + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + minutes + 0 + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 4 + + False True - 0 - - - - - True - True - 0 - quotegroupSizeSoftLimitAdjustment - - - True - True 1 - - True - False - 5 - 5 - 5 - 5 - - - False - True - 2 - - - - - True - True - 2 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Hard limit - 0 - - - False - True - 3 - - - - - True - False - False - 5 - - + + 100 True True - False - 5 - 5 - 5 - 5 - right - True + in + + + True + False + + + True + True + ListGroups + 0 + + + + + + Name + True + + + + + + + + Quota + True + + + + + + + + Size + True + + + + + + + + Soft +Restriction +(size) + True + + + + + + + + Severe +limitation +(size) + True + + + + + + + + Soft +Restriction +(files) + True + + + + + + + + Files + + + + + + + + Severe +limitation +(files) + True + + + + + + + + Deferring +(size) + True + + + + + + + + Deferring +(files) + True + + + + + + + + + False True - 0 - - - - - True - True - 0 - quotegroupSizeHardLimitAdjustment - - - True - True - 1 + 2 - + True False - 5 - 5 - 5 - 5 + + + True + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + True + False + + + True + False + com.ublinux.ubl-settings-diskquota.funnel + + + 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 + 5 + 5 + True + + + False + True + 0 + + + + + True + True + True + 5 + 5 + 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 + 5 + 5 + True + + + False + True + 2 + + + + + False + True + end + 1 + + False True - 2 + end + 3 - 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 + 2 - - + + True False - 5 - 5 - 5 - 5 - 5 - 5 - Soft limit - 0 + Groups - False - True - 1 + 2 + False True False - 5 + vertical - + True - True - False + False 5 5 5 5 - right - True + 5 + 5 + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Device: + + + False + True + 0 + + + + + True + False + + + True + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + + Off + Not set + + + + False + True + 2 + + False @@ -5010,204 +3513,1193 @@ limitation - - True - True - 0 - quotegroupFilesSoftLimitAdjustment - - - True - True - 1 - - - - + True False - 5 - 5 - 5 - 5 - files + + + True + False + vertical + 5 + True + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Excess size delay period + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Excess files delay period + + + False + True + end + 1 + + + + + False + True + 0 + + + + + True + False + vertical + 5 + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + weeks + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + weeks + 0 + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + vertical + 5 + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + days + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + days + 0 + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 2 + + + + + True + False + vertical + 5 + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + hours + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + hours + 0 + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 3 + + + + + True + False + vertical + 5 + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + minutes + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + minutes + 0 + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 4 + + False True - 2 + 1 - - - True - True - 2 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - Hard limit - 0 - - - False - True - 3 - - - - - True - False - 5 - + + 100 True True - False - 5 - 5 - 5 - 5 - 5 - right - True + in + + + True + False + + + True + True + ListProject + 0 + + + + + + ID + True + + + + + + + + Project Name + True + + + + + + + + Quota + True + + + + + + + + Size + True + + + + + + + + Soft +Restriction +(size) + True + + + + + + + + Severe +limitation +(size) + True + + + + + + + + Soft +Restriction +(files) + True + + + + + + + + Files + + + + + + + + Severe +limitation +(files) + True + + + + + + + + Deferring +(size) + True + + + + + + + + Deferring +(files) + True + + + + + + + + + False True - 0 - - - - - True - True - 0 - quotegroupFilesHardLimitAdjustment - - - True - True - 1 + 2 - + True False - 5 - 5 - 5 - 5 - files + + + True + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + True + False + + + True + False + com.ublinux.ubl-settings-diskquota.funnel + + + 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 + 5 + 5 + True + + + False + True + 0 + + + + + True + True + True + 5 + 5 + 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 + 5 + 5 + True + + + False + True + 2 + + + + + False + True + end + 1 + + False True - 2 + end + 3 - True - True - 4 + 3 + + + + + True + False + Project + + + 3 + False + + True + True + 0 + + + False + True + 0 + - - + + + False + True + 2 + + + + + True + True + 0 + + + + + + + True + False + True + + + True + False + 5 + 5 + 5 + 5 + 2 + ubl-settings-diskquota + + + + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 6 + 32 + com.ublinux.ubl-settings-diskquota + + + + + True + False + + + True + True + False + True + menu3 + + True False - 5 - 5 - 5 - 5 - 5 - 5 - Files + + + True + False + Save + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + - True + False + True + 0 + + + + + True + True + True + False + True + True + menu2 + none + + + + + + + False True 1 + + end + 1 + + + + + True + False + + + True + True + False + True + menu1 + + + True + False + + + True + False + Load + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + + + + + + False + True + 0 + + + + + 2 + + + + + + + + 1000000 + 1 + 10 + + + 1000000 + 1 + 10 + + + 1024 + 1 + 10 + + + 1024 + 1 + 10 + + + 1000000 + 1 + 10 + + + 1000000 + 1 + 10 + + + 1024 + 1 + 10 + + + 1024 + 1 + 10 + + + False + Please select File + True + center + 500 + 400 + True + com.ublinux.ublexec + dialog + True + True + select-folder + + + False + + + False + + + False + False + 0 + + + + + + + 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 - vertical + end + 5 + 5 True - + + gtk-cancel True - False - end - 5 - True - - - gtk-cancel - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - - - False - True - 0 - - - - - gtk-save - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - - - False - True - 1 - - + True + True + center + True False @@ -5215,11 +4707,115 @@ limitation 0 + + + gtk-save + True + True + True + center + True + + + False + True + 1 + + False True - 2 + end + 5 + + + + + Hard limit (size) delay + True + True + False + start + True + + + False + True + 5 + + + + + Files + True + True + False + start + True + + + False + True + 6 + + + + + 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 + True + False + True + + + False + True + 11 @@ -5228,12 +4824,11 @@ limitation True False - True - + True False - Settings disk quotas - Addition + Filters @@ -5251,22 +4846,7 @@ limitation - - True - - - - - - - True - - - - - - - + False start False @@ -5291,7 +4871,7 @@ limitation True False - + True False 5 @@ -5309,7 +4889,7 @@ limitation - + True False 5 @@ -5335,7 +4915,7 @@ limitation True False - + True False 5 @@ -5353,7 +4933,7 @@ limitation - + True False 5 @@ -5379,7 +4959,7 @@ limitation True False - + True False 5 @@ -5389,6 +4969,7 @@ limitation 5 5 Catalog + 0 False @@ -5397,16 +4978,70 @@ limitation - + True - False + True + 5 + 5 + 5 + 5 + 5 + 5 - False + True True 1 + + + True + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + True + False + + + True + False + gtk-zoom-fit + + + False + True + 0 + + + + + True + False + Review + + + False + True + 1 + + + + + + + False + True + 2 + + False @@ -5419,7 +5054,7 @@ limitation True False - + True False 5 @@ -5429,6 +5064,7 @@ limitation 5 5 Project ID + 0 False @@ -5437,9 +5073,18 @@ limitation - + + Auto True - False + True + False + 5 + 5 + 5 + 5 + 5 + 5 + True False @@ -5447,6 +5092,42 @@ limitation 1 + + + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + True + True + 2 + + + + + Generate + True + True + True + 5 + 5 + 5 + 5 + 5 + 5 + + + False + True + 3 + + False @@ -5459,7 +5140,7 @@ limitation True False - + True False 5 @@ -5477,15 +5158,13 @@ limitation - + True True 5 5 5 5 - 5 - 5 True @@ -5537,7 +5216,7 @@ limitation False vertical - + True False 5 @@ -5555,7 +5234,7 @@ limitation - + True False 5 @@ -5579,7 +5258,7 @@ limitation False 5 - + True True False @@ -5597,11 +5276,10 @@ limitation - + True True 0 - quotegroupSizeSoftLimitAdjustment True @@ -5610,7 +5288,7 @@ limitation - + True False 5 @@ -5632,7 +5310,7 @@ limitation - + True False 5 @@ -5657,7 +5335,7 @@ limitation False 5 - + True True False @@ -5675,11 +5353,10 @@ limitation - + True True 0 - quotegroupSizeHardLimitAdjustment True @@ -5688,7 +5365,7 @@ limitation - + True False 5 @@ -5714,7 +5391,7 @@ limitation - + True False 5 @@ -5758,7 +5435,7 @@ limitation False vertical - + True False 5 @@ -5776,7 +5453,7 @@ limitation - + True False 5 @@ -5800,7 +5477,7 @@ limitation False 5 - + True True False @@ -5818,11 +5495,10 @@ limitation - + True True 0 - quotegroupFilesSoftLimitAdjustment True @@ -5831,15 +5507,13 @@ limitation - + True False 5 5 5 5 - 5 - 5 files @@ -5856,7 +5530,7 @@ limitation - + True False 5 @@ -5880,14 +5554,14 @@ limitation False 5 - + True True False - 5 5 - 5 5 + 5 + 5 right True @@ -5898,11 +5572,10 @@ limitation - + True True 0 - quotegroupFilesHardLimitAdjustment True @@ -5911,15 +5584,13 @@ limitation - + True False 5 5 5 5 - 5 - 5 files @@ -5940,7 +5611,7 @@ limitation - + True False 5 @@ -5980,7 +5651,7 @@ limitation 5 True - + gtk-cancel True True @@ -6000,7 +5671,7 @@ limitation - + gtk-save True True @@ -6039,12 +5710,11 @@ limitation True False - True - + True False - Settings disk quotas - Editing + Settings disk quotas - Addition @@ -6062,7 +5732,7 @@ limitation - + False start False @@ -6087,7 +5757,95 @@ limitation True False - + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Device: + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + + + False + True + 1 + + + + + True + True + 0 + + + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Quota use status: + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + + + False + True + 1 + + + + + True + True + 1 + + + + + True + False + + True False 5 @@ -6096,7 +5854,7 @@ limitation 5 5 5 - Device: + Catalog False @@ -6105,23 +5863,21 @@ limitation - + True False - 5 - 5 - True + False True 1 - True + False True - 0 + 2 @@ -6129,7 +5885,7 @@ limitation True False - + True False 5 @@ -6138,8 +5894,7 @@ limitation 5 5 5 - Quota use status: - 0 + Project ID False @@ -6148,26 +5903,21 @@ limitation - + True False - 5 - 5 - 5 - 5 - 0 - True + False True 1 - True + False True - 1 + 3 @@ -6175,7 +5925,7 @@ limitation True False - + True False 5 @@ -6184,8 +5934,7 @@ limitation 5 5 5 - UserGropProject: - 0 + Project Name False @@ -6194,16 +5943,18 @@ limitation - + True - False + True 5 5 5 5 + 5 + 5 - False + True True 1 @@ -6212,7 +5963,7 @@ limitation False True - 2 + 4 @@ -6252,7 +6003,7 @@ limitation False vertical - + True False 5 @@ -6270,7 +6021,7 @@ limitation - + True False 5 @@ -6294,7 +6045,7 @@ limitation False 5 - + True True False @@ -6312,11 +6063,10 @@ limitation - + True True 0 - quotegroupSizeSoftLimitAdjustment True @@ -6325,7 +6075,7 @@ limitation - + True False 5 @@ -6347,7 +6097,7 @@ limitation - + True False 5 @@ -6372,7 +6122,7 @@ limitation False 5 - + True True False @@ -6390,11 +6140,10 @@ limitation - + True True 0 - quotegroupSizeHardLimitAdjustment True @@ -6403,7 +6152,7 @@ limitation - + True False 5 @@ -6429,7 +6178,7 @@ limitation - + True False 5 @@ -6473,7 +6222,7 @@ limitation False vertical - + True False 5 @@ -6491,7 +6240,7 @@ limitation - + True False 5 @@ -6515,7 +6264,7 @@ limitation False 5 - + True True False @@ -6533,11 +6282,10 @@ limitation - + True True 0 - quotegroupFilesSoftLimitAdjustment True @@ -6546,7 +6294,7 @@ limitation - + True False 5 @@ -6571,7 +6319,7 @@ limitation - + True False 5 @@ -6595,7 +6343,7 @@ limitation False 5 - + True True False @@ -6613,11 +6361,10 @@ limitation - + True True 0 - quotegroupFilesHardLimitAdjustment True @@ -6626,7 +6373,7 @@ limitation - + True False 5 @@ -6655,7 +6402,7 @@ limitation - + True False 5 @@ -6695,18 +6442,165 @@ limitation 5 True - + gtk-cancel True - True - True + True + True + 5 + 5 + 5 + 5 + 5 + 5 + True + + + False + True + 0 + + + + + gtk-save + True + True + True + 5 + 5 + 5 + 5 + 5 + 5 + True + + + False + True + 1 + + + + + False + True + 0 + + + + + False + True + 2 + + + + + + + True + False + + + True + False + Settings disk quotas - Editing + + + + + + + + True + False + 32 + com.ublinux.ubl-settings-diskquota + 5 + + + + + + + False + start + False + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + vertical + + + True + False + vertical + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Device: + + + False + True + 0 + + + + + True + False + 5 + 5 + + + True + True + 1 + + + + + True + True + 0 + + + + + True + False + + + True + False 5 5 5 5 5 5 - True + Quota use status: + 0 False @@ -6715,458 +6609,561 @@ limitation - - gtk-save + True - True - True + False 5 5 5 5 - 5 - 5 - True + 0 - False + True True 1 - - False - True - 0 - - - - - False - True - 2 - - - - - - - True - False - True - - - True - False - Settings disk quotas - Editing - - - - - - - - True - False - 32 - com.ublinux.ubl-settings-diskquota - 5 - - - - - - - 1000000 - 1 - 10 - - - 1000000 - 1 - 10 - - - 1024 - 1 - 10 - - - 1024 - 1 - 10 - - - False - Please select File - True - center - 500 - 400 - True - com.ublinux.ublexec - dialog - True - True - select-folder - - - False - vertical - 2 - - - False - end - - - gtk-cancel - True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - True True - 0 + 1 - - gtk-ok + True - True - True - 5 - 5 - 5 - 5 - 5 - 5 - True - - - True - True - 1 - - - - - False - False - 0 - - - - - - - - - - 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 + False + 5 + 5 + 5 + 5 + 5 + 5 + UserGropProject: + 0 + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + + + False + True + 1 + + + + + False + True + 2 + + False True - 4 + 0 True False - end - 5 - 5 True - - gtk-cancel - True - True - True - center - True - - - False - True - 0 - - - - - gtk-save + True - True - True - center - 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 + 5 + 5 + 5 + 5 + right + True + + + False + True + 0 + + + + + True + True + 0 + + + True + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + + + 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 + 5 + 5 + 5 + 5 + right + True + + + False + True + 0 + + + + + True + True + 0 + + + True + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + + + False + True + 2 + + + + + True + True + 4 + + + + + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Size + + - False + True True - 1 + 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 + 5 + 5 + 5 + 5 + right + True + + + False + True + 0 + + + + + True + True + 0 + + + True + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 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 + 5 + 5 + 5 + 5 + right + True + + + False + True + 0 + + + + + True + True + 0 + + + True + True + 1 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + files + + + False + True + 2 + + + + + True + True + 4 + + + + + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + Files + + + + + True + 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 + 1 - - - - - True - False - True - - - True - False - Filters - - - - - - - - True - False - 32 - com.ublinux.ubl-settings-diskquota - 5 - - - - - - - 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 - - + vertical + True True False - vertical + end + 5 + True - + + gtk-cancel True - False - start - 10 + True + True + 5 + 5 + 5 + 5 + 5 5 - Would you like to read documentation in the Web? - True - 0 - - - - + True False @@ -7175,167 +7172,55 @@ limitation - - 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 + + gtk-save True True - False - end - 10 - True - + True + 5 + 5 + 5 + 5 + 5 + 5 + True False True - 2 + 1 - - - - True - True - 1 - - - - - - True - True - 0 - - - - - True - False - 5 - 5 - 5 - 5 - 5 - 5 - 30 - True - - - Cancel - True - True - True - - True + False True 0 - - - Read Online - True - True - True - - - - True - True - 1 - - False True - 1 + 2 - + True False - True - + True False - ubl-settings-diskquota + Settings disk quotas - Editing - - - True - False - 32 - dialog-question-symbolic - - - - - - - 800 - 600 - False - True - True - com.ublinux.ubl-settings-diskquota - - - - - - True - False - True - - - True - False - ubl-settings-diskquota - - True