master #14

Merged
asmeron merged 13 commits from Igor1/ubl-settings-diskquota:master into develop 2 years ago

@ -123,6 +123,7 @@ install: check uninstall
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/" "logo-background.png" @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}.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.${PKGNAME}.warning.svg"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.ubl-settings-diskquota.funnel.svg"
asmeron commented 2 years ago
Review

Игорь, выше смотри как строчки прописаны !
Должно быть имя: com.ublinux.${PKGNAME}.funnel.svg

Игорь, выше смотри как строчки прописаны ! Должно быть имя: com.ublinux.${PKGNAME}.funnel.svg
@if [ -z ${DESTDIR} ]; then \ @if [ -z ${DESTDIR} ]; then \
[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ [ -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; \ update-desktop-database --quiet &>/dev/null || true; \

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
user-166 commented 2 years ago
Review

Заменить на актуальную

Заменить на актуальную
Igor1 commented 2 years ago
Review

Исправил.
effeece73c

Исправил. https://gitea.ublinux.ru/Igor1/ubl-settings-diskquota/commit/effeece73c527f0b4596673b1669467251bbdfc2
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
version="1.1"
id="svg1359"
width="256"
height="256"
viewBox="0 0 256 256"
sodipodi:docname="funnel.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1363" />
<sodipodi:namedview
id="namedview1361"
pagecolor="#ffffff"
bordercolor="#999999"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="1.5333252"
inkscape:cx="133.37027"
inkscape:cy="231.84906"
inkscape:window-width="1920"
inkscape:window-height="1027"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g1365" />
<g
inkscape:groupmode="layer"
inkscape:label="Image"
id="g1365">
<path
style="fill:#313131;stroke-width:0.499256;fill-opacity:1"
d="m 104.65705,237.70905 c -0.62183,-0.24981 -1.35199,-1.03652 -1.62259,-1.74825 -0.31065,-0.81708 -0.49199,-18.8221 -0.49199,-48.8496 V 139.55564 L 63.364841,95.35613 24.187217,51.156622 18.806245,50.863604 C 12.784621,50.535703 10.172614,49.782271 6.8934643,47.427365 -3.1207996,40.235664 -1.3333195,24.490308 10.106237,19.127045 l 2.819779,-1.322011 H 128.00452 243.08303 l 2.81978,1.322011 c 3.59114,1.683651 6.65629,4.748951 8.33921,8.33961 1.8728,3.995783 1.8839,9.615451 0.0268,13.553783 -3.22543,6.840051 -9.19011,9.973686 -19.00052,9.982229 l -3.32143,0.0029 -39.24013,44.276883 -39.24012,44.27689 -0.011,35.72889 c -0.0103,33.46974 -0.0684,35.85515 -0.9194,37.72591 -0.49963,1.09836 -1.22486,2.25007 -1.61161,2.55936 -1.04329,0.83431 -44.14983,22.65836 -44.68151,22.62142 -0.25051,-0.0174 -0.96424,-0.23604 -1.58606,-0.48586 z"
id="path1444" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -9,6 +9,11 @@ int main(int argc, char** argv) {
for (int i=1; i<argc; i++){ for (int i=1; i<argc; i++){
str_cmd_argv+= to_string(*argv[i]) + " "; str_cmd_argv+= to_string(*argv[i]) + " ";
} }
if (geteuid()!=0){
string cmd = "";
cmd = cmd + "pkexec " + app_name + " " + str_cmd_argv;
return system(cmd.c_str());
}
if (argc > 1){ if (argc > 1){
str_argv = argv[1]; str_argv = argv[1];
} }

@ -98,7 +98,6 @@ extern string version_application;
#define str_hard_activation_size _("Hard limit activation time (size)") #define str_hard_activation_size _("Hard limit activation time (size)")
#define str_hard_limit_time _("Hard limit (file) activation time") #define str_hard_limit_time _("Hard limit (file) activation time")
#define str_group_quotas_device _("Group quotas for this device:") #define str_group_quotas_device _("Group quotas for this device:")
#define str_general_settings _("General settings")
#define str_tw_severe_limitation _("Severe\nlimitation\n(size)") #define str_tw_severe_limitation _("Severe\nlimitation\n(size)")
#define str_tw_general_deferring_size _("Deferring\n(size)") #define str_tw_general_deferring_size _("Deferring\n(size)")
@ -156,7 +155,7 @@ extern string version_application;
#define website _("https://wiki.ublinux.com") #define website _("https://wiki.ublinux.com")
#define project_Home_page _("Project Home Page") #define project_Home_page _("Project Home Page")
#define open_dir_file_manager "/home/"
asmeron commented 2 years ago
Review

Это что такое ?

Это что такое ?
#endif #endif

@ -174,29 +174,12 @@ void MainWindow::view_add_columns(Gtk::TreeView &treeView) {
} }
void MainWindow::lacalization() { void MainWindow::lacalization() {
generalTabLabel->set_text(str_general_settings);
GroupsTabLabel->set_text(str_groups); GroupsTabLabel->set_text(str_groups);
headerTopic->set_label(name_app); headerTopic->set_label(name_app);
UsersTabLabel->set_text(str_users); UsersTabLabel->set_text(str_users);
generalGroupsFilesLabel->set_text(str_excess_files_delay); generalGroupsFilesLabel->set_text(str_excess_files_delay);
generalUsersSizeLabel->set_text(str_excess_size_delay); generalUsersSizeLabel->set_text(str_excess_size_delay);
generalUsersFilesLabel->set_text(str_excess_files_delay); generalUsersFilesLabel->set_text(str_excess_files_delay);
generalGroupsSizeWeeksLabel->set_text(str_weeks);
generalGroupsFilesWeeksLabel->set_text(str_weeks);
generalUsersSizeWeeksLabel->set_text(str_weeks);
generalUsersFilesWeeksLabel->set_text(str_weeks);
generalGroupsSizeDaysLabel->set_text(str_days);
generalGroupsFilesDaysLabel->set_text(str_days);
generalUsersSizeDaysLabel->set_text(str_days);
generalUsersFilesDaysLabel->set_text(str_days);
generalGroupsSizeHoursLabel->set_text(str_hours);
generalGroupsFilesHoursLabel->set_text(str_hours);
generalUsersSizeHoursLabel->set_text(str_hours);
generalUsersFilesHoursLabel->set_text(str_hours);
generalGroupsSizeMinutesLabel->set_text(str_minutes);
generalGroupsFilesMinutesLabel->set_text(str_minutes);
generalUsersSizeMinutesLabel->set_text(str_minutes);
generalUsersFilesMinutesLabel->set_text(str_minutes);
lblLoad->set_text(str_load_local); lblLoad->set_text(str_load_local);
lblSave->set_text(str_save_local); lblSave->set_text(str_save_local);
groupsDeviceLabel->set_label(str_device); groupsDeviceLabel->set_label(str_device);

@ -50,8 +50,20 @@ void View_add_project::event() {
}); });
quotegroupCancelButtonAdd->signal_clicked().connect([&]() {this->close_wnd();}); quotegroupCancelButtonAdd->signal_clicked().connect([&]() {this->close_wnd();});
quotegroupSaveButtonAdd->signal_clicked().connect([&]() {this->save();}); quotegroupSaveButtonAdd->signal_clicked().connect([&]() {this->save();});
btnReviewProject->signal_clicked().connect([&]() {show_file_manager();});
btnFilemangerOk->signal_clicked().connect([&]() {save_file_manager();});
btnFilemangerExit->signal_clicked().connect([&]() {wndChooseFileWallpaper->hide();});
} }
void View_add_project::show_file_manager() {
wndChooseFileWallpaper->set_current_folder(open_dir_file_manager);
wndChooseFileWallpaper->show();
}
void View_add_project::save_file_manager() {
entryCatalogProject->set_text(wndChooseFileWallpaper->get_filename());
wndChooseFileWallpaper->hide();
}
void View_add_project::close_wnd() { void View_add_project::close_wnd() {
wndQuotasAddProject->hide(); wndQuotasAddProject->hide();
} }
@ -99,22 +111,14 @@ void View_add_project::get_builder() {
builder->get_widget("quotegroupFilesHardLimitSpinProject", quotegroupFilesHardLimitSpinProject); builder->get_widget("quotegroupFilesHardLimitSpinProject", quotegroupFilesHardLimitSpinProject);
builder->get_widget("quotegroupSizeSoftLimitComboProject", quotegroupSizeSoftLimitComboProject); builder->get_widget("quotegroupSizeSoftLimitComboProject", quotegroupSizeSoftLimitComboProject);
builder->get_widget("quotegroupSizeHardLimitComboProject", quotegroupSizeHardLimitComboProject); builder->get_widget("quotegroupSizeHardLimitComboProject", quotegroupSizeHardLimitComboProject);
builder->get_widget("wndChooseFileWallpaper", wndChooseFileWallpaper);
builder->get_widget("btnFilemangerExit", btnFilemangerExit);
builder->get_widget("btnFilemangerOk", btnFilemangerOk);
} }
void View_add_project::lacalization() { void View_add_project::lacalization() {
this->fill_in_pow_memory(quotegroupSizeSoftLimitComboProject); this->fill_in_pow_memory(quotegroupSizeSoftLimitComboProject);
this->fill_in_pow_memory(quotegroupSizeHardLimitComboProject); this->fill_in_pow_memory(quotegroupSizeHardLimitComboProject);
lblDeviceProject->set_text(str_device);
lblStatusQuotaProject->set_text(str_quota_status);
// lblSetUGP->set_text("");
quotegroupSizeFrameLabelProject->set_text(str_size);
quotegroupFilesFrameLabelProject->set_text(str_files);
quotegroupSizeCurrentlyLabelProject->set_text(str_currently_using);
quotegroupFilesCurrentlyLabelProject->set_text(str_currently_using);
quotegroupSizeSoftLimitLabelProject->set_text(str_soft_limit);
quotegroupFilesSoftLimitLabelProject->set_text(str_soft_limit);
quoteSizeHardLimitLabelProject->set_text(str_hard_limit);
quoteFilesHardLimitLabelProject->set_text(str_hard_limit);
} }

@ -40,6 +40,9 @@ private:
Gtk::SpinButton* quotegroupFilesHardLimitSpinProject; Gtk::SpinButton* quotegroupFilesHardLimitSpinProject;
Gtk::ComboBoxText* quotegroupSizeSoftLimitComboProject; Gtk::ComboBoxText* quotegroupSizeSoftLimitComboProject;
Gtk::ComboBoxText* quotegroupSizeHardLimitComboProject; Gtk::ComboBoxText* quotegroupSizeHardLimitComboProject;
Gtk::FileChooserDialog* wndChooseFileWallpaper;
Gtk::Button* btnFilemangerOk;
Gtk::Button* btnFilemangerExit;
public: public:
View_add_project(/* args */); View_add_project(/* args */);
@ -54,6 +57,8 @@ public:
void check_limit(Gtk::CheckButton *check_button, Gtk::SpinButton *spin, Gtk::ComboBoxText *combo_box); void check_limit(Gtk::CheckButton *check_button, Gtk::SpinButton *spin, Gtk::ComboBoxText *combo_box);
void check_limit(Gtk::CheckButton *check_button, Gtk::SpinButton *spin, Gtk::Label *combo_box); void check_limit(Gtk::CheckButton *check_button, Gtk::SpinButton *spin, Gtk::Label *combo_box);
void fill_in_pow_memory(Gtk::ComboBoxText *cb_text); void fill_in_pow_memory(Gtk::ComboBoxText *cb_text);
void show_file_manager();
void save_file_manager();
}; };

@ -92,17 +92,6 @@ void View_add_user_group::show() {
} }
void View_add_user_group::lacalization() { void View_add_user_group::lacalization() {
lblSetDevice->set_text(str_device);
lblQuotasStatus->set_text(str_quota_status);
// lblSetUGP->set_text("");
quotegroupSizeFrameLabel->set_text(str_size);
quotegroupFilesFrameLabel->set_text(str_files);
quotegroupSizeCurrentlyLabel->set_text(str_currently_using);
quotegroupSizeSoftLimitLabel->set_text(str_soft_limit);
quoteSizeHardLimitLabel->set_text(str_hard_limit);
quoteFilesHardLimitLabel->set_text(str_hard_limit);
quotegroupFilesSoftLimitLabel->set_text(str_soft_limit);
quotegroupFilesCurrentlyLabel->set_text(str_currently_using);
this->fill_in_pow_memory(quotegroupSizeSoftLimitCombo); this->fill_in_pow_memory(quotegroupSizeSoftLimitCombo);
this->fill_in_pow_memory(quotegroupSizeHardLimitCombo); this->fill_in_pow_memory(quotegroupSizeHardLimitCombo);

@ -28,6 +28,7 @@ void View_edit_project::setting() {
} }
void View_edit_project::event() { void View_edit_project::event() {
quoteCancelButtonEdit->signal_clicked().connect([&]() {this->close_wnd();}); quoteCancelButtonEdit->signal_clicked().connect([&]() {this->close_wnd();});
quoteSaveButtonEdit->signal_clicked().connect([&]() {this->save();}); quoteSaveButtonEdit->signal_clicked().connect([&]() {this->save();});
quoteSizeSoftLimitCheckProjectEdit->signal_toggled().connect([&]() { quoteSizeSoftLimitCheckProjectEdit->signal_toggled().connect([&]() {
@ -101,17 +102,6 @@ void View_edit_project::get_builder() {
} }
void View_edit_project::lacalization() { void View_edit_project::lacalization() {
lblDeviceProjectEdit->set_text(str_device);
lblStatusQuotaProjectEdit->set_text(str_quota_status);
// lblSetUGP->set_text("");
quoteSizeFrameLabelProjectEdit->set_text(str_size);
quoteFilesFrameLabelProjectEdit->set_text(str_files);
quoteSizeCurrentlyLabelProjectEdit->set_text(str_currently_using);
quoteFilesCurrentlyLabelProjectEdit->set_text(str_currently_using);
quoteSizeSoftLimitLabelProjectEdit->set_text(str_soft_limit);
quoteFilesSoftLimitLabelProjectEdit->set_text(str_soft_limit);
quoteSizeHardLimitLabelProjectEdit->set_text(str_hard_limit);
quoteFilesHardLimitLabelProject1->set_text(str_hard_limit);
this->fill_in_pow_memory(quoteSizeSoftLimitComboProjectEdit); this->fill_in_pow_memory(quoteSizeSoftLimitComboProjectEdit);
this->fill_in_pow_memory(quoteSizeHardLimitComboProjectEdit); this->fill_in_pow_memory(quoteSizeHardLimitComboProjectEdit);
} }

@ -86,16 +86,6 @@ void View_edit_user_group::get_builder() {
} }
void View_edit_user_group::lacalization() { void View_edit_user_group::lacalization() {
lblSetDeviceUser->set_text(str_device);
lblQuotasStatusUser->set_text(str_quota_status);
quotegroupSizeFrameLabelUser->set_text(str_size);
quotegroupFilesFrameLabelUser->set_text(str_files);
quotegroupSizeCurrentlyLabelUser->set_text(str_currently_using);
quotegroupSizeSoftLimitLabelUser->set_text(str_soft_limit);
quoteSizeHardLimitLabel1->set_text(str_hard_limit);
quoteFilesHardLimitLabelUser->set_text(str_hard_limit);
quotegroupFilesSoftLimitLabelUser->set_text(str_soft_limit);
quotegroupFilesCurrentlyLabelUser->set_text(str_currently_using);
this->fill_in_pow_memory(quotegroupSizeSoftLimitComboUser); this->fill_in_pow_memory(quotegroupSizeSoftLimitComboUser);
this->fill_in_pow_memory(quotegroupSizeHardLimitComboUser); this->fill_in_pow_memory(quotegroupSizeHardLimitComboUser);
} }

@ -49,6 +49,7 @@ void View_filters::show() {
} }
void View_filters::lacalization() { void View_filters::lacalization() {
/*
chbFilterName->set_label(str_name); chbFilterName->set_label(str_name);
chbFilterQuotas->set_label(str_quotas); chbFilterQuotas->set_label(str_quotas);
chbFilterSize->set_label(str_size); chbFilterSize->set_label(str_size);
@ -59,6 +60,7 @@ void View_filters::lacalization() {
chbFilterSoftLimitFile->set_label(str_soft_restriction_files); chbFilterSoftLimitFile->set_label(str_soft_restriction_files);
chbFilterHardLimitFile->set_label(str_severe_limitation_files); chbFilterHardLimitFile->set_label(str_severe_limitation_files);
chbFilterHardLimitFileDelay->set_label(str_deferring_limit_files); chbFilterHardLimitFileDelay->set_label(str_deferring_limit_files);
*/
} }
void View_filters::event() { void View_filters::event() {

@ -22,8 +22,8 @@ void View_open_browser::settings() {
obj_open_browser = this; obj_open_browser = this;
this->get_builder(); this->get_builder();
#ifdef WEBKIT_FOUND #ifdef WEBKIT_FOUND
one = WEBKIT_WEB_VIEW( webkit_web_view_new() ); my_web_kit = WEBKIT_WEB_VIEW( webkit_web_view_new() );
three = Glib::wrap(GTK_WIDGET(one)); three = Glib::wrap(GTK_WIDGET(my_web_kit));
wndWeb->add(*three); wndWeb->add(*three);
#endif #endif
this->lacalization(); this->lacalization();
@ -79,7 +79,17 @@ void View_open_browser::temp_help_show() {
void View_open_browser::open_browser() { void View_open_browser::open_browser() {
#ifdef WEBKIT_FOUND #ifdef WEBKIT_FOUND
webkit_web_view_load_uri(one, _(global_lick_doc.c_str())); 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(); wndWeb->show_all();
#else #else
this->template_open_browser(global_lick_doc); this->template_open_browser(global_lick_doc);

@ -27,7 +27,7 @@ public:
#ifdef WEBKIT_FOUND #ifdef WEBKIT_FOUND
Gtk::Window *wndWeb; Gtk::Window *wndWeb;
Gtk::Widget *three; Gtk::Widget *three;
WebKitWebView *one; WebKitWebView *my_web_kit = NULL;
#endif #endif
public: public:
View_open_browser(/* args */); View_open_browser(/* args */);

@ -142,5 +142,13 @@ border:none;
background-color: transparent; background-color: transparent;
opacity:0.99; opacity:0.99;
} }
.thin{
margin:0px;
padding: 0px;
}
.nobg{
background: none;
}
.addbg * {
background-color: @theme_bg_color;
}

@ -1,11 +1,11 @@
[Desktop Entry] [Desktop Entry]
Encoding=UTF-8 Encoding=UTF-8
Name=ubl-settings-diskquota Name=Setting user quotas
Name[ru]=Настройка дисковых квот Name[ru]=Настройка квот пользователей
GenericName=ubl-settings-diskquota GenericName=Setting user quotas
GenericName[ru]=Настройка дисковых квот GenericName[ru]=Настройка квот пользователей
Comment=Application for managing and configuring disk quotas Comment=Configuring disk quota settings for system groups and users
Comment[ru]=Приложение по управлению и настройке дисковых квот Comment[ru]=Настройка параметров дисковых квот для системных групп и пользователей системы
Type=Application Type=Application
Exec=pkexec ubl-settings-diskquota Exec=pkexec ubl-settings-diskquota
Icon=com.ublinux.ubl-settings-diskquota Icon=com.ublinux.ubl-settings-diskquota

File diff suppressed because it is too large Load Diff

@ -639,6 +639,9 @@ msgstr ""
msgid "files" msgid "files"
msgstr "" msgstr ""
msgid "Configuring disk quota settings for system groups and users"
msgstr ""
#: source/ubl-settings-diskquota.cc:167 source/ubl-settings-diskquota.cc:168 #: source/ubl-settings-diskquota.cc:167 source/ubl-settings-diskquota.cc:168
#: source/ubl-settings-diskquota.cc:169 source/ubl-settings-diskquota.cc:170 #: source/ubl-settings-diskquota.cc:169 source/ubl-settings-diskquota.cc:170
#: source/ubl-settings-diskquota.cc:97 source/ubl-settings-diskquota.cc:98 #: source/ubl-settings-diskquota.cc:97 source/ubl-settings-diskquota.cc:98
@ -716,3 +719,6 @@ msgstr ""
#: source/ubl-settings-diskquota.cc:93 #: source/ubl-settings-diskquota.cc:93
msgid "weeks" msgid "weeks"
msgstr "" msgstr ""
msgid "General statistics"
msgstr ""

@ -77,6 +77,9 @@ msgstr "Проекты"
msgid "Configuration of disk quotas parameters for system groups and users" msgid "Configuration of disk quotas parameters for system groups and users"
msgstr "Настройка параметров дисковых квот для системных групп и пользователей" msgstr "Настройка параметров дисковых квот для системных групп и пользователей"
msgid "Configuring disk quota settings for system groups and users"
msgstr "Настройка параметров дисковых квот для системных групп и пользователей системы"
#: source/ubl-settings-quotas.cc:138 source/ubl-settings-quotas.cc:68 #: source/ubl-settings-quotas.cc:138 source/ubl-settings-quotas.cc:68
#: source/ubl-settings-quotas.cc:60 source/ubl-settings-quotas.cc:81 #: source/ubl-settings-quotas.cc:60 source/ubl-settings-quotas.cc:81
#: source/ubl-settings-quotas.cc:78 source/ubl-settings-quotas.cc:75 #: source/ubl-settings-quotas.cc:78 source/ubl-settings-quotas.cc:75
@ -858,6 +861,9 @@ msgstr "ubl-settings-diskquota версия: "
msgid "ubl-settings-quotas" msgid "ubl-settings-quotas"
msgstr "Квоты" msgstr "Квоты"
msgid "General statistics"
msgstr "Общая статистика"
#~ msgid "Severe limitation (size)" #~ msgid "Severe limitation (size)"
#~ msgstr "Жесткое лимит (объём)" #~ msgstr "Жесткое лимит (объём)"

Loading…
Cancel
Save