Добавлен блокировка gui, если запущенно не от root

pull/11/head
Igor Belitskiy 3 years ago
parent aab87e7a9c
commit 8622c86df6

@ -76,6 +76,9 @@ void MainWindow::settings(){
}
else{
boxWidgetAll->set_sensitive(false);
btnDownload->set_sensitive(false);
boxSave->set_sensitive(false);
imgInfo->set("/usr/share/icons/hicolor/scalable/status/warning.svg");
info_status_app("boxInfoMessError");
lblWarning->set_text(_("The program must be run with superuser privileges!"));
@ -145,8 +148,9 @@ void MainWindow::get_builder(){
builder->get_widget("boxKernel1", boxKernel1);
builder->get_widget("boxKernel2", boxKernel2);
builder->get_widget("boxColor", boxColor);
builder->get_widget("boxWidgetAll", boxWidgetAll);
builder->get_widget("aboutWindows", aboutWindows);
builder->get_widget("btnSynopsis", btnSynopsis);
builder->get_widget("btnAbout", btnAbout);
builder->get_widget("btnDonwlodLocal", btnDonwlodLocal);

@ -95,6 +95,7 @@ class MainWindow : public Gtk::ApplicationWindow {
Gtk::Widget *boxButton;
Gtk::Widget *boxSave;
Gtk::Box *boxInfoError;
Gtk::Box *boxWidgetAll;
Gtk::Label *lblWarning;
Gtk::Image *imgInfo;
Gtk::ButtonBox *btnBoxAboutDialog;

@ -352,7 +352,7 @@ specified priority</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkBox">
<object class="GtkBox" id="boxWidgetAll">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>

Loading…
Cancel
Save