@ -136,7 +136,17 @@ void on_item_selection_changed(GtkIconView *IV, actionWidgets *widgets){
void on_ButtonOpenHelp_activated ( GtkWidget * button , GtkBuilder * builder ) {
void on_ButtonOpenHelp_activated ( GtkWidget * button , GtkBuilder * builder ) {
if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( gtk_builder_get_object ( builder , " AlwaysOpenHelpCheckbox " ) ) ) )
if ( gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( gtk_builder_get_object ( builder , " AlwaysOpenHelpCheckbox " ) ) ) )
{
{
if ( system ( " xdg-open http://ublinux.com " ) ) { } ;
# ifdef WEBKIT_FOUND
GtkBuilder * web_builder = gtk_builder_new_from_file ( GladePath ) ;
GtkWidget * browser = GTK_WIDGET ( gtk_builder_get_object ( web_builder , " Web_Window " ) ) ;
GtkWidget * web_place = GTK_WIDGET ( gtk_builder_get_object ( web_builder , " Web_Place " ) ) ;
GtkWidget * WebView = webkit_web_view_new ( ) ;
webkit_web_view_load_uri ( WEBKIT_WEB_VIEW ( WebView ) , UBLINUX_WIKI_LINK ) ;
gtk_box_pack_start ( GTK_BOX ( web_place ) , WebView , 1 , 1 , 0 ) ;
gtk_widget_show_all ( browser ) ;
# else
if ( system ( UBLINUX_WIKI_COMMAND ) ) { } ;
# endif
} else
} else
{
{
GtkWidget * window = GTK_WIDGET ( gtk_builder_get_object ( builder , " HelpSureWindow " ) ) ;
GtkWidget * window = GTK_WIDGET ( gtk_builder_get_object ( builder , " HelpSureWindow " ) ) ;
@ -159,7 +169,17 @@ void on_CancelHelpButton_activated(GtkWidget *button,GtkBuilder *builder){
} ;
} ;
void on_ReadHelpButton_activated ( GtkWidget * button , GtkBuilder * builder ) {
void on_ReadHelpButton_activated ( GtkWidget * button , GtkBuilder * builder ) {
if ( system ( " xdg-open http://ublinux.com " ) ) { } ;
# ifdef WEBKIT_FOUND
GtkBuilder * web_builder = gtk_builder_new_from_file ( GladePath ) ;
GtkWidget * browser = GTK_WIDGET ( gtk_builder_get_object ( web_builder , " Web_Window " ) ) ;
GtkWidget * web_place = GTK_WIDGET ( gtk_builder_get_object ( web_builder , " Web_Place " ) ) ;
GtkWidget * WebView = webkit_web_view_new ( ) ;
webkit_web_view_load_uri ( WEBKIT_WEB_VIEW ( WebView ) , UBLINUX_WIKI_LINK ) ;
gtk_box_pack_start ( GTK_BOX ( web_place ) , WebView , 1 , 1 , 0 ) ;
gtk_widget_show_all ( browser ) ;
# else
if ( system ( UBLINUX_WIKI_COMMAND ) ) { } ;
# endif
GtkWidget * window = GTK_WIDGET ( gtk_builder_get_object ( builder , " HelpSureWindow " ) ) ;
GtkWidget * window = GTK_WIDGET ( gtk_builder_get_object ( builder , " HelpSureWindow " ) ) ;
gtk_widget_hide ( window ) ;
gtk_widget_hide ( window ) ;
} ;
} ;
@ -280,7 +300,7 @@ void on_paned_move(GtkPaned* self, GtkScrollType* scroll_type, actionWidgets *wi
}
}
int on_settingsOpen ( GtkWidget * button , actionWidgets * widgets ) {
int on_settingsOpen ( GtkWidget * button , actionWidgets * widgets ) {
gtk_window_set_title ( GTK_WINDOW ( widgets - > SettingsWindow ) , " UBLinux Settings Manager " ) ;
gtk_window_set_title ( GTK_WINDOW ( widgets - > SettingsWindow ) , UBL_SETTINGS_MANAGER_TITLE ) ;
gtk_widget_set_size_request ( widgets - > SettingsWindow , 400 , 250 ) ;
gtk_widget_set_size_request ( widgets - > SettingsWindow , 400 , 250 ) ;
GtkIconTheme * icthm = gtk_icon_theme_get_default ( ) ;
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_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 ) ) ;
@ -636,13 +656,20 @@ void on_double_click_changed(GtkWidget *Switch, gboolean state, dictionary *widg
void on_about ( GtkWidget * button ) {
void on_about ( GtkWidget * button ) {
GtkBuilder * builder = gtk_builder_new_from_file ( GladePath ) ;
GtkBuilder * builder = gtk_builder_new_from_file ( GladePath ) ;
GtkWidget * AboutButtons = GTK_WIDGET ( gtk_builder_get_object ( builder , " AboutButtons " ) ) ;
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 " ) ) ;
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_comments ( GTK_ABOUT_DIALOG ( About ) , _ ( ABOUT_PROJECT_COMMENTS_LABEL ) ) ;
gtk_about_dialog_set_program_name ( GTK_ABOUT_DIALOG ( About ) , _ ( " UBLinux Settings Manager " ) ) ;
gtk_about_dialog_set_program_name ( GTK_ABOUT_DIALOG ( About ) , _ ( UBL_SETTINGS_MANAGER_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_about_dialog_set_version ( GTK_ABOUT_DIALOG ( About ) , version_application ) ;
gtk_widget_show ( About ) ;
gtk_widget_show ( About ) ;
gtk_about_dialog_set_website_label ( GTK_ABOUT_DIALOG ( About ) , _ ( " Project Home Page " ) ) ;
GList * list = gtk_container_get_children ( GTK_CONTAINER ( AboutButtons ) ) ;
gtk_widget_set_visible ( AboutButtons , 0 ) ;
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);
}
}
int launch ( thread_output * thread ) {
int launch ( thread_output * thread ) {
@ -896,16 +923,13 @@ int setup_config(){
GKeyFile * configfile = g_key_file_new ( ) ;
GKeyFile * configfile = g_key_file_new ( ) ;
char * pth = malloc ( 7 + strlen ( UserConfigPath ) + strlen ( getlogin ( ) ) ) ;
char * pth = malloc ( 7 + strlen ( UserConfigPath ) + strlen ( getlogin ( ) ) ) ;
sprintf ( pth , " %s%s%s " , " /home/ " , getlogin ( ) , UserConfigPath ) ;
sprintf ( pth , " %s%s%s " , " /home/ " , getlogin ( ) , UserConfigPath ) ;
g_key_file_load_from_file ( configfile , pth , G_KEY_FILE_KEEP_TRANSLATIONS , & err ) ;
g_key_file_load_from_file ( configfile , GlobalConfigPath , G_KEY_FILE_KEEP_TRANSLATIONS , & err ) ;
if ( err ) {
if ( err ) {
g_error_free ( err ) ;
g_error_free ( err ) ;
err = NULL ;
return 0 ;
g_key_file_load_from_file ( configfile , GlobalConfigPath , G_KEY_FILE_KEEP_TRANSLATIONS , & err ) ;
} else {
if ( err ) {
g_error_free ( err ) ;
return 0 ;
}
}
char * foroutput = NULL ;
char * foroutput = NULL ;
char * line = NULL ;
char * line = NULL ;
main_config . GnomeDoubleClick = g_key_file_get_boolean ( configfile , " window " , " GnomeDoubleClick " , NULL ) ;
main_config . GnomeDoubleClick = g_key_file_get_boolean ( configfile , " window " , " GnomeDoubleClick " , NULL ) ;
@ -924,6 +948,52 @@ int setup_config(){
main_config . lastUser = g_key_file_get_string ( configfile , " window " , " User " , NULL ) ;
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 . fullscreen = g_key_file_get_boolean ( configfile , " window " , " fullscreen " , NULL ) ;
main_config . BannerHidden = g_key_file_get_boolean ( configfile , " window " , " BannerHidden " , 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 ) {
if ( err )
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 . MainlabelSize = = 0 ) main_config . MainlabelSize = 12 ;
if ( main_config . labelDensity = = 0 ) main_config . labelDensity = 0 ;
if ( main_config . labelDensity = = 0 ) main_config . labelDensity = 0 ;
main_config . MainlabelSize = main_config . MainlabelSize * 1000 ;
main_config . MainlabelSize = main_config . MainlabelSize * 1000 ;
@ -959,6 +1029,8 @@ int setup_config(){
} ;
} ;
void save_config ( actionWidgets * widgets ) {
void save_config ( actionWidgets * widgets ) {
if ( main_config . lock_settings = = 1 )
return ;
GKeyFile * gfile = g_key_file_new ( ) ;
GKeyFile * gfile = g_key_file_new ( ) ;
int sz = 1 , szm = 1 ;
int sz = 1 , szm = 1 ;
@ -1008,6 +1080,8 @@ void save_config(actionWidgets *widgets){
}
}
g_key_file_set_boolean ( gfile , " window " , " fullscreen " , main_config . fullscreen ) ;
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 " , " 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 ) ;
sprintf ( fromint , " %d " , main_config . WindowTheme ) ;
g_key_file_set_string ( gfile , " window " , " WindowTheme " , fromint ) ;
g_key_file_set_string ( gfile , " window " , " WindowTheme " , fromint ) ;
sprintf ( fromint , " %d " , sz ) ;
sprintf ( fromint , " %d " , sz ) ;
@ -1023,7 +1097,8 @@ void save_config(actionWidgets *widgets){
sprintf ( fromint , " %d " , ( int ) ( ( float ) main_config . labelDensity / 1000 ) ) ;
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 " , " LabelDensity " , fromint ) ;
g_key_file_set_string ( gfile , " window " , " User " , login ) ;
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 ) {
char * yon_cut ( char * source , int size , int startpos ) {
@ -1057,7 +1132,7 @@ void yon_set_default_sections(dictionary *section){
yon_section_new ( section , " Personal " , " X-UBL-SettingsManager;X-UBL-PersonalSettings; " ) ;
yon_section_new ( section , " Personal " , " X-UBL-SettingsManager;X-UBL-PersonalSettings; " ) ;
yon_section_new ( section , " Hardware " , " X-UBL-SettingsManager;X-UBL-HardwareSettings; " ) ;
yon_section_new ( section , " Hardware " , " X-UBL-SettingsManager;X-UBL-HardwareSettings; " ) ;
yon_section_new ( section , " System " , " X-UBL-SettingsManager;X-UBL-SystemSettings; " ) ;
yon_section_new ( section , " System " , " X-UBL-SettingsManager;X-UBL-SystemSettings; " ) ;
yon_section_new ( section , " Misc " , " X-UBL-SettingsManager;X-UBL-MiscSettings; ") ;
yon_section_new ( section , " Misc " , " ") ;
}
}
IVGraphicals * yon_create_single_section_IV ( char * name , char * cats ) {
IVGraphicals * yon_create_single_section_IV ( char * name , char * cats ) {
@ -1635,9 +1710,10 @@ 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 - > 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 - > 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 - > 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 , " MenuItemAbout System " ) ) ) ;
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 - > 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 - > 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 ;
curWidgets - > SettingsSections = main_config . SettingsSections ;
if ( main_config . BannerHidden = = 0 ) {
if ( main_config . BannerHidden = = 0 ) {
gtk_revealer_set_reveal_child ( GTK_REVEALER ( curWidgets - > Revealer ) , 1 ) ;
gtk_revealer_set_reveal_child ( GTK_REVEALER ( curWidgets - > Revealer ) , 1 ) ;
@ -1649,8 +1725,8 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
gtk_style_context_add_class ( gtk_widget_get_style_context ( curWidgets - > icvpack ) , " iconview " ) ;
gtk_style_context_add_class ( gtk_widget_get_style_context ( curWidgets - > icvpack ) , " iconview " ) ;
curWidgets - > socket = GTK_WIDGET ( create_socket ( curWidgets ) ) ;
curWidgets - > socket = GTK_WIDGET ( create_socket ( curWidgets ) ) ;
if ( curWidgets - > ButtonBackToMain ! = NULL )
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_LABEL ) ;
gtk_window_set_title ( GTK_WINDOW ( curWidgets - > window ) , _ ( " UBLinux Settings Manager " ) ) ;
gtk_window_set_title ( GTK_WINDOW ( curWidgets - > window ) , UBL_SETTINGS_MANAGER_TITLE ) ;
if ( curWidgets - > GnomePaned ! = NULL ) {
if ( curWidgets - > GnomePaned ! = NULL ) {
gtk_paned_set_position ( GTK_PANED ( curWidgets - > GnomePaned ) , main_config . iconSegmentSize ) ;
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 ) ;
g_signal_connect ( G_OBJECT ( curWidgets - > GnomePaned ) , " notify::position " , G_CALLBACK ( on_paned_move ) , curWidgets ) ;
@ -1663,7 +1739,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
// }
// }
if ( curWidgets - > ButtonBackToMain ! = NULL )
if ( curWidgets - > ButtonBackToMain ! = NULL )
g_signal_connect ( G_OBJECT ( curWidgets - > ButtonBackToMain ) , " clicked " , G_CALLBACK ( on_backToSettingsButton_clicked ) , curWidgets ) ;
g_signal_connect ( G_OBJECT ( curWidgets - > ButtonBackToMain ) , " clicked " , G_CALLBACK ( on_backToSettingsButton_clicked ) , curWidgets ) ;
gtk_window_set_title ( GTK_WINDOW ( curWidgets - > window ) , _ ( " UBLinux Settings Manager " ) ) ;
gtk_window_set_title ( GTK_WINDOW ( curWidgets - > window ) , UBL_SETTINGS_MANAGER_TITLE ) ;
gtk_window_move ( GTK_WINDOW ( curWidgets - > window ) , main_config . windowPosX , main_config . windowPosY ) ;
gtk_window_move ( GTK_WINDOW ( curWidgets - > window ) , main_config . windowPosX , main_config . windowPosY ) ;
// Standard for all themes
// Standard for all themes
@ -1705,9 +1781,10 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
gtk_window_resize ( GTK_WINDOW ( curWidgets - > window ) , main_config . windowWidth , main_config . windowHeight ) ;
gtk_window_resize ( GTK_WINDOW ( curWidgets - > window ) , main_config . windowWidth , main_config . windowHeight ) ;
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 - > 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 ) ) ;
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 - > MenuItemDocumentation ) , " activate " , G_CALLBACK ( on_ ButtonOpenHelp_activated ) , curWidgets - > builder ) ; //on_ButtonOpenHelp_activated
g_signal_connect ( G_OBJECT ( curWidgets - > MenuItemSettings ) , " activate " , G_CALLBACK ( on_settingsOpen ) , curWidgets ) ;
g_signal_connect ( G_OBJECT ( curWidgets - > MenuItemSettings ) , " activate " , G_CALLBACK ( on_settingsOpen ) , curWidgets ) ;
g_signal_connect ( G_OBJECT ( curWidgets - > BannerRevealer ) , " clicked " , G_CALLBACK ( on_reveal_banner ) , curWidgets ) ;
g_signal_connect ( G_OBJECT ( curWidgets - > BannerRevealer ) , " clicked " , G_CALLBACK ( on_reveal_banner ) , curWidgets ) ;
g_signal_connect ( G_OBJECT ( curWidgets - > MenuItemAboutSystem ) , " activate " , G_CALLBACK ( on_about ) , curWidgets - > builder ) ;
if ( gnld = = 0 ) {
if ( gnld = = 0 ) {
gnld = 1 ;
gnld = 1 ;
@ -1727,28 +1804,29 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
}
}
gtk_widget_hide_on_delete ( curWidgets - > window ) ;
gtk_widget_hide_on_delete ( curWidgets - > window ) ;
g_signal_connect ( G_OBJECT ( curWidgets - > window ) , " destroy " , G_CALLBACK ( yon_main_quit ) , curWidgets ) ;
g_signal_connect ( G_OBJECT ( curWidgets - > window ) , " destroy " , G_CALLBACK ( yon_main_quit ) , curWidgets ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " MainHeaderNameLabel " ) ) , _ ( " UBLinux Settings Manager " ) ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " MainHeaderNameLabel " ) ) , UBL_SETTINGS_MANAGER_TITLE ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " sectionsHeaderNameLabel " ) ) , _ ( " UBLinux Settings Manager " ) ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " sectionsHeaderNameLabel " ) ) , UBL_SETTINGS_MANAGER_TITLE ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " GnomeHeaderNameLabel " ) ) , _ ( " UBLinux Settings Manager " ) ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " GnomeHeaderNameLabel " ) ) , UBL_SETTINGS_MANAGER_TITLE ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " UBLinux Settings " ) ) , _ ( " UBLinux Settings Manager " ) ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " settingsHeaderNameLabel " ) ) , UBL_SETTINGS_MANAGER_TITLE ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " webHeaderNameLabel " ) ) , _ ( " UBLinux Settings Manager " ) ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " webHeaderNameLabel " ) ) , UBL_SETTINGS_MANAGER_TITLE ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " warningHeaderNameLabel " ) ) , _ ( " UBLinux Settings Manager " ) ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " warningHeaderNameLabel " ) ) , UBL_SETTINGS_MANAGER_TITLE ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " LoaderHeaderNameLabel " ) ) , _ ( " UBLinux Settings Manager " ) ) ;
gtk_label_set_text ( GTK_LABEL ( gtk_builder_get_object ( builder , " LoaderHeaderNameLabel " ) ) , UBL_SETTINGS_MANAGER_TITLE ) ;
gtk_label_set_text ( GTK_LABEL ( curWidgets - > settingsSubmenuLabelSize ) , _ ( " Icon size " ) ) ;
gtk_label_set_text ( GTK_LABEL ( curWidgets - > settingsSubmenuLabelSize ) , ICON_SIZE_LABEL ) ;
gtk_label_set_text ( GTK_LABEL ( curWidgets - > settingsSubmenuLabelTheme ) , _ ( " Window theme " ) ) ;
gtk_label_set_text ( GTK_LABEL ( curWidgets - > settingsSubmenuLabelTheme ) , WINDOW_THEME_LABEL ) ;
gtk_label_set_text ( GTK_LABEL ( curWidgets - > helpHeader ) , _ ( " Would you like to read documentation in the Web? " ) ) ;
gtk_label_set_text ( GTK_LABEL ( curWidgets - > helpHeader ) , REDIRECTION_LABEL ) ;
gtk_label_set_text ( GTK_LABEL ( curWidgets - > helpText ) , _ ( " You will be redirected to documentation site, where user help pages are translated and supported by community. " ) ) ;
gtk_label_set_text ( GTK_LABEL ( curWidgets - > helpText ) , REDIRECTION_COMMENT_LABEL ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > ReadHelpButton ) , _ ( " Read online " ) ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > ReadHelpButton ) , READ_ONLINE_LABEL ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > CancelHelpButton ) , _ ( " Cancel " ) ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > CancelHelpButton ) , CANCEL_LABEL ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > settingsCancel ) , _ ( " Close " ) ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > settingsCancel ) , CLOSE_LABEL ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > settingsAccept ) , _ ( " Save and apply " ) ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > settingsAccept ) , SAVE_AND_APPLY_LABEL ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > SectionSettingsSaveButton ) , _ ( " Apply " ) ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > SectionSettingsSaveButton ) , APPLY_LABEL ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > AlwaysOpenDocumentation ) , _ ( " Always redirect " ) ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > AlwaysOpenDocumentation ) , ALWAYS_REDIRECT_LABEL ) ;
gtk_menu_item_set_label ( GTK_MENU_ITEM ( curWidgets - > MenuItemSettings ) , _ ( " Settings " ) ) ;
gtk_menu_item_set_label ( GTK_MENU_ITEM ( curWidgets - > MenuItemSettings ) , SETTINGS_LABEL ) ;
gtk_menu_item_set_label ( GTK_MENU_ITEM ( curWidgets - > MenuItemDocumentation ) , _ ( " About... " ) ) ;
gtk_menu_item_set_label ( GTK_MENU_ITEM ( curWidgets - > MenuItemDocumentation ) , DOCUMENTATION_LABEL ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > CautionUnderstandButton ) , _ ( " Understood " ) ) ;
gtk_menu_item_set_label ( GTK_MENU_ITEM ( curWidgets - > MenuItemAboutSystem ) , ABOUT_LABEL ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > settingsSectionsSettingsButton ) , _ ( " Sections management " ) ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > CautionUnderstandButton ) , UNDERSTOOD_LABEL ) ;
gtk_label_set_text ( GTK_LABEL ( curWidgets - > settingsDoubleClickLabel ) , _ ( " Double click selection " ) ) ;
gtk_button_set_label ( GTK_BUTTON ( curWidgets - > settingsSectionsSettingsButton ) , SECTIONS_MANAGEMENT_LABEL ) ;
gtk_label_set_text ( GTK_LABEL ( curWidgets - > settingsDoubleClickLabel ) , DOUBLE_CLICK_SELECTION_LABEL ) ;
return widgets ;
return widgets ;
}
}
@ -1777,7 +1855,7 @@ int main(int argc, char *argv[]){
}
}
gtk_init ( & argc , & argv ) ;
gtk_init ( & argc , & argv ) ;
if ( setup_config ( ) = = 0 ) {
if ( setup_config ( ) = = 0 ) {
printf ( " Ошибка загрузки конфига! \n " ) ;
printf ( CONFIG_LOAD_ERROR ) ;
return - 1 ;
return - 1 ;
}
}
actionWidgets * widget = NULL ;
actionWidgets * widget = NULL ;