diff --git a/Makefile b/Makefile index c208f65..a4dbb21 100644 --- a/Makefile +++ b/Makefile @@ -115,11 +115,9 @@ install: check uninstall @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/css/" style.css @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "${pkgname}.svg" @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" "${pkgname}.png" - @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" bg_top.png - @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" checked.svg - @install -Dm644 -t "${pkgdir}/usr/share/${pkgname}/images/" warning.svg - @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "checked.svg" - @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "warning.svg" + @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/emblems/" "bg_top.png" + @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ubl-datetime-checked.svg" + @install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/scalable/status/" "ubl-datetime-warning.svg" @gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ @update-desktop-database --quiet 2>/dev/null @touch /usr/share/applications diff --git a/close.svg b/close.svg deleted file mode 100644 index d869d85..0000000 --- a/close.svg +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index 02303c9..f9c5ef9 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -125,16 +125,16 @@ void MainWindow::settings() { lblDateTimeSetting->set_sensitive(false); btnBoxAboutDialog->set_visible(false); this->event(); - imgInfo->set("/usr/share/icons/hicolor/scalable/status/warning.svg"); + imgInfo->set("ubl-datetime-warning"); info_status_app("boxInfoMessError"); - lblWarning->set_text(_("The program must be run with superuser privileges!")); + lblWarning->set_text(_("The program must be run as root")); } } int MainWindow::check_root() { if (geteuid() != 0) { - lblMessageSudo->set_text(_("The program must be run with \nsuperuser privileges!")); + lblMessageSudo->set_text(_("The program must be run as root")); mess_sudo->show(); return 1; } @@ -417,7 +417,7 @@ void MainWindow::save_global_local_cfg() { void MainWindow::info_warning_error(int mess) { if (error_info > 0 || warning_info > 0) { info_status_app("boxInfoMessError"); - imgInfo->set("/usr/share/icons/hicolor/scalable/status/warning.svg"); + imgInfo->set("ubl-datetime-warning"); error_info = 0; warning_info = 0; string mess_error = ""; @@ -445,7 +445,7 @@ void MainWindow::info_warning_error(int mess) { } else { info_status_app("boxInfoMessOK"); - imgInfo->set("/usr/share/icons/hicolor/scalable/status/checked.svg"); + imgInfo->set("ubl-datetime-checked"); if (mess == 0) { lblWarning->set_text(_("Local configuration downloaded successfully")); } diff --git a/source/ubl-util-standard.c b/source/ubl-util-standard.c index f922043..ef040bd 100644 --- a/source/ubl-util-standard.c +++ b/source/ubl-util-standard.c @@ -52,8 +52,11 @@ inline void ubl_make_plugs(Gtk::Widget *LeftWidget, Gtk::Widget *RightWidget, in } 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),"bkimButtonPlug"); + gtk_style_context_remove_class(gtk_widget_get_style_context(plug),"bkimButton"); + gtk_style_context_remove_class(gtk_widget_get_style_context(toplug),"bkimButton"); gtk_style_context_add_class(gtk_widget_get_style_context(plug),"noborder"); + gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"button"); + gtk_style_context_add_class(gtk_widget_get_style_context(plug),"button"); gtk_style_context_add_class(gtk_widget_get_style_context(plug),"primary-toolbar"); } if (right_plug_id>0&&RightWidget){ @@ -67,8 +70,11 @@ inline void ubl_make_plugs(Gtk::Widget *LeftWidget, Gtk::Widget *RightWidget, in } 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),"bkimButtonPlug"); + gtk_style_context_remove_class(gtk_widget_get_style_context(plug),"bkimButton"); + gtk_style_context_remove_class(gtk_widget_get_style_context(toplug),"bkimButton"); gtk_style_context_add_class(gtk_widget_get_style_context(plug),"noborder"); + gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"button"); + gtk_style_context_add_class(gtk_widget_get_style_context(plug),"button"); gtk_style_context_add_class(gtk_widget_get_style_context(plug),"primary-toolbar"); } diff --git a/style.css b/style.css index 3fdf619..65d31d4 100644 --- a/style.css +++ b/style.css @@ -2,7 +2,7 @@ background-color: #ea9999; } .cssboxColor1{ - background: url("/usr/share/ubl-settings-datetime/images/bg_top.png") no-repeat; + background: url("/usr/share/icons/hicolor/scalable/emblems/bg_top.png") no-repeat; } .boxInfoMessOK{ background-color: #f3f0ac; @@ -81,9 +81,23 @@ } .bkimButtonPlug{ background-color: transparent; - color: rgb(0, 0, 0); opacity:1.0; } .noborder{ border:none; +} +.buttonPlug { + background-color: transparent; + background-repeat: no-repeat; + border: none; + outline: none; +} + +.button { + background-image: -gtk-gradient(linear, + left top, left bottom, + from(@entry_background_a), + color-stop(0.20, @entry_background_b), + color-stop(0.85, @entry_background_c), + to(@entry_background_d)); } \ No newline at end of file diff --git a/checked.svg b/ubl-datetime-checked.svg similarity index 100% rename from checked.svg rename to ubl-datetime-checked.svg diff --git a/warning.svg b/ubl-datetime-warning.svg similarity index 100% rename from warning.svg rename to ubl-datetime-warning.svg diff --git a/ubl-settings-datetime.glade b/ubl-settings-datetime.glade index fe7fea1..9db607c 100644 --- a/ubl-settings-datetime.glade +++ b/ubl-settings-datetime.glade @@ -60,7 +60,6 @@ True False Load global configuration - True @@ -71,7 +70,6 @@ True False Load local configuration - True @@ -89,7 +87,6 @@ True False Help - True @@ -100,7 +97,6 @@ True False About - True @@ -118,7 +114,6 @@ True False Save to global and local configuration - True @@ -129,7 +124,6 @@ True False Save global configuration - True @@ -140,7 +134,6 @@ True False Save local configuration - True @@ -1045,9 +1038,6 @@ Format: DD.MM.YYYY 0 - 1 @@ -1133,9 +1123,6 @@ Format: DD.MM.YYYY 1 - end diff --git a/ubl-settings-datetime_ru.po b/ubl-settings-datetime_ru.po index 9285589..d423663 100644 --- a/ubl-settings-datetime_ru.po +++ b/ubl-settings-datetime_ru.po @@ -58,7 +58,7 @@ msgstr "По умолчанию" msgid "The program must be run with \nsuperuser privileges!" msgstr "Программа должна быть запущена с правами \nсуперпользователя!" -msgid "The program must be run with superuser privileges!" +msgid "The program must be run as root" msgstr "Программа должна быть запущена с правами суперпользователя!" msgid "Manual"