|
|
|
|
@ -897,7 +897,7 @@ int setup_config(){
|
|
|
|
|
char *pth=malloc(7+strlen(UserConfigPath)+strlen(getlogin()));
|
|
|
|
|
sprintf(pth,"%s%s%s","/home/",getlogin(),UserConfigPath);
|
|
|
|
|
g_key_file_load_from_file(configfile,pth,G_KEY_FILE_KEEP_TRANSLATIONS,&err);
|
|
|
|
|
if (err){
|
|
|
|
|
if (err||main_config.lock_settings==1){
|
|
|
|
|
g_error_free(err);
|
|
|
|
|
err=NULL;
|
|
|
|
|
g_key_file_load_from_file(configfile,GlobalConfigPath,G_KEY_FILE_KEEP_TRANSLATIONS,&err);
|
|
|
|
|
@ -959,6 +959,8 @@ int setup_config(){
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void save_config(actionWidgets *widgets){
|
|
|
|
|
if (main_config.lock_settings==1)
|
|
|
|
|
return;
|
|
|
|
|
GKeyFile *gfile=g_key_file_new();
|
|
|
|
|
|
|
|
|
|
int sz=1,szm=1;
|
|
|
|
|
@ -1023,7 +1025,8 @@ void save_config(actionWidgets *widgets){
|
|
|
|
|
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);
|
|
|
|
|
g_key_file_save_to_file(gfile,pth,NULL);
|
|
|
|
|
if (main_config.lock_settings==0)
|
|
|
|
|
g_key_file_save_to_file(gfile,pth,NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *yon_cut(char *source, int size, int startpos){
|
|
|
|
|
@ -1638,6 +1641,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
|
curWidgets->MenuItemAboutSystem=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"MenuItemAboutSystem")));
|
|
|
|
|
curWidgets->BannerRevealer=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"RevealButton")));
|
|
|
|
|
curWidgets->Revealer=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"Revealer")));
|
|
|
|
|
curWidgets->BackToSettingsLabel=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"BackToSettingsLabel")));
|
|
|
|
|
curWidgets->SettingsSections=main_config.SettingsSections;
|
|
|
|
|
if (main_config.BannerHidden==0){
|
|
|
|
|
gtk_revealer_set_reveal_child(GTK_REVEALER(curWidgets->Revealer),1);
|
|
|
|
|
@ -1649,7 +1653,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
|
gtk_style_context_add_class(gtk_widget_get_style_context(curWidgets->icvpack),"iconview");
|
|
|
|
|
curWidgets->socket=GTK_WIDGET(create_socket(curWidgets));
|
|
|
|
|
if (curWidgets->ButtonBackToMain!=NULL)
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(curWidgets->ButtonBackToMain),_("Back to all settings"));
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(curWidgets->BackToSettingsLabel),_("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);
|
|
|
|
|
|