pull/9/head
parent e34595ebfe
commit eb293d72dc

@ -10,9 +10,10 @@ CMAKE_COMMAND = cmake
#CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile
CMAKE_SOURCE_DIR = ./source
CMAKE_BUILD_DIR = ./compile
DEPENDS = cmake
PKGNAME = $(MAKEFILE_DIR)
version_application =
#PKGNAME = check-hostalive
#PKGNAME = ubl-settings-manager
pkgdir =
default_target: all
@ -21,10 +22,10 @@ all: init build
init:
@echo "Initialize ..."; \
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-datetime.h; \
version=$${version:8}; \
search="s/char *version_application.*$&"; \
replace="char *version_application = \"$${version}\";"; \
sed -i -e "$$search/$$replace/gi" source/ubl-settings-manager.h; \
echo "-- Build path: ${CMAKE_BUILD_DIR}"
depend:
@ -89,10 +90,13 @@ uninstall:
@$(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}.png"
@$(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
@ -115,22 +119,15 @@ install: check uninstall
done
@install -Dm644 -t /usr/share/icons/hicolor/scalable/apps/ ${PKGNAME}.svg
@install -Dm755 -t /usr/bin/ ${CMAKE_BUILD_DIR}/${PKGNAME}
@install -Dm644 -t /usr/share/applications/ ${PKGNAME}.desktop; \
if [ ! -d "/usr/share/${PKGNAME}" ]; then \
mkdir /usr/share/${PKGNAME}; \
fi; \
if [ ! -d "/usr/share/${PKGNAME}/ui" ]; then \
mkdir /usr/share/${PKGNAME}/ui; \
fi; \
if [ ! -d "/usr/share/${PKGNAME}/css" ]; then \
mkdir /usr/share/${PKGNAME}/css; \
fi
@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 /usr/share/${PKGNAME}/ui/ ublinux-logo.svg
@install -Dm644 -t /etc/ ubconfig-main.conf; \
chmod 766 /etc/ubconfig-main.conf
@install -Dm644 -t /usr/share/${PKGNAME}/ui/ ${PKGNAME}.png
@install -Dm644 -t /etc/ ubconfig-main.conf
@chmod 766 /etc/ubconfig-main.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

@ -1 +1 @@
string version_application = "1.1";
VERSION 1.1

@ -82,7 +82,6 @@ void on_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets *appl
if (!tempapp){}else{
char arg[100];
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){
@ -108,7 +107,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];
@ -122,7 +121,8 @@ void on_gnome_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets
//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);
@ -297,7 +297,8 @@ 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;
@ -309,36 +310,37 @@ int on_settingsOpen(GtkWidget *button, actionWidgets *widgets){
char *tmp=malloc(6);
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(AppIconPath,*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,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));
};
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(AppIconPath,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");
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(AppIconPath,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");
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(AppIconPath,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");
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(AppIconPath,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");
if (*main_config.currentThemeIconSize!=64)
main_config.changed=1;
@ -693,7 +695,6 @@ void on_about_system(GtkWidget *button, actionWidgets *widgets){
void on_theme_selection_changed(GtkWidget *self, actionWidgets *widgets){
int *icsize;
// printf("changed\n");
int curthm=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->settingsThemeChooser));
// main_config.changed=1;
if (curthm==0){
@ -706,24 +707,25 @@ void on_theme_selection_changed(GtkWidget *self, actionWidgets *widgets){
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),gdk_pixbuf_new_from_file_at_scale(AppIconPath,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_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),gdk_pixbuf_new_from_file_at_scale(AppIconPath,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_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),gdk_pixbuf_new_from_file_at_scale(AppIconPath,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_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),gdk_pixbuf_new_from_file_at_scale(AppIconPath,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_scale_set_value_pos(GTK_SCALE(widgets->settingsSizeSlider),4.0);
*icsize=64;
}
@ -731,29 +733,44 @@ void on_theme_selection_changed(GtkWidget *self, actionWidgets *widgets){
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);
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){
@ -770,34 +787,9 @@ int reload_list(IVGraphicals *section){
int load_apps(IVGraphicals *section, apps *applist, int size){
int catstofind=sizeof(section->categories)/sizeof(char*);
int i=0,sz=0;
dictionary *times=yon_dictionary_create_empty();
for (int i=0;i<size;i++){
if (check_categories(applist[i],section->categories)==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);
// GdkPixbuf *pixbuf;
// pixbuf=gdk_pixbuf_new_from_file_at_size(yon_char_get_augumented(path,PictureFormatMain),*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,NULL);
// if (!pixbuf) {
// pixbuf=gdk_pixbuf_new_from_file_at_size(yon_char_get_augumented(path,PictureFormatExtra),*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,NULL);
// if (!pixbuf){
// GtkWidget *imag=gtk_image_new_from_icon_name(applist[i].Icon,yon_get_icon_size(*main_config.currentThemeIconSize));
// void *a=GTK_ICON_SIZE_DIALOG;
// pixbuf=gtk_image_get_pixbuf(GTK_IMAGE(imag));
// // printf("%s\n",applist[i].Icon);
// if (!pixbuf)
// pixbuf=gdk_pixbuf_new_from_file_at_size(ErrIconPicturePath,*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,NULL);
// else {
// gdk_pixbuf_scale(pixbuf,pixbuf,0,0,*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,0,0,*main_config.currentThemeIconSize,*main_config.currentThemeIconSize,GDK_INTERP_NEAREST);
// GValue a = G_VALUE_INIT;
// g_value_init (&a, G_TYPE_STRING);
// g_value_set_string (&a, applist[i].Icon);
// g_object_set_property(G_OBJECT(section->iconRender),"icon-name", &a);
// }
// }
// };
GtkTreeIter iter;
gtk_list_store_append(section->LV,&iter);
int sz= *main_config.currentThemeIconSize+10;
@ -810,11 +802,9 @@ int load_apps(IVGraphicals *section, apps *applist, int size){
gtk_icon_view_set_columns(GTK_ICON_VIEW(section->IV), -1);
gtk_icon_view_set_columns(GTK_ICON_VIEW(section->IV), cols);
yon_time_reg_for_average(times,sz++,clock());
}
}
// printf("среднее время на каждую проверку: %f\n",yon_time_average(times)/1000);
gtk_icon_view_set_model(GTK_ICON_VIEW(section->IV),GTK_TREE_MODEL(section->LV));
};
@ -882,7 +872,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,".");
@ -1669,13 +1658,14 @@ 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->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_ButtonOpenHelp_activated), curWidgets->builder);
g_signal_connect(G_OBJECT(curWidgets->MenuItemSettings), "activate", G_CALLBACK(on_settingsOpen), curWidgets);
@ -1736,7 +1726,6 @@ int main(int argc, char *argv[]){
for (dictionary *cur=widg->ICSys->first; cur!=NULL;cur=cur->next){
load_apps((IVGraphicals*)cur->data,widg->applist,widg->appssize);
}
// printf("\n\n");
yon_show_icon_views(widg->ICSys,widg);
yon_icv_resize_item(widg->ICSys,widg->GnomePaned);
theme="Main";
@ -1754,7 +1743,6 @@ int main(int argc, char *argv[]){
for (dictionary *cur=widg->ICSys->first; cur!=NULL;cur=cur->next){
load_apps((IVGraphicals*)cur->data,widg->applist,widg->appssize);
}
// printf("\n\n");
yon_show_icon_views(widg->ICSys,widg);
main_config.WindowTheme=1;
main_config.currentThemeIconSize=&main_config.Gnomeiconsize;
@ -1769,7 +1757,6 @@ int main(int argc, char *argv[]){
for (dictionary *cur=widg->ICSys->first; cur!=NULL;cur=cur->next){
load_apps((IVGraphicals*)cur->data,widg->applist,widg->appssize);
}
// printf("\n\n");
yon_show_icon_views(widg->ICSys,widg);
theme="Gnome";
main_config.WindowTheme=1;
@ -1786,7 +1773,6 @@ int main(int argc, char *argv[]){
for (dictionary *cur=widg->ICSys->first; cur!=NULL;cur=cur->next){
load_apps((IVGraphicals*)cur->data,widg->applist,widg->appssize);
}
// printf("\n\n");
yon_show_icon_views(widg->ICSys,widg);
main_config.WindowTheme=0;
yon_icv_resize_item(widg->ICSys,widg->GnomePaned);
@ -1812,7 +1798,8 @@ int main(int argc, char *argv[]){
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(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.currentThemeIconSize,*main_config.currentThemeIconSize,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(),

@ -9,20 +9,18 @@
#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/scalable/apps/ubl-settings-manager.svg"
#define AppBannerPath "//usr/share/ubl-settings-manager/ui/ubl-settings-manager.png"
#define AppIconPath "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 ublinux_logo "/usr/share/ubl-settings-manager/ui/ublinux-logo.svg"
#define PictureFormatMain ".svg"
#define PictureFormatExtra ".png"
#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="
char *version_application = "1.3";
typedef struct apps{
char *Name;
@ -34,6 +32,11 @@ typedef struct apps{
int DualPluggable;
} apps;
typedef struct {
char *command;
int *exitcode;
} thread_output;
typedef struct dictionary {
char *key;
void *data;
@ -155,7 +158,7 @@ typedef struct {
int appssize;
apps *applist;
GtkWidget *icvpack;
GtkWidget *infoWarningWindow;
} actionWidgets;
@ -176,9 +179,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);
@ -215,7 +218,7 @@ 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);

Before

Width:  |  Height:  |  Size: 366 KiB

After

Width:  |  Height:  |  Size: 366 KiB

@ -383,15 +383,17 @@
</object>
</child>
<child>
<object class="GtkBox" id="GnomeThirdSocketPlace">
<property name="visible">True</property>
<property name="can-focus">False</property>
<object class="GtkButton" id="GnomebackToSettingsButton">
<property name="label" translatable="yes">Back to settings</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">False</property>
<property name="double-buffered">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
<property name="margin-right">10</property>
<property name="margin-end">10</property>
<property name="image">image5</property>
</object>
<packing>
<property name="position">1</property>
@ -445,6 +447,21 @@
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkBox" id="GnomeThirdSocketPlace">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">4</property>
</packing>
</child>
<style>
<class name="bkim"/>
</style>
@ -985,7 +1002,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="stock">gtk-missing-image</property>
<property name="icon-name">ubl-settings-manager-banner</property>
<property name="icon_size">3</property>
<style>
<class name="noborder"/>
@ -1523,6 +1540,11 @@
</object>
</child>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">go-first-symbolic</property>
</object>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name gchararray1 -->

Loading…
Cancel
Save