diff --git a/Makefile b/Makefile
index 8a9e47a..2e62183 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,6 @@ DEPENDS = /bin/cmake
PREFIX ?= /usr/local
PKGNAME = $(MAKEFILE_DIR)
FILE_VER = source/${PKGNAME}.h
-PKGIDENT = $(subst /,-,$(subst /usr,,${PREFIX}))
default_target: all
@@ -22,9 +21,9 @@ all: init build
init:
@echo "Initialize ..."; \
- if [ -d ".git" ]; then \
+ if [[ -d ".git" ]]; then \
LATEST_TAG=$$(git describe --abbrev=0 --tags | sed 's/^v//'); \
- if [ -z "$${LATEST_TAG}" ]; \
+ if [[ -z "$${LATEST_TAG}" ]]; \
then \
LATEST_TAG=$$"0.0"; \
echo "$${LATEST_TAG} is empty"; \
@@ -38,7 +37,7 @@ init:
depend:
@echo "Check depends ..."
@for FILE_DEPEND in $(DEPENDS); do \
- if [ ! -f $${FILE_DEPEND} ]; then \
+ if [[ ! -f "$${FILE_DEPEND}" ]]; then \
echo "ERROR: Depend '$${FILE_DEPEND}' not found !"; \
exit 1; \
fi; \
@@ -48,21 +47,21 @@ depend:
debug:
@echo "Debug ..."
- if [ ! -d ${CMAKE_BUILD_DIR} ]; then \
+ 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 "Debug: OK"
prepare:
@echo "Prepare ..."; \
- if [ ! -d ${CMAKE_BUILD_DIR} ]; then \
+ if [[ ! -d "${CMAKE_BUILD_DIR}" ]]; then \
$(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \
fi; \
echo "Prepare: OK"
check:
@echo "Check ..."; \
- if [ -f ${CMAKE_BUILD_DIR}/${PKGNAME} ]; then \
+ if [[ -f "${CMAKE_BUILD_DIR}/${PKGNAME}" ]]; then \
echo "Check: OK"; \
else \
echo "Check: ${CMAKE_BUILD_DIR}/${PKGNAME} not found !"; \
@@ -77,10 +76,9 @@ build: depend prepare
uninstall:
@echo "Uninstall ..."
- @for FILE_PO in $(wildcard *.po); do \
- LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
- FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
- PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
+ @for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \
+# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \
+ PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \
$(RM) "$${PATH_FILE_MO}"; \
done
@for SIZE in 16x16 32x32 48x48 scalable; do \
@@ -92,51 +90,64 @@ uninstall:
$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \
done; \
done
- @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg"
- @$(RM) "${DESTDIR}${PREFIX}/share/${PKGNAME}"
- @$(RM) "${DESTDIR}/etc/xdg/${PKGNAME}/${PKGNAME}.conf"
- @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop"
+ @for FILE_ICON in $(wildcard icons/*/*.svg); do \
+ SUB_NAME=$${FILE_ICON#*/}; SUB_NAME=$${SUB_NAME%/*}; \
+ $(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/$${SUB_NAME}/$${FILE_ICON##*/}"; \
+ done
@$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}"
- @$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy"
- @if [ -z ${DESTDIR} ]; then \
- [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \
+ @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop"
+ @if [[ "${PREFIX}" == @("/usr"|"/usr/") ]]; then \
+ $(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}.policy"; \
+ else \
+# $(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
+ $(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
+ fi
+ @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; \
+ [[ -d "${DESTDIR}${PREFIX}/share/applications" ]] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \
fi
@echo "Uninstall: OK"
install: check uninstall
@echo "Install ..."
- @for FILE_PO in $(wildcard *.po); do \
- LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
- install -dm755 "${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES"; \
- FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
- PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
- echo "$${FILE_PO}"; \
- msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \
+ @for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \
+ install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \
+# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \
+ PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \
+ PKGNAME_PO="./locale/${PKGNAME}_$${LANG}.po"; [[ -f "$${PKGNAME_PO}" ]] || PKGNAME_PO= ; \
+ msgfmt --verbose --use-fuzzy --output-file "$${PATH_FILE_MO}" - < <(msgcat --use-first --no-wrap $${PKGNAME_PO} ./locale/*_$${LANG}.po); \
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 svg --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \
+ install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \
+ rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "icons/apps/com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \
+ done
+ @for FILE_ICON in $(wildcard icons/*/*.svg); do \
+ SUB_NAME=$${FILE_ICON#*/}; SUB_NAME=$${SUB_NAME%/*}; \
+ install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/$${SUB_NAME}" $${FILE_ICON}; \
done
- @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg"
- @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/" "ublinux-logo.svg"
- @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop"
- @install -Dm644 -t "${DESTDIR}/etc/xdg/${PKGNAME}/" "${PKGNAME}.conf"
@install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}"
- @install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy"
- @sed -e '\|annotate key=|s|/usr/bin|${PREFIX}/bin|' -e '/action id=/s/\.run/${PKGIDENT}\.run/' -i ${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy
- @if [ -z ${DESTDIR} ]; then \
- [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \
+ @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop"
+ @if [[ "${PREFIX}" == @("/usr"|"/usr/") ]]; then \
+ install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.policy"; \
+ else \
+# install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
+ install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
+# sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
+ sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
+ fi
+ @if [[ -z "${DESTDIR}" ]]; then \
+ ldconfig -n ${DESTDIR}${PREFIX}/lib; \
+ [[ -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; \
+ [[ -d "${DESTDIR}${PREFIX}/share/applications" ]] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \
fi
@echo "Install: OK"
clean:
@echo "Clean ..."
@$(RM) -rd ${CMAKE_BUILD_DIR}
- @if [ -d ${CMAKE_BUILD_DIR} ]; then \
+ @if [[ -d "${CMAKE_BUILD_DIR}" ]]; then \
echo "Clean: error, compile directory exist ${CMAKE_BUILD_DIR}"; \
else \
echo "Clean: OK"; \
@@ -148,7 +159,7 @@ help:
echo "... init"; \
echo "... debug"; \
echo "... prepare"; \
- echo "... build"; \
+ echo "... compile"; \
echo "... install"; \
echo "... uninstall"; \
echo "... clean"
\ No newline at end of file
diff --git a/gresource.xml b/gresource.xml
index 15ccfb7..d804f02 100644
--- a/gresource.xml
+++ b/gresource.xml
@@ -6,7 +6,9 @@
ubl-settings-manager-theme-gnome.glade
ubl-settings-manager-theme-gnome-section.glade
ubl-settings-manager-theme-main.glade
+ ubl-settings-manager-theme-main-section.glade
ubl-settings-manager-settings-sections.glade
+ ubl-settings-manager-section-element.glade
ubl-settings-manager.css
diff --git a/com.ublinux.ubl-settings-manager.svg b/icons/apps/com.ublinux.ubl-settings-manager.svg
similarity index 100%
rename from com.ublinux.ubl-settings-manager.svg
rename to icons/apps/com.ublinux.ubl-settings-manager.svg
diff --git a/locale/ubl-settings-manager.pot b/locale/ubl-settings-manager.pot
new file mode 100644
index 0000000..ed32ae0
--- /dev/null
+++ b/locale/ubl-settings-manager.pot
@@ -0,0 +1,145 @@
+# Language translations for ubl-settings-manager package.
+# Copyright (C) 2022, UBTech LLC
+# This file is distributed under the same license as the ubl-settings-manager package.
+# UBLinux Team , 2022
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: ubl-settings-manager 1.0\n"
+"Report-Msgid-Bugs-To: info@ublinux.com\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2023-04-21 12:33+0000\n"
+"PO-Revision-Date: 2023-01-01 00:00+0600\n"
+"Last-Translator: UBLinux Team \n"
+"Language-Team: Russian - UBLinux Team \n"
+"Language: Russian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: source/ubl-strings.h:3
+msgid "UBLinux Settings Manager"
+msgstr ""
+
+#: source/ubl-strings.h:4
+msgid "About UBLinux Settings Manager"
+msgstr ""
+
+#: source/ubl-strings.h:6
+msgid ""
+"https://wiki.ublinux.ru/software/programs_and_utilities/all/ubl-settings-"
+"manager"
+msgstr ""
+
+#: source/ubl-strings.h:8
+msgid "Settings manager for UBLinux"
+msgstr ""
+
+#: source/ubl-strings.h:9
+msgid "Back to settings"
+msgstr ""
+
+#: source/ubl-strings.h:10
+msgid "Config loading failed!\n"
+msgstr ""
+
+#: source/ubl-strings.h:11
+msgid "Double click selection"
+msgstr ""
+
+#: source/ubl-strings.h:12
+msgid "Sections management"
+msgstr ""
+
+#: source/ubl-strings.h:13
+msgid "Understood"
+msgstr ""
+
+#: source/ubl-strings.h:14
+msgid "Settings"
+msgstr ""
+
+#: source/ubl-strings.h:15
+msgid "Apply"
+msgstr ""
+
+#: source/ubl-strings.h:16
+msgid "Close"
+msgstr ""
+
+#: source/ubl-strings.h:17
+msgid "Cancel"
+msgstr ""
+
+#: source/ubl-strings.h:18
+msgid "About..."
+msgstr ""
+
+#: source/ubl-strings.h:19
+msgid "Documentation"
+msgstr ""
+
+#: source/ubl-strings.h:20
+msgid "Window theme"
+msgstr ""
+
+#: source/ubl-strings.h:21
+msgid "Icon size"
+msgstr ""
+
+#: source/ubl-strings.h:22
+msgid "All settings"
+msgstr ""
+
+#: source/ubl-strings.h:23
+msgid "Failed to load theme"
+msgstr ""
+
+#: source/ubl-strings.h:24
+msgid "Main theme"
+msgstr ""
+
+#: source/ubl-strings.h:25
+msgid "GNOME theme"
+msgstr ""
+
+#: source/ubl-strings.h:26
+msgid "Default"
+msgstr ""
+
+#: source/ubl-strings.h:27
+msgid "Section name"
+msgstr ""
+
+#: source/ubl-strings.h:28
+msgid "Identifier"
+msgstr ""
+
+#: source/ubl-strings.h:29
+msgid "Add section"
+msgstr ""
+
+#: source/ubl-strings.h:30
+msgid "Clear fields"
+msgstr ""
+
+#: source/ubl-strings.h:31
+msgid "Remove section"
+msgstr ""
+
+#: source/ubl-strings.h:32
+msgid "Personal"
+msgstr ""
+
+#: source/ubl-strings.h:33
+msgid "Hardware"
+msgstr ""
+
+#: source/ubl-strings.h:34
+msgid "System"
+msgstr ""
+
+#: source/ubl-strings.h:35
+msgid "Misc"
+msgstr ""
diff --git a/locale/ubl-settings-manager_ru.po b/locale/ubl-settings-manager_ru.po
new file mode 100644
index 0000000..469b1f5
--- /dev/null
+++ b/locale/ubl-settings-manager_ru.po
@@ -0,0 +1,146 @@
+# Russian translations for ubl-settings-manager package.
+# Copyright (C) 2022, UBTech LLC
+# This file is distributed under the same license as the ubl-settings-manager package.
+# UBLinux Team , 2022
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: ubl-settings-manager 1.0\n"
+"Report-Msgid-Bugs-To: info@ublinux.com\n"
+"POT-Creation-Date: 2023-04-21 12:33+0000\n"
+"PO-Revision-Date: 2023-01-01 00:00+0600\n"
+"Last-Translator: UBLinux Team \n"
+"Language-Team: Russian - UBLinux Team \n"
+"Language: Russian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: source/ubl-strings.h:3
+msgid "UBLinux Settings Manager"
+msgstr "Диспетчер настроек UBLinux"
+
+#: source/ubl-strings.h:4
+msgid "About UBLinux Settings Manager"
+msgstr "О приложении Диспетчер настроек UBLinux"
+
+#: source/ubl-strings.h:6
+msgid ""
+"https://wiki.ublinux.ru/software/programs_and_utilities/all/ubl-settings-"
+"manager"
+msgstr ""
+"https://wiki.ublinux.ru/software/programs_and_utilities/all/ubl-settings-"
+"manager"
+
+#: source/ubl-strings.h:8
+msgid "Settings manager for UBLinux"
+msgstr "Диспетчер настроек UBLinux"
+
+#: source/ubl-strings.h:9
+msgid "Back to settings"
+msgstr "Назад к настройкам"
+
+#: source/ubl-strings.h:10
+msgid "Config loading failed!\n"
+msgstr "Ошибка загрузки конфигурации!\n"
+
+#: source/ubl-strings.h:11
+msgid "Double click selection"
+msgstr "Открывать приложения двойным нажатием"
+
+#: source/ubl-strings.h:12
+msgid "Sections management"
+msgstr "Настройка разделов"
+
+#: source/ubl-strings.h:13
+msgid "Understood"
+msgstr "Понятно"
+
+#: source/ubl-strings.h:14
+msgid "Settings"
+msgstr "Настройки"
+
+#: source/ubl-strings.h:15
+msgid "Apply"
+msgstr "Применить"
+
+#: source/ubl-strings.h:16
+msgid "Close"
+msgstr "Закрыть"
+
+#: source/ubl-strings.h:17
+msgid "Cancel"
+msgstr "Отменить"
+
+#: source/ubl-strings.h:18
+msgid "About..."
+msgstr "О программе..."
+
+#: source/ubl-strings.h:19
+msgid "Documentation"
+msgstr "Справка"
+
+#: source/ubl-strings.h:20
+msgid "Window theme"
+msgstr "Выбор темы"
+
+#: source/ubl-strings.h:21
+msgid "Icon size"
+msgstr "Размер иконок"
+
+#: source/ubl-strings.h:22
+msgid "All settings"
+msgstr "Все настройки"
+
+#: source/ubl-strings.h:23
+msgid "Failed to load theme"
+msgstr "Ошибка загрузки темы"
+
+#: source/ubl-strings.h:24
+msgid "Main theme"
+msgstr "Основная тема"
+
+#: source/ubl-strings.h:25
+msgid "GNOME theme"
+msgstr "GNOME тема"
+
+#: source/ubl-strings.h:26
+msgid "Default"
+msgstr "По умолчанию"
+
+#: source/ubl-strings.h:27
+msgid "Section name"
+msgstr "Название раздела"
+
+#: source/ubl-strings.h:28
+msgid "Identifier"
+msgstr "Идентификатор"
+
+#: source/ubl-strings.h:29
+msgid "Add section"
+msgstr "Добавить раздел"
+
+#: source/ubl-strings.h:30
+msgid "Clear fields"
+msgstr "Очистить поля"
+
+#: source/ubl-strings.h:31
+msgid "Remove section"
+msgstr "Удалить раздел"
+
+#: source/ubl-strings.h:32
+msgid "Personal"
+msgstr "Личные"
+
+#: source/ubl-strings.h:33
+msgid "Hardware"
+msgstr "Оборудование"
+
+#: source/ubl-strings.h:34
+msgid "System"
+msgstr "Система"
+
+#: source/ubl-strings.h:35
+msgid "Misc"
+msgstr "Прочее"
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index ffb5543..ebb3650 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -15,7 +15,9 @@ add_definitions(${VTE291_CFLAGS_OTHER})
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
+option(WEBKIT_FOUND "No" OFF)
if(WEBKIT_LIBRARIES_FOUND)
+ option(WEBKIT_FOUND "Yes" ON)
PKG_CHECK_MODULES(WEBKIT REQUIRED webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
include_directories(${WEBKIT_INCLUDE_DIRS})
link_directories(${WEBKIT_LIBRARY_DIRS})
@@ -35,6 +37,8 @@ set(DEPENDFILES
../ubl-settings-manager-theme-gnome-section.glade
../ubl-settings-manager-theme-main.glade
../ubl-settings-manager-settings-sections.glade
+ ../ubl-settings-manager-theme-main-section.glade
+ ../ubl-settings-manager-section-element.glade
../gresource.xml
../manager-banner.png
../ubl-settings-manager.css
@@ -47,33 +51,39 @@ add_custom_command(
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${GLIB_COMPILE_RESOURCES}
ARGS
- --generate-source
- --target=${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
- ${GRESOURCE_XML}
+ --generate-source
+ --target=${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
+ ${GRESOURCE_XML}
VERBATIM
MAIN_DEPENDENCY ${GRESOURCE_XML}
DEPENDS
- ${GLADE}
+ ${GLADE}
)
add_custom_target(
- dummy-resource
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
+ 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 \
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \
-O2 -pipe -fno-plt -fexceptions \
- -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
+ -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection")
-
+
+string(FIND "${CMAKE_CXX_FLAGS}" "-D_FORTIFY_SOURCE" FORTIFY_FOUND)
+
+if(FORTIFY_FOUND EQUAL -1)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wp,-D_FORTIFY_SOURCE=2")
+endif()
set(SOURCE_FILES
ubl-settings-manager.c
ubl-settings-manager-settings.c
ubl-settings-manager-theme.c
ubl-settings-manager-theme-gnome.c
+ ubl-settings-manager-theme-main.c
ubl-settings-manager-app-sections.c
+ ubl-settings-manager-settings-sections.c
+ ubl-settings-manager-misc.c
ubl-settings-manager.h
ubl-strings.h
)
diff --git a/source/ubl-settings-manager-misc.c b/source/ubl-settings-manager-misc.c
new file mode 100644
index 0000000..408f151
--- /dev/null
+++ b/source/ubl-settings-manager-misc.c
@@ -0,0 +1,69 @@
+#include "ubl-settings-manager.h"
+
+
+void yon_open_browser(GtkWidget *, char *link){
+ GtkWidget *window = yon_ubl_browser_window_open(link,template_app_information.app_title);
+ if (window)
+ gtk_window_set_icon_name(GTK_WINDOW(window),yon_char_append("com.ublinux.",template_app_information.app_tech_name));
+}
+
+void on_open_documentation_confirmation(GtkWidget *self, char *link){
+ if (main_config.always_open_documentation==0){
+ GtkBuilder *builder = gtk_builder_new_from_resource(ui_glade_path_documentation);
+ template_documentation_confirmation_window *window = malloc(sizeof(template_documentation_confirmation_window));
+ window->Window = yon_gtk_builder_get_widget(builder,"helpConfirmationWindow");
+ window->AcceptButton = yon_gtk_builder_get_widget(builder,"ReadHelpButton");
+ window->CloseButton = yon_gtk_builder_get_widget(builder,"CancelHelpButton");
+ window->HeaderLabel = yon_gtk_builder_get_widget(builder,"webHeaderNameLabel");
+ window->AlwaysOpenCheck = yon_gtk_builder_get_widget(builder,"AlwaysOpenDocumentationCheckbox");
+ gtk_label_set_text(GTK_LABEL(window->HeaderLabel),TITLE_LABEL);
+ gtk_window_set_title(GTK_WINDOW(window->Window),TITLE_LABEL);
+ gtk_window_set_icon_name(GTK_WINDOW(window->Window),yon_char_append("com.ublinux.",template_app_information.app_tech_name));
+ gtk_widget_show_all(window->Window);
+ g_signal_connect(G_OBJECT(window->CloseButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
+ g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(yon_open_browser),yon_char_new(link));
+ g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_subwindow_close),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);
+}
+
+void on_about(GtkWidget *, char *version_application){
+ GtkBuilder *builder=gtk_builder_new_from_resource(ui_glade_path_about);
+ 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_logo_icon_name(GTK_ABOUT_DIALOG(window),yon_char_append("com.ublinux.",LocaleName));
+ gtk_window_set_icon_name(GTK_WINDOW(window),yon_char_append("com.ublinux.",LocaleName));
+ char *title_str = about_label(TITLE_LABEL);
+ gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(window),title_str);
+ gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(window),LocaleName);
+ gtk_label_set_text(GTK_LABEL(title),title_str);
+ g_signal_connect(G_OBJECT(window),"activate-link",G_CALLBACK(on_link),NULL);
+ gtk_widget_set_visible(hideButtonBox,0);
+ gtk_widget_destroy(hideButtonBox);
+ gtk_window_set_title(GTK_WINDOW(window),title_str);
+ gtk_widget_show(window);
+ free(title_str);
+}
\ No newline at end of file
diff --git a/source/ubl-settings-manager-settings-sections.c b/source/ubl-settings-manager-settings-sections.c
new file mode 100644
index 0000000..3cc301f
--- /dev/null
+++ b/source/ubl-settings-manager-settings-sections.c
@@ -0,0 +1,177 @@
+#include "ubl-settings-manager.h"
+
+typedef struct {
+ GtkWidget *Window;
+ GtkWidget *StatusBox;
+ GtkWidget *DefaultSwitch;
+ GtkWidget *SectionsBox;
+ GtkWidget *NameEntry;
+ GtkWidget *CategoriesEntry;
+ GtkWidget *ClearButton;
+ GtkWidget *AddButton;
+ GtkWidget *CancelButton;
+ GtkWidget *SaveButton;
+ // section_struct *sections;
+} settings_section_window;
+
+typedef struct {
+ GtkWidget *SectionBox;
+ GtkWidget *NameEntry;
+ GtkWidget *CategoriesEntry;
+ GtkWidget *RemoveButton;
+ // GtkWidget *AcceptButton;
+} section_struct;
+
+void yon_section_window_add_default(settings_section_window *window);
+void on_section_remove(GtkWidget *,section_struct *section);
+void on_section_add(GtkWidget *,settings_section_window *window);
+void on_section_clear(GtkWidget *,settings_section_window *window);
+void on_sections_save(GtkWidget *,settings_section_window *window);
+section_struct *yon_section_new();
+settings_section_window *yon_section_window_new();
+
+
+void on_section_remove(GtkWidget *,section_struct *section){
+ gtk_widget_destroy(section->SectionBox);
+}
+
+section_struct *yon_section_new(){
+ section_struct *section = malloc(sizeof(section_struct));
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_section_element);
+ section->SectionBox = yon_gtk_builder_get_widget(builder,"SectionBox");
+ section->NameEntry = yon_gtk_builder_get_widget(builder,"NameEntry");
+ section->CategoriesEntry = yon_gtk_builder_get_widget(builder,"CategoriesEntry");
+ section->RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton");
+ // section->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton");
+
+ g_object_set_data(G_OBJECT(section->SectionBox),"section",section);
+
+ g_signal_connect(G_OBJECT(section->RemoveButton),"clicked",G_CALLBACK(on_section_remove),section);
+ return section;
+}
+
+void on_section_add(GtkWidget *,settings_section_window *window){
+ const char *cat_name = gtk_entry_get_text(GTK_ENTRY(window->NameEntry));
+ char *cat_categories = yon_char_new(gtk_entry_get_text(GTK_ENTRY(window->CategoriesEntry)));
+ if (cat_categories[strlen(cat_categories)-1]!=';') {
+ char *temp = yon_char_append_c(cat_categories,';');
+ free(cat_categories);
+ cat_categories = temp;
+ }
+ if (yon_char_is_empty(cat_name)){
+ yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
+ yon_ubl_status_highlight_incorrect(window->NameEntry);
+ return;
+ }
+ section_struct *section = yon_section_new();
+ gtk_box_pack_start(GTK_BOX(window->SectionsBox),section->SectionBox,0,0,0);
+
+ gtk_entry_set_text(GTK_ENTRY(section->NameEntry),cat_name);
+ gtk_entry_set_text(GTK_ENTRY(section->CategoriesEntry),cat_categories);
+
+ gtk_entry_set_text(GTK_ENTRY(window->NameEntry),"");
+ gtk_entry_set_text(GTK_ENTRY(window->CategoriesEntry),"");
+ free(cat_categories);
+}
+
+void on_section_clear(GtkWidget *,settings_section_window *window){
+ gtk_entry_set_text(GTK_ENTRY(window->NameEntry),"");
+ gtk_entry_set_text(GTK_ENTRY(window->CategoriesEntry),"");
+}
+
+void on_sections_save(GtkWidget *,settings_section_window *window){
+ main_window *widgets = g_object_get_data(G_OBJECT(window->Window),"widgets");
+ gsize size;
+ config_str parameters = yon_window_config_get_section(sections_section,&size);
+ for (gsize i=0;iDefaultSwitch))){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(window->SectionsBox));
+ GList *iter;
+ for (iter=list;iter;iter=iter->next){
+ section_struct *section = g_object_get_data(G_OBJECT(iter->data),"section");
+ char *name = (char*)gtk_entry_get_text(GTK_ENTRY(section->NameEntry));
+ char *categories = (char*)gtk_entry_get_text(GTK_ENTRY(section->CategoriesEntry));
+ yon_window_config_add_instant_parameter(name,sections_section,categories,YON_TYPE_STRING);
+ }
+ }
+ on_subwindow_close(window->Window);
+ yon_interface_update(widgets);
+
+}
+
+void yon_section_window_add_default(settings_section_window *window){
+
+ section_struct *cur_section = yon_section_new();
+ gtk_box_pack_start(GTK_BOX(window->SectionsBox),cur_section->SectionBox,0,0,0);
+ gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),_("Personal"));
+ gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),"X-UBL-SettingsManager;X-UBL-PersonalSettings;");
+
+ cur_section = yon_section_new();
+ gtk_box_pack_start(GTK_BOX(window->SectionsBox),cur_section->SectionBox,0,0,0);
+ gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),_("Hardware"));
+ gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),"X-UBL-SettingsManager;X-UBL-HardwareSettings;");
+
+ cur_section = yon_section_new();
+ gtk_box_pack_start(GTK_BOX(window->SectionsBox),cur_section->SectionBox,0,0,0);
+ gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),_("System"));
+ gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),"X-UBL-SettingsManager;X-UBL-SystemSettings;");
+
+ cur_section = yon_section_new();
+ gtk_box_pack_start(GTK_BOX(window->SectionsBox),cur_section->SectionBox,0,0,0);
+ gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),_("Misc"));
+ gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),"");
+}
+
+settings_section_window *yon_section_window_new(){
+ settings_section_window *window = malloc(sizeof(settings_section_window));
+
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_settings_section);
+ window->Window = yon_gtk_builder_get_widget(builder,"Window");
+ window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
+ window->DefaultSwitch = yon_gtk_builder_get_widget(builder,"DefaultSwitch");
+ window->SectionsBox = yon_gtk_builder_get_widget(builder,"SectionsBox");
+ window->NameEntry = yon_gtk_builder_get_widget(builder,"NameEntry");
+ window->CategoriesEntry = yon_gtk_builder_get_widget(builder,"CategoriesEntry");
+ window->ClearButton = yon_gtk_builder_get_widget(builder,"ClearButton");
+ window->AddButton = yon_gtk_builder_get_widget(builder,"AddButton");
+ window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
+ window->SaveButton = yon_gtk_builder_get_widget(builder,"SaveButton");
+
+ g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
+ g_signal_connect(G_OBJECT(window->SaveButton),"clicked",G_CALLBACK(on_sections_save),window);
+ g_signal_connect(G_OBJECT(window->AddButton),"clicked",G_CALLBACK(on_section_add),window);
+ g_signal_connect(G_OBJECT(window->ClearButton),"clicked",G_CALLBACK(on_section_clear),window);
+ g_signal_connect(G_OBJECT(window->DefaultSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->SectionsBox);
+ g_signal_connect(G_OBJECT(window->DefaultSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->NameEntry);
+ g_signal_connect(G_OBJECT(window->DefaultSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->CategoriesEntry);
+ g_signal_connect(G_OBJECT(window->DefaultSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->AddButton);
+ g_signal_connect(G_OBJECT(window->DefaultSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->ClearButton);
+
+ gsize parameters_size;
+ config_str parameters = NULL;
+ parameters = yon_window_config_get_section(sections_section,¶meters_size);
+ if (parameters_size){
+ for (gsize i=0;iSectionsBox),cur_section->SectionBox,0,0,0);
+ gtk_entry_set_text(GTK_ENTRY(cur_section->NameEntry),parameters[i]);
+ gtk_entry_set_text(GTK_ENTRY(cur_section->CategoriesEntry),param);
+
+ }
+ } else {
+ gtk_switch_set_active(GTK_SWITCH(window->DefaultSwitch),1);
+ yon_section_window_add_default(window);
+ }
+ return window;
+}
+
+void yon_section_window_open(GtkWidget *, settings_window *settings){
+ main_window *widgets = g_object_get_data(G_OBJECT(settings->Window),"widgets");
+ settings_section_window *window = yon_section_window_new();
+ g_object_set_data(G_OBJECT(window->Window),"widgets",widgets);
+ yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(settings->Window),TITLE_LABEL,icon_path,"sections_window");
+}
\ No newline at end of file
diff --git a/source/ubl-settings-manager-settings.c b/source/ubl-settings-manager-settings.c
index 07c10e0..caeab42 100644
--- a/source/ubl-settings-manager-settings.c
+++ b/source/ubl-settings-manager-settings.c
@@ -16,21 +16,22 @@ gboolean on_settings_size_changed(GtkRange* , GtkScrollType* , gdouble value, se
void on_settings_accept(GtkWidget *, settings_window *window){
main_window *widgets = g_object_get_data(G_OBJECT(window->Window),"widgets");
- yon_window_config_add_instant_parameter(icon_size_parameter,"Settings",&window->icon_size,YON_TYPE_INT);
+ yon_window_config_add_instant_parameter(icon_size_parameter,settings_section,&window->icon_size,YON_TYPE_INT);
+ main_config.apps_icon_size = window->icon_size;
char *cur_theme = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->ThemeCombo));
if (cur_theme)
- yon_window_config_add_instant_parameter(theme_parameter,"Settings",cur_theme,YON_TYPE_STRING);
+ yon_window_config_add_instant_parameter(theme_parameter,settings_section,cur_theme,YON_TYPE_STRING);
int double_click = gtk_switch_get_active(GTK_SWITCH(window->DoubleClickSwitch));
- yon_window_config_add_instant_parameter(double_click_parameter,"Settings",&double_click,YON_TYPE_INT);
+ yon_window_config_add_instant_parameter(double_click_parameter,settings_section,&double_click,YON_TYPE_INT);
yon_interface_update(widgets);
on_subwindow_close(window->Window);
}
settings_window *yon_settings_window_new(){
settings_window *window = malloc(sizeof(settings_window));
- memset(window,0,sizeof(window));
+ memset(window,0,sizeof(settings_window));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_settings);
window->Window = yon_gtk_builder_get_widget(builder,"Window");
window->SizeSlider = yon_gtk_builder_get_widget(builder,"SizeSlider");
@@ -47,25 +48,25 @@ settings_window *yon_settings_window_new(){
g_signal_connect(G_OBJECT(window->SizeSlider),"change-value",G_CALLBACK(on_settings_size_changed),window);
int size;
- config_str themes = (config_str)g_hash_table_get_keys_as_array(main_config.themes,&size);
+ config_str themes = (config_str)g_hash_table_get_keys_as_array(main_config.themes,(guint*)&size);
qsort(themes,size,sizeof(char*),yon_char_parsed_compare);
for (int i=0;iThemeCombo),themes[i],themes[i]);
}
char *theme_id = NULL;
- if (yon_window_config_get_parameter("Settings",theme_parameter,&theme_id,YON_TYPE_STRING)){
+ if (yon_window_config_get_parameter(settings_section,theme_parameter,&theme_id,YON_TYPE_STRING)){
gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->ThemeCombo),theme_id);
} else {
gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->ThemeCombo),GNOME_THEME_LABEL);
}
- window->icon_size;
- if (!yon_window_config_get_parameter("Settings",icon_size_parameter,&window->icon_size,YON_TYPE_INT)){
+ if (!yon_window_config_get_parameter(settings_section,icon_size_parameter,&window->icon_size,YON_TYPE_INT)){
window->icon_size=32;
}
gtk_range_set_value(GTK_RANGE(window->SizeSlider),window->icon_size);
+ on_settings_size_changed(NULL,NULL,window->icon_size,window);
int double_click_activate;
- if (!yon_window_config_get_parameter("Settings",double_click_parameter,&double_click_activate,YON_TYPE_BOOLEAN)){
+ if (!yon_window_config_get_parameter(settings_section,double_click_parameter,&double_click_activate,YON_TYPE_BOOLEAN)){
double_click_activate=0;
}
gtk_switch_set_active(GTK_SWITCH(window->DoubleClickSwitch),double_click_activate);
@@ -75,6 +76,7 @@ settings_window *yon_settings_window_new(){
void on_settings_open(GtkWidget *, main_window *widgets){
settings_window *window = yon_settings_window_new();
+ g_signal_connect(G_OBJECT(window->SectionsConfigurationButton),"clicked",G_CALLBACK(yon_section_window_open),window);
yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window),TITLE_LABEL,icon_path,"settings_window");
gtk_widget_show(window->Window);
g_object_set_data(G_OBJECT(window->Window),"widgets",widgets);
diff --git a/source/ubl-settings-manager-theme-gnome.c b/source/ubl-settings-manager-theme-gnome.c
index 16eee5a..7b2325b 100644
--- a/source/ubl-settings-manager-theme-gnome.c
+++ b/source/ubl-settings-manager-theme-gnome.c
@@ -6,6 +6,10 @@ typedef struct {
app_section *section;
} gnome_section;
+gnome_section *yon_gnome_section_new();
+void yon_gnome_section_setup_apps(gnome_section *cur_section, const char *target);
+void yon_gnome_section_search_show(gnome_section *section, const char *string);
+
void on_gnome_plug_connected(GtkWidget *,gnome_theme_struct *theme){
gtk_widget_show(theme->SocketBox);
gtk_widget_hide(theme->HideBox);
@@ -39,8 +43,8 @@ void on_gnome_activate(GtkWidget *,GtkListBoxRow *self, gnome_theme_struct *them
}
-void on_gnome_selected(GtkWidget *self_list,GtkListBoxRow *self, gnome_theme_struct *theme);
-void on_gnome_selected(GtkWidget *self_list,GtkListBoxRow *self, gnome_theme_struct *theme){
+void on_gnome_selected(GtkWidget *self_list,GtkListBoxRow *, gnome_theme_struct *theme);
+void on_gnome_selected(GtkWidget *self_list,GtkListBoxRow *, gnome_theme_struct *theme){
GList *list = gtk_container_get_children(GTK_CONTAINER(theme->AppsTree));
GList *iter;
for (iter=list;iter;iter=iter->next){
@@ -53,16 +57,16 @@ void on_gnome_selected(GtkWidget *self_list,GtkListBoxRow *self, gnome_theme_str
}
}
-void on_gnome_socket_add(){
-
-}
gnome_section *yon_gnome_section_new(){
gnome_section *cur_section = malloc(sizeof(gnome_section));
- memset(cur_section,0,sizeof(cur_section));
+ memset(cur_section,0,sizeof(gnome_section));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_gnome_section);
cur_section->expander = yon_gtk_builder_get_widget(builder,"MainExpander");
cur_section->AppsList = yon_gtk_builder_get_widget(builder,"AppsList");
+ int doubleclick=0;
+ yon_window_config_get_parameter(settings_section,double_click_parameter,&doubleclick,YON_TYPE_BOOLEAN);
+ gtk_list_box_set_activate_on_single_click(GTK_LIST_BOX(cur_section->AppsList),!doubleclick);
return cur_section;
}
@@ -85,6 +89,8 @@ void yon_gnome_section_setup_apps(gnome_section *cur_section, const char *target
gtk_box_pack_start(GTK_BOX(Box),Image,0,0,0);
gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0);
gtk_label_set_xalign(GTK_LABEL(Label),0);
+ gtk_label_set_line_wrap(GTK_LABEL(Label),1);
+ gtk_label_set_line_wrap_mode(GTK_LABEL(Label),PANGO_WRAP_WORD);
gtk_list_box_insert(GTK_LIST_BOX(cur_section->AppsList),Row,-1);
g_object_set_data(G_OBJECT(Row),"gnome_section",cur_section);
@@ -118,7 +124,6 @@ int yon_gnome_update(gnome_theme_struct *theme){
free(cur_section);
}
- int size;
dictionary *cur;
for_dictionaries(cur,main_config.sections){
app_section *section_data = yon_dictionary_get_data(cur,app_section*);
@@ -127,6 +132,31 @@ int yon_gnome_update(gnome_theme_struct *theme){
return 1;
}
+void yon_gnome_section_search_show(gnome_section *section, const char *string){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(section->AppsList));
+ GList *iter;
+ for (iter=list;iter;iter=iter->next){
+ apps *cur_app = g_object_get_data(G_OBJECT(iter->data),"apps");
+ if (yon_char_is_empty(string)||yon_char_check_begins_with(cur_app->Name,(char*)string)){
+ gtk_widget_show(GTK_WIDGET(iter->data));
+ } else {
+ gtk_widget_hide(GTK_WIDGET(iter->data));
+ }
+ }
+ g_list_free(list);
+}
+
+void on_gnome_search(GtkWidget *, gnome_theme_struct *theme){
+ const char *search_string = gtk_entry_get_text(GTK_ENTRY(theme->SearchEntry));
+ GList *list = gtk_container_get_children(GTK_CONTAINER(theme->AppsTree));
+ GList *iter;
+ for (iter=list;iter;iter=iter->next){
+ gnome_section *cur_section = g_object_get_data(G_OBJECT(iter->data),"gnome_section");
+ yon_gnome_section_search_show(cur_section,search_string);
+ }
+ g_list_free(list);
+}
+
gnome_theme_struct *yon_gnome_theme_new(){
gnome_theme_struct *theme = malloc(sizeof(gnome_theme_struct));
@@ -135,6 +165,7 @@ gnome_theme_struct *yon_gnome_theme_new(){
theme->AppsTree = yon_gtk_builder_get_widget(builder,"AppsTree");
theme->SocketBox = yon_gtk_builder_get_widget(builder,"SocketBox");
theme->GnomePaned = yon_gtk_builder_get_widget(builder,"GnomePaned");
+ theme->SearchEntry = yon_gtk_builder_get_widget(builder,"SearchEntry");
theme->GnomeInfoLogoImage = yon_gtk_builder_get_widget(builder,"GnomeInfoLogoImage");
theme->HideBox = yon_gtk_builder_get_widget(builder,"HideBox");
theme->IconCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"IconCell"));
@@ -145,7 +176,7 @@ gnome_theme_struct *yon_gnome_theme_new(){
gtk_box_pack_start(GTK_BOX(theme->SocketBox),theme->Socket,1,1,0);
gtk_widget_show(theme->Socket);
- g_signal_connect(G_OBJECT(theme->SocketBox),"add",G_CALLBACK(on_gnome_socket_add),theme);
+ g_signal_connect(G_OBJECT(theme->SearchEntry),"changed",G_CALLBACK(on_gnome_search),theme);
// gtk_cell_renderer_set_fixed_size(theme->IconCell,main_config.apps_icon_size,main_config.apps_icon_size);
return theme;
}
diff --git a/source/ubl-settings-manager-theme-main.c b/source/ubl-settings-manager-theme-main.c
new file mode 100644
index 0000000..15d3540
--- /dev/null
+++ b/source/ubl-settings-manager-theme-main.c
@@ -0,0 +1,203 @@
+#include "ubl-settings-manager.h"
+
+typedef struct {
+ GtkWidget *expander;
+ GtkWidget *MainLabel;
+ GtkWidget *AppsList;
+ app_section *section;
+} main_section;
+
+void yon_main_section_setup_apps(main_section *cur_section, const char *target);
+main_section *yon_main_section_new();
+void yon_main_section_get_max_size(main_section *section, int *ret_width, int *ret_height);
+
+void on_main_plug_connected(GtkWidget *,main_theme_struct *theme){
+ gtk_widget_show(theme->SocketBox);
+ gtk_widget_hide(theme->HideBox);
+}
+
+void on_main_plug_disconnected(GtkWidget *,main_theme_struct *theme){
+ gtk_widget_show(theme->HideBox);
+ gtk_widget_hide(theme->SocketBox);
+ on_plug_disconnected(GTK_SOCKET(theme->Socket),main_config.widgets);
+}
+
+void on_main_selected(GtkWidget* self, main_theme_struct *theme);
+void on_main_selected(GtkWidget* self, main_theme_struct *theme){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(theme->AppsTree));
+ GList *iter;
+ for (iter=list;iter;iter=iter->next){
+ main_section *cur_section = g_object_get_data(G_OBJECT(iter->data),"main_section");
+ if (cur_section->AppsList != self){
+ g_signal_handlers_block_by_func(G_OBJECT(cur_section->AppsList),G_CALLBACK(on_main_selected),theme);
+ GList *flowlist = gtk_flow_box_get_selected_children(GTK_FLOW_BOX(cur_section->AppsList));
+ if (flowlist){
+ gtk_flow_box_unselect_child(GTK_FLOW_BOX(cur_section->AppsList),GTK_FLOW_BOX_CHILD(flowlist->data));
+ g_list_free(flowlist);
+ }
+ g_signal_handlers_unblock_by_func(G_OBJECT(cur_section->AppsList),G_CALLBACK(on_main_selected),theme);
+ }
+ }
+}
+
+void on_main_activate(GtkFlowBox* , GtkFlowBoxChild* child, main_theme_struct *theme){
+ theme->Socket = GTK_WIDGET(yon_sockets_init(GTK_BOX(theme->SocketBox)));
+ g_signal_connect(G_OBJECT(theme->Socket),"plug_added",G_CALLBACK(on_main_plug_connected),theme);
+ g_signal_connect(G_OBJECT(theme->Socket),"destroy",G_CALLBACK(on_main_plug_disconnected),theme);
+ apps *cur_app = g_object_get_data(G_OBJECT(child),"apps");
+ char *command = cur_app->Exec;//launch_command(cur_app->Desktop_path);
+ char *command_args = NULL;
+ if (cur_app->DualPluggable==1){
+ char *save_socket = yon_get_save_socket();
+ char *load_socket = yon_get_load_socket();
+ char *main_socket_id = yon_char_from_long((long)gtk_socket_get_id(GTK_SOCKET(theme->Socket)));
+ command_args = launch_args_command(main_socket_id,load_socket,save_socket);
+ } else if (cur_app->Pluggable){
+ char *main_socket_id = yon_char_from_long((long)gtk_socket_get_id(GTK_SOCKET(theme->Socket)));
+ command_args = yon_char_unite("--socket-id=",main_socket_id,NULL);
+
+ }
+ yon_launch_app_with_arguments(command,command_args);
+}
+
+// void on_main_socket_add(){
+
+// }
+
+void yon_main_section_setup_apps(main_section *cur_section, const char *target){
+ if (yon_char_is_empty(target)) return;
+ apps *cur_app = yon_apps_get((char*)target);
+ GtkIconInfo *info = gtk_icon_theme_lookup_icon_for_scale(gtk_icon_theme_get_default(), !yon_char_is_empty(cur_app->Icon)?cur_app->Icon:icon_path, main_config.apps_icon_size,1,GTK_ICON_LOOKUP_FORCE_SIZE);
+ GtkWidget *Image = NULL;
+ if (info){
+ Image = gtk_image_new_from_pixbuf(gtk_icon_info_load_icon(info,NULL));
+ } else {
+ info = gtk_icon_theme_lookup_icon_for_scale(gtk_icon_theme_get_default(), icon_path, main_config.apps_icon_size,1,GTK_ICON_LOOKUP_FORCE_SIZE);
+ Image = gtk_image_new_from_pixbuf(gtk_icon_info_load_icon(info,NULL));
+
+ }
+
+ char *name = yon_char_wrap_to_length_str(cur_app->Name,20);
+
+ GtkWidget *Row = gtk_flow_box_child_new();
+ GtkWidget *Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
+ GtkWidget *Label = gtk_label_new(name);
+ GtkWidget *Icon = Image;
+
+ gtk_box_pack_start(GTK_BOX(Box),Icon,0,0,0);
+ gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0);
+ gtk_container_add(GTK_CONTAINER(Row),Box);
+ gtk_flow_box_insert(GTK_FLOW_BOX(cur_section->AppsList),Row,-1);
+
+ gtk_widget_set_size_request(Row,50,50);
+
+ gtk_widget_set_halign(Box,GTK_ALIGN_START);
+ gtk_widget_set_valign(Box,GTK_ALIGN_CENTER);
+
+ gtk_label_set_line_wrap_mode(GTK_LABEL(Label),PANGO_WRAP_WORD);
+ gtk_label_set_line_wrap(GTK_LABEL(Label),1);
+ gtk_label_set_xalign(GTK_LABEL(Label),0);
+
+ g_object_set_data(G_OBJECT(Row),"main_section",cur_section);
+ g_object_set_data(G_OBJECT(Row),"apps",cur_app);
+ g_object_set_data(G_OBJECT(Row),"Label",Label);
+
+ gtk_widget_show_all(Row);
+}
+
+main_section *yon_main_section_new(){
+ main_section *cur_section = malloc(sizeof(main_section));
+ memset(cur_section,0,sizeof(main_section));
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_main_section);
+ cur_section->expander = yon_gtk_builder_get_widget(builder,"MainExpander");
+ cur_section->MainLabel = yon_gtk_builder_get_widget(builder,"MainLabel");
+ cur_section->AppsList = yon_gtk_builder_get_widget(builder,"AppsFlow");
+ g_object_set_data(G_OBJECT(cur_section->expander),"main_section",cur_section);
+ int doubleclick=0;
+ yon_window_config_get_parameter(settings_section,double_click_parameter,&doubleclick,YON_TYPE_BOOLEAN);
+ gtk_flow_box_set_activate_on_single_click(GTK_FLOW_BOX(cur_section->AppsList),!doubleclick);
+ return cur_section;
+}
+
+void yon_main_section_setup(main_theme_struct *theme, app_section *section){
+ main_section *cur_section = yon_main_section_new();
+ cur_section->section = section;
+ gtk_label_set_text(GTK_LABEL(cur_section->MainLabel),section->name);
+ int app_size;
+ config_str app_list = yon_apps_get_by_categories(section->categories,section->categories_size,&app_size);
+ for(int i=0;iAppsTree),cur_section->expander,0,0,0);
+ g_object_set_data(G_OBJECT(cur_section->expander),"main_section",cur_section);
+ g_signal_connect(G_OBJECT(cur_section->AppsList),"child-activated",G_CALLBACK(on_main_activate),theme);
+ g_signal_connect(G_OBJECT(cur_section->AppsList),"selected-children-changed",G_CALLBACK(on_main_selected),theme);
+
+}
+
+void yon_main_section_get_max_size(main_section *section, int *ret_width, int *ret_height){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(section->AppsList));
+ GList *iter;
+ for (iter = list; iter;iter=iter->next){
+ gtk_widget_realize(GTK_WIDGET(iter->data));
+ int width;
+ int height;
+ GtkWidget *Label = g_object_get_data(G_OBJECT(iter->data),"Label");
+
+ gtk_widget_get_preferred_width(Label,NULL,&width);
+ gtk_widget_get_preferred_height(Label,NULL,&height);
+ if ((*ret_width)AppsTree));
+ GList *iter;
+ int max_width=0;
+ int max_height=0;
+ for (iter=list;iter;iter=iter->next){
+ main_section *section = g_object_get_data(G_OBJECT(iter->data),"main_section");
+ yon_main_section_get_max_size(section,&max_width,&max_height);
+ }
+ for (iter=list;iter;iter=iter->next){
+ main_section *section = g_object_get_data(G_OBJECT(iter->data),"main_section");
+ GList *child_list = gtk_container_get_children(GTK_CONTAINER(section->AppsList));
+ if (child_list){
+ GtkWidget *Label = g_object_get_data(G_OBJECT(child_list->data),"Label");
+ gtk_widget_set_size_request(Label,max_width,max_height);
+ }
+ }
+}
+
+int yon_main_update(main_theme_struct *theme){
+ GList *list = gtk_container_get_children(GTK_CONTAINER(theme->AppsTree));
+ GList *iter;
+ for (iter=list;iter;iter=iter->next){
+ gtk_widget_destroy(GTK_WIDGET(iter->data));
+ }
+
+ dictionary *cur;
+ for_dictionaries(cur,main_config.sections){
+ app_section *section_data = yon_dictionary_get_data(cur,app_section*);
+ yon_main_section_setup(theme,section_data);
+ }
+
+ yon_main_theme_resize(theme);
+ return 1;
+}
+
+main_theme_struct *yon_main_theme_new(){
+ main_theme_struct *theme = malloc(sizeof(main_theme_struct));
+
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_main_theme);
+ theme->MainBox = yon_gtk_builder_get_widget(builder,"MainBox");
+ theme->AppsTree = yon_gtk_builder_get_widget(builder,"AppsTree");
+ theme->SocketBox = yon_gtk_builder_get_widget(builder,"SocketBox");
+ theme->HideBox = yon_gtk_builder_get_widget(builder,"HideBox");
+ theme->theme_name = yon_char_new(MAIN_THEME_LABEL);
+ theme->Socket = NULL;
+ theme->list_update_func = (int(*)(struct main_theme_struct*))yon_main_update;
+
+ return theme;
+}
diff --git a/source/ubl-settings-manager-theme.c b/source/ubl-settings-manager-theme.c
index 4eee16f..501d6df 100644
--- a/source/ubl-settings-manager-theme.c
+++ b/source/ubl-settings-manager-theme.c
@@ -2,7 +2,7 @@
theme_struct *yon_theme_update(main_window *widgets){
char *theme_id;
- if (!yon_window_config_get_parameter("Settings","theme",&theme_id,YON_TYPE_STRING)){
+ if (!yon_window_config_get_parameter(settings_section,theme_parameter,&theme_id,YON_TYPE_STRING)){
theme_id = yon_char_new(GNOME_THEME_LABEL);
}
@@ -29,33 +29,4 @@ void yon_theme_init(){
// theme_struct *main_struct = (theme_struct*)yon_main_theme_new();
g_hash_table_insert(main_config.themes,yon_char_new(GNOME_THEME_LABEL),yon_gnome_theme_new);
g_hash_table_insert(main_config.themes,yon_char_new(MAIN_THEME_LABEL),yon_main_theme_new);
-}
-
-void yon_main_update(main_theme_struct *theme){
-
-}
-
-void on_main_activate(){
-
-}
-
-void on_main_socket_add(){
-
-}
-
-main_theme_struct *yon_main_theme_new(){
- main_theme_struct *theme = malloc(sizeof(main_theme_struct));
-
- GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_main_theme);
- theme->MainBox = yon_gtk_builder_get_widget(builder,"MainBox");
- theme->AppsIconView = yon_gtk_builder_get_widget(builder,"AppsIconView");
- theme->SocketBox = yon_gtk_builder_get_widget(builder,"SocketBox");
- theme->AppsList = GTK_LIST_STORE(gtk_builder_get_object(builder,"AppsList"));
- theme->theme_name = yon_char_new(MAIN_THEME_LABEL);
- theme->Socket = NULL;
- theme->list_update_func = (int(*)(struct main_theme_struct*))yon_main_update;
-
- g_signal_connect(G_OBJECT(theme->AppsIconView),"item-activated",G_CALLBACK(on_main_activate),theme);
- g_signal_connect(G_OBJECT(theme->SocketBox),"add",G_CALLBACK(on_main_socket_add),theme);
- return theme;
-}
+}
\ No newline at end of file
diff --git a/source/ubl-settings-manager.c b/source/ubl-settings-manager.c
index 2cee476..925e3e9 100644
--- a/source/ubl-settings-manager.c
+++ b/source/ubl-settings-manager.c
@@ -337,13 +337,13 @@ void on_reveal_banner(GtkWidget *, main_window *widgets){
gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->BannerRevealer),0);
gtk_menu_button_set_direction(GTK_MENU_BUTTON(widgets->BannerArrow),GTK_ARROW_RIGHT);
int banner = 1;
- yon_window_config_add_instant_parameter(hide_banner_parameter,"Settings",&banner,YON_TYPE_BOOLEAN);
+ yon_window_config_add_instant_parameter(hide_banner_parameter,settings_section,&banner,YON_TYPE_BOOLEAN);
} else {
gtk_revealer_set_transition_type(GTK_REVEALER(widgets->BannerRevealer),GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->BannerRevealer),1);
gtk_menu_button_set_direction(GTK_MENU_BUTTON(widgets->BannerArrow),GTK_ARROW_LEFT);
int banner = 0;
- yon_window_config_add_instant_parameter(hide_banner_parameter,"Settings",&banner,YON_TYPE_BOOLEAN);
+ yon_window_config_add_instant_parameter(hide_banner_parameter,settings_section,&banner,YON_TYPE_BOOLEAN);
}
}
@@ -432,18 +432,19 @@ void config_init(){
main_config.double_click=0;
main_config.apps_icon_size=24;
main_config.labelDensity=0;
- main_config.themes = g_hash_table_new(g_str_hash,g_str_equal);
- yon_theme_init();
};
void yon_config_update(){
- if (!yon_window_config_get_parameter("Setings",double_click_parameter,&main_config.double_click,YON_TYPE_INT)){
+ if (!yon_window_config_get_parameter(settings_section,double_click_parameter,&main_config.double_click,YON_TYPE_INT)){
main_config.double_click=0;
}
- if (!yon_window_config_get_parameter("Setings",icon_size_parameter,&main_config.apps_icon_size,YON_TYPE_INT)){
+ if (!yon_window_config_get_parameter(settings_section,icon_size_parameter,&main_config.apps_icon_size,YON_TYPE_INT)){
main_config.apps_icon_size=24;
}
+
+ main_config.themes = g_hash_table_new(g_str_hash,g_str_equal);
+ yon_theme_init();
}
int yon_char_parsed_compare(const void *a, const void *b){
@@ -517,9 +518,9 @@ char *yon_get_load_socket(){
return NULL;
}
-void confugure_setings_window(main_window *widgets){
+// void confugure_setings_window(main_window *widgets){
-}
+// }
void yon_interface_update(main_window *widgets){
if (main_config.sections) {
@@ -528,39 +529,39 @@ void yon_interface_update(main_window *widgets){
}
gsize size;
- config_str section_settings = yon_window_config_get_section("Sections",&size);
+ config_str section_settings = yon_window_config_get_section(sections_section,&size);
if (size){
for (gsize i=0;iname = yon_char_new(section_settings[i]);
char *categories = NULL;
- yon_window_config_get_parameter("Sections",cur_section->name,&categories,YON_TYPE_STRING);
+ yon_window_config_get_parameter(sections_section,cur_section->name,&categories,YON_TYPE_STRING);
cur_section->categories = yon_char_parse(categories,&cur_section->categories_size,";");
yon_dictionary_add_or_create_if_exists_with_data(main_config.sections,cur_section->name,cur_section);
}
} else {
{
app_section *cur_section = yon_app_section_new();
- cur_section->name = yon_char_new("Personal");
+ cur_section->name = yon_char_new(_("Personal"));
cur_section->categories = yon_char_parse("X-UBL-SettingsManager;X-UBL-PersonalSettings;",&cur_section->categories_size,";");
yon_dictionary_add_or_create_if_exists_with_data(main_config.sections,cur_section->name,cur_section);
}
{
app_section *cur_section = yon_app_section_new();
- cur_section->name = yon_char_new("Hardware");
+ cur_section->name = yon_char_new(_("Hardware"));
cur_section->categories = yon_char_parse("X-UBL-SettingsManager;X-UBL-HardwareSettings;",&cur_section->categories_size,";");
yon_dictionary_add_or_create_if_exists_with_data(main_config.sections,cur_section->name,cur_section);
}
{
app_section *cur_section = yon_app_section_new();
- cur_section->name = yon_char_new("System");
+ cur_section->name = yon_char_new(_("System"));
cur_section->categories = yon_char_parse("X-UBL-SettingsManager;X-UBL-SystemSettings;",&cur_section->categories_size,";");
yon_dictionary_add_or_create_if_exists_with_data(main_config.sections,cur_section->name,cur_section);
}
{
app_section *cur_section = yon_app_section_new();
- cur_section->name = yon_char_new("Misc");
+ cur_section->name = yon_char_new(_("Misc"));
cur_section->categories = yon_char_parsed_new(&cur_section->categories_size,"",NULL);
yon_dictionary_add_or_create_if_exists_with_data(main_config.sections,cur_section->name,cur_section);
}
@@ -599,19 +600,22 @@ main_window *yon_main_window_setup(){
g_signal_connect(G_OBJECT(widgets->MainMenuItemSettings),"activate",G_CALLBACK(on_settings_open),widgets);
g_signal_connect(G_OBJECT(widgets->BannerButton),"clicked",G_CALLBACK(on_reveal_banner),widgets);
-
+ g_signal_connect(G_OBJECT(widgets->MainMenuItemDocumentation),"activate",G_CALLBACK(on_open_documentation_confirmation),WIKI_LINK);
+ g_signal_connect(G_OBJECT(widgets->MainMenuItemAbout),"activate",G_CALLBACK(on_about),version_application);
+
yon_window_config_setup(GTK_WINDOW(widgets->Window));
char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL);
yon_window_config_load(path);
free(path);
+ config_init();
+ yon_config_update();
{
int banner_hidden = 0;
- yon_window_config_get_parameter("Settings",hide_banner_parameter, &banner_hidden,YON_TYPE_BOOLEAN);
+ yon_window_config_get_parameter(settings_section,hide_banner_parameter, &banner_hidden,YON_TYPE_BOOLEAN);
gtk_revealer_set_transition_type(GTK_REVEALER(widgets->BannerRevealer),!banner_hidden?GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT:GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->BannerRevealer),!banner_hidden);
gtk_menu_button_set_direction(GTK_MENU_BUTTON(widgets->BannerArrow),!banner_hidden?GTK_ARROW_LEFT:GTK_ARROW_RIGHT);
}
-
gtk_widget_show(widgets->Window);
yon_interface_update(widgets);
return widgets;
@@ -641,8 +645,7 @@ int main(int argc, char *argv[]){
}
}
gtk_init(&argc, &argv);
- config_init();
- main_window *widgets = yon_main_window_setup();
+ yon_main_window_setup();
GtkCssProvider *css=gtk_css_provider_new();
gtk_css_provider_load_from_resource(css,CssPath);
diff --git a/source/ubl-settings-manager.h b/source/ubl-settings-manager.h
index 783c4e5..0ce7ca7 100644
--- a/source/ubl-settings-manager.h
+++ b/source/ubl-settings-manager.h
@@ -36,8 +36,11 @@
#define glade_path "/com/ublinux/ui/ubl-settings-manager.glade"
#define glade_path_gnome_theme "/com/ublinux/ui/ubl-settings-manager-theme-gnome.glade"
#define glade_path_gnome_section "/com/ublinux/ui/ubl-settings-manager-theme-gnome-section.glade"
+#define glade_path_main_section "/com/ublinux/ui/ubl-settings-manager-theme-main-section.glade"
#define glade_path_main_theme "/com/ublinux/ui/ubl-settings-manager-theme-main.glade"
#define glade_path_settings "/com/ublinux/ui/ubl-settings-manager-settings.glade"
+#define glade_path_settings_section "/com/ublinux/ui/ubl-settings-manager-settings-sections.glade"
+#define glade_path_section_element "/com/ublinux/ui/ubl-settings-manager-section-element.glade"
#define CssPath "/com/ublinux/css/ubl-settings-manager.css"
#define GlobalConfigPath "/etc/xdg/ubl-settings-manager/ubl-settings-manager.conf"
#define UserConfigPath "/.config/ubl-settings-manager/ubl-settings-manager.conf"
@@ -53,6 +56,9 @@
#define launch_command(target) yon_char_unite("xdg-open ",target,NULL)
#define launch_args_command(main_socket,load_socket,save_socket) yon_char_unite("--socket-id=",main_socket," --socket-ext-id=",save_socket," --socket-trd-id=",load_socket,NULL)
+#define settings_section "Settings"
+#define sections_section "Sections"
+
#define double_click_parameter "double_click"
#define icon_size_parameter "icon_size"
#define theme_parameter "theme"
@@ -107,14 +113,13 @@ typedef struct {
GtkWidget *DeleditBox;
} SectionSettingSegment;
-typedef struct theme_struct {
+/// @brief Public fields of theme structs
+typedef struct theme_struct {
char *theme_name;
GtkWidget *MainBox; //theme main box, which connects to window
GtkWidget *SocketBox; //main socket box, where socket is being parented to
GtkWidget *HideBox; //box to hide when socket has been connected
int (*list_update_func)(struct theme_struct*); //function to update theme's lits of application
- // GtkWidget *AppsTree; //theme application list container
- // GtkWidget *Socket;
} theme_struct;
typedef struct gnome_theme_struct {
@@ -123,6 +128,7 @@ typedef struct gnome_theme_struct {
GtkWidget *SocketBox;
GtkWidget *HideBox;
int (*list_update_func)(struct gnome_theme_struct*);
+ GtkWidget *SearchEntry;
GtkWidget *AppsTree;
GtkWidget *Socket;
GtkWidget *GnomePaned;
@@ -136,7 +142,7 @@ typedef struct main_theme_struct {
GtkWidget *SocketBox;
GtkWidget *HideBox;
int (*list_update_func)(struct main_theme_struct*);
- GtkWidget *AppsIconView;
+ GtkWidget *AppsTree;
GtkWidget *Socket;
GtkListStore *AppsList;
} main_theme_struct;
@@ -206,6 +212,11 @@ typedef struct {
int icon_size;
} settings_window;
+void yon_open_browser(GtkWidget *self, char *link);
+void on_open_documentation_confirmation(GtkWidget *self, char *link);
+void on_link(GtkWidget *self, char* uri, gpointer user_data);
+void on_about(GtkWidget *self, char *version_application);
+
void on_settings_accept(GtkWidget *, settings_window *window);
void yon_theme_init();
theme_struct *yon_theme_update(main_window *widgets);
@@ -222,5 +233,25 @@ int yon_char_parsed_compare(const void *a, const void *b);
void yon_interface_update(main_window *widgets);
void on_settings_open(GtkWidget *, main_window *widgets);
+void yon_section_window_open(GtkWidget *, settings_window *settings);
+void on_reveal_banner(GtkWidget *, main_window *widgets);
+void config_init();
+void yon_config_update();
+void on_back_clicked(GtkWidget *, GtkWidget *socket);
+void on_plug_connected(GtkSocket *self, main_window *widgets);
+main_window *yon_main_window_setup();
+gboolean on_settings_size_changed(GtkRange* , GtkScrollType* , gdouble value, settings_window *window);
+settings_window *yon_settings_window_new();
+void on_gnome_plug_connected(GtkWidget *,gnome_theme_struct *theme);
+void on_gnome_plug_disconnected(GtkWidget *,gnome_theme_struct *theme);
+void yon_gnome_section_setup(gnome_theme_struct *theme,app_section *section);
+int yon_gnome_update(gnome_theme_struct *theme);
+void on_gnome_search(GtkWidget *, gnome_theme_struct *theme);
+void on_main_plug_connected(GtkWidget *,main_theme_struct *theme);
+void on_main_plug_disconnected(GtkWidget *,main_theme_struct *theme);
+void on_main_activate(GtkFlowBox* , GtkFlowBoxChild* child, main_theme_struct *theme);
+void yon_main_section_setup(main_theme_struct *theme, app_section *section);
+void yon_main_theme_resize(main_theme_struct *theme);
+int yon_main_update(main_theme_struct *theme);
#endif
\ No newline at end of file
diff --git a/source/ubl-strings.h b/source/ubl-strings.h
index 3ef5e19..45dda0b 100644
--- a/source/ubl-strings.h
+++ b/source/ubl-strings.h
@@ -6,21 +6,30 @@
#define WIKI_LINK _("https://wiki.ublinux.ru/software/programs_and_utilities/all/ubl-settings-manager")
#define ABOUT_PROJECT_COMMENTS_LABEL _("Settings manager for UBLinux")
+#define BACK_TO_SETTINGS_LABEL _("Back to settings")
#define CONFIG_LOAD_ERROR _("Config loading failed!\n")
#define DOUBLE_CLICK_SELECTION_LABEL _("Double click selection")
#define SECTIONS_MANAGEMENT_LABEL _("Sections management")
#define UNDERSTOOD_LABEL _("Understood")
#define SETTINGS_LABEL _("Settings")
#define APPLY_LABEL _("Apply")
-#define SAVE_AND_APPLY_LABEL _("Save and apply")
#define CLOSE_LABEL _("Close")
#define CANCEL_LABEL _("Cancel")
-#define READ_ONLINE_LABEL _("Read online")
-#define REDIRECTION_COMMENT_LABEL _("You will be redirected to documentation site, where user help pages are translated and supported by community.")
-#define REDIRECTION_LABEL _("Would you like to read documentation in the Web?")
+#define ABOUT__LABEL _("About...")
+#define DOCUMENTATION__LABEL _("Documentation")
#define WINDOW_THEME_LABEL _("Window theme")
#define ICON_SIZE_LABEL _("Icon size")
#define BACK_TO_ALL_SETTINGS_LABEL _("All settings")
#define THEME_ERROR_LABEL _("Failed to load theme")
#define MAIN_THEME_LABEL _("Main theme")
-#define GNOME_THEME_LABEL _("GNOME theme")
\ No newline at end of file
+#define GNOME_THEME_LABEL _("GNOME theme")
+#define DEFAULT_LABEL _("Default")
+#define SECTION_NAME_LABEL _("Section name")
+#define IDENTIFIER_LABEL _("Identifier")
+#define ADD_SECTION_TOOLTIP_LABEL _("Add section")
+#define CLEAR_SECTION_TOOLTIP_LABEL _("Clear fields")
+#define REMOVE_SECTION_TOOLTIP_LABEL _("Remove section")
+#define PERSONAL_SECTION_LABEL _("Personal")
+#define HARDWARE_SECTION_LABEL _("Hardware")
+#define SYSTEM_SECTION_LABEL _("System")
+#define MISC_SECTION_LABEL _("Misc")
\ No newline at end of file
diff --git a/ubl-settings-manager-section-element.glade b/ubl-settings-manager-section-element.glade
new file mode 100644
index 0000000..b64d256
--- /dev/null
+++ b/ubl-settings-manager-section-element.glade
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
diff --git a/ubl-settings-manager-settings-sections.glade b/ubl-settings-manager-settings-sections.glade
index 2fa7881..daedbd2 100644
--- a/ubl-settings-manager-settings-sections.glade
+++ b/ubl-settings-manager-settings-sections.glade
@@ -1,247 +1,239 @@
-
+
-
+
+ True
+ False
+ 16
+ com.ublinux.libublsettingsui-gtk3.funnel-symbolic
+
+
+ True
+ False
+ 16
+ com.ublinux.libublsettingsui-gtk3.accept-symbolic
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.cancel-uncolored-symbolic
+
+
+ True
+ False
+ com.ublinux.libublsettingsui-gtk3.accept-symbolic
+
+
+ 450
+ 350
+ True
False
- 800
- 600
+ True
+ com.ublinux.ubl-settings-manager
True
False
vertical
+ 5
-
+
True
- True
- 5
- 5
+ False
+ vertical
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
5
5
- 5
5
- in
+ vertical
+ 5
-
+
True
False
+ 5
+ 5
+ 5
+
+
+ True
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Default
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ in
-
+
True
False
- vertical
+ 5
+ 5
+ 5
+ 5
-
+
True
False
- 5
- 5
- 5
- 5
- 5
- 5
vertical
+ 5
-
- False
- True
- 0
-
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
-
+
True
False
- 5
- 5
- 5
- 5
- 0.019999999552965164
- in
+ 5
-
+
True
- False
- 3
- 3
- 5
- 5
-
-
- True
- False
-
-
- True
- True
- True
- center
- 3
- 3
- image2
-
-
- False
- True
- 0
-
-
-
-
- True
- True
- True
- False
- Section name
- name
-
-
- True
- True
- 1
-
-
-
-
- True
- False
-
-
- True
- False
- center
-
-
- True
- True
- True
- 5
- 5
- image4
-
-
- False
- True
- end
- 2
-
-
-
-
- True
- False
- 2
-
-
- True
- True
- 5
- 10
- 5
- 10
- False
- Identifier
-
-
- True
- True
- 0
-
-
-
-
- True
- True
- 2
-
-
-
-
- True
- True
- 1
-
-
-
-
- True
- True
- 2
-
-
-
-
+ True
+ 15
+ True
+ False
+ Section name
+ name
+
+ False
+ True
+ 0
+
-
-
+
+
+ True
+ True
+ 0
+ False
+ Identifier
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ True
+ True
+ Clear fields
+ center
+ image2
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ True
+ Add section
+ image4
+
+
+
+ False
+ True
+ end
+ 3
+
-
- False
- True
- 1
-
-
-
-
-
- True
- True
- 0
-
-
-
-
- True
- False
-
-
- Save and apply
- True
- True
- True
- 5
- 5
- 5
- image7
-
-
- False
- True
- end
- 0
-
-
-
-
- Close
- True
- True
- True
- 15
- 15
- 5
- image6
+
+
+
False
True
- end
- 1
+ 2
- False
+ True
True
1
@@ -249,11 +241,11 @@
-
-
- True
- False
- 16
- user-trash-symbolic
-
-
- True
- False
- 16
- object-select-symbolic
-
-
- True
- False
- process-stop-symbolic
-
-
- True
- False
- emblem-ok-symbolic
-
diff --git a/ubl-settings-manager-settings.glade b/ubl-settings-manager-settings.glade
index fb1c050..1379914 100644
--- a/ubl-settings-manager-settings.glade
+++ b/ubl-settings-manager-settings.glade
@@ -1,7 +1,8 @@
-
+
+
24
64
@@ -266,7 +267,7 @@
- Close
+ Cancel
True
True
True
diff --git a/ubl-settings-manager-theme-gnome-section.glade b/ubl-settings-manager-theme-gnome-section.glade
index 600e2c4..b7ecb20 100644
--- a/ubl-settings-manager-theme-gnome-section.glade
+++ b/ubl-settings-manager-theme-gnome-section.glade
@@ -6,6 +6,8 @@
True
True
+ True
+ True
True
diff --git a/ubl-settings-manager-theme-gnome.glade b/ubl-settings-manager-theme-gnome.glade
index 249c798..28dc32f 100644
--- a/ubl-settings-manager-theme-gnome.glade
+++ b/ubl-settings-manager-theme-gnome.glade
@@ -25,53 +25,71 @@
True
True
-
+
True
- True
- in
+ False
+ 5
+ 5
+ 5
+ 5
+ vertical
+ 5
-
+
True
- False
+ True
+ 0
+ edit-find-symbolic
+ False
+ False
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
-
+
True
False
- vertical
- 5
+ none
-
- True
- True
- edit-find-symbolic
- False
- False
-
-
- False
- True
- 0
-
-
-
-
+
True
False
vertical
5
-
+
+ True
+ False
+ vertical
+ 5
+
+
+
+
+
+ True
+ True
+ 1
+
-
- True
- True
- 1
-
+
+ True
+ True
+ 1
+
@@ -164,6 +182,9 @@
True
+
True
diff --git a/ubl-settings-manager-theme-main-IconView.glade b/ubl-settings-manager-theme-main-IconView.glade
deleted file mode 100644
index 5d4daf1..0000000
--- a/ubl-settings-manager-theme-main-IconView.glade
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- True
- 4
- natural
- horizontal
- liststoreTemplate
- 135
- 0
- 2
- 5
- True
-
-
- 2
-
-
- 5
- 3
- 1
- 2
- 4
-
-
-
-
- 0
- word
- 130
-
-
- 3
- 0
-
-
-
-
-
diff --git a/ubl-settings-manager-theme-main-section.glade b/ubl-settings-manager-theme-main-section.glade
new file mode 100644
index 0000000..36f79fa
--- /dev/null
+++ b/ubl-settings-manager-theme-main-section.glade
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ label
+ 0
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ start
+ True
+ 5
+ 5
+ 15
+ browse
+ False
+
+
+ False
+ True
+ 1
+
+
+
+
diff --git a/ubl-settings-manager-theme-main.glade b/ubl-settings-manager-theme-main.glade
index 306a248..72717ed 100644
--- a/ubl-settings-manager-theme-main.glade
+++ b/ubl-settings-manager-theme-main.glade
@@ -3,7 +3,6 @@
-
True
False
@@ -15,20 +14,27 @@
vertical
- 5
- 5
True
True
- immediate
- never
- always
in
-
+
True
- True
- 6
- AppsList
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ vertical
+
+
+
+
+
@@ -57,7 +63,7 @@
- False
+ True
True
1
diff --git a/ubl-settings-manager.conf b/ubl-settings-manager.conf
deleted file mode 100644
index 3e8a48b..0000000
--- a/ubl-settings-manager.conf
+++ /dev/null
@@ -1,22 +0,0 @@
-[window]
-WindowPosX=0
-WindowPosY=0
-WindowWidth=800
-WindowHeight=600
-WindowTheme=0
-MainIconSize=3
-GnomeIconSize=3
-IconSegmentSize=250
-MainLabelSize=12
-GnomeLabelSize=12
-LabelDensity=0
-User=
-GnomeDoubleClick=false
-MainDoubleClick=true
-BannerHidden=false
-
-[sections]
-Personal=X-UBL-SettingsManager;X-UBL-PersonalSettings;
-Hardware=X-UBL-SettingsManager;X-UBL-HardwareSettings;
-System=X-UBL-SettingsManager;X-UBL-SystemSettings;
-Misc=
diff --git a/ubl-settings-manager.css b/ubl-settings-manager.css
index a042536..8cc8f3b 100644
--- a/ubl-settings-manager.css
+++ b/ubl-settings-manager.css
@@ -10,6 +10,11 @@
border-style: solid;
}
+
+.titlelabel {
+ color: @theme_bg_color;
+}
+
.nobackground {
background:transparent;
}
diff --git a/ubl-settings-manager.glade b/ubl-settings-manager.glade
index 3ed6809..07d3236 100644
--- a/ubl-settings-manager.glade
+++ b/ubl-settings-manager.glade
@@ -3,111 +3,6 @@
-
- False
- False
- dialog-information-symbolic
- False
-
-
- True
- False
- vertical
-
-
- True
- False
-
-
- True
- False
- center
- start
- 20
- 20
- 20
- 20
- dialog-information-symbolic
- 6
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- center
- start
- 10
- 25
- 20
- 20
- Changing the theme is not available due to the small screen resolution!
- True
- 0
-
-
- True
- True
- 1
-
-
-
-
- True
- True
- 0
-
-
-
-
- Understood
- True
- True
- True
- 5
- 5
- 5
- 5
-
-
- False
- True
- 2
-
-
-
-
-
-
-
-
True
False
@@ -164,7 +59,6 @@
True
False
- 5
True
@@ -249,9 +143,7 @@
True
False
- 5
vertical
- 5
True
@@ -269,17 +161,11 @@
- Icon
True
False
- 5
-
True
@@ -346,7 +232,10 @@
True
False
- com.ublinux.libublsettingsui-gtk3.pan-left
+ com.ublinux.libublsettingsui-gtk3.pan-left-symbolic
+
False
@@ -355,7 +244,7 @@
-
+
True
False
Back to settings
diff --git a/ubl-settings-manager.pot b/ubl-settings-manager.pot
deleted file mode 100644
index 52374e8..0000000
--- a/ubl-settings-manager.pot
+++ /dev/null
@@ -1,164 +0,0 @@
-# Language translations for ubl-settings-manager package.
-# Copyright (C) 2022, UBTech LLC
-# This file is distributed under the same license as the ubl-settings-manager package.
-# UBLinux Team , 2022
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: ubl-settings-manager 1.0\n"
-"Report-Msgid-Bugs-To: info@ublinux.com\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-04-21 12:33+0000\n"
-"PO-Revision-Date: 2023-01-01 00:00+0600\n"
-"Last-Translator: UBLinux Team \n"
-"Language-Team: Russian - UBLinux Team \n"
-"Language: Russian\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: source/ubl-settings-manager.h:9
-msgid ""
-"\n"
-"GTK settings manager for UBLinux\n"
-"Usage: ubl-settings-manager [OPTIONS...]\n"
-"Options:\n"
-" -h, --help\t\t Show this help\n"
-" -V, --version\t \t Show package version\n"
-" --lock-settings Lock menu settings\n"
-msgstr ""
-
-#: source/ubl-settings-manager.h:27
-msgid "About UBLinux Settings Manager"
-msgstr ""
-
-#: source/ubl-settings-manager.h:34 source/ubl-settings-manager.c:1685
-msgid "About..."
-msgstr ""
-
-#: source/ubl-settings-manager.h:37 source/ubl-settings-manager.h:36
-#: source/ubl-settings-manager.c:1683
-msgid "Always redirect"
-msgstr ""
-
-#: source/ubl-settings-manager.h:38 source/ubl-settings-manager.h:37
-#: source/ubl-settings-manager.c:1742
-msgid "Apply"
-msgstr ""
-
-#: source/ubl-settings-manager.h:47 source/ubl-settings-manager.h:46
-#: source/ubl-settings-manager.c:1600
-msgid "All settings"
-msgstr ""
-
-#: source/ubl-settings-manager.h:41 source/ubl-settings-manager.h:40
-#: source/ubl-settings-manager.c:1680
-msgid "Cancel"
-msgstr ""
-
-#: source/ubl-settings-manager.h:40 source/ubl-settings-manager.h:39
-#: source/ubl-settings-manager.c:1681
-msgid "Close"
-msgstr ""
-
-#: source/ubl-settings-manager.h:30
-msgid "Config loading failed!\n"
-msgstr ""
-
-#: source/ubl-settings-manager.h:35
-msgid "Documentation"
-msgstr ""
-
-#: source/ubl-settings-manager.h:31 source/ubl-settings-manager.c:1748
-msgid "Double click selection"
-msgstr ""
-
-#: source/ubl-settings-manager.c:1913 source/ubl-settings-manager.c:1912
-#: source/ubl-settings-manager.c:1793
-msgid "GNOME theme"
-msgstr ""
-
-msgid "Hardware"
-msgstr ""
-
-#: source/ubl-settings-manager.h:46 source/ubl-settings-manager.h:45
-#: source/ubl-settings-manager.c:1675
-msgid "Icon size"
-msgstr ""
-
-msgid "Misc"
-msgstr ""
-
-msgid "Personal"
-msgstr ""
-
-#: source/ubl-settings-manager.h:28 source/ubl-settings-manager.c:636
-msgid "Project Home Page"
-msgstr ""
-
-#: source/ubl-settings-manager.h:42 source/ubl-settings-manager.h:41
-#: source/ubl-settings-manager.c:1679
-msgid "Read online"
-msgstr ""
-
-#: source/ubl-settings-manager.h:39 source/ubl-settings-manager.h:38
-#: source/ubl-settings-manager.c:1682
-msgid "Save and apply"
-msgstr ""
-
-#: source/ubl-settings-manager.h:32 source/ubl-settings-manager.c:1687
-msgid "Sections management"
-msgstr ""
-
-#: source/ubl-settings-manager.h:36 source/ubl-settings-manager.h:35
-#: source/ubl-settings-manager.c:1684
-msgid "Settings"
-msgstr ""
-
-#: source/ubl-settings-manager.h:29 source/ubl-settings-manager.c:632
-msgid "Settings manager for UBLinux"
-msgstr ""
-
-#: source/ubl-settings-manager.c:1912 source/ubl-settings-manager.c:1911
-#: source/ubl-settings-manager.c:1792
-msgid "Standard theme"
-msgstr ""
-
-msgid "System"
-msgstr ""
-
-#: source/ubl-settings-manager.h:26 source/ubl-settings-manager.c:633
-#: source/ubl-settings-manager.c:1601 source/ubl-settings-manager.c:1615
-#: source/ubl-settings-manager.c:1674
-msgid "UBLinux Settings Manager"
-msgstr ""
-
-#: source/ubl-settings-manager.h:33 source/ubl-settings-manager.c:1686
-msgid "Understood"
-msgstr ""
-
-#: source/ubl-settings-manager.h:8
-msgid "Version: "
-msgstr ""
-
-#: source/ubl-settings-manager.h:45 source/ubl-settings-manager.h:44
-#: source/ubl-settings-manager.c:1676
-msgid "Window theme"
-msgstr ""
-
-#: source/ubl-settings-manager.h:44 source/ubl-settings-manager.h:43
-#: source/ubl-settings-manager.c:1677
-msgid "Would you like to read documentation in the Web?"
-msgstr ""
-
-#: source/ubl-settings-manager.h:43 source/ubl-settings-manager.h:42
-#: source/ubl-settings-manager.c:1678
-msgid ""
-"You will be redirected to documentation site, where user help pages are\n"
-"translated and supported by community."
-msgstr ""
-
-#: source/ubl-settings-manager.h:9
-msgid "ubl-settings-manager version: "
-msgstr ""
diff --git a/ubl-settings-manager_ru.po b/ubl-settings-manager_ru.po
deleted file mode 100644
index 304ac21..0000000
--- a/ubl-settings-manager_ru.po
+++ /dev/null
@@ -1,172 +0,0 @@
-# Russian translations for ubl-settings-manager package.
-# Copyright (C) 2022, UBTech LLC
-# This file is distributed under the same license as the ubl-settings-manager package.
-# UBLinux Team , 2022
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: ubl-settings-manager 1.0\n"
-"Report-Msgid-Bugs-To: info@ublinux.com\n"
-"POT-Creation-Date: 2023-04-21 12:33+0000\n"
-"PO-Revision-Date: 2023-01-01 00:00+0600\n"
-"Last-Translator: UBLinux Team \n"
-"Language-Team: Russian - UBLinux Team \n"
-"Language: Russian\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: source/ubl-settings-manager.h:9
-msgid ""
-"\n"
-"GTK settings manager for UBLinux\n"
-"Usage: ubl-settings-manager [OPTIONS...]\n"
-"Options:\n"
-" -h, --help\t\t Show this help\n"
-" -V, --version\t \t Show package version\n"
-" --lock-settings Lock menu settings\n"
-msgstr ""
-"\n"
-"GTK Менеджер настроек для UBLinux\n"
-"Использование: ubl-settings-manager [АРГУМЕНТЫ...]\n"
-"Аргументы:\n"
-" -h, --help\t\t Показать помощь\n"
-" -V, --version\t \t Показать версию пакета\n"
-" --lock-settings \t Заблокировать окно настроек\n"
-
-#: source/ubl-settings-manager.h:27
-msgid "About UBLinux Settings Manager"
-msgstr "О приложении Диспетчер настроек UBLinux"
-
-#: source/ubl-settings-manager.h:34 source/ubl-settings-manager.c:1685
-msgid "About..."
-msgstr "О программе"
-
-#: source/ubl-settings-manager.h:37 source/ubl-settings-manager.h:36
-#: source/ubl-settings-manager.c:1683
-msgid "Always redirect"
-msgstr "Всегда перенаправлять"
-
-#: source/ubl-settings-manager.h:38 source/ubl-settings-manager.h:37
-#: source/ubl-settings-manager.c:1742
-msgid "Apply"
-msgstr "Применить"
-
-#: source/ubl-settings-manager.h:47 source/ubl-settings-manager.h:46
-#: source/ubl-settings-manager.c:1600
-msgid "All settings"
-msgstr "Все настройки"
-
-#: source/ubl-settings-manager.h:41 source/ubl-settings-manager.h:40
-#: source/ubl-settings-manager.c:1680
-msgid "Cancel"
-msgstr "Отменить"
-
-#: source/ubl-settings-manager.h:40 source/ubl-settings-manager.h:39
-#: source/ubl-settings-manager.c:1681
-msgid "Close"
-msgstr "Закрыть"
-
-#: source/ubl-settings-manager.h:30
-msgid "Config loading failed!\n"
-msgstr "Ошибка загрузки конфигурации!\n"
-
-#: source/ubl-settings-manager.h:35
-msgid "Documentation"
-msgstr "Справка"
-
-#: source/ubl-settings-manager.h:31 source/ubl-settings-manager.c:1748
-msgid "Double click selection"
-msgstr "Открывать приложения двойным нажатием"
-
-#: source/ubl-settings-manager.c:1913 source/ubl-settings-manager.c:1912
-#: source/ubl-settings-manager.c:1793
-msgid "GNOME theme"
-msgstr "GNOME тема"
-
-msgid "Hardware"
-msgstr "Оборудование"
-
-#: source/ubl-settings-manager.h:46 source/ubl-settings-manager.h:45
-#: source/ubl-settings-manager.c:1675
-msgid "Icon size"
-msgstr "Размер иконок"
-
-msgid "Misc"
-msgstr "Прочее"
-
-msgid "Personal"
-msgstr "Личные"
-
-#: source/ubl-settings-manager.h:28 source/ubl-settings-manager.c:636
-msgid "Project Home Page"
-msgstr "Домашняя страница проекта"
-
-#: source/ubl-settings-manager.h:42 source/ubl-settings-manager.h:41
-#: source/ubl-settings-manager.c:1679
-msgid "Read online"
-msgstr "Прочитать онлайн"
-
-#: source/ubl-settings-manager.h:39 source/ubl-settings-manager.h:38
-#: source/ubl-settings-manager.c:1682
-msgid "Save and apply"
-msgstr "Сохранить и применить"
-
-#: source/ubl-settings-manager.h:32 source/ubl-settings-manager.c:1687
-msgid "Sections management"
-msgstr "Настройка разделов"
-
-#: source/ubl-settings-manager.h:36 source/ubl-settings-manager.h:35
-#: source/ubl-settings-manager.c:1684
-msgid "Settings"
-msgstr "Настройки"
-
-#: source/ubl-settings-manager.h:29 source/ubl-settings-manager.c:632
-msgid "Settings manager for UBLinux"
-msgstr "Диспетчер настроек UBLinux"
-
-#: source/ubl-settings-manager.c:1912 source/ubl-settings-manager.c:1911
-#: source/ubl-settings-manager.c:1792
-msgid "Standard theme"
-msgstr "Стандартная тема"
-
-msgid "System"
-msgstr "Система"
-
-#: source/ubl-settings-manager.h:26 source/ubl-settings-manager.c:633
-#: source/ubl-settings-manager.c:1601 source/ubl-settings-manager.c:1615
-#: source/ubl-settings-manager.c:1674
-msgid "UBLinux Settings Manager"
-msgstr "Диспетчер настроек UBLinux"
-
-#: source/ubl-settings-manager.h:33 source/ubl-settings-manager.c:1686
-msgid "Understood"
-msgstr "Понятно"
-
-#: source/ubl-settings-manager.h:8
-msgid "Version: "
-msgstr "Версия: "
-
-#: source/ubl-settings-manager.h:45 source/ubl-settings-manager.h:44
-#: source/ubl-settings-manager.c:1676
-msgid "Window theme"
-msgstr "Выбор темы"
-
-#: source/ubl-settings-manager.h:44 source/ubl-settings-manager.h:43
-#: source/ubl-settings-manager.c:1677
-msgid "Would you like to read documentation in the Web?"
-msgstr "Вы хотите прочитать справку в Сети?"
-
-#: source/ubl-settings-manager.h:43 source/ubl-settings-manager.h:42
-#: source/ubl-settings-manager.c:1678
-msgid ""
-"You will be redirected to documentation site, where user help pages are\n"
-"translated and supported by community."
-msgstr ""
-"Вы будете перенаправлены на сайт с документацией где страницы помощи\n"
-"переводятся и поддерживаются сообществом."
-
-#: source/ubl-settings-manager.h:9
-msgid "ubl-settings-manager version: "
-msgstr "ubl-settings-manager версия: "
diff --git a/ublinux-logo.svg b/ublinux-logo.svg
deleted file mode 100644
index d44113c..0000000
--- a/ublinux-logo.svg
+++ /dev/null
@@ -1,241 +0,0 @@
-
-