pull/62/head
parent a01e74f228
commit 0d1ff86c63

@ -6,51 +6,48 @@ MAKEFILE_DIR := $(notdir $(patsubst %/,%,$(dir $(MAKEFILE_FILEPATH))))
MAKEFILE_PATH := $(dir $(MAKEFILE_FILEPATH)) MAKEFILE_PATH := $(dir $(MAKEFILE_FILEPATH))
CMAKE_COMMAND = cmake CMAKE_COMMAND = cmake
CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source #CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source
CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile #CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile
DEPENDS = /bin/cmake CMAKE_SOURCE_DIR = ./source
PREFIX ?= /usr/local CMAKE_BUILD_DIR = ./compile
DEPENDS = cmake
PKGNAME = $(MAKEFILE_DIR) PKGNAME = $(MAKEFILE_DIR)
FILE_VER = source/${PKGNAME}.h #PKGNAME = ubl-settings-manager
pkgdir =
default_target: all default_target: all
.PHONY: all init depend debug prepare check build uninstall install clean help
all: init build all: init build
init: init:
@echo "Initialize ..."; \ @echo "Initialize ..."; \
if [ -d ".git" ]; then \ version="$$(cat VERSION.md)"; \
LATEST_TAG=$$(git describe --abbrev=0 --tags | sed 's/^v//'); \ version=$${version:8}; \
else \ search="s/char *version_application.*$&"; \
LATEST_TAG="Development"; \ replace="char *version_application = \"$${version}\";"; \
fi; \ sed -i -e "$$search/$$replace/gi" source/ubl-settings-manager.h; \
sed -r "s/^(string version_application).*/\1 = \"$${LATEST_TAG}\";/" -i ${FILE_VER}; \ echo "-- Build path: ${CMAKE_BUILD_DIR}"
echo "-- Build path: ${CMAKE_BUILD_DIR}"
depend: depend:
@echo "Check depends ..." @echo "Check depends ..."; \
@for FILE_DEPEND in $(DEPENDS); do \ if [ ! -f /bin/cmake ]; then \
if [ ! -f $${FILE_DEPEND} ]; then \ echo "-- Depend 'cmake' not found !"; \
echo "ERROR: Depend '$${FILE_DEPEND}' not found !"; \ exit 1; \
exit 1; \ fi; \
fi; \
done; \
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B${CMAKE_BUILD_DIR} --check-build-system CMakeFiles/Makefile.cmake 1 || exit 1; \
echo "Check depends: OK" echo "Check depends: OK"
# $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
debug: debug:
@echo "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}"; \ cmake -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="/usr"; \
fi; \ fi; \
echo "Debug: OK" echo "Debug: OK"
prepare: prepare:
@echo "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}"; \ cmake -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr"; \
fi; \ fi; \
echo "Prepare: OK" echo "Prepare: OK"
@ -65,64 +62,75 @@ check:
build: depend prepare build: depend prepare
@echo "Build ..."; \ @echo "Build ..."; \
$(MAKE_COMMAND) --directory=${CMAKE_BUILD_DIR}; \ make --directory=${CMAKE_BUILD_DIR}; \
sed -r "s/^(string version_application).*/\1;/" -i ${FILE_VER}; \
echo "Build: OK" echo "Build: OK"
uninstall: uninstall:
@echo "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}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
$(RM) "$${PATH_FILE_MO}"; \
done
@for SIZE in 16x16 32x32 48x48 scalable; do \ @for SIZE in 16x16 32x32 48x48 scalable; do \
$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ $(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/${PKGNAME}.svg"; \
$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/apps/com.ublinux.${PKGNAME}.png"; \ $(RM) "/usr/share/"${pkgname}"/images/${PKGNAME}.png"; \
done done
@for FILE_SVG in $(wildcard *.svg); do \ @for FILE_SVG in $(wildcard *.svg); do \
for SIZE in 16x16 32x32 48x48 scalable; do \ for SIZE in 16x16 32x32 48x48 scalable; do \
$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \ $(RM) "/usr/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \
done; \ done; \
done done
@$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}" @for FILE_PO in $(wildcard *.po); do \
@$(RM) "${DESTDIR}/etc/xdg/${PKGNAME}/${PKGNAME}.conf" LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
@$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg" PATH_FILE_MO="/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
@$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}.policy" $(RM) "/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
@if [ -z ${DESTDIR} ]; then \ done
[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ @$(RM) "/usr/bin/${PKGNAME}"
update-desktop-database --quiet &>/dev/null || true; \ @$(RM) "/usr/share/applications/${PKGNAME}.desktop"
[ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ @$(RM) "/usr/share/icons/hicolor/scalable/apps/${PKGNAME}.png"
fi @$(RM) "/usr/share/icons/hicolor/scalable/apps/${PKGNAME}.svg"
@$(RM) "/usr/share/icons/hicolor/scalable/apps/ubl-settings-manager.svg"
@$(RM) "/usr/share/${PKGNAME}/ui/ublinux-logo.svg"
@$(RM) "/usr/share/${PKGNAME}/ui/${PKGNAME}.glade"
@$(RM) "/usr/share/${PKGNAME}/css/${PKGNAME}.css"
@$(RM) "/usr/share/${PKGNAME}/ui/${PKGNAME}-banner.png"
@$(RM) "/usr/share/${PKGNAME}/css/${PKGNAME}.css"
@$(RM) "/usr/share/${PKGNAME}/css/${PKGNAME}.css"
@$(RM) "/usr/share/${PKGNAME}/css/${PKGNAME}.css"
@$(RM) -d "/usr/share/${PKGNAME}/css"
@$(RM) -d "/usr/share/${PKGNAME}/ui"
@$(RM) -d "/usr/share/${PKGNAME}"
@$(RM) "/etc/ubconfig-main.conf"
@gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ &>/dev/null
@update-desktop-database --quiet 2>/dev/null
@touch /usr/share/applications
@echo "Uninstall: OK" @echo "Uninstall: OK"
install: check uninstall install: check uninstall
@echo "Install ..." @echo "Install ..."
@for FILE_PO in $(wildcard *.po); do \ @for FILE_PO in $(wildcard *.po); do \
LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \ install -dm755 /usr/share/locale/$${LANG}/LC_MESSAGES; \
FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ PATH_FILE_MO="/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
echo "$${FILE_PO}"; \ echo $${FILE_PO}; \
msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \ msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \
done done
@for SIZE in 16 32 48; do \ @for SIZE in 16 32 48; do \
install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ install -dm755 /usr/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"; \ rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data ${PKGNAME}.svg -o "/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/${PKGNAME}.svg"; \
done done
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg" @install -Dm644 -t /usr/share/icons/hicolor/scalable/apps/ ${PKGNAME}.svg
@install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.policy" @install -Dm755 -t /usr/bin/ ${CMAKE_BUILD_DIR}/${PKGNAME}
@install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" @install -Dm644 -t /usr/share/applications/ ${PKGNAME}.desktop
@install -Dm744 -t "${DESTDIR}/etc/xdg/${PKGNAME}/" "${PKGNAME}.conf" @install -Dm755 /usr/share/${PKGNAME}/ -d ui
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" @install -Dm755 /usr/share/${PKGNAME}/ -d css
@sed -e 's+/usr/bin+${PREFIX}/bin+g' -i ${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}.policy @install -Dm644 -t /usr/share/${PKGNAME}/ui/ ${PKGNAME}.glade
@if [ -z ${DESTDIR} ]; then \ @install -Dm644 -t /usr/share/${PKGNAME}/css/ ${PKGNAME}.css
[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ @install -Dm644 -t /usr/share/${PKGNAME}/ui/ ublinux-logo.svg
update-desktop-database --quiet &>/dev/null || true; \ @install -Dm644 -t /etc/ ubconfig-main.conf
[ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ @chmod 766 /etc/ubconfig-main.conf
fi @install -Dm644 -t /usr/share/${PKGNAME}/ui/ ${PKGNAME}-banner.png
@gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ &>/dev/null
@update-desktop-database --quiet 2>/dev/null
@touch /usr/share/applications
@echo "Install: OK" @echo "Install: OK"
clean: clean:
@ -135,12 +143,12 @@ clean:
fi fi
help: help:
@echo "The following are some of the valid targets for this Makefile:"; \ @echo "The following are some of the valid targets for this Makefile:"
echo "... all (the default if no target is provided)"; \ @echo "... all (the default if no target is provided)"
echo "... init"; \ @echo "... init"
echo "... debug"; \ @echo "... debug"
echo "... prepare"; \ @echo "... prepare"
echo "... compile"; \ @echo "... compile"
echo "... install"; \ @echo "... install"
echo "... uninstall"; \ @echo "... uninstall"
echo "... clean" @echo "... clean"

@ -8,86 +8,18 @@ include_directories(${GTK_INCLUDE_DIRS})
link_directories(${GTK_LIBRARY_DIRS}) link_directories(${GTK_LIBRARY_DIRS})
add_definitions(${GTK_CFLAGS_OTHER}) add_definitions(${GTK_CFLAGS_OTHER})
#pkg_check_modules(VTE291 REQUIRED vte-2.91)
#include_directories(${VTE291_INCLUDE_DIRS})
#link_directories(${VTE291_LIBRARY_DIRS})
#add_definitions(${VTE291_CFLAGS_OTHER})
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
option(WEBKIT_FOUND "No" OFF)
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})
add_definitions(${WEBKIT_CFLAGS_OTHER})
endif()
configure_file(ubl-cmake.in ubl-cmake.h)
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/ubl-cmake.h DESTINATION ./)
set(GRESOURCE_C resources.c)
set(GRESOURCE_XML gresource.xml)
find_program(GLIB_COMPILE_RESOURCES NAMES glib-compile-resources REQUIRED)
add_custom_target(GLADE ubl-settings-manager.glade)
set(DEPENDFILES
../ubl-settings-manager.glade
../gresource.xml
../ubl-settings-manager-banner.png
../ubl-settings-manager.css
)
file(COPY ${DEPENDFILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_custom_command(
OUTPUT ${GRESOURCE_C}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${GLIB_COMPILE_RESOURCES}
ARGS
--generate-source
--target=${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
${GRESOURCE_XML}
VERBATIM
MAIN_DEPENDENCY ${GRESOURCE_XML}
DEPENDS
${GLADE}
)
add_custom_target(
dummy-resource
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -std=c++2a") #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -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 -lm")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \
-O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection")
set(SOURCE_FILES set(SOURCE_FILES
ubl-settings-manager.c ubl-settings-manager.c
ubl-settings-manager.h ubl-settings-manager.h)
${CMAKE_CURRENT_BINARY_DIR}/ubl-cmake.h
)
set(LIBRARIES set(LIBRARIES
${GTK_LIBRARIES} ${GTK_LIBRARIES}
${WEBKIT_LIBRARIES}
# ${VTE291_LIBRARIES}
pthread) pthread)
add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}) add_executable(ubl-settings-manager ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} PUBLIC ${LIBRARIES}) target_link_libraries(ubl-settings-manager ${LIBRARIES})
target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_BINARY_DIR}) install(TARGETS ubl-settings-manager DESTINATION bin)
set_source_files_properties(
${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
PROPERTIES GENERATED TRUE
)
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
add_dependencies(${PROJECT_NAME} dummy-resource)

@ -3,58 +3,24 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <time.h> #include <time.h>
#include <getopt.h>
#include <dlfcn.h>
#include "ubl-cmake.h"
#ifdef WEBKIT_FOUND
#include <webkit2/webkit2.h>
#endif
#define UBLINUX_WIKI_COMMAND "xdg-open https://wiki.ublinux.ru/ru/Программное_обеспечениерограммы_и_утилиты/Все/ubl-settings-manager"
#define UBLINUX_WIKI_LINK " https://wiki.ublinux.ru/ru/Программное_обеспечениерограммы_и_утилиты/Все/ubl-settings-manager"
#define check_web2kit_command "ldconfig -p |grep webkit2"
#define cmdVersionText yon_char_get_augumented(yon_char_get_augumented(_("Version: "),version_application),"\n") #define GladePath "/usr/share/ubl-settings-manager/ui/ubl-settings-manager.glade"
#define cmdHelpText yon_char_get_augumented(yon_char_get_augumented(_("ubl-settings-manager version: "),version_application),_("\nGTK settings manager for UBLinux\nUsage: ubl-settings-manager [OPTIONS...]\nOptions:\n -h, --help Show this help\n -V, --version Show package version\n --lock-settings Lock menu settings\n")) #define CssPath "/usr/share/ubl-settings-manager/css/ubl-settings-manager.css"
#define GladePath "/com/ublinux/ui/ubl-settings-manager.glade" #define GlobalConfigPath "/etc/ubconfig-main.conf"
#define CssPath "/com/ublinux/css/ubl-settings-manager.css" #define UserConfigPath "/.config/ubl-settings-manager/ubconfig-main.conf"
#define GlobalConfigPath "/etc/xdg/ubl-settings-manager/ubl-settings-manager.conf" #define AppIconPath "ubl-settings-manager"
#define UserConfigPath "/.config/ubl-settings-manager/ubl-settings-manager.conf" #define AppBannerPath "/usr/share/ubl-settings-manager/ui/ubl-settings-manager-banner.png"
#define AppIconPath "com.ublinux.ubl-settings-manager"
#define AppBannerPath "/com/ublinux/images/ubl-settings-manager-banner.png"
#define DesktopPath "/usr/share/applications/" #define DesktopPath "/usr/share/applications/"
#define IconPicturesPath "/usr/share/icons/hicolor/scalable/apps/" #define IconPicturesPath "/usr/share/icons/hicolor/scalable/apps/"
#define ErrIconPicturePath "/usr/share/icons/Faenza/emblems/32/emblem-important.png"
#define ublinux_logo "/usr/share/ubl-settings-manager/ui/ublinux-logo.svg"
#define LocalePath "/usr/share/locale" #define LocalePath "/usr/share/locale"
#define LocaleName "ubl-settings-manager" #define LocaleName "ubl-settings-manager"
#define LogoPath "/usr/share/icons/hicolor/scalable/apps/ubl-settings-manager.svg"
#define ubl_settings_infoPath "ubl-settings-info" #define ubl_settings_infoPath "ubl-settings-info"
#define ubl_settings_infoPathLaunch "ubl-settings-info --socket-id=" #define ubl_settings_infoPathLaunch "ubl-settings-info --socket-id="
typedef char* string; char *version_application = "1.3";
string version_application;
#define UBL_SETTINGS_MANAGER_TITLE _("UBLinux Settings Manager")
#define UBL_SETTINGS_MANAGER_ABOUT_TITLE _("About UBLinux Settings Manager")
#define ABOUT_PROJECT_HOME_PAGE_LABEL _("Project Home Page")
#define ABOUT_PROJECT_COMMENTS_LABEL _("Settings manager for UBLinux")
#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 ABOUT_LABEL _("About...")
#define DOCUMENTATION_LABEL _("Documentation")
#define SETTINGS_LABEL _("Settings")
#define ALWAYS_REDIRECT_LABEL _("Always redirect")
#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 WINDOW_THEME_LABEL _("Window theme")
#define ICON_SIZE_LABEL _("Icon size")
#define BACK_TO_ALL_SETTINGS_LABEL _("All settings")
typedef struct apps{ typedef struct apps{
char *Name; char *Name;
@ -114,12 +80,6 @@ typedef struct {
char *lastUser; char *lastUser;
int changed; int changed;
int fullscreen; int fullscreen;
int lock_settings;
int GnomeDoubleClick;
int MainDoubleClick;
int *currentDoubleClick;
dictionary *SettingsSections;
int BannerHidden;
} config; } config;
typedef struct { typedef struct {
@ -177,7 +137,7 @@ typedef struct {
GtkWidget *GnomePaned; GtkWidget *GnomePaned;
GtkWidget *GnomeInfoLabel; GtkWidget *GnomeInfoLabel;
GtkWidget *workingwindow; GtkWidget *workingwindow;
GtkWidget *settingsSectionsSettingsButton; // GtkWidget *settingsSectionsSettingsButton;
GtkWidget *SectionSettingsWindow; GtkWidget *SectionSettingsWindow;
GtkWidget *SectionSettingsPack; GtkWidget *SectionSettingsPack;
dictionary *SettingsSections; dictionary *SettingsSections;
@ -199,13 +159,6 @@ typedef struct {
apps *applist; apps *applist;
GtkWidget *icvpack; GtkWidget *icvpack;
GtkWidget *infoWarningWindow; GtkWidget *infoWarningWindow;
GtkWidget *infoWarningButton;
GtkWidget *infoWarningLabel;
GtkWidget *BannerRevealer;
GtkWidget *Revealer;
GtkWidget *settingsDoubleClickSwitch;
GtkWidget *settingsDoubleClickLabel;
GtkWidget *BackToSettingsLabel;
} actionWidgets; } actionWidgets;
@ -244,13 +197,11 @@ void sort_apps(apps *applist,int size);
apps *find_apps(int *sizef); apps *find_apps(int *sizef);
int check_categories(apps app, char *catstocheck); int check_categories(apps app, char *catstocheck);
int setup_config(); int setup_config();
void update_double_clicks(dictionary *widgetsD);
void yon_icv_resize_item(dictionary *icdict, GtkWidget *paned);
dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *theme_id, apps *applist, int appsize); dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *theme_id, apps *applist, int appsize);
char *yon_char_get_augumented(char *source, char *append); char *yon_char_get_augumented(char *source, char *append);
char *yon_cut(char *source, int size, int startpos); char *yon_cut(char *source, int size, int startpos);
int yon_set_sections(IconSection *section); int yon_set_sections(IconSection *section);
void yon_set_default_sections(dictionary *section); void yon_set_default_sections(dictionary **section);
char *yon_char_divide_search(char *source, char* dividepos, int delete_divider); char *yon_char_divide_search(char *source, char* dividepos, int delete_divider);
char *yon_char_divide(char *source, int dividepos); char *yon_char_divide(char *source, int dividepos);
dictionary *yon_section_new(dictionary *section, char *section_name, char *categories); dictionary *yon_section_new(dictionary *section, char *section_name, char *categories);
@ -258,12 +209,6 @@ void yon_switch_theme(dictionary **dict, dictionary *newone);
dictionary *yon_dictionary_find(dictionary **dict, char *key); dictionary *yon_dictionary_find(dictionary **dict, char *key);
void yon_segment_show(actionWidgets *widgets, SectionSettingSegment *sgm); void yon_segment_show(actionWidgets *widgets, SectionSettingSegment *sgm);
dictionary *yon_dictionary_create_empty(); dictionary *yon_dictionary_create_empty();
dictionary *yon_dictionary_rip(dictionary *dict);
dictionary *yon_dictionary_get_last(dictionary *dict);
dictionary *yon_dictionary_switch_places(dictionary *dict,int aim);
dictionary *yon_dictionary_create_with_data(char *key, void *data);
dictionary *yon_dictionary_create_with_data_connected(dictionary *dict, char *key, void *data);
dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect);
SectionSettingSegment *yon_create_section_setting(char *name, char *categories); SectionSettingSegment *yon_create_section_setting(char *name, char *categories);
void yon_segments_show(actionWidgets *widgets); void yon_segments_show(actionWidgets *widgets);
void yon_segments_hide(actionWidgets *widgets); void yon_segments_hide(actionWidgets *widgets);
@ -271,6 +216,7 @@ void yon_dictionary_make_first(dictionary *dict);
dictionary *yon_create_icon_section_list(dictionary *sections); dictionary *yon_create_icon_section_list(dictionary *sections);
int yon_show_icon_views(dictionary *IVS,actionWidgets *widgets); int yon_show_icon_views(dictionary *IVS,actionWidgets *widgets);
void yon_icon_size_convert(int mode); void yon_icon_size_convert(int mode);
void on_about_system(GtkWidget *button, actionWidgets *widgets);
char *yon_char_new(char *chr); char *yon_char_new(char *chr);
int launch(thread_output *thread); int launch(thread_output *thread);
float yon_time_average(dictionary *times); float yon_time_average(dictionary *times);
@ -278,6 +224,5 @@ void yon_time_reg_for_average(dictionary *listofregs, int size, time_t tm);
void yon_dictionary_switch_to_last(dictionary **dict); void yon_dictionary_switch_to_last(dictionary **dict);
dictionary *yon_dictionary_create_conneced(dictionary *targetdict); dictionary *yon_dictionary_create_conneced(dictionary *targetdict);
int yon_get_icon_size(int size); int yon_get_icon_size(int size);
char *yon_char_from_int(int int_to_convert);
#endif #endif
Loading…
Cancel
Save