diff --git a/source/ubl-settings-manager.c b/source/ubl-settings-manager.c index ebf8165..d481b2f 100644 --- a/source/ubl-settings-manager.c +++ b/source/ubl-settings-manager.c @@ -636,16 +636,18 @@ void on_double_click_changed(GtkWidget *Switch, gboolean state, dictionary *widg void on_about(GtkWidget *button){ GtkBuilder *builder = gtk_builder_new_from_file(GladePath); GtkWidget *AboutButtons = GTK_WIDGET(gtk_builder_get_object(builder,"AboutButtons")); + GtkWidget *AboutHeadLabel = GTK_WIDGET(gtk_builder_get_object(builder,"aboutHeadLabel")); GtkWidget *About = GTK_WIDGET(gtk_builder_get_object(builder, "ublAbloutWindow")); gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(About),_(ABOUT_PROJECT_COMMENTS_LABEL)); gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(About),_(UBL_SETTINGS_MANAGER_TITLE)); - gtk_window_set_title(GTK_WINDOW(About),UBL_SETTINGS_MANAGER_ABOUT_TITLE); + gtk_label_set_text(GTK_LABEL(AboutHeadLabel),UBL_SETTINGS_MANAGER_ABOUT_TITLE); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(About),version_application); gtk_widget_show(About); GList *list = gtk_container_get_children(GTK_CONTAINER(AboutButtons)); - gtk_widget_destroy(GTK_WIDGET(g_list_first(list))); - gtk_widget_destroy(GTK_WIDGET(g_list_first(list)->next)); - gtk_widget_destroy(GTK_WIDGET(g_list_first(list)->next->next)); + gtk_widget_destroy(AboutButtons); + // gtk_widget_destroy(GTK_WIDGET(g_list_first(list)->next->next)); + // gtk_widget_destroy(GTK_WIDGET(g_list_first(list)->next)); + // gtk_widget_destroy(GTK_WIDGET(g_list_first(list))); gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(About),_(ABOUT_PROJECT_HOME_PAGE_LABEL)); // gtk_widget_set_visible(AboutButtons,0); } @@ -901,16 +903,13 @@ int setup_config(){ GKeyFile *configfile = g_key_file_new(); 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||main_config.lock_settings==1){ + + g_key_file_load_from_file(configfile,GlobalConfigPath,G_KEY_FILE_KEEP_TRANSLATIONS,&err); + if (err){ g_error_free(err); - err=NULL; - g_key_file_load_from_file(configfile,GlobalConfigPath,G_KEY_FILE_KEEP_TRANSLATIONS,&err); - if (err){ - g_error_free(err); - return 0; - } - } + return 0; + } else { + char *foroutput=NULL; char *line=NULL; main_config.GnomeDoubleClick=g_key_file_get_boolean(configfile,"window", "GnomeDoubleClick",NULL); @@ -929,6 +928,51 @@ int setup_config(){ main_config.lastUser=g_key_file_get_string(configfile,"window","User",NULL); main_config.fullscreen=g_key_file_get_boolean(configfile,"window","fullscreen",NULL); main_config.BannerHidden=g_key_file_get_boolean(configfile,"window","BannerHidden",NULL); + } + + g_key_file_load_from_file(configfile,pth,G_KEY_FILE_KEEP_TRANSLATIONS,&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); + + } else { + + int GnomeDoubleClick=g_key_file_get_boolean(configfile,"window", "GnomeDoubleClick",NULL); + int MainDoubleClick=g_key_file_get_boolean(configfile,"window", "MainDoubleClick",NULL); + int windowPosX=g_key_file_get_integer(configfile,"window","WindowPosX",NULL); + int windowPosY=g_key_file_get_integer(configfile,"window","WindowPosY",NULL); + int windowWidth=g_key_file_get_integer(configfile,"window","WindowWidth",NULL); + int windowHeight=g_key_file_get_integer(configfile,"window","WindowHeight",NULL); + int WindowTheme=g_key_file_get_integer(configfile,"window","WindowTheme",NULL); + int Mainiconsize=g_key_file_get_integer(configfile,"window","MainIconSize",NULL); + int Gnomeiconsize=g_key_file_get_integer(configfile,"window","GnomeIconSize",NULL); + int iconSegmentSize=g_key_file_get_integer(configfile,"window","IconSegmentSize",NULL); + int MainlabelSize=g_key_file_get_integer(configfile,"window","MainLabelSize",NULL); + int GnomelabelSize=g_key_file_get_integer(configfile,"window","GnomeLabelSize",NULL); + int labelDensity=g_key_file_get_integer(configfile,"window","LabelDensity",NULL); + char *lastUser=g_key_file_get_string(configfile,"window","User",NULL); + int fullscreen=g_key_file_get_boolean(configfile,"window","fullscreen",NULL); + int BannerHidden=g_key_file_get_boolean(configfile,"window","BannerHidden",NULL); + main_config.GnomeDoubleClick=GnomeDoubleClick; + main_config.MainDoubleClick=MainDoubleClick; + main_config.windowPosX=windowPosX; + main_config.windowPosY=windowPosY; + main_config.windowWidth=windowWidth; + main_config.windowHeight=windowHeight; + main_config.WindowTheme=WindowTheme; + main_config.Mainiconsize=Mainiconsize; + main_config.Gnomeiconsize=Gnomeiconsize; + main_config.iconSegmentSize=iconSegmentSize; + main_config.MainlabelSize=MainlabelSize; + main_config.GnomelabelSize=GnomelabelSize; + main_config.labelDensity=labelDensity; + if (lastUser) + main_config.lastUser=lastUser; + main_config.fullscreen=fullscreen; + main_config.BannerHidden=BannerHidden; + } + if (main_config.MainlabelSize==0) main_config.MainlabelSize=12; if (main_config.labelDensity==0) main_config.labelDensity=0; main_config.MainlabelSize=main_config.MainlabelSize*1000; @@ -1015,6 +1059,8 @@ void save_config(actionWidgets *widgets){ } g_key_file_set_boolean(gfile,"window","fullscreen",main_config.fullscreen); g_key_file_set_boolean(gfile,"window","BannerHidden",main_config.BannerHidden); + g_key_file_set_boolean(gfile,"window","MainDoubleClick",main_config.MainDoubleClick); + g_key_file_set_boolean(gfile,"window","GnomeDoubleClick",main_config.GnomeDoubleClick); sprintf(fromint,"%d",main_config.WindowTheme); g_key_file_set_string(gfile,"window","WindowTheme",fromint); sprintf(fromint,"%d",sz); @@ -1643,7 +1689,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them 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->MenuItemAboutSystem=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,yon_char_get_augumented(theme_id,"MenuItemAbout"))); 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"))); @@ -1754,7 +1800,8 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them gtk_button_set_label(GTK_BUTTON(curWidgets->SectionSettingsSaveButton),APPLY_LABEL); gtk_button_set_label(GTK_BUTTON(curWidgets->AlwaysOpenDocumentation),ALWAYS_REDIRECT_LABEL); gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemSettings),SETTINGS_LABEL); - gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemDocumentation),ABOUT_LABEL); + gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemDocumentation),DOCUMENTATION_LABEL); + gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemAboutSystem),ABOUT_LABEL); gtk_button_set_label(GTK_BUTTON(curWidgets->CautionUnderstandButton),UNDERSTOOD_LABEL); gtk_button_set_label(GTK_BUTTON(curWidgets->settingsSectionsSettingsButton),SECTIONS_MANAGEMENT_LABEL); gtk_label_set_text(GTK_LABEL(curWidgets->settingsDoubleClickLabel),DOUBLE_CLICK_SELECTION_LABEL); diff --git a/source/ubl-settings-manager.h b/source/ubl-settings-manager.h index 55652a0..d748bac 100644 --- a/source/ubl-settings-manager.h +++ b/source/ubl-settings-manager.h @@ -32,6 +32,7 @@ string version_application = "1.3"; #define SECTIONS_MANAGEMENT_LABEL _("Sections management") #define UNDERSTOOD_LABEL _("Understood") #define ABOUT_LABEL _("About...") +#define DOCUMENTATION_LABEL _("Documentation") #define SETTINGS_LABEL _("Settings") #define ALWAYS_REDIRECT_LABEL _("Always redirect") #define APPLY_LABEL _("Apply") diff --git a/ubl-settings-manager.glade b/ubl-settings-manager.glade index 7d99f54..de0e853 100644 --- a/ubl-settings-manager.glade +++ b/ubl-settings-manager.glade @@ -125,6 +125,17 @@ + + + True + False + About... + True + + + True @@ -354,6 +365,17 @@ + + + True + False + About... + True + + + True @@ -391,25 +413,7 @@ - - 1 - 5 - 2 - 1 - 1 - - - 1 - 1 - 10 - - - - True - False - go-first-symbolic - - + False 800 558 @@ -417,30 +421,28 @@ True - True False vertical True - True False - + True False + True - + True False start slide-left - + True False - start - start + center 3 + + + + + + + False + True + + + + True False - 5 - 5 - 5 - 5 vertical - - 5 - 5 + True - True - immediate - never - always - in + False + vertical - + True False - natural + 3 + 3 + 3 + 3 + 3 + 0 + in - + True False - vertical - 2 + center + center + 12 - + + True + False + center + center + + + + False + True + 0 + + + - + + + + + True + True + 0 + @@ -556,37 +616,43 @@ 0 - - - True - True - 0 - - - - - False - vertical - + + True + False + vertical + + + False + vertical + + + + + + False + True + 0 + + + + + False + True + 1 + - - False - True - 1 + True + True - True True + end 1 @@ -605,7 +671,7 @@ False True - + True False UBLinux Settings @@ -624,57 +690,73 @@ - - Back to settings + True False False - False center center - 10 10 - image1 - - - - 1 - - - - - True - False - center - center - vertical - + + True + False + 5 + + + True + True + False + True + left + False + + + + + + + False + True + 0 + + + + + True + False + Back to settings + + + False + True + 1 + + + - - 2 + 1 True False - vertical - + True True False True center center - MainMenu + GnomeMenu none - False @@ -688,11 +770,11 @@ end - 3 + 2 - + True False center @@ -700,86 +782,35 @@ - end - 4 + 3 - - - - - - True - False - 16 - user-trash-symbolic - - - True - False - ubconfig-gui - 6 - - - True - False - - - True - False - Element 1 - - - - - True - False - Element 2 - - + + True False + center + center + vertical - - True - False - Element 3 - + + + 4 + + - - - Element 4 - True - False - image3 - False - - - - - True - False - 16 - object-select-symbolic - - True - False - go-first-symbolic - - + False 800 558 @@ -787,28 +818,30 @@ True + True False vertical True + True False - + True False - True - + True False start slide-left - + True False - center + start + start 3 - - - - - - - False - True - - + False + vertical - + True False + 5 + 5 + 5 + 5 vertical - + + 5 + 5 True - False - vertical + True + immediate + never + always + in - + True False - 3 - 3 - 3 - 3 - 3 - 0 - in + natural - + True False - center - center - 12 + vertical + 2 - - True - False - center - center - - - - False - True - 0 - - - + + - - - - - True - True - 0 - @@ -982,43 +957,37 @@ 0 + + + True + True + 0 + + + + + False + vertical - - True - False - vertical - - - False - vertical - - - - - - False - True - 0 - - - - - False - True - 1 - + + - True - True + False + True + 1 + True True - end 1 @@ -1037,7 +1006,7 @@ False True - + True False UBLinux Settings @@ -1056,34 +1025,94 @@ - - Back to settings + True False False + False center center 10 - image5 + + + + True + False + 5 + + + True + True + False + True + left + + + + + + + False + True + 0 + + + + + True + False + Back to settings + + + False + True + 1 + + + + 1 + + + True + False + center + center + vertical + + + + + + + 2 + + True False + vertical - + True True False True center center - GnomeMenu + MainMenu none + False @@ -1097,11 +1126,11 @@ end - 2 + 3 - + True False center @@ -1109,33 +1138,92 @@ + end - 3 + 4 - - + + + + + + 1 + 5 + 2 + 1 + 1 + + + 1 + 1 + 10 + + + + True + False + 16 + user-trash-symbolic + + + True + False + ubconfig-gui + 6 + + + True + False + + + True + False + Element 1 + + + + + True + False + Element 2 + + True False - center - center - vertical - + + True + False + Element 3 + - - 4 - - + + + Element 4 + True + False + image3 + False + + + + + True + False + 16 + object-select-symbolic True @@ -2163,7 +2251,6 @@ False - About False True center @@ -2196,8 +2283,31 @@ 0 + + + + + True + False + True + + + True + False + About UBLinux Settings Manager + + + + + - + + True + False + 32 + com.ublinux.ubl-settings-manager + 5 +