diff --git a/.gitignore b/.gitignore
index 42fe714..12d63ca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,7 @@ msgformat.py
calendarApp.glade
calendarApp.glade~
ubl-settings-manager.glade~
+*ubl-settings-manager.glade#
ubl-settings-manager
**base.mo
home/
@@ -13,4 +14,5 @@ css/
.config/
images/
locale/
-ui/
\ No newline at end of file
+ui/
+ubl-settings-manager_ru.pos
\ No newline at end of file
diff --git a/Makefile b/Makefile
index 4c1f9b8..16ade97 100644
--- a/Makefile
+++ b/Makefile
@@ -10,8 +10,9 @@ CMAKE_COMMAND = cmake
#CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile
CMAKE_SOURCE_DIR = ./source
CMAKE_BUILD_DIR = ./compile
+DEPENDS = cmake
PKGNAME = $(MAKEFILE_DIR)
-#PKGNAME = check-hostalive
+#PKGNAME = ubl-settings-manager
default_target: all
@@ -19,7 +20,12 @@ all: init build
init:
@echo "Initialize ..."; \
- echo "-- Build path: ${CMAKE_BUILD_DIR}"
+ version="$$(cat VERSION.md)"; \
+ version=$${version:8}; \
+ search="s/string version_application.*"; \
+ replace="string version_application = \"$${version}\";"; \
+ sed -i -e "$$search/$$replace/gi" source/ubl-settings-manager.h; \
+ echo "-- Build path: ${CMAKE_BUILD_DIR}"
depend:
@echo "Check depends ..."; \
@@ -77,10 +83,15 @@ uninstall:
done
@$(RM) "/usr/bin/${PKGNAME}"
@$(RM) "/usr/share/applications/${PKGNAME}.desktop"
- @$(RM) "/usr/share/icons/hicolor/scalable/apps/${PKGNAME}.png"
- @$(RM) "/usr/share/icons/hicolor/scalable/apps/${PKGNAME}.svg"
- @$(RM) "/etc/ubconfig-main.conf"
- @$(RM) "~/ubconfig-main.conf"
+ @$(RM) "/usr/share/icons/hicolor/scalable/apps/ru.ublinux.${PKGNAME}.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) -d "/usr/share/${PKGNAME}/css"
+ @$(RM) -d "/usr/share/${PKGNAME}/ui"
+ @$(RM) -d "/usr/share/${PKGNAME}"
+ @$(RM) "/etc/xdg/${PKGNAME}/${PKGNAME}.conf"
@gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ &>/dev/null
@update-desktop-database --quiet 2>/dev/null
@touch /usr/share/applications
@@ -98,23 +109,23 @@ install: check uninstall
done
@for SIZE in 16 32 48; do \
install -dm755 /usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps; \
- rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data ${PKGNAME}.svg -o "/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/${PKGNAME}.svg"; \
+ rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data ru.ublinux.${PKGNAME}.svg -o "/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/ru.ublinux.${PKGNAME}.svg"; \
done
@install -dm755 /usr/share/icons/hicolor/scalable/apps
- @install -Dm644 -t /usr/share/icons/hicolor/scalable/apps/ ${PKGNAME}.svg
- @install -dm755 /usr/share/icons/hicolor/scalable/status
+ @install -Dm644 -t /usr/share/icons/hicolor/scalable/apps/ ru.ublinux.${PKGNAME}.svg
@install -Dm755 -t /usr/bin/ ${CMAKE_BUILD_DIR}/${PKGNAME}
- @install -Dm644 -t /usr/share/applications/ ${PKGNAME}.desktop
+ @install -Dm644 -t /usr/share/applications/ ${PKGNAME}.desktop
+ @install -Dm755 /usr/share/${PKGNAME}/ -d ui
+ @install -Dm755 /usr/share/${PKGNAME}/ -d css
@install -Dm644 -t /usr/share/${PKGNAME}/ui/ ${PKGNAME}.glade
@install -Dm644 -t /usr/share/${PKGNAME}/css/ ${PKGNAME}.css
- @install -Dm644 -t /etc/ ubconfig-main.conf
- chmod 766 /etc/ubconfig-main.conf
- @install -Dm655 -t ~/.config/ ubconfig-main.conf
- @install -Dm644 -t /usr/share/icons/hicolor/scalable/apps/ ${PKGNAME}.png
+ @install -Dm644 -t /usr/share/${PKGNAME}/ui/ ublinux-logo.svg
+ @install -Dm766 -t /etc/xdg/${PKGNAME}/ ${PKGNAME}.conf
+ @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 ${USER}"
+ @echo "Install: OK"
clean:
@echo "Clean ..."
@@ -123,7 +134,13 @@ clean:
echo "Clean: error, compile directory exist ${CMAKE_BUILD_DIR}"; \
else \
echo "Clean: OK"; \
- fi
+ fi; \
+ version="$$(cat VERSION.md)"; \
+ version=$${version:8}; \
+ search="s/string version_application.*"; \
+ echo $$search; \
+ replace="string version_application = ;"; \
+ sed -i -e "$$search/$$replace/gi" source/ubl-settings-manager.h; \
help:
@echo "The following are some of the valid targets for this Makefile:"
diff --git a/VERSION.md b/VERSION.md
new file mode 100644
index 0000000..0ca32b7
--- /dev/null
+++ b/VERSION.md
@@ -0,0 +1 @@
+VERSION 1.1
\ No newline at end of file
diff --git a/ru.ublinux.ubl-settings-manager.svg b/ru.ublinux.ubl-settings-manager.svg
new file mode 100644
index 0000000..f636c26
--- /dev/null
+++ b/ru.ublinux.ubl-settings-manager.svg
@@ -0,0 +1,4957 @@
+
+
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 318ac88..6279e9e 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -9,7 +9,7 @@ link_directories(${GTK_LIBRARY_DIRS})
add_definitions(${GTK_CFLAGS_OTHER})
#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")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -lm")
set(SOURCE_FILES
ubl-settings-manager.c
diff --git a/source/ubl-settings-manager.c b/source/ubl-settings-manager.c
index dfe83a4..e9bc67f 100644
--- a/source/ubl-settings-manager.c
+++ b/source/ubl-settings-manager.c
@@ -40,48 +40,42 @@ int cmld=0;
void on_plug_added(GtkSocket* self, actionWidgets *builder){
gtk_widget_show(builder->socketbutton);
gtk_widget_show(builder->ThirdSocket);
- // printf("Plug has been added!\n");
gtk_widget_set_vexpand(builder->HideWhileLaunch,0);
gtk_widget_hide(builder->HideWhileLaunch);
gtk_widget_set_vexpand(GTK_WIDGET(builder->socketplace),1);
gtk_widget_set_vexpand(GTK_WIDGET(self),1);
gtk_widget_show(builder->socketplace);
- if (main_config.WindowTheme==0)
- gtk_widget_hide(builder->appSettings);
- if (builder->ButtonBackToMain!=NULL) gtk_widget_set_sensitive(builder->ButtonBackToMain,1);
+ gtk_widget_hide(builder->appSettings);
+ if (builder->ButtonBackToMain!=NULL) gtk_widget_show(builder->ButtonBackToMain);
gtk_widget_show(GTK_WIDGET(self));
+ gtk_widget_show(builder->socketbuttonplace);
+ gtk_widget_show(builder->ThirdSocketPlace);
+ gtk_widget_show(builder->socketbutton);
+ gtk_widget_show(builder->ThirdSocket);
}
void on_plug_removed(GtkSocket* self, actionWidgets *widgets){
+ gtk_widget_show(widgets->socketbuttonplace);
gtk_widget_show(widgets->appSettings);
gtk_widget_show(widgets->HideWhileLaunch);
gtk_widget_set_vexpand(widgets->socketplace,0);
gtk_widget_set_vexpand(widgets->HideWhileLaunch,1);
- // printf("Plug has been removed!\n\n\n");
if(widgets->socketbutton)
gtk_widget_destroy(widgets->socketbutton);
if(widgets->ThirdSocket)
gtk_widget_destroy(widgets->ThirdSocket);
-
- gtk_widget_show(widgets->appSettings);
}
void on_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets *applist){
- // printf("\n\n\nActivated\n\n\n");
GtkTreeIter iter;
char *name;
gtk_tree_model_get_iter(gtk_icon_view_get_model(self),&iter,path);
- gtk_tree_model_get(gtk_icon_view_get_model(self),&iter,1,&name,-1);
+ gtk_tree_model_get(gtk_icon_view_get_model(self),&iter,0,&name,-1);
apps *tempapp=get_app_by_name(applist->applist,name,applist->appssize);
- // printf("%s\n",tempapp->Name);
if (!tempapp){}else{
char arg[100];
- // printf("%s\n",tempapp->Exec);
- // printf("%d\n",tempapp->Type);
- // printf("%d\n",tempapp->Pluggable);
memset(arg,0,100);
- printf("%d\n%d\n\n\n\n",gtk_socket_get_id(GTK_SOCKET(applist->socket)),gtk_socket_get_id(GTK_SOCKET(applist->socketbutton)));
sprintf(arg,"--socket-id=%d",gtk_socket_get_id(GTK_SOCKET(applist->socket)),gtk_socket_get_id(GTK_SOCKET(applist->socketbutton)));
if (tempapp[0].Type==1){
@@ -106,7 +100,7 @@ void on_gnome_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets
applist->socket=create_socket(applist);
gtk_tree_model_get_iter(gtk_icon_view_get_model(self),&iter,path);
- gtk_tree_model_get(gtk_icon_view_get_model(self),&iter,1,&name,-1);
+ gtk_tree_model_get(gtk_icon_view_get_model(self),&iter,0,&name,-1);
apps *tempapp=get_app_by_name(applist->applist,name,applist->appssize);
char arg[100];
@@ -117,10 +111,10 @@ void on_gnome_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets
if (tempapp->Pluggable==1){
if (tempapp->DualPluggable==1){
- gtk_widget_hide(applist->appSettings);
char *dualarg=malloc(strlen("--socket-id= --socket-ext-id= --socket-trd-id=")+30);
sprintf(dualarg,"--socket-id=%d --socket-ext-id=%d --socket-trd-id=%d",gtk_socket_get_id(GTK_SOCKET(applist->socket)),gtk_socket_get_id(GTK_SOCKET(applist->socketbutton)),gtk_socket_get_id(GTK_SOCKET(applist->ThirdSocket)));
- launch_app_with_arguments(tempapp[0].Exec,dualarg);
+ if (launch_app_with_arguments(tempapp[0].Exec,dualarg)==32512)
+ gtk_widget_show(applist->infoWarningWindow);
}
else{
launch_app_with_arguments(tempapp[0].Exec,arg);
@@ -128,7 +122,6 @@ void on_gnome_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets
}
}
else {
- on_about_system(NULL,applist);
launch_app(tempapp[0].Exec);
gtk_widget_destroy(applist->socketbutton);
}
@@ -164,7 +157,7 @@ void on_backToSettingsButton_clicked(GtkWidget *button,actionWidgets *sctb){
gtk_widget_destroy(sctb->socket);
sctb->socket=GTK_WIDGET(create_socket(sctb));
GtkWidget *backbutton=sctb->ButtonBackToMain;
- gtk_widget_set_sensitive(backbutton,0);
+ gtk_widget_hide(backbutton);
};
void on_CancelHelpButton_activated(GtkWidget *button,GtkBuilder *builder){
@@ -184,7 +177,6 @@ int on_settings_accept(GtkWidget *button, dictionary **widgetsDs){
else if (main_config.WindowTheme==1)
main_config.curThemeName="Gnome";
dictionary *widgetsD=yon_dictionary_find(widgetsDs,main_config.curThemeName);
- // printf("Saving config...\n");
actionWidgets *widgets=(actionWidgets*)widgetsD->data;
int theme=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->settingsThemeChooser));
gtk_window_get_position(GTK_WINDOW(widgets->window),&main_config.windowPosX,&main_config.windowPosY);
@@ -205,11 +197,16 @@ int on_settings_accept(GtkWidget *button, dictionary **widgetsDs){
gtk_window_present(GTK_WINDOW(widgets->SettingsWindow));
}
GKeyFile *gfile=g_key_file_new();
- int sz;
- if (main_config.iconsize==64) sz=4;
- if (main_config.iconsize==48) sz=3;
- if (main_config.iconsize==32) sz=2;
- if (main_config.iconsize==24) sz=1;
+
+ int sz=1,szm=1;
+ if (main_config.Gnomeiconsize==64) sz=4;
+ else if (main_config.Gnomeiconsize==48) sz=3;
+ else if (main_config.Gnomeiconsize==32) sz=2;
+ else if (main_config.Gnomeiconsize==24) sz=1;
+ if (main_config.Mainiconsize==64) szm=4;
+ else if (main_config.Mainiconsize==48) szm=3;
+ else if (main_config.Mainiconsize==32) szm=2;
+ else if (main_config.Mainiconsize==24) szm=1;
char *fromint=malloc(5);
memset(fromint,0,5);
GError *err=NULL;
@@ -234,42 +231,50 @@ int on_settings_accept(GtkWidget *button, dictionary **widgetsDs){
fclose(fp);
}
g_key_file_load_from_file(gfile,pth,G_KEY_FILE_NONE,&err);
- sprintf(fromint,"%d",main_config.windowPosX);
- g_key_file_set_string(gfile,"window","WindowPosX",fromint);
- sprintf(fromint,"%d",main_config.windowPosY);
- g_key_file_set_string(gfile,"window","WindowPosY",fromint);
- sprintf(fromint,"%d",main_config.windowWidth);
- g_key_file_set_string(gfile,"window","WindowWidth",fromint);
- sprintf(fromint,"%d",main_config.windowHeight);
- g_key_file_set_string(gfile,"window","WindowHeight",fromint);
+ if (gtk_window_is_maximized(GTK_WINDOW(widgets->window))==0){
+ sprintf(fromint,"%d",main_config.windowPosX);
+ g_key_file_set_string(gfile,"window","WindowPosX",fromint);
+ sprintf(fromint,"%d",main_config.windowPosY);
+ g_key_file_set_string(gfile,"window","WindowPosY",fromint);
+ sprintf(fromint,"%d",main_config.windowWidth);
+ g_key_file_set_string(gfile,"window","WindowWidth",fromint);
+ sprintf(fromint,"%d",main_config.windowHeight);
+ g_key_file_set_string(gfile,"window","WindowHeight",fromint);
+ }
sprintf(fromint,"%d",main_config.WindowTheme);
g_key_file_set_string(gfile,"window","WindowTheme",fromint);
sprintf(fromint,"%d",sz);
- g_key_file_set_string(gfile,"window","IconSize",fromint);
+ g_key_file_set_string(gfile,"window","GnomeIconSize",fromint);
+ sprintf(fromint,"%d",szm);
+ g_key_file_set_string(gfile,"window","MainIconSize",fromint);
sprintf(fromint,"%d",main_config.iconSegmentSize);
g_key_file_set_string(gfile,"window","IconSegmentSize",fromint);
- sprintf(fromint,"%d",(int)((float)main_config.labelSize/1000));
- g_key_file_set_string(gfile,"window","LabelSize",fromint);
+ sprintf(fromint,"%d",(int)((float)main_config.GnomelabelSize/1000));
+ g_key_file_set_string(gfile,"window","GnomeLabelSize",fromint);
+ sprintf(fromint,"%d",(int)((float)main_config.MainlabelSize/1000));
+ g_key_file_set_string(gfile,"window","MainLabelSize",fromint);
sprintf(fromint,"%d",(int)((float)main_config.labelDensity/1000));
g_key_file_set_string(gfile,"window","LabelDensity",fromint);
g_key_file_set_string(gfile,"window","User",login);
+
for (dictionary *dict=widgets->ICSys->first;dict!=NULL;dict=dict->next){
IVGraphicals *IV=(IVGraphicals*)dict->data;
g_key_file_set_string(gfile,"sections",IV->sectionName,IV->categories);
- load_apps_with_clear(IV,widgets->applist,widgets->appssize);
+ if (main_config.changed==1){
+ load_apps_with_clear(IV,widgets->applist,widgets->appssize);
+ }
}
+ main_config.changed=0;
g_key_file_save_to_file(gfile,pth,NULL);
gtk_widget_hide(widgets->SettingsWindow);
- //gtk_window_present(GTK_WINDOW(widgets->SettingsWindow));
};
-void on_paned_move(GtkPaned* self, GtkScrollType* scroll_type, actionWidgets *widgets){ /* TODO */
+void on_paned_move(GtkPaned* self, GtkScrollType* scroll_type, actionWidgets *widgets){
int position=gtk_paned_get_position(GTK_PANED(widgets->GnomePaned));
+ if (position<200) {position=200; gtk_paned_set_position(GTK_PANED(widgets->GnomePaned),200);}
main_config.iconSegmentSize=position;
- if (position <115) position=115;
- double pos=((double)position-(1/(double)position*4)*500)/1.8;
- if (pos<110) pos=110;
- //printf("Paned moved to %f\n",pos);
+ double pos=((double)position-20);
+ if (pos<70) pos=70;
for (dictionary *dict=widgets->ICSys;dict!=NULL;dict=dict->next){
IVGraphicals *IV=(IVGraphicals*)dict->data;
gtk_icon_view_set_item_width(GTK_ICON_VIEW(IV->IV),pos);
@@ -281,44 +286,54 @@ void on_paned_move(GtkPaned* self, GtkScrollType* scroll_type, actionWidgets *wi
int on_settingsOpen(GtkWidget *button, actionWidgets *widgets){
gtk_window_set_title(GTK_WINDOW(widgets->SettingsWindow),"UBLinux Settings Manager");
gtk_widget_set_size_request(widgets->SettingsWindow,400,250);
- gtk_window_set_icon_from_file(GTK_WINDOW(widgets->SettingsWindow),AppIconPath,NULL);
+ GtkIconTheme *icthm=gtk_icon_theme_get_default();
+ gtk_window_set_icon(GTK_WINDOW(widgets->SettingsWindow),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(32),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
gtk_widget_show_all(widgets->SettingsWindow);
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->settingsThemeChooser),main_config.WindowTheme);
int sz=1;
- if (main_config.iconsize==64) sz=4;
- if (main_config.iconsize==48) sz=3;
- if (main_config.iconsize==32) sz=2;
- if (main_config.iconsize==24) sz=1;
+ if (*main_config.currentThemeIconSize==64) sz=4;
+ if (*main_config.currentThemeIconSize==48) sz=3;
+ if (*main_config.currentThemeIconSize==32) sz=2;
+ if (*main_config.currentThemeIconSize==24) sz=1;
gtk_range_set_value(GTK_RANGE(widgets->settingsSizeSlider),sz);
char *tmp=malloc(6);
- sprintf(tmp,"%dx%d\0",main_config.iconsize,main_config.iconsize);
+ sprintf(tmp,"%dx%d\0",*main_config.currentThemeIconSize,*main_config.currentThemeIconSize);
gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),tmp);
- gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gdk_pixbuf_new_from_file_at_scale("/usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg",main_config.iconsize,main_config.iconsize,1,NULL));
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(*main_config.currentThemeIconSize),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
- gtk_window_present(GTK_WINDOW(widgets->SettingsWindow));
+ gtk_window_present(GTK_WINDOW(widgets->SettingsWindow));
};
int on_settings_icon_size_changed(GtkWidget* self, actionWidgets *widgets){
int val=(int)gtk_range_get_value(GTK_RANGE(self));
+ GtkIconTheme *icthm=gtk_icon_theme_get_default();
if ((int)val==1||(int)val==0){
- gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gdk_pixbuf_new_from_file_at_scale("/usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg",24,24,1,NULL));
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(24),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),"24x24");
- main_config.iconsize=24;
+ if (*main_config.currentThemeIconSize!=24)
+ main_config.changed=1;
+ *main_config.currentThemeIconSize=24;
}
if ((int)val==2){
- gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gdk_pixbuf_new_from_file_at_scale("/usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg",32,32,1,NULL));
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(32),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),"32x32");
- main_config.iconsize=32;
+ if (*main_config.currentThemeIconSize!=32)
+ main_config.changed=1;
+ *main_config.currentThemeIconSize=32;
}
if ((int)val==3){
- gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gdk_pixbuf_new_from_file_at_scale("/usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg",48,48,1,NULL));
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(48),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),"48x48");
- main_config.iconsize=48;
+ if (*main_config.currentThemeIconSize!=48)
+ main_config.changed=1;
+ *main_config.currentThemeIconSize=48;
}
if ((int)val==4){
- gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gdk_pixbuf_new_from_file_at_scale("/usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg",64,64,1,NULL));
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(64),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),"64x64");
- main_config.iconsize=64;
+ if (*main_config.currentThemeIconSize!=64)
+ main_config.changed=1;
+ *main_config.currentThemeIconSize=64;
}
};
@@ -350,7 +365,7 @@ void on_section_settings_open(GtkButton* self,dictionary *cWidgets){
dict=dict->prev;
dict->next=NULL;
}
- gtk_widget_show(widgets->SectionSettingsWindow);
+ gtk_window_present(GTK_WINDOW(widgets->SectionSettingsWindow));
}
void on_sections_edit(GtkWidget *button, actionWidgets *widgets){
@@ -471,7 +486,6 @@ void on_sections_move_down(GtkWidget *button, actionWidgets *widgets){
dct->prev->next=dct->next;
dct->prev=dct->next;
dct->next=NULL;
- //dct->next->prev=dct;
dct->prev->next=dct;
} else if (dct->prev==NULL){
yon_dictionary_make_first(dct->next);
@@ -530,13 +544,11 @@ void on_sections_add(GtkWidget *button, actionWidgets *widgets){
}
void on_sections_new_clear(GtkWidget *button, actionWidgets *widgets){
- //printf("w54y3563sthts\n");
gtk_entry_set_text(GTK_ENTRY(widgets->SectionSettingAddNameEntry),"");
gtk_entry_set_text(GTK_ENTRY(widgets->SectionSettingAddCategoriesEntry),"");
}
void on_sections_close(GtkWidget *button, actionWidgets *widgets){
- //printf("snnnnnnthtsgyuilgg\n");
gtk_widget_hide(widgets->SectionSettingsWindow);
}
@@ -613,32 +625,34 @@ void on_section_delete(GtkWidget *button, actionWidgets *widgets){
void on_resized (GtkWidget *window, GdkEventConfigure *event, dictionary *widgetsD){
actionWidgets *widgets=(actionWidgets*)widgetsD->data;
int x,y;
+ if (gtk_window_is_maximized(GTK_WINDOW(widgets->window))==0)
+ main_config.fullscreen=0;
+ else
+ main_config.fullscreen=1;
gtk_window_get_size(GTK_WINDOW(window),&main_config.windowWidth,&main_config.windowHeight);
- if (main_config.windowWidth<1240){
- if (stld==0){
- stld=1;
- main_config.WindowTheme=0;
-
- gtk_window_set_resizable(GTK_WINDOW(window),0);
- gtk_window_get_position(GTK_WINDOW(window),&main_config.windowPosX,&main_config.windowPosY);
- gtk_window_get_size(GTK_WINDOW(window),&main_config.windowWidth,&main_config.windowHeight);
- yon_switch_theme(&widgetsD,yon_dictionary_find(&widgetsD,"Main"));
- main_config.iconsize=24;
-
- for (dictionary *dict=widgets->ICSys->first;dict!=NULL;dict=dict->next){
- IVGraphicals *IV=(IVGraphicals*)dict->data;
- load_apps_with_clear(IV,widgets->applist,widgets->appssize);
+ if (main_config.WindowTheme==1){
+ if (main_config.windowWidth<1240){
+ if (stld==0){
+ stld=1;
+ main_config.WindowTheme=0;
+
+ gtk_window_set_resizable(GTK_WINDOW(window),0);
+ gtk_window_get_position(GTK_WINDOW(window),&main_config.windowPosX,&main_config.windowPosY);
+ gtk_window_get_size(GTK_WINDOW(window),&main_config.windowWidth,&main_config.windowHeight);
+ yon_switch_theme(&widgetsD,yon_dictionary_find(&widgetsD,"Main"));
+ *main_config.currentThemeIconSize=24;
+ gtk_window_resize(GTK_WINDOW(widgets->window),main_config.windowWidth,main_config.windowHeight);
+ gtk_widget_hide(widgets->window);
+ }
+ }else {
+ yon_segments_hide(widgets);
+ yon_segments_show(widgets);
+ if (stld==1){
+ stld=0;
+ cmld=0;
}
- gtk_window_resize(GTK_WINDOW(widgets->window),main_config.windowWidth,main_config.windowHeight);
- gtk_widget_hide(widgets->window);
- }
- }else {
- if (stld==1){
- stld=0;
- cmld=0;
}
}
-
}
void on_resized_done (GtkWidget *window, GdkEvent *event, dictionary *widgetsD){
@@ -650,38 +664,95 @@ void on_resized_done (GtkWidget *window, GdkEvent *event, dictionary *widgetsD){
}
}
-void on_about_system(GtkWidget *button, actionWidgets *widgets){
- char arg[100];
- memset(arg,0,100);
- // printf("%d\n%d\n\n\n\n",gtk_socket_get_id(GTK_SOCKET(widgets->socket)),gtk_socket_get_id(GTK_SOCKET(widgets->socketbutton)));
- sprintf(arg,"--socket-id=%d --socket-ext-id=%d",gtk_socket_get_id(GTK_SOCKET(widgets->socket)),gtk_socket_get_id(GTK_SOCKET(widgets->socketbutton)));
- launch_app_with_arguments("ubl-settings-info",arg);
+
+
+void on_theme_selection_changed(GtkWidget *self, actionWidgets *widgets){
+ int *icsize;
+ int curthm=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->settingsThemeChooser));
+ if (curthm==0){
+ main_config.currentThemeIconSize=&main_config.Mainiconsize;
+ main_config.currentThemeLabelSize=&main_config.MainlabelSize;
+ icsize=main_config.currentThemeIconSize;
+ }
+ else if (curthm==1){
+ main_config.currentThemeIconSize=&main_config.Gnomeiconsize;
+ main_config.currentThemeLabelSize=&main_config.GnomelabelSize;
+ icsize=main_config.currentThemeIconSize;
+ }
+ GtkIconTheme *icthm=gtk_icon_theme_get_default();
+ if (*icsize==24 || *icsize==1){
+ gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),"24x24");
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(24),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
+ gtk_scale_set_value_pos(GTK_SCALE(widgets->settingsSizeSlider),1.0);
+ *icsize=24;
+ } else if (*icsize==32 || *icsize==2){
+ gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),"32x32");
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(32),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
+ gtk_scale_set_value_pos(GTK_SCALE(widgets->settingsSizeSlider),2.0);
+ *icsize=32;
+ } else if (*icsize==48 || *icsize==3){
+ gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),"48x48");
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(48),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
+ gtk_scale_set_value_pos(GTK_SCALE(widgets->settingsSizeSlider),3.0);
+ *icsize=48;
+ } else{
+ gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),"64x64");
+ gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(64),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
+ gtk_scale_set_value_pos(GTK_SCALE(widgets->settingsSizeSlider),4.0);
+ *icsize=64;
+ }
+}
+
+void on_about(GtkWidget *button){
+ GtkBuilder *builder = gtk_builder_new_from_file(GladePath);
+ GtkWidget *AboutButtons = GTK_WIDGET(gtk_builder_get_object(builder,"AboutButtons"));
+ GtkWidget *About = GTK_WIDGET(gtk_builder_get_object(builder, "ublAbloutWindow"));
+ gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(About),_("Settings manager for UBLinux"));
+ gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(About),_("UBLinux Settings Manager"));
+ gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(About),version_application);
+ gtk_widget_show(About);
+ gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(About),_("Project Home Page"));
+ gtk_widget_set_visible(AboutButtons,0);
}
-void launch(char *command){
- system(command);
+int launch(thread_output *thread){
+ int a=0;
+ a=system(thread->command);
+ *thread->exitcode=a;
+ return *thread->exitcode;
}
-void launch_app_with_arguments(char *name, char *args){
+int launch_app_with_arguments(char *name, char *args){
char *path=yon_char_get_augumented("/bin/",name);
path=yon_char_get_augumented(path," ");
path=yon_char_get_augumented(path,args);
- // printf("%s\n",path);
pthread_t thread_id;
- pthread_create(&thread_id, NULL, (void*)launch, path);
+ thread_output *thread=malloc(sizeof(thread_output));
+ thread->command=path;
+ thread->exitcode=malloc(sizeof(int));
+ pthread_create(&thread_id, NULL, (void*)launch, thread);
+ return *thread->exitcode;
};
-void launch_app(char *name){
+int launch_app(char *name){
char *path=name;
+ thread_output *thread=malloc(sizeof(thread_output));
+ thread->command=path;
+ thread->exitcode=malloc(sizeof(int));
pthread_t thread_id;
- pthread_create(&thread_id, NULL, (void*)launch, path);
+ pthread_create(&thread_id, NULL, (void*)launch, thread);
+ return *thread->exitcode;
};
-void py_launch_app(char *name,char *args){
+int py_launch_app(char *name,char *args){
char *path=malloc(strlen("python ./")+strlen(name)+6+strlen(args));
sprintf(path,"python ./%s.py %s &",name,args);
pthread_t thread_id;
- pthread_create(&thread_id, NULL, (void*)launch, path);
+ thread_output *thread=malloc(sizeof(thread_output));
+ thread->command=path;
+ thread->exitcode=malloc(sizeof(int));
+ pthread_create(&thread_id, NULL, (void*)launch, thread);
+ return *thread->exitcode;
};
apps *get_app_by_name(apps *applist,char *name, int size){
@@ -693,36 +764,30 @@ apps *get_app_by_name(apps *applist,char *name, int size){
int reload_list(IVGraphicals *section){
gtk_icon_view_set_model(GTK_ICON_VIEW(section->IV),GTK_TREE_MODEL(section->LV));
- gtk_icon_view_set_pixbuf_column(GTK_ICON_VIEW(section->IV),0);
- gtk_icon_view_set_text_column(GTK_ICON_VIEW(section->IV),1);
}
int load_apps(IVGraphicals *section, apps *applist, int size){
int catstofind=sizeof(section->categories)/sizeof(char*);
- int i=0;
+ int i=0,sz=0;
for (int i=0;icategories)==1){
GError *err=NULL;
- char *path=malloc(strlen(IconPicturesPath)+strlen(applist[i].Icon)+7);
- memset(path,0,strlen(IconPicturesPath)+strlen(applist[i].Icon)+7);
- memcpy(path,IconPicturesPath,strlen(IconPicturesPath));
- path=yon_char_get_augumented(path,applist[i].Icon);
- path=yon_char_get_augumented(path,PictureFormatMain);
- GdkPixbuf *pixbuf;
- pixbuf=gdk_pixbuf_new_from_file_at_size(path,main_config.iconsize,main_config.iconsize,NULL);
- if (!pixbuf) {
- pixbuf=gdk_pixbuf_new_from_file_at_size(ErrIconPicturePath,main_config.iconsize,main_config.iconsize,NULL);
- };
GtkTreeIter iter;
gtk_list_store_append(section->LV,&iter);
- char *ChosenName;
- ChosenName=applist[i].Name;
- gtk_list_store_set(section->LV,&iter,0,pixbuf,1,ChosenName,-1);
+ int sz= yon_get_icon_size(*main_config.currentThemeIconSize)+3;
+ if (sz<34) sz=34;
+ GtkIconTheme *icthm=gtk_icon_theme_get_default();
+ GdkPixbuf *pixbuf=gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, applist[i].Icon,yon_get_icon_size(*main_config.currentThemeIconSize),1,GTK_ICON_LOOKUP_FORCE_SIZE),NULL);
+ GtkTreePath *pth = gtk_tree_model_get_path(GTK_TREE_MODEL(section->LV),&iter);
+ gtk_list_store_set(section->LV,&iter,0,applist[i].Name,1,0.0,2,0.5, 3, sz+5, 4, pixbuf, 5,yon_get_icon_size(*main_config.currentThemeIconSize)+10, -1);
+ int cols = gtk_icon_view_get_columns(GTK_ICON_VIEW(section->IV));
+ gtk_icon_view_set_columns(GTK_ICON_VIEW(section->IV), -1);
+ gtk_icon_view_set_columns(GTK_ICON_VIEW(section->IV), cols);
+
}
+
}
gtk_icon_view_set_model(GTK_ICON_VIEW(section->IV),GTK_TREE_MODEL(section->LV));
- gtk_icon_view_set_pixbuf_column(GTK_ICON_VIEW(section->IV),0);
- gtk_icon_view_set_text_column(GTK_ICON_VIEW(section->IV),1);
};
int load_apps_with_clear(IVGraphicals *section, apps *applist, int size){
@@ -752,15 +817,6 @@ GtkWidget *create_socket(actionWidgets *builder){
g_signal_connect(G_OBJECT(socket),"plug-added",G_CALLBACK(on_plug_added),builder);
g_signal_connect(G_OBJECT(socket),"plug-removed",G_CALLBACK(on_plug_removed),builder);
g_signal_connect(G_OBJECT(socket),"destroy",G_CALLBACK(on_plug_removed),builder);
-
- // g_signal_connect(G_OBJECT(socketbutton),"plug-added",G_CALLBACK(on_plug_added),builder);
- // g_signal_connect(G_OBJECT(socketbutton),"plug-removed",G_CALLBACK(on_plug_removed),builder);
- // g_signal_connect(G_OBJECT(socketbutton),"destroy",G_CALLBACK(on_plug_removed),builder);
-
- // g_signal_connect(G_OBJECT(ThirdSocket),"plug-added",G_CALLBACK(on_plug_added),builder);
- // g_signal_connect(G_OBJECT(ThirdSocket),"plug-removed",G_CALLBACK(on_plug_removed),builder);
- // g_signal_connect(G_OBJECT(ThirdSocket),"destroy",G_CALLBACK(on_plug_removed),builder);
-
gtk_box_pack_start(GTK_BOX(builder->socketplace),socket,true,true,0);
gtk_box_pack_start(GTK_BOX(builder->socketbuttonplace),socketbutton,1,1,0);
builder->socketbutton=socketbutton;
@@ -798,7 +854,6 @@ apps *find_apps(int *sizef){
FILE *file;
char *path=yon_char_get_augumented(DesktopPath,de->d_name);
file=fopen(path,"r");
- //printf("%s\n",path);
if (strlen(de->d_name)>9)
{
char *extension=strstr(path,".");
@@ -822,27 +877,28 @@ apps *find_apps(int *sizef){
tempapp.Pluggable=g_key_file_get_boolean(gfile,"Desktop Entry", "Pluggable",NULL);
if (!tempapp.Pluggable) tempapp.Pluggable=g_key_file_get_boolean(gfile,"Desktop Entry", "X-XfcePluggable",NULL);
if (tempapp.Pluggable) tempapp.DualPluggable=g_key_file_get_boolean(gfile,"Desktop Entry", "X-UBLPluggable",NULL);
- if (size==0){
- applist=(apps*)malloc(size+1*sizeof(apps));
- applist[0].Name=yon_char_new(tempapp.Name);
- applist[0].Categories=yon_char_new(tempapp.Categories);
- applist[0].Exec=yon_char_new(tempapp.Exec);
- applist[0].Icon=yon_char_new(tempapp.Icon);
- applist[0].Type=tempapp.Type;
- applist[0].Pluggable=tempapp.Pluggable;
- applist[0].DualPluggable=tempapp.DualPluggable;
- size++;
- } else {
- applist=(apps*)realloc(applist,(size+1)*sizeof(apps));
- applist[size].Name=yon_char_new(tempapp.Name);
- applist[size].Categories=yon_char_new(tempapp.Categories);
- applist[size].Exec=yon_char_new(tempapp.Exec);
- applist[size].Icon=yon_char_new(tempapp.Icon);
- applist[size].Pluggable=tempapp.Pluggable;
- applist[size].DualPluggable=tempapp.DualPluggable;
- applist[size].Type=tempapp.Type;
- size++;
- }
+ if (g_key_file_get_boolean(gfile,"Desktop Entry", "X-UBL-SettingsManager-Hidden",NULL)==0)
+ if (size==0){
+ applist=(apps*)malloc(size+1*sizeof(apps));
+ applist[0].Name=yon_char_new(tempapp.Name);
+ applist[0].Categories=yon_char_new(tempapp.Categories);
+ applist[0].Exec=yon_char_new(tempapp.Exec);
+ applist[0].Icon=yon_char_new(tempapp.Icon);
+ applist[0].Type=tempapp.Type;
+ applist[0].Pluggable=tempapp.Pluggable;
+ applist[0].DualPluggable=tempapp.DualPluggable;
+ size++;
+ } else {
+ applist=(apps*)realloc(applist,(size+1)*sizeof(apps));
+ applist[size].Name=yon_char_new(tempapp.Name);
+ applist[size].Categories=yon_char_new(tempapp.Categories);
+ applist[size].Exec=yon_char_new(tempapp.Exec);
+ applist[size].Icon=yon_char_new(tempapp.Icon);
+ applist[size].Pluggable=tempapp.Pluggable;
+ applist[size].DualPluggable=tempapp.DualPluggable;
+ applist[size].Type=tempapp.Type;
+ size++;
+ }
}
}
}
@@ -872,7 +928,8 @@ int check_categories(apps app, char *catstocheck){
if (!found) return 0;
n_found++;
while (cat){
- char *fcat=strstr(app.Categories,";");
+ left_cats=cat+1;
+ char *fcat=app.Categories;//strstr(app.Categories,";");
cat=strstr(cat+1,";");
if (!cat) break;
find_it=yon_cut(left_cats,(strlen(left_cats)-strlen(cat)),0);
@@ -881,7 +938,7 @@ int check_categories(apps app, char *catstocheck){
if (!found) break;
n_found++;
left_cats=cat+1;
- if (strlen(left_cats)==0 ||strcmp(left_cats,'\0')==0) break;
+ if (strlen(left_cats)==0 ||strcmp(left_cats,"")==0) break;
}
if (to_find==n_found) return 1; else return 0;
}
@@ -890,11 +947,7 @@ int check_categories(apps app, char *catstocheck){
int setup_config(){
FILE *file;
GError *err=NULL;
- main_config.sections=malloc(sizeof(dictionary));
- main_config.sections->data=NULL;
- main_config.sections->next=NULL;
- main_config.sections->prev=NULL;
- main_config.sections->first=NULL;
+ main_config.sections=yon_dictionary_create_empty();
GKeyFile *configfile = g_key_file_new();
char *pth=malloc(7+strlen(UserConfigPath)+strlen(getlogin()));
sprintf(pth,"%s%s%s","/home/",getlogin(),UserConfigPath);
@@ -915,19 +968,33 @@ int setup_config(){
main_config.windowWidth=g_key_file_get_integer(configfile,"window","WindowWidth",NULL);
main_config.windowHeight=g_key_file_get_integer(configfile,"window","WindowHeight",NULL);
main_config.WindowTheme=g_key_file_get_integer(configfile,"window","WindowTheme",NULL);
- main_config.iconsize=g_key_file_get_integer(configfile,"window","IconSize",NULL);
+ main_config.Mainiconsize=g_key_file_get_integer(configfile,"window","MainIconSize",NULL);
+ main_config.Gnomeiconsize=g_key_file_get_integer(configfile,"window","GnomeIconSize",NULL);
main_config.iconSegmentSize=g_key_file_get_integer(configfile,"window","IconSegmentSize",NULL);
- main_config.labelSize=g_key_file_get_integer(configfile,"window","LabelSize",NULL);
+ main_config.MainlabelSize=g_key_file_get_integer(configfile,"window","MainLabelSize",NULL);
+ main_config.GnomelabelSize=g_key_file_get_integer(configfile,"window","GnomeLabelSize",NULL);
main_config.labelDensity=g_key_file_get_integer(configfile,"window","LabelDensity",NULL);
main_config.lastUser=g_key_file_get_string(configfile,"window","User",NULL);
- if (main_config.labelSize==0) main_config.labelSize=12;
+ main_config.fullscreen=g_key_file_get_boolean(configfile,"window","fullscreen",NULL);
+ if (main_config.MainlabelSize==0) main_config.MainlabelSize=12;
if (main_config.labelDensity==0) main_config.labelDensity=0;
- main_config.labelSize=main_config.labelSize*1000;
+ main_config.MainlabelSize=main_config.MainlabelSize*1000;
+ if (main_config.GnomelabelSize==0) main_config.GnomelabelSize=12;
+ main_config.GnomelabelSize=main_config.GnomelabelSize*1000;
+
+ if (main_config.WindowTheme==0){
+ main_config.currentThemeLabelSize=&main_config.MainlabelSize;
+ main_config.currentThemeIconSize=&main_config.Mainiconsize;
+ } else if (main_config.WindowTheme==1){
+ main_config.currentThemeLabelSize=&main_config.GnomelabelSize;
+ main_config.currentThemeIconSize=&main_config.Gnomeiconsize;
+ }
+
yon_icon_size_convert(0);
gsize length=0;
char **a=g_key_file_get_keys(configfile,"sections",&length,NULL);
- if (!a){yon_set_default_sections(&main_config.sections);} else {
+ if (!a){yon_set_default_sections(main_config.sections);} else {
for (int i=0;isection="Personal";
- sec->categories="X-UBL-SettingsManager;X-UBL-PersonalSettings;";
- (*section)->data=sec;
- (*section)->first=*section;
- (*section)->next=malloc(sizeof(dictionary));
- (*section)->next->prev=*section;
- (*section)->next->first=(*section)->first;
- *section=(*section)->next;
- sec=malloc(sizeof(IconSection));
- sec->section="Hardware";
- sec->categories="X-UBL-SettingsManager;X-UBL-HardwareSettings;";
- (*section)->data=sec;
- (*section)->next=malloc(sizeof(dictionary));
- (*section)->next->prev=*section;
- (*section)->next->first=(*section)->first;
- *section=(*section)->next;
- sec=malloc(sizeof(IconSection));
- sec->section="System";
- sec->categories="X-UBL-SettingsManager;X-UBL-SystemSettings;";
- (*section)->data=sec;
- (*section)->next=malloc(sizeof(dictionary));
- (*section)->next->prev=*section;
- (*section)->next->first=(*section)->first;
- *section=(*section)->next;
- sec=malloc(sizeof(IconSection));
- sec->section="Misc";
- sec->categories="X-UBL-SettingsManager;";
- (*section)->data=sec;
- *section=(*section)->first;
+void yon_set_default_sections(dictionary *section){
+ yon_section_new(section,"Personal","X-UBL-SettingsManager;X-UBL-PersonalSettings;");
+ section=yon_dictionary_create_conneced(section);
+ yon_section_new(section,"Hardware","X-UBL-SettingsManager;X-UBL-HardwareSettings;");
+ section=yon_dictionary_create_conneced(section);
+ yon_section_new(section,"System","X-UBL-SettingsManager;X-UBL-SystemSettings;");
+ section=yon_dictionary_create_conneced(section);
+ yon_section_new(section,"Misc","X-UBL-SettingsManager;X-UBL-MiscSettings;");
}
IVGraphicals *yon_create_single_section_IV(char *name,char *cats){
- IVGraphicals *IVG=malloc(sizeof(IVGraphicals));
- GtkWidget *box=gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
- GtkWidget *iv=gtk_icon_view_new();
- GtkWidget *label=gtk_label_new(_(name));
- PangoAttrList *attrs=pango_attr_list_new();
- pango_attr_list_insert(attrs,pango_attr_size_new(main_config.labelSize));
+ IVGraphicals *IVG = malloc(sizeof(IVGraphicals));
+ GtkWidget *box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+ GtkBuilder *builder = gtk_builder_new_from_file(GladePath);
+ GtkWidget *iv = GTK_WIDGET(gtk_builder_get_object(builder,"iconTemplate"));
+ GtkWidget *label = gtk_label_new(_(name));
+ GtkCellRendererPixbuf *iconRender = GTK_CELL_RENDERER_PIXBUF(gtk_builder_get_object(builder, "iconPic"));
+ PangoAttrList *attrs = pango_attr_list_new();
+ PangoFontDescription *descr = pango_font_description_new();
+ pango_font_description_set_weight(descr,PANGO_WEIGHT_BOLD);
+ int stretch = main_config.labelDensity;
+ if (stretch>8)
+ stretch = 4;
+ pango_font_description_set_stretch(descr,main_config.labelDensity);
+ pango_attr_list_insert(attrs,pango_attr_size_new(*main_config.currentThemeLabelSize));
+ pango_attr_list_insert(attrs, pango_attr_font_desc_new(descr));
gtk_label_set_attributes(GTK_LABEL(label),attrs);
- gtk_widget_set_name(label,"iconlabel");
+ gtk_widget_set_margin_end(label,6);
+ gtk_widget_set_margin_start(label,6);
+ gtk_widget_set_margin_bottom(label,2);
+ gtk_icon_view_set_spacing(GTK_ICON_VIEW(iv),20);
if (main_config.WindowTheme==1) {
gtk_icon_view_set_columns(GTK_ICON_VIEW(iv),1);
gtk_widget_set_name(iv,"GnomeIcon");
gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(iv),1);
gtk_icon_view_set_item_orientation(GTK_ICON_VIEW(iv),GTK_ORIENTATION_HORIZONTAL);
} else {
- gtk_widget_set_name(iv,"Icon");
+ gtk_icon_view_set_item_padding(GTK_ICON_VIEW(iv),3);
+ gtk_icon_view_set_item_orientation(GTK_ICON_VIEW(iv),GTK_ORIENTATION_HORIZONTAL);
+ gtk_icon_view_set_row_spacing(GTK_ICON_VIEW(iv),2);
}
-
GtkWidget *sep=gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
- gtk_widget_set_name(sep,"thinborder");
- GtkListStore *lv=gtk_list_store_new(2, GDK_TYPE_PIXBUF,G_TYPE_STRING);
+ GtkListStore *lv=GTK_LIST_STORE(gtk_builder_get_object(builder,"liststoreTemplate"));
+ gtk_widget_set_name(sep,"SepIcon");
gtk_widget_set_halign(box,0);
gtk_widget_set_valign(box,1);
- gtk_icon_view_set_pixbuf_column(GTK_ICON_VIEW(iv),0);
- gtk_icon_view_set_text_column(GTK_ICON_VIEW(iv),1);
- gtk_icon_view_set_item_width(GTK_ICON_VIEW(iv),75);
+ gtk_widget_set_margin_end(sep,6);
+ gtk_widget_set_margin_start(sep,6);
gtk_icon_view_set_model(GTK_ICON_VIEW(iv),GTK_TREE_MODEL(lv));
gtk_label_set_xalign(GTK_LABEL(label),0);
gtk_box_pack_start(GTK_BOX(box),label,FALSE,FALSE,0);
@@ -1035,11 +1155,12 @@ IVGraphicals *yon_create_single_section_IV(char *name,char *cats){
gtk_box_pack_start(GTK_BOX(box),iv,FALSE,FALSE,0);
IVG->sectionName=name;
IVG->categories=cats;
- IVG->LV=lv;
- IVG->Box=box;
- IVG->IV=iv;
- IVG->label=label;
- IVG->sep=sep;
+ IVG->LV = lv;
+ IVG->Box = box;
+ IVG->IV = iv;
+ IVG->label = label;
+ IVG->sep = sep;
+ IVG->iconRender = iconRender;
return IVG;
}
@@ -1052,7 +1173,6 @@ dictionary *yon_create_icon_section_list(dictionary *sections){
while (sections!=NULL){
IconSection *name=(IconSection*)sections->data;
IVSections=yon_create_single_section_IV(name->section,name->categories);
- // loadapps(IVSections,// applist,size //);
if (!IVDict) {
IVDict=yon_dictionary_create_empty();
IVDict->key=name->section;
@@ -1083,7 +1203,7 @@ void yon_check_path(char *path){
dictionary *yon_section_new(dictionary *section, char *section_name, char *categories){
section->next=NULL;
IconSection *sct=malloc(sizeof(IconSection));
- dictionary *dict=malloc(sizeof(dictionary));
+ dictionary *dict=yon_dictionary_create_empty();//malloc(sizeof(dictionary));
sct->section=section_name;
sct->categories=categories;
dict->data=sct;
@@ -1106,8 +1226,10 @@ void yon_icv_resize_item(dictionary *icdict, GtkWidget *paned){
for (dictionary *dict=icdict->first;dict!=NULL;dict=dict->next){
IVGraphicals *icv=(IVGraphicals*)dict->data;
int width=gtk_paned_get_position(GTK_PANED(paned));
- if (width < 115) width=115;
- gtk_icon_view_set_item_width(GTK_ICON_VIEW(icv->IV),width);
+ int pos=(int)((double)width-20);
+ if (pos < 100) pos=100;
+
+ gtk_icon_view_set_item_width(GTK_ICON_VIEW(icv->IV),pos);
}
}
@@ -1162,6 +1284,8 @@ void yon_switch_theme(dictionary **dict, dictionary *newone){
gtk_window_resize(GTK_WINDOW(widgets->window),main_config.windowWidth,main_config.windowHeight);
gtk_window_move(GTK_WINDOW(widgets->window),main_config.windowPosX,main_config.windowPosY);
if (strcmp(dct->key,"Gnome")==0){
+ main_config.currentThemeIconSize=&main_config.Gnomeiconsize;
+ main_config.currentThemeLabelSize=&main_config.GnomelabelSize;
int x,y;
GdkRectangle workarea;
gdk_monitor_get_workarea(gdk_display_get_monitor(gdk_screen_get_display(gtk_window_get_screen(GTK_WINDOW(widgets->window))),0),&workarea);
@@ -1193,6 +1317,8 @@ void yon_switch_theme(dictionary **dict, dictionary *newone){
}
} else {
+ main_config.currentThemeIconSize=&main_config.Mainiconsize;
+ main_config.currentThemeLabelSize=&main_config.MainlabelSize;
gtk_widget_show(widgets->window);
main_config.WindowTheme=0;
main_config.curThemeName="Main";
@@ -1202,17 +1328,24 @@ void yon_switch_theme(dictionary **dict, dictionary *newone){
}
+int yon_get_icon_size(int size){
+ if (size==1||size==24) return 24;
+ if (size==2||size==32) return 32;
+ if (size==3||size==48) return 48;
+ if (size==4||size==64) return 64;
+}
+
void yon_icon_size_convert(int mode){
if (mode==0){
- if (main_config.iconsize==1) main_config.iconsize=24;
- if (main_config.iconsize==2) main_config.iconsize=32;
- if (main_config.iconsize==3) main_config.iconsize=48;
- if (main_config.iconsize==4) main_config.iconsize=64;
+ if (*main_config.currentThemeIconSize==1) *main_config.currentThemeIconSize=24;
+ if (*main_config.currentThemeIconSize==2) *main_config.currentThemeIconSize=32;
+ if (*main_config.currentThemeIconSize==3) *main_config.currentThemeIconSize=48;
+ if (*main_config.currentThemeIconSize==4) *main_config.currentThemeIconSize=64;
} else if (mode==1){
- if (main_config.iconsize==24) main_config.iconsize=1;
- if (main_config.iconsize==32) main_config.iconsize=2;
- if (main_config.iconsize==48) main_config.iconsize=3;
- if (main_config.iconsize==64) main_config.iconsize=4;
+ if (*main_config.currentThemeIconSize==24) *main_config.currentThemeIconSize=1;
+ if (*main_config.currentThemeIconSize==32) *main_config.currentThemeIconSize=2;
+ if (*main_config.currentThemeIconSize==48) *main_config.currentThemeIconSize=3;
+ if (*main_config.currentThemeIconSize==64) *main_config.currentThemeIconSize=4;
}
}
@@ -1319,6 +1452,19 @@ dictionary *yon_dictionary_create_empty(){
return dict;
}
+void yon_dictionary_switch_to_last(dictionary **dict){
+ if ((*dict)->next!=NULL)
+ for ((*dict)=(*dict)->first;(*dict)->next!=NULL;(*dict)=(*dict)->next){}
+}
+
+dictionary * yon_dictionary_create_conneced(dictionary *targetdict){
+ yon_dictionary_switch_to_last(&targetdict);
+ targetdict->next=yon_dictionary_create_empty();
+ targetdict->next->prev=targetdict;
+ targetdict->next->first=targetdict->first;
+ return targetdict->next;
+}
+
void yon_segment_show(actionWidgets *widgets, SectionSettingSegment *sgm){
gtk_box_pack_start(GTK_BOX(widgets->SectionSettingsPack),sgm->MainFrame,FALSE,FALSE,5);
g_signal_connect(G_OBJECT(sgm->ButtonEdit),"clicked",G_CALLBACK(on_sections_edit), widgets);
@@ -1331,6 +1477,7 @@ void yon_segment_show(actionWidgets *widgets, SectionSettingSegment *sgm){
}
void yon_segments_show(actionWidgets *widgets){
+ if(widgets->SettingsSections)
for (dictionary *dict=widgets->SettingsSections->first;dict!=NULL;dict=dict->next){
SectionSettingSegment *sgm=(SectionSettingSegment*)dict->data;
if (sgm!=NULL)
@@ -1341,6 +1488,7 @@ void yon_segments_show(actionWidgets *widgets){
};
void yon_segments_hide(actionWidgets *widgets){
+ if(widgets->SettingsSections)
for (dictionary *dict=widgets->SettingsSections->first;dict!=NULL;dict=dict->next){
SectionSettingSegment *sgm=(SectionSettingSegment*)dict->data;
if (sgm!=NULL){
@@ -1356,9 +1504,32 @@ void yon_dictionary_make_first(dictionary *dict){
}
}
+float yon_time_average(dictionary *times){
+ int sum=0;
+ int size=0;
+ for (dictionary *i=times->first;i!=NULL;i=i->next){
+ sum+=(time_t)i->data;
+ size++;
+ }
+ return (float)sum/size;
+}
+
+void yon_time_reg_for_average(dictionary *listofregs, int size, time_t tm){
+ yon_dictionary_switch_to_last(&listofregs);
+ time_t prev=(time_t)listofregs->data;
+ listofregs=yon_dictionary_create_conneced(listofregs);
+ listofregs->data=(void*)(tm-prev);
+
+}
+
void yon_small_window_theme_change(actionWidgets *widgets){
}
+void yon_main_quit(actionWidgets *widgets){
+ save_config(widgets);
+ gtk_main_quit();
+}
+
dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *theme_id, apps *applist, int appsize){
dictionary *widgets=*widgetss;
@@ -1384,39 +1555,35 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
curWidgets->socketbuttonplace=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"socketbuttonplace")));
curWidgets->Overlay=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"Overlay")));
curWidgets->ThirdSocketPlace=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"ThirdSocketPlace")));
+ curWidgets->MenuItemSettings=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"MenuItemSettings")));
+ curWidgets->MenuItemDocumentation=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"MenuItemDocumentation")));
+ curWidgets->MenuItemAboutSystem=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"MenuItemAboutSystem")));
curWidgets->SettingsSections=NULL;
gtk_style_context_add_class(gtk_widget_get_style_context(curWidgets->icvpack),"iconview");
curWidgets->socket=GTK_WIDGET(create_socket(curWidgets));
- curWidgets->MenuItemAboutSystem=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"MenuItemAboutSystem"));
- g_signal_connect(G_OBJECT(curWidgets->MenuItemAboutSystem), "activate", G_CALLBACK(on_about_system),curWidgets);
if (curWidgets->ButtonBackToMain!=NULL)
- gtk_button_set_label(GTK_BUTTON(curWidgets->ButtonBackToMain),_("Back to settings"));
- gtk_window_set_title(GTK_WINDOW(curWidgets->window),"UBLinux Settings Manager");
- g_signal_connect(G_OBJECT(curWidgets->window), "destroy", G_CALLBACK(gtk_main_quit), NULL);
+ gtk_button_set_label(GTK_BUTTON(curWidgets->ButtonBackToMain),_("Back to all settings"));
+ gtk_window_set_title(GTK_WINDOW(curWidgets->window),_("UBLinux Settings Manager"));
if (curWidgets->GnomePaned!=NULL){
gtk_paned_set_position(GTK_PANED(curWidgets->GnomePaned),main_config.iconSegmentSize);
g_signal_connect(G_OBJECT(curWidgets->GnomePaned), "notify::position", G_CALLBACK(on_paned_move), curWidgets);
}
- if (strcmp(theme_id,"Gnome")==0){
- on_about_system(NULL,curWidgets);
g_signal_connect(G_OBJECT(curWidgets->window), "configure-event", G_CALLBACK(on_resized), widgets);
+ if (strcmp(theme_id,"Gnome")==0){
g_signal_connect(G_OBJECT(curWidgets->window), "event-after", G_CALLBACK(on_resized_done), widgets);
}
if (curWidgets->ButtonBackToMain!=NULL)
g_signal_connect(G_OBJECT(curWidgets->ButtonBackToMain), "clicked", G_CALLBACK(on_backToSettingsButton_clicked), curWidgets);
curWidgets->LabelTitle=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"LabelTitle"));
- gtk_window_set_title(GTK_WINDOW(curWidgets->window),"UBLinux Settings Manager GNOME");
+ gtk_window_set_title(GTK_WINDOW(curWidgets->window),_("UBLinux Settings Manager"));
// Standard for all themes
curWidgets->settingsThemeChooser=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsThemeChooser"));
curWidgets->SettingsWindow=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SettingsWindow"));
- curWidgets->MenuItemSettings=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"MenuItemSettings"));
- curWidgets->MenuItemDocumentation=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"MenuItemDocumentation"));
- curWidgets->MenuItemAboutSystem=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"MenuItemAboutSystem"));
curWidgets->DialogOpenDocumentation=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"HelpSureWindow"));
curWidgets->CancelHelpButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"CancelHelpButton"));
curWidgets->ReadHelpButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"ReadHelpButton"));
@@ -1425,7 +1592,6 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
curWidgets->helpText=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"helpText"));
curWidgets->settingsSizeInfoLabel=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSizeInfoLabel"));
curWidgets->settingsIcon=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsIcon"));
- curWidgets->settingsSectionsSettingsButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSectionsSettingsButton"));
curWidgets->SectionSettingsWindow=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsWindow"));
curWidgets->SectionSettingsPack=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsPack"));
curWidgets->settingsSizeSlider=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSizeSlider"));
@@ -1433,6 +1599,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
curWidgets->settingsCancel=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsCancel"));
curWidgets->settingsSubmenuLabelSize=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSubmenuLabelSize"));
curWidgets->settingsSubmenuLabelTheme=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSubmenuLabelTheme"));
+ curWidgets->settingsSectionsSettingsButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSectionsSettingsButton"));
curWidgets->SectionSettingAddButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsAddButton"));
curWidgets->SectionSettingAddNameEntry=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsAddNameEntry"));
curWidgets->SectionSettingAddCategoriesEntry=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsAddCategoriesEntry"));
@@ -1441,31 +1608,35 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
curWidgets->SectionSettingsCloseButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsCloseButton"));
curWidgets->CautionWindow=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"CautionWindow"));
curWidgets->CautionUnderstandButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"CautionUnderstandButton"));
+ curWidgets->infoWarningWindow=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"windowSettings-infoWarning"));
+ curWidgets->infoWarningButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"buttonSettings-infoWarning"));
+ curWidgets->infoWarningLabel=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"labelSettings-infoWarning"));
curWidgets->applist=applist;
curWidgets->appssize=appsize;
-
+ GtkIconTheme *icthm=gtk_icon_theme_get_default();
gtk_widget_set_size_request(curWidgets->window,800,600);
gtk_window_resize(GTK_WINDOW(curWidgets->window),main_config.windowWidth,main_config.windowHeight);
- gtk_window_set_icon_from_file(GTK_WINDOW(curWidgets->window),AppIconPath,NULL);
- gtk_window_set_icon_from_file(GTK_WINDOW(curWidgets->SectionSettingsWindow),AppIconPath,NULL);
-
+ gtk_window_set_icon(GTK_WINDOW(curWidgets->window),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(32),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
+ gtk_window_set_icon(GTK_WINDOW(curWidgets->SectionSettingsWindow),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(32),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
+ g_signal_connect(G_OBJECT(curWidgets->MenuItemDocumentation), "activate", G_CALLBACK(on_about), curWidgets->builder); //on_ButtonOpenHelp_activated
+ g_signal_connect(G_OBJECT(curWidgets->MenuItemSettings), "activate", G_CALLBACK(on_settingsOpen), curWidgets);
if (gnld==0){
gnld=1;
- g_signal_connect(G_OBJECT(curWidgets->MenuItemDocumentation), "activate", G_CALLBACK(on_ButtonOpenHelp_activated), curWidgets->builder);
+ g_signal_connect(G_OBJECT(curWidgets->settingsThemeChooser), "changed", G_CALLBACK(on_theme_selection_changed), curWidgets);
g_signal_connect(G_OBJECT(curWidgets->CancelHelpButton), "clicked", G_CALLBACK(on_CancelHelpButton_activated), curWidgets->builder);
g_signal_connect(G_OBJECT(curWidgets->ReadHelpButton), "clicked", G_CALLBACK(on_ReadHelpButton_activated), curWidgets->builder);
- g_signal_connect(G_OBJECT(curWidgets->MenuItemSettings), "activate", G_CALLBACK(on_settingsOpen), curWidgets);
g_signal_connect(G_OBJECT(curWidgets->settingsSizeSlider), "value-changed", G_CALLBACK(on_settings_icon_size_changed), curWidgets);
g_signal_connect(G_OBJECT(curWidgets->settingsCancel), "clicked", G_CALLBACK(on_settings_cancel), curWidgets);
g_signal_connect(G_OBJECT(curWidgets->settingsAccept), "clicked", G_CALLBACK(on_settings_accept), widgetss);
- g_signal_connect(G_OBJECT(curWidgets->settingsSectionsSettingsButton), "clicked", G_CALLBACK(on_section_settings_open), widgets);
g_signal_connect(G_OBJECT(curWidgets->SectionSettingAddButton), "clicked", G_CALLBACK(on_sections_add), curWidgets);
g_signal_connect(G_OBJECT(curWidgets->SectionSettingsClearEntryButton), "clicked", G_CALLBACK(on_sections_new_clear), curWidgets);
g_signal_connect(G_OBJECT(curWidgets->SectionSettingsCloseButton), "clicked", G_CALLBACK(on_sections_close), curWidgets);
g_signal_connect(G_OBJECT(curWidgets->SectionSettingsSaveButton), "clicked", G_CALLBACK(on_sections_save), curWidgets);
g_signal_connect(G_OBJECT(curWidgets->CautionUnderstandButton), "clicked", G_CALLBACK(on_caution_understand), curWidgets);
+ g_signal_connect(G_OBJECT(curWidgets->settingsSectionsSettingsButton), "clicked", G_CALLBACK(on_section_settings_open), widgets);
}
+ g_signal_connect(G_OBJECT(curWidgets->window), "destroy", G_CALLBACK(yon_main_quit), curWidgets);
gtk_label_set_text(GTK_LABEL(curWidgets->LabelTitle),_("UBLinux Settings Manager"));
gtk_label_set_text(GTK_LABEL(curWidgets->settingsSubmenuLabelSize),_("Icon size"));
gtk_label_set_text(GTK_LABEL(curWidgets->settingsSubmenuLabelTheme),_("Window theme"));
@@ -1478,9 +1649,8 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
gtk_button_set_label(GTK_BUTTON(curWidgets->AlwaysOpenDocumentation),_("Always redirect"));
gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemSettings),_("Settings"));
gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemDocumentation),_("About..."));
- gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemAboutSystem),_("About system"));
gtk_button_set_label(GTK_BUTTON(curWidgets->CautionUnderstandButton),_("Understood"));
- gtk_button_set_label(GTK_BUTTON(curWidgets->settingsSectionsSettingsButton),_("Section management"));
+ gtk_button_set_label(GTK_BUTTON(curWidgets->settingsSectionsSettingsButton),_("Sections management"));
return widgets;
}
@@ -1491,9 +1661,9 @@ int main(int argc, char *argv[]){
return -1;
}
local=setlocale(LC_ALL, "");
- // printf("%s\n\n\n",bindtextdomain (LocaleName, LocalePath));
textdomain (LocaleName);
- actionWidgets *widget=malloc(sizeof(actionWidgets));
+ actionWidgets *widget=NULL;
+ widget=malloc(sizeof(actionWidgets));
dictionary *widgets=yon_dictionary_create_empty();
widgets->data=widget;
int *size=malloc(sizeof(int));
@@ -1511,7 +1681,6 @@ int main(int argc, char *argv[]){
load_apps((IVGraphicals*)cur->data,widg->applist,widg->appssize);
}
yon_show_icon_views(widg->ICSys,widg);
- gtk_overlay_add_overlay(GTK_OVERLAY(widg->Overlay),GTK_WIDGET(gtk_builder_get_object(builder,"GnomeScroll")));
yon_icv_resize_item(widg->ICSys,widg->GnomePaned);
theme="Main";
main_config.WindowTheme=0;
@@ -1523,15 +1692,18 @@ int main(int argc, char *argv[]){
widg->applist=applist;
widg->appssize=*size;
widg->ICSys=yon_create_icon_section_list(main_config.sections);
+ main_config.currentThemeIconSize=&main_config.Mainiconsize;
+ main_config.currentThemeLabelSize=&main_config.MainlabelSize;
for (dictionary *cur=widg->ICSys->first; cur!=NULL;cur=cur->next){
load_apps((IVGraphicals*)cur->data,widg->applist,widg->appssize);
}
yon_show_icon_views(widg->ICSys,widg);
- gtk_overlay_add_overlay(GTK_OVERLAY(widg->Overlay),widg->workingwindow);
main_config.WindowTheme=1;
-
+ main_config.currentThemeIconSize=&main_config.Gnomeiconsize;
+ main_config.currentThemeLabelSize=&main_config.GnomelabelSize;
}
- else {theme="Main";
+ else {
+ theme="Main";
yon_theme_new(&widgets->first, builder,theme,applist,*size);
widg->applist=applist;
widg->appssize=*size;
@@ -1540,7 +1712,6 @@ int main(int argc, char *argv[]){
load_apps((IVGraphicals*)cur->data,widg->applist,widg->appssize);
}
yon_show_icon_views(widg->ICSys,widg);
- gtk_overlay_add_overlay(GTK_OVERLAY(widg->Overlay),GTK_WIDGET(gtk_builder_get_object(builder,"GnomeScroll")));
theme="Gnome";
main_config.WindowTheme=1;
widgets->next=yon_dictionary_create_empty();
@@ -1550,23 +1721,26 @@ int main(int argc, char *argv[]){
widg=(actionWidgets*)widgets->next->data;
widg->applist=applist;
widg->appssize=*size;
+ main_config.currentThemeIconSize=&main_config.Gnomeiconsize;
+ main_config.currentThemeLabelSize=&main_config.GnomelabelSize;
widg->ICSys=yon_create_icon_section_list(main_config.sections);
for (dictionary *cur=widg->ICSys->first; cur!=NULL;cur=cur->next){
load_apps((IVGraphicals*)cur->data,widg->applist,widg->appssize);
}
yon_show_icon_views(widg->ICSys,widg);
- gtk_overlay_add_overlay(GTK_OVERLAY(widg->Overlay),widg->icvpack);
main_config.WindowTheme=0;
yon_icv_resize_item(widg->ICSys,widg->GnomePaned);
+ main_config.currentThemeIconSize=&main_config.Mainiconsize;
+ main_config.currentThemeLabelSize=&main_config.MainlabelSize;
}
if (geteuid()==0){
- gtk_widget_set_sensitive(widg->settingsSectionsSettingsButton,1);
}
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widg->settingsThemeChooser),NULL,_("Standard theme"));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widg->settingsThemeChooser),NULL,_("GNOME theme"));
widg=(actionWidgets*)widgets->data;
- gtk_window_maximize(GTK_WINDOW(widg->window));
- gtk_widget_show_all(widg->window);
+ if (main_config.fullscreen==1)
+ gtk_window_maximize(GTK_WINDOW(widg->window));
+ gtk_widget_show(widg->window);
hide_if_unfound(widgets);
if (main_config.WindowTheme==1)
gtk_widget_hide(widg->MenuItemAboutSystem);
@@ -1577,14 +1751,15 @@ int main(int argc, char *argv[]){
banner = GTK_WIDGET(gtk_builder_get_object(widg->builder,"loaderBanner"));
gtk_image_set_from_pixbuf(GTK_IMAGE(banner),gdk_pixbuf_new_from_file(AppBannerPath,NULL));
banner = GTK_WIDGET(gtk_builder_get_object(widg->builder,"GnomeInfoLogo"));
- gtk_image_set_from_pixbuf(GTK_IMAGE(banner),gdk_pixbuf_new_from_file_at_scale(LogoPath,512,512,1,NULL));
+ gtk_image_set_from_pixbuf(GTK_IMAGE(banner),gdk_pixbuf_new_from_file_at_scale(ublinux_logo,512,512,1,NULL));
banner = GTK_WIDGET(gtk_builder_get_object(widg->builder,"settingsIcon"));
- gtk_image_set_from_pixbuf(GTK_IMAGE(banner),gdk_pixbuf_new_from_file_at_scale(AppIconPath,main_config.iconsize,main_config.iconsize,1,NULL));
+ GtkIconTheme *icthm=gtk_icon_theme_get_default();
+ gtk_image_set_from_pixbuf(GTK_IMAGE(banner),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(*main_config.currentThemeIconSize),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
GtkCssProvider *css=gtk_css_provider_new();
gtk_css_provider_load_from_path(css,CssPath,NULL);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),
GTK_STYLE_PROVIDER(css),
- 0);
+ -1);
gtk_main();
}
diff --git a/source/ubl-settings-manager.h b/source/ubl-settings-manager.h
index 92f3100..b20917e 100644
--- a/source/ubl-settings-manager.h
+++ b/source/ubl-settings-manager.h
@@ -2,24 +2,24 @@
#define UBL_SETTINGS_MANAGER
#include
+#include
+
#define GladePath "/usr/share/ubl-settings-manager/ui/ubl-settings-manager.glade"
#define CssPath "/usr/share/ubl-settings-manager/css/ubl-settings-manager.css"
-#define GlobalConfigPath "/etc/ubconfig-main.conf"
-#define UserConfigPath "/.config/ubl-settings-manager/ubconfig-main.conf"
-#define AppIconPath "/usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg"
-#define AppBannerPath "/usr/share/icons/hicolor/scalable/apps/ubl-settings-manager.png"
+#define GlobalConfigPath "/etc/xdg/ubl-settings-manager/ubl-settings-manager.conf"
+#define UserConfigPath "/.config/ubl-settings-manager/ubl-settings-manager.conf"
+#define AppIconPath "ru.ublinux.ubl-settings-manager"
+#define AppBannerPath "/usr/share/ubl-settings-manager/ui/ubl-settings-manager-banner.png"
#define DesktopPath "/usr/share/applications/"
#define IconPicturesPath "/usr/share/icons/hicolor/scalable/apps/"
-#define ErrIconPicturePath "/usr/share/icons/Faenza/emblems/32/emblem-important.png"
-#define PictureFormatMain ".svg"
-#define PictureFormatExtra ".png"
+#define ublinux_logo "/usr/share/ubl-settings-manager/ui/ublinux-logo.svg"
#define LocalePath "/usr/share/locale"
#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_infoPathLaunch "ubl-settings-info --socket-id="
-
+typedef char* string;
+string version_application = ;
typedef struct apps{
char *Name;
@@ -31,6 +31,11 @@ typedef struct apps{
int DualPluggable;
} apps;
+typedef struct {
+ char *command;
+ int *exitcode;
+} thread_output;
+
typedef struct dictionary {
char *key;
void *data;
@@ -47,6 +52,7 @@ typedef struct IVGrapgicals{
GtkWidget *IV;
GtkWidget *label;
GtkWidget *sep;
+ GtkCellRendererPixbuf *iconRender;
} IVGraphicals;
typedef struct IconSection{
@@ -61,12 +67,18 @@ typedef struct {
int windowPosY;
int WindowTheme;
char *curThemeName;
- int iconsize;
+ int Mainiconsize;
+ int Gnomeiconsize;
int iconSegmentSize;
dictionary *sections;
- int labelSize;
+ int MainlabelSize;
+ int GnomelabelSize;
+ int *currentThemeLabelSize;
+ int *currentThemeIconSize;
int labelDensity;
char *lastUser;
+ int changed;
+ int fullscreen;
} config;
typedef struct {
@@ -145,7 +157,9 @@ typedef struct {
int appssize;
apps *applist;
GtkWidget *icvpack;
-
+ GtkWidget *infoWarningWindow;
+ GtkWidget *infoWarningButton;
+ GtkWidget *infoWarningLabel;
} actionWidgets;
@@ -166,9 +180,9 @@ void on_ButtonOpenHelp_activated(GtkWidget *button, GtkBuilder *builder);
void on_backToSettingsButton_clicked(GtkWidget *button,actionWidgets *sctb);
void on_CancelHelpButton_activated(GtkWidget *button,GtkBuilder *builder);
void on_ReadHelpButton_activated(GtkWidget *button, GtkBuilder *builder);
-void launch_app_with_arguments(char *name, char *args);
-void launch_app(char *name);
-void py_launch_app(char *name,char *args);
+int launch_app_with_arguments(char *name, char *args);
+int launch_app(char *name);
+int py_launch_app(char *name,char *args);
int on_settings_accept(GtkWidget *button, dictionary **widgetsDs);
void on_paned_move(GtkPaned* self, GtkScrollType* scroll_type, actionWidgets *widgets);
int on_settingsOpen(GtkWidget *button, actionWidgets *widgets);
@@ -188,7 +202,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
char *yon_char_get_augumented(char *source, char *append);
char *yon_cut(char *source, int size, int startpos);
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(char *source, int dividepos);
dictionary *yon_section_new(dictionary *section, char *section_name, char *categories);
@@ -203,7 +217,12 @@ void yon_dictionary_make_first(dictionary *dict);
dictionary *yon_create_icon_section_list(dictionary *sections);
int yon_show_icon_views(dictionary *IVS,actionWidgets *widgets);
void yon_icon_size_convert(int mode);
-void on_about_system(GtkWidget *button, actionWidgets *widgets);
char *yon_char_new(char *chr);
-void launch(char *command);
+int launch(thread_output *thread);
+float yon_time_average(dictionary *times);
+void yon_time_reg_for_average(dictionary *listofregs, int size, time_t tm);
+void yon_dictionary_switch_to_last(dictionary **dict);
+dictionary *yon_dictionary_create_conneced(dictionary *targetdict);
+int yon_get_icon_size(int size);
+
#endif
\ No newline at end of file
diff --git a/ubl-settings-manager.png b/ubl-settings-manager-banner.png
similarity index 100%
rename from ubl-settings-manager.png
rename to ubl-settings-manager-banner.png
diff --git a/ubconfig-main.conf b/ubl-settings-manager.conf
similarity index 82%
rename from ubconfig-main.conf
rename to ubl-settings-manager.conf
index 4d5b3a4..e8ceb76 100644
--- a/ubconfig-main.conf
+++ b/ubl-settings-manager.conf
@@ -4,9 +4,11 @@ WindowPosY=0
WindowWidth=800
WindowHeight=600
WindowTheme=0
-IconSize=2
+MainIconSize=3
+GnomeIconSize=3
IconSegmentSize=250
-LabelSize=12
+MainLabelSize=12
+GnomeLabelSize=12
LabelDensity=0
User=
diff --git a/ubl-settings-manager.css b/ubl-settings-manager.css
index 437117d..79a5aa8 100644
--- a/ubl-settings-manager.css
+++ b/ubl-settings-manager.css
@@ -6,9 +6,14 @@ background-color: #404040;
#GnomeIcon{
border-style:solid;
border-bottom-width: 1px;
- border-image: linear-gradient(90deg, #aaaaaa 0%, #dcddde 100%);
+ border-image: linear-gradient(90deg, alpha(@theme_text_color,0.4) 55%, alpha(@theme_bg_color, 0) 100%);
border-image-slice: 1;
}
+
+#SepIcon{
+ background-color: alpha(@theme_text_color, 0.6);
+}
+
#iconlabel {
font-size:14px;
font-weight: bold;
@@ -19,3 +24,86 @@ background-color: #404040;
border-width:1px;
border-radius:5px;
}
+.noborder {
+ border: none;
+}
+.menu:hover {
+ border-color:alpha(@theme_text_color, 0.01);
+}
+.menu {
+ border-color:alpha(@theme_text_color, 0.01);
+}
+.menu:hover >* {
+ border-color:alpha(@theme_text_color, 0.01);
+}
+.menuitembottom{
+ margin-top:0px;
+ margin-bottom:3px;
+}
+.menuitemmiddle{
+ margin-top:0px;
+ margin-bottom:0px;
+}
+
+.menuitemtop{
+ margin-bottom:0px;
+}
+.menuitemtop *{
+ margin:2px 2px 0 2px;
+ padding: 5px 10px 3px 5px;
+}
+.menuitemmiddle *{
+ margin:0 2px 0 2px;
+ padding: 3px 10px 3px 5px;
+}
+.menuitembottom *{
+ margin:0 2px 2px 2px;
+ padding: 3px 10px 5px 5px;
+}
+.menuitemtop:hover {
+ background:@theme_bg_color;
+}
+.menuitemmiddle:hover {
+ background:@theme_bg_color;
+}
+.menuitembottom:hover {
+ background:@theme_bg_color;
+
+}
+.menuitemtop:hover* {
+ margin:2px 2px 0 2px;
+ padding: 5px 10px 3px 5px;
+ background:@theme_selected_bg_color;
+ border-radius:2px;
+}
+.menuitemmiddle:hover* {
+ margin:0 2px 0 2px;
+ padding: 3px 10px 3px 5px;
+ background:@theme_selected_bg_color;
+ border-radius:2px;
+}
+.menuitembottom:hover* {
+ margin:0 2px 2px 2px;
+ padding: 3px 10px 5px 5px;
+ background:@theme_selected_bg_color;
+ border-radius:2px;
+}
+
+.workingbg, #workingbg {
+ background-color:@theme_base_color;
+}
+.workingbg.view.cell:selected {
+ background-color:@theme_selected_bg_color;
+}
+.workingbg.view.cell:hover {
+ background-color:darker(@theme_selected_bg_color);
+ color:@theme_selected_text_color;
+ border-radius:3px;
+}
+.bkim {
+ transition: 200ms ease-out;
+ background-image: none;
+}
+
+
+
diff --git a/ubl-settings-manager.desktop b/ubl-settings-manager.desktop
index 0e55e44..6c60fcf 100644
--- a/ubl-settings-manager.desktop
+++ b/ubl-settings-manager.desktop
@@ -8,7 +8,7 @@ Comment=ubl-settings-manager
Comment[ru]=Приложение для управления настройками UBLinux
Type=Application
Exec=ubl-settings-manager
-Icon=ublinux-ubconfig
+Icon=ubl-settings-manager
Terminal=false
X-XfcePluggable=false
Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;
diff --git a/ubl-settings-manager.glade b/ubl-settings-manager.glade
index 8566978..63a249e 100644
--- a/ubl-settings-manager.glade
+++ b/ubl-settings-manager.glade
@@ -2,6 +2,7 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
False
@@ -163,7 +148,7 @@
start
20
20
- gtk-dialog-question
+ dialog-question-symbolic
6
@@ -184,7 +169,8 @@
start
10
5
- Would yo like to read documentation in the Web?
+ Would you like to read documentation in the Web?
+ 0
@@ -208,6 +194,7 @@
10
You will be redirected to documentation website where documentation is translated and supported by community.
True
+ 0
@@ -262,6 +249,12 @@
True
False
+ 5
+ 5
+ 5
+ 5
+ 30
+ True
Cancel
@@ -305,140 +298,76 @@
-
-
- True
- False
- vertical
-
-
+
+
-
- True
- True
- 0
-
+
+
+ True
+ False
+ False
+ False
+ 4
-
+
+ True
False
- vertical
-
-
-
+ Settings
+ True
-
- False
- True
- 1
-
-
-
- True
- False
- emblem-danger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
-
+
True
False
-
-
-
+ Documentation
+ True
+
+
-
+
@@ -465,7 +394,7 @@
5
5
2
- 0
+ 0.019999999552965164
in
@@ -527,6 +456,7 @@
64
True
False
+ ubconfig-gui
False
@@ -542,6 +472,8 @@
@@ -560,7 +492,7 @@
5
2
5
- 0
+ 0.019999999552965164
in
@@ -597,6 +529,8 @@
@@ -608,51 +542,15 @@
-
+
+ button
True
- False
+ True
+ True
5
5
- 0
- in
-
-
- True
- False
-
-
- True
- False
- True
- True
-
-
- Sections management
- True
- False
- True
- True
- 10
- 10
- 5
-
-
- True
- True
- 1
-
-
-
-
-
-
-
-
- True
- False
- Тонкая настройка
-
-
+ 5
+ 5
False
@@ -670,6 +568,9 @@
False
5
5
+ 3
+ 30
+ True
Close
@@ -697,7 +598,6 @@
False
True
- end
1
@@ -718,10 +618,19 @@
-
@@ -730,55 +639,308 @@
1
10
+
True
False
- gtk-go-back
-
-
- True
- False
- gtk-undelete
-
-
- True
- False
- ../../../../usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg
- 6
+ go-first-symbolic
-
+
+ True
+ False
+ 16
+ software-remove-symbolic
+
+
+ True
+ False
+ ubconfig-gui
+ 6
+
+
+
+
+
+
+
+
+
+
+
+ Стандартная тема
+
+
+ GNOME тема
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ 4
+ natural
+ horizontal
+ liststoreTemplate
+ 135
+ 0
+ 2
+ 5
+ True
+
+
+ 2
+
+
+ 5
+ 3
+ 1
+ 2
+ 4
+
+
+
+
+ 0
+ word
+ 18
+
+
+ 3
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+ True
+ False
+ 0
+ none
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
-
+
True
False
+ 4
+ 4
+ 4
+ 4
+ vertical
-
+
+ True
+ True
+ True
+ Settings
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ True
+ True
+ Documentation
+
+
+ False
+ True
+ 4
+
-
-
- False
- True
- 1
-
-
-
-
- True
- False
-
+
-
- False
- True
- end
- 2
-
-
-
- True
- False
- ../../../../usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg
- 5
-
-
-
-
- True
- False
- vertical
-
-
-
-
-
- 1
-
+
+
@@ -1400,6 +1706,7 @@
False
800
600
+ ubconfig-gui
True
@@ -1559,7 +1866,7 @@
True
menu1
none
- False
+ settingsPopover
@@ -1576,7 +1883,8 @@
True
False
- ../../../../usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg
+ 32
+ ubl-settings-manager
5
@@ -1587,107 +1895,128 @@
-
+
False
- 800
- 600
True
False
+ 4
+ 4
+ 4
+ 4
+ 4
+ 4
vertical
-
+
- True
+ False
+ True
+ 3
+
+
+
+
+
+ False
+ True
+ 4
+
+
+
+
+
+ False
True
+ 5
+
+
+
+
+
+
+
+ False
+ About
+ False
+ True
+ center
+ ubl-settings-manager
+ dialog
+ True
+ UBLinux Settings Manager
+ 1.6
+ Copyright © 2022 - 2023 - UBSoft Software LLC
+ Settings manager for UBLinux
+ https://ublinux.ru/
+ Project Home Page
+ UBGroup
+ UBGroup
+ ubl-settings-manager
+ gpl-2-0
+
+
+ False
+ vertical
+ 2
+
+
+ False
+ end
+
+
+ False
+ False
0
+
+
+
-
-
+
+ False
+
+
True
False
- True
-
+ vertical
+
True
False
- True
-
+
True
False
-
-
- True
- False
- UBLinux Settings Manager
-
-
- True
- True
- 0
-
-
+ start
+ 20
+ 20
+ 20
+ 20
+ True
+ dialog-question-symbolic
+ 6
True
@@ -1696,17 +2025,17 @@
-
+
True
False
- center
- center
-
-
-
-
+ start
+ 10
+ 15
+ 20
+ 20
+ Looks like you don't have ubl-settings-info installed on your PC.
+ True
+ 0
False
@@ -1714,95 +2043,50 @@
1
-
-
- True
- False
- vertical
-
-
- True
- True
- False
- True
- menu1
- none
- False
-
-
-
-
-
- False
- True
- 0
-
-
-
-
- False
- True
- end
- 2
-
-
-
-
-
-
- True
- False
- ../../../../usr/share/icons/hicolor/32x32/apps/ublinux-ubconfig.svg
- 5
+
+ False
+ True
+ 0
+
-
- Back to settings
+
+ Ok
True
- False
True
- False
- False
- False
- 10
- 10
- image1
-
-
+ True
+ end
+ end
+ 5
+ 5
+ 5
+ 5
+ False
+ True
+ end
1
+
+
+
+
-
-
-
-
-
-
diff --git a/ubl-settings-manager_ru.po b/ubl-settings-manager_ru.po
index 19df6c7..a06a944 100644
--- a/ubl-settings-manager_ru.po
+++ b/ubl-settings-manager_ru.po
@@ -6,88 +6,101 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: 1.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-02-09 16:45+0600\n"
+"POT-Creation-Date: 2023-03-13 10:24+0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
-"Language: \n"
+"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ubl-settings-manager.c:1338
-msgid "Back to settings"
-msgstr "Назад"
+#: source/ubl-settings-manager.c:730
+msgid "Settings manager for UBLinux"
+msgstr "Менеджер настроек для UBLinux"
-#: ubl-settings-manager.c:1418
+#: source/ubl-settings-manager.c:731 source/ubl-settings-manager.c:1615
+#: source/ubl-settings-manager.c:1630 source/ubl-settings-manager.c:1685
msgid "UBLinux Settings Manager"
msgstr "Настройки UBLinux"
-#: ubl-settings-manager.c:1419
+#: source/ubl-settings-manager.c:733
+msgid "Project Home Page"
+msgstr "Домашняя станица проекта"
+
+#: source/ubl-settings-manager.c:1614
+msgid "Back to all settings"
+msgstr "Назад ко всем настройкам"
+
+#: source/ubl-settings-manager.c:1686
msgid "Icon size"
msgstr "Размер иконок"
-#: ubl-settings-manager.c:1420
+#: source/ubl-settings-manager.c:1687
msgid "Window theme"
msgstr "Выбор темы"
-#: ubl-settings-manager.c:1421
+#: source/ubl-settings-manager.c:1688
msgid "Would you like to read documentation in the Web?"
msgstr "Вы хотите прочитать руководство в сети?"
-#: ubl-settings-manager.c:1422
+#: source/ubl-settings-manager.c:1689
msgid ""
"You will be redirected to documentation site, where user help pages are "
"translated and supported by community."
msgstr "Вы будете перенаправлены на сайт с документацией, где страницы помощи переводятся и поддерживаются сообществом."
-#: ubl-settings-manager.c:1423
+#: source/ubl-settings-manager.c:1690
msgid "Read online"
msgstr "Прочитать онлайн"
-#: ubl-settings-manager.c:1424
+#: source/ubl-settings-manager.c:1691
msgid "Cancel"
msgstr "Отменить"
-#: ubl-settings-manager.c:1425
+#: source/ubl-settings-manager.c:1692
msgid "Close"
msgstr "Закрыть"
-#: ubl-settings-manager.c:1426
+#: source/ubl-settings-manager.c:1693
msgid "Save and apply"
msgstr "Сохранить и применить"
-#: ubl-settings-manager.c:1427
+#: source/ubl-settings-manager.c:1694
msgid "Always redirect"
msgstr "Всегда перенаправлять"
-#: ubl-settings-manager.c:1428
+#: source/ubl-settings-manager.c:1695
msgid "Settings"
msgstr "Настройки"
-#: ubl-settings-manager.c:1429
+#: source/ubl-settings-manager.c:1696
msgid "About..."
msgstr "О программе"
-#: ubl-settings-manager.c:1430
+#: source/ubl-settings-manager.c:1697
+msgid "Looks like you don't have ubl-settings-info installed on your PC."
+msgstr "В вашей системе не обнаружен UBLinux Settings Info."
+
+#: source/ubl-settings-manager.c:1697
msgid "About system"
msgstr "О системе"
-#: ubl-settings-manager.c:1431
+#: source/ubl-settings-manager.c:1719
+msgid "Sections management"
+msgstr "Настройка разделов"
+
+#: source/ubl-settings-manager.c:1698
msgid "Understood"
msgstr "Понятно"
-#: ubl-settings-manager.c:1432
-msgid "Section management"
-msgstr "Точная настройка"
-
-#: ubl-settings-manager.c:1508
+#: source/ubl-settings-manager.c:1782
msgid "Standard theme"
-msgstr "Основная тема"
+msgstr "Стандартная тема"
-#: ubl-settings-manager.c:1509
+#: source/ubl-settings-manager.c:1783
msgid "GNOME theme"
msgstr "GNOME тема"
diff --git a/ubl-settings-manager.svg b/ublinux-logo.svg
similarity index 100%
rename from ubl-settings-manager.svg
rename to ublinux-logo.svg