diff --git a/resolutions.csv b/resolutions.csv index bff0b8e..8de3633 100644 --- a/resolutions.csv +++ b/resolutions.csv @@ -1,27 +1,27 @@ -640x480 ,4:3,VGA -800x480 ,5:3,WVGA -800x600 ,4:3,SVGA -854x480 ,16:9,FWVGA -960x540 ,19:9,qHD -1024x600,128:75,WSVGA -1024x768,4:3,XGA -1152x864,4:3,XGA+ -1200x600,2:1,WXVGA -1280x720,16:9,HD -1280x768,5:3,WSGA -1280x1024,5:4,SXGA -1440x900,16:10,WXGA+ -1400x1050,4:3,SXGA+ -1440x1080,4:3,HDV 1080 -1536x960,16:10,XJXGA -1536x1024,3:2,WSXGA -1600x900,16:9,HD+ -1600x1024,25:16,WSXGA -1600x1200,4:3,UXGA -1680x1050,16:10,WSXGA+ -1920x1080,16:9,FHD -1920x1200,16:10,WUXGA -2048x1080,19:10,2K DCI -2048x1152,16:9,QWXGA -2560x1080,21:9,UWHD -2560x1440,16:9,QHD +640x480 ;4:3;VGA +800x480 ;5:3;WVGA +800x600 ;4:3;SVGA +854x480 ;16:9;FWVGA +960x540 ;19:9;qHD +1024x600;128:75;WSVGA +1024x768;4:3;XGA +1152x864;4:3;XGA+ +1200x600;2:1;WXVGA +1280x720;16:9;HD +1280x768;5:3;WSGA +1280x1024;5:4;SXGA +1440x900;16:10;WXGA+ +1400x1050;4:3;SXGA+ +1440x1080;4:3;HDV 1080 +1536x960;16:10;XJXGA +1536x1024;3:2;WSXGA +1600x900;16:9;HD+ +1600x1024;25:16;WSXGA +1600x1200;4:3;UXGA +1680x1050;16:10;WSXGA+ +1920x1080;16:9;FHD +1920x1200;16:10;WUXGA +2048x1080;19:10;2K DCI +2048x1152;16:9;,QWXGA +2560x1080;21:9;UWHD +2560x1440;16:9;QHD diff --git a/source/ubl-settings-video-strings.h b/source/ubl-settings-video-strings.h index a1bef55..3693de7 100644 --- a/source/ubl-settings-video-strings.h +++ b/source/ubl-settings-video-strings.h @@ -1,3 +1,5 @@ +#define VERSION_LABEL yon_char_unite(_("Version:")," ",version_application,"\n",NULL) +#define HELP_LABEL yon_char_unite(_("ubl-settings-video version:")," ", version_application,"\n",_("Video adapter and display settings"),"\n",_("Usage:"), " ubl-settings-video ",_("[OPTIONS]"),"\n",_("Options:"),"\n\t--help, -h\t\t\t",_("Show this help"),"\n\t--version, -V\t\t\t",_("Show package version"),"\n\t--lock-help\t\t\t",_("Lock this help menu"),"\n\t--lock-save\t\t\t",_("Lock configration saving"),"\n\t--lock-save-local\t\t",_("Lock local configration saving"),"\n\t--lock-save-global\t\t",_("Lock global configration saving"),"\n\t--lock-load-global\t\t",_("Lock global configration loading"),"\n",NULL) #define PARAMETER_DEFAULT_LABEL _("Default settings") #define MONITOR_LABEL _("Monitor ") #define SETTINGS_VIDEO_TITLE_LABEL _("Video adapter and display settings") @@ -47,7 +49,7 @@ #define DISCRETE_ONLY_LABEL _("discrete video only (AMD/ATI)") #define LOAD_GLOBAL_LABEL _("Load from global configuration") #define LOAD_LOCAL_LABEL _("Load from local configuration") -#define SAVE_GLOBAL_LOCAL_LABEL _("Save to global an local configuration") +#define SAVE_GLOBAL_LOCAL_LABEL _("Save configuration") #define SAVE_GLOBAL_LABEL _("Save to global configuration") #define SAVE_LOCAL_LABEL _("Save to local configuration") #define DOCUMENTATION_LABEL _("Documentation") diff --git a/source/ubl-settings-video.c b/source/ubl-settings-video.c index 3108062..39ebfee 100644 --- a/source/ubl-settings-video.c +++ b/source/ubl-settings-video.c @@ -53,7 +53,7 @@ void on_monitor_config_save(GtkWidget *self, monitor_edit_window *window){ } if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->templateMonitorConfigurationResolutionCombo))!=0) { - config->resolution = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->templateMonitorConfigurationResolutionCombo)); + config->resolution =yon_char_divide_search((char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->templateMonitorConfigurationResolutionCombo)),";",-1); int rotation = gtk_combo_box_get_active(GTK_COMBO_BOX(window->templateMonitorConfigurationRotationCombo)); if (rotation==1) config->rotation=rotation; else if (rotation==2) config->rotation=rotation; @@ -72,8 +72,6 @@ void on_monitor_config_save(GtkWidget *self, monitor_edit_window *window){ } void on_terminal_done(GtkWidget *terminal, int size, widgets_dict *widgets){ - char *text=vte_terminal_get_text_range(VTE_TERMINAL(terminal),0,0,0,10,NULL,NULL,NULL); - printf("\"%s\"\n",text); gtk_widget_destroy(terminal); } @@ -100,7 +98,6 @@ static void child_ready(VteTerminal *terminal, GPid pid, GError *error, gpointer void on_terminal_check_progress(VteTerminal *terminal, widgets_dict *widgets){ char *text = vte_terminal_get_text(terminal,NULL,NULL,NULL); - // printf("%d - %s\n",rows, text); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->TerminalInfoLabel),(double)yon_char_find_count(text,"::")/4); } @@ -377,11 +374,9 @@ void on_configuration_save_local(GtkWidget *self, widgets_dict *widgets) str=yon_configuration_get_save_command(save_drivers_local_command); delstr=yon_configuration_get_remove_command(remove_drivers_local_command); if (delstr){ - printf("%s\n\n",delstr); yon_config_save(delstr); } if (str){ - printf("%s\n\n",str); yon_config_save(str); videoconfig.status_render.text_to_render=LOCAL_SAVE_SUCCESS; @@ -403,21 +398,21 @@ void on_configuration_save_local_global(GtkWidget *self, widgets_dict *widgets) void on_configuration_save_global(GtkWidget *self, widgets_dict *widgets) { - videoconfig.status_render.text_to_render=GLOBAL_SAVE_SUCCESS; - videoconfig.status_render.type=BACKGROUND_IMAGE_SUCCESS_TYPE; - yon_ubl_status_box_render(&videoconfig.status_render); yon_update_config(widgets); - char *str = NULL; - if (videoconfig.failsafenVidia) - str = yon_char_get_augumented(save_drivers_global_command, yon_char_get_augumented(" ", videoconfig.failsafenVidia)); - if (videoconfig.failsafeATI) - str = yon_char_get_augumented(str, yon_char_get_augumented(" ", videoconfig.failsafeATI)); - if (videoconfig.optirun) - str = yon_char_get_augumented(str, yon_char_get_augumented(" ", videoconfig.optirun)); - if (videoconfig.primusrun) - str = yon_char_get_augumented(str, yon_char_get_augumented(" ", videoconfig.primusrun)); - // printf(str); - yon_config_save(str); + char *str=NULL; + char *delstr=NULL; + str=yon_configuration_get_save_command(save_drivers_global_command); + delstr=yon_configuration_get_remove_command(remove_drivers_global_command); + if (delstr){ + yon_config_save(delstr); + } + if (str){ + yon_config_save(str); + + videoconfig.status_render.text_to_render=LOCAL_SAVE_SUCCESS; + videoconfig.status_render.type=BACKGROUND_IMAGE_SUCCESS_TYPE; + yon_ubl_status_box_render(&videoconfig.status_render); + } } void yon_update_config(widgets_dict *widgets) @@ -430,38 +425,17 @@ void yon_update_config(widgets_dict *widgets) void on_configuration_load_local(GtkWidget *self, widgets_dict *widgets) { - videoconfig.status_render.text_to_render=LOCAL_LOAD_SUCCESS; - videoconfig.status_render.type=BACKGROUND_IMAGE_SUCCESS_TYPE; - yon_ubl_status_box_render(&videoconfig.status_render); - char *command = load_drivers_local_command; - dictionary *dct; - for_dictionaries(dct, videoconfig.monitors) - { - command = yon_char_get_augumented(command, (yon_char_get_augumented(" XORG_MONITOR[", yon_char_get_augumented(((monitorconfig *)dct->data)->port, "]")))); - } - int size = 0; - char **rtn = yon_ubl_load_global_config(command, &size); - char *param = NULL; - // yon_config_init(rtn, size); + yon_setup_config(load_drivers_local_command); on_config_fill_interface(widgets); + yon_monitor_view_setup(widgets->mainMonitorVisualConfigurationBox); } void on_configuration_load_global(GtkWidget *self, widgets_dict *widgets) { - videoconfig.status_render.text_to_render=GLOBAL_LOAD_SUCCESS; - videoconfig.status_render.type=BACKGROUND_IMAGE_SUCCESS_TYPE; - yon_ubl_status_box_render(&videoconfig.status_render); - char *command = load_drivers_global_command; - dictionary *dct; - for_dictionaries(dct, videoconfig.monitors) - { - command = yon_char_get_augumented(command, (yon_char_get_augumented(" XORG_MONITOR[", yon_char_get_augumented(((monitorconfig *)dct->data)->port, "]")))); - } - int size = 0; - char **rtn = yon_ubl_load_global_config(command, &size); - char *param = NULL; - // yon_config_init(rtn, size); + + yon_setup_config(load_drivers_global_command); on_config_fill_interface(widgets); + yon_monitor_view_setup(widgets->mainMonitorVisualConfigurationBox); } /**void on_monitor_delete(GtkWidget *self,monitor_view windowd) @@ -500,22 +474,6 @@ void on_monitor_add(GtkWidget *self,monitor_window *window){ } } -// void on_monitor_string_edit(GtkWidget *self,monitor_edit_window *monitor){ -// int size=0; -// config_str rtn = yon_char_parse((char*)gtk_entry_get_text(GTK_ENTRY(monitor->templateMonitorConfigurationParameterLineEntry)),&size,","); -// if (yon_char_parsed_check_exist(rtn,size,"enable")!=-1) GTK_CHECK_BUTTON(monitor->templateMonitorConfigurationEnableCheck)); -// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_COMBO_BOX_TEXT(monitor->templateMonitorConfigurationResolutionCombo)); -// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_COMBO_BOX_TEXT(monitor->templateMonitorConfigurationFrequencyCombo)); -// if (yon_char_parsed_check_exist(rtn,size,"rotate")!=-1) GTK_COMBO_BOX_TEXT(monitor->templateMonitorConfigurationRotationCombo)); -// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_COMBO_BOX_TEXT(monitor->templateMonitorConfigurationPositionPosCombo)); -// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_COMBO_BOX_TEXT(monitor->templateMonitorConfigurationPositionPortCombo)); -// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_CHECK_BUTTON(monitor->templateMonitorConfigurationDoNotSwitchOffCheck)); -// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_CHECK_BUTTON(monitor->templateMonitorConfigurationModelineCVTCheck)); -// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_CHECK_BUTTON(monitor->templateMonitorConfigurationUseCVTReducedCheck)); -// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_CHECK_BUTTON(monitor->templateMonitorConfigurationModelineGTFCheck)); -// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_CHECK_BUTTON(monitor->templateMonitorConfigurationMainCheck)); -// } - void on_monitor_configure(GtkWidget *self,monitor_window *window){ if(window&&window->config){ monitor_edit_window *monitors = new(monitor_edit_window); @@ -635,7 +593,10 @@ void yon_monitor_window_update(monitor_edit_window *window){ found=0; gtk_combo_box_set_active(GTK_COMBO_BOX(window->templateMonitorConfigurationPortCombo),found); gtk_combo_box_set_active(GTK_COMBO_BOX(window->templateMonitorConfigurationResolutionCombo),found); - + gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(window->templateMonitorConfigurationFrequencyCombo)); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window->templateMonitorConfigurationFrequencyCombo),PARAMETER_DEFAULT_LABEL); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window->templateMonitorConfigurationFrequencyCombo),"60"); + gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window->templateMonitorConfigurationFrequencyCombo),"75"); found = yon_gtk_combo_box_text_find(window->templateMonitorConfigurationPositionPortCombo, yon_dictionary_get_data(window->config,monitorconfig*)->position_port); if (found==-1) found=0; @@ -722,7 +683,7 @@ void yon_monitor_view_update(){ else if (params->stringparameters){ int size=0; config_str rtn=yon_char_parse(params->stringparameters,&size,","); - char *res=yon_char_parsed_get_resolution(rtn,size); + char *res=yon_char_divide_search(yon_char_new(yon_char_parsed_get_resolution(rtn,size))," ",-1); if (res&&strcmp(res,"")!=0) gtk_label_set_text(GTK_LABEL(monitor->templateMonitorInfoResolutionLabel),res); else @@ -913,7 +874,7 @@ void on_config_fill_interface(widgets_dict *widgets) str = videoconfig.failsafenVidia; gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(widgets->mainDriverFailsafeNvidiaCombo), DONT_USE_LABEL); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(widgets->mainDriverFailsafeNvidiaCombo), FBDEV_LABEL); - if (str&&videoconfig.autoChooseDrivers==0) + if (str) { gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->mainDriverFailsafeNvidiaCombo), 1); } @@ -924,7 +885,7 @@ void on_config_fill_interface(widgets_dict *widgets) str = videoconfig.failsafeATI; gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(widgets->mainDriverFailsafeAMDCombo), DONT_USE_LABEL); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(widgets->mainDriverFailsafeAMDCombo), FBDEV_LABEL); - if (str&&videoconfig.autoChooseDrivers==0) + if (str) { gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->mainDriverFailsafeAMDCombo), 1); } @@ -933,6 +894,8 @@ void on_config_fill_interface(widgets_dict *widgets) if (videoconfig.autoChooseDrivers==1){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->mainDriverAutomaticallyChooseCheck),1); } + else + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->mainDriverAutomaticallyChooseCheck),0); dictionary *dict = NULL; } @@ -950,9 +913,9 @@ dictionary *yon_proprieary_get(){ for (int i=0;idata,&size,":"); + config_str str = yon_char_parse((char*)dict->data,&size,";"); gtk_list_store_append(list,&iter); gtk_list_store_set(list,&iter,1,str[0],2,str[1],3,str[2],4,str[3],-1); if (strstr(dict->key," installed")) @@ -989,13 +952,41 @@ char *yon_char_remove_brackets(char* source){ return NULL; } +void yon_monitor_view_dictionary_destroy(void *window){ + monitor_window *monitor=(monitor_window*)window; + gtk_widget_destroy(monitor->templateMonitorscreenOverlay); +} + /**void yon_setup_config(char *configcommand) * [EN] */ void yon_setup_config(char *configcommand) { + videoconfig.monitors=NULL; + if(videoconfig.monitor_visuals) + yon_dictionary_free_all(videoconfig.monitor_visuals,yon_monitor_view_dictionary_destroy); + videoconfig.monitor_visuals=NULL; + videoconfig.autoChooseDrivers=0; + videoconfig.configsize=0; + videoconfig.descreteOnly=0; + videoconfig.failsafeATI=NULL; + videoconfig.failsafenVidia=NULL; + videoconfig.gapfix=0; + videoconfig.loaded_config=NULL; + if(videoconfig.optirun) + free(videoconfig.optirun); + videoconfig.optirun=NULL; + if (videoconfig.primusrun) + free(videoconfig.primusrun); + videoconfig.primusrun=NULL; + if (videoconfig.ports) + for (int i=0;iInformationCompanyLogoImage); } } + /** void yon_setup_widgets(widgets_dict *widgets) * [EN] * Sets up every element on main window @@ -1345,6 +1337,10 @@ void yon_setup_widgets(widgets_dict *widgets) widgets->templateMonitorConfigurationDoNotSwitchOffLabel = yon_gtk_builder_get_widget(widgets->builder, "templateMonitorConfigurationDoNotSwitchOffLabel"); widgets->templateMonitorConfigurationDoNotSwitchOffCheck = yon_gtk_builder_get_widget(widgets->builder, "templateMonitorConfigurationDoNotSwitchOffCheck"); + widgets->PlugBox = yon_gtk_builder_get_widget(widgets->builder, "mainPlugBox"); + widgets->PlugSaveBox = yon_gtk_builder_get_widget(widgets->builder, "plugLoadButton"); + widgets->PlugLoadBox = yon_gtk_builder_get_widget(widgets->builder, "plugSaveButton"); + widgets->proprietaryTreeView = yon_gtk_builder_get_widget(widgets->builder, "proprietaryTreeView"); widgets->proprietaryInfoButton = yon_gtk_builder_get_widget(widgets->builder, "proprietaryInfoButton"); widgets->proprietaryDeleteButton = yon_gtk_builder_get_widget(widgets->builder, "proprietaryDeleteButton"); @@ -1466,35 +1462,120 @@ void yon_setup_widgets(widgets_dict *widgets) videoconfig.status_render.icon=widgets->mainStatusIcon; videoconfig.status_render.label=widgets->mainStatusLabel; videoconfig.status_render.box=widgets->mainStatusBox; + if (videoconfig.lock_load_global==1) + gtk_widget_set_sensitive(widgets->mainHeaderLoadGlobalMenuItem,0); + if (videoconfig.lock_save_global==1) + gtk_widget_set_sensitive(widgets->mainHeaderSaveGlobalMenuItem,0); + if (videoconfig.lock_save_local==1) + gtk_widget_set_sensitive(widgets->mainHeaderSaveLocalMenuItem,0); + if (videoconfig.lock_save_global==1||videoconfig.lock_save_local==1) + gtk_widget_set_sensitive(widgets->mainHeaderSaveGlobalLocalMenuItem,0); } int main(int argc, char *argv[]) { - - local = setlocale(LC_ALL, ""); - textdomain(LocaleName); - gtk_init(&argc, &argv); - - GError error; - yon_setup_config(load_drivers_local_command); - widgets_dict widgets; - yon_setup_widgets(&widgets); - yon_gtk_list_store_fill_with_proprietaries(videoconfig.list); - yon_gtk_list_store_fill_with_proprietaries(videoconfig.modulelist); - gtk_widget_show(widgets.MainWindow); - // yon_fill_ui(&widgets); + { + int show_help=0; + videoconfig.socket_id=-1; + videoconfig.save_socket_id=-1; + videoconfig.load_socket_id=-1; + videoconfig.lock_help=-1; + videoconfig.lock_load_global=-1; + videoconfig.lock_save_global=-1; + videoconfig.lock_save_local=-1; + local = setlocale(LC_ALL, ""); + textdomain(LocaleName); + int option_index=0; + struct option long_options[] = { + {"help", 0, 0, 'h'}, + {"version", 0, 0, 'V'}, + {"lock-help", 0,0, 1}, + // {"lock-settings", 0,0, -16}, + {"lock-save", 0,0, 2}, + {"lock-save-local", 0,0, 3}, + {"lock-save-global", 0,0, 4}, + {"lock-load-global", 0,0, 5}, + {"socket-id", 1, 0, 's'}, + {"socket-ext-id", 1,0, 'e'}, + {"socket-trd-id", 1,0, 't'}, + { NULL, 0, NULL, 0 } + }; + for (int i=0;i #include #include +#include +#include #include "ubl-utils.h" #include "ubl-settings-video-strings.h" #ifndef UBL_SETINGS_VIDEO_H @@ -33,7 +35,7 @@ #define get_resolutions_command "xrandr |grep -noP \"\\d+x+\\d+\"" #define get_resolution_ports_command "xrandr |grep -nwP \"connected\" |grep -oE \"[0-9a-zA-Z:]{1,10} connected\" |grep -oE \"[0-9a-zA-Z:]{1,10} \"" -#define get_proprietary_drivers_info_command "cut -d: -f2- /usr/share/ubl-settings-video/csv/video-drivers.csv | grep -E \"-\"" +#define get_proprietary_drivers_info_command "cut -d';' -f2- /usr/share/ubl-settings-video/csv/video-drivers.csv | grep -E \"-\"" #define get_resolutions_supportable_command "cut -d, -f1- /usr/share/ubl-settings-video/csv/resolutions.csv |sed 's/,/ /g'" @@ -43,15 +45,15 @@ #define load_drivers_global_command "/usr/bin/ubconfig --default --source global get video FAILSAFENVIDIA FAILSAFEATI OPTIRUN PRIMUSRUN VGADRV_AUTO " -#define save_drivers_global_command "/usr/bin/ubconfig --target global set video " +#define save_drivers_global_command "pkexec /usr/bin/ubconfig --target global --noexecute set video " #define load_drivers_local_command "/usr/bin/ubconfig --default --source system get video FAILSAFENVIDIA FAILSAFEATI OPTIRUN PRIMUSRUN VGADRV_AUTO " -#define save_drivers_local_command "pkexec /usr/bin/ubconfig --target system set video " +#define save_drivers_local_command "pkexec /usr/bin/ubconfig --target system --noexecute set video " -#define remove_drivers_global_command "/usr/bin/ubconfig --target system remove video " +#define remove_drivers_global_command "/usr/bin/ubconfig --target system remove --noexecute video " -#define remove_drivers_local_command "/usr/bin/ubconfig --target system remove video " +#define remove_drivers_local_command "/usr/bin/ubconfig --target system remove --noexecute video " #define install_proprietary_command "pkexec pacman --quiet --needed --noconfirm -Sy " @@ -63,7 +65,7 @@ #define get_proprietary_drivers_command "LC_ALL=C pacman -Ss ubm-nvidia-.* |grep -oE \"[a-zA-Z-]{1,}-nvidia-[a-zA-Z0-9-]{1,}|installed\"|sed ':a;N;$!ba;s/\\ninstalled/ installed/g'" -#define get_proprietary_drivers_command "LC_ALL=C pacman -Ss ubm-nvidia-.* |grep -oE \"[a-zA-Z-]{1,}nvidia-[a-zA-Z0-9-]{1,}|installed\"|sed ':a;N;$!ba;s/\\ninstalled/ installed/g'" +// #define get_proprietary_drivers_command "LC_ALL=C pacman -Ss ubm-nvidia-.* |grep -oE \"[a-zA-Z-]{1,}nvidia-[a-zA-Z0-9-]{1,}|installed\"|sed ':a;N;$!ba;s/\\ninstalled/ installed/g'" #define get_adapter_info "lshw -c display -quiet |grep -oE \"vendor:[0-9a-zA-Z ]{1,}|description:[0-9a-zA-Z ]{1,}|product:[]0-9a-zA-Z [-]{1,}\"|sed 's/: /=/g';lspci | grep -E ' VGA | Display ' | cut -d\" \" -f 1 | xargs -i lspci -v -s {} |grep -oE \"Kernel[:a-zA-Z0-9: ]{1,}\"|sed 's/: /=/g'|sed 's/ /_/g'" @@ -105,7 +107,6 @@ typedef struct proprietary_config proprietary; dictionary *supported_resolutions; GtkListStore *list; - GtkListStore *modulelist; char *failsafenVidia; char *failsafeATI; int descreteOnly; @@ -117,6 +118,14 @@ typedef struct config_str resolutions; int resolutionssize; render_data status_render; + + int socket_id; + int save_socket_id; + int load_socket_id; + int lock_save_local; + int lock_save_global; + int lock_load_global; + int lock_help; } config; typedef struct @@ -256,6 +265,11 @@ typedef struct GtkWidget *TerminalMoreButton; GtkWidget *TerminalScroll; GtkWidget *TerminalMoreRevieler; + + + GtkWidget *PlugBox; + GtkWidget *PlugSaveBox; + GtkWidget *PlugLoadBox; } widgets_dict; typedef struct @@ -342,4 +356,6 @@ char *yon_monitor_make_string(monitorconfig* config); void yon_launch_with_output(char *command); dictionary *yon_proprieary_get(); void yon_gtk_list_store_fill_with_proprietaries(GtkListStore *list); +void yon_setup_config(char *configcommand); +void yon_monitor_view_setup(GtkWidget *container); #endif \ No newline at end of file diff --git a/source/ubl-utils.c b/source/ubl-utils.c index 5784a10..866c980 100644 --- a/source/ubl-utils.c +++ b/source/ubl-utils.c @@ -232,6 +232,24 @@ dictionary *yon_dictionary_create_with_data(char *key, void *data) return dct; } +/** void *yon_dictionary_free_all(dictionary *dictionary,void *data_manipulation) + * [EN] + * Frees whole [dictionary] and activates [data_manipulation] function if not NULL with [dictionary]->data argument for each dictionary. + * [RU] + * Освобождает память для всех элементов словаря [dictionary] и активирует функцию [data_manipulation], если она была передана, с аргументом [dictionary]->data на каждый элемент словаря. +*/ +void *yon_dictionary_free_all(dictionary *dictionary_to_free,void (*data_manipulation)(void*)){ + dictionary *dict=NULL; + for_dictionaries(dict,dictionary_to_free){ + if(data_manipulation) + data_manipulation(dict->data); + if(dict->prev) + free(dict->prev); + } + free(dict); + return NULL; +} + dictionary *yon_dictionary_create_with_data_connected(dictionary *dict, char *key, void *data) { dictionary *dct = yon_dictionary_create_conneced(dict); @@ -781,8 +799,61 @@ int yon_launch(thread_output *thread) // Gtk functions + #ifdef __GTK_H__ +#ifdef VTE_TERMINAL + +/** + * void yon_terminal_integrated_launch(GtkWidget *place_to_show, void *endwork_function, void* endwork_function_argument) + * [EN] + * launches terminal with specific [command], + * terminal is shown in [place_to_show] container, + * after terminal done its work [endwork_function] is called with [endwork_function_argument] argument. + * [RU] + * Запускает терминал с командой [command], + * терминал добавляется в контейнер [place_to_show] виджета, + * после завершения работы терминала вызывается функция [endwork_function] с аргументом [endwork_function_argument]. +*/ +void yon_terminal_integrated_launch(GtkWidget *place_to_show, char* command, void *endwork_function, void* endwork_function_argument){ + GtkWidget *terminal = vte_terminal_new(); + vte_terminal_set_size(VTE_TERMINAL(terminal),10,15); + VtePty *pty = vte_pty_new_sync(VTE_PTY_DEFAULT,NULL,NULL); + vte_terminal_set_pty(VTE_TERMINAL(terminal),pty); + char *install_command=yon_char_unite("tput cup 0 0 && tput ed; ",command," ; sleep 5;exit 0","\n",NULL); + g_signal_connect(G_OBJECT(terminal), "child-exited", G_CALLBACK(on_terminal_done), widgets); + vte_terminal_spawn_async(VTE_TERMINAL(terminal), + VTE_PTY_DEFAULT, + NULL, + install_command, + NULL, + 0, + NULL, NULL, + NULL, + -1, + NULL, + NULL, + NULL); + vte_pty_spawn_async(pty, + NULL, + install_command, + NULL, + 0, + NULL, NULL, + NULL, + -1, + NULL, + NULL, + NULL); + vte_terminal_set_scrollback_lines(VTE_TERMINAL(terminal), 100); + vte_terminal_set_scroll_on_output(VTE_TERMINAL(terminal), TRUE); + vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(terminal), TRUE); + gtk_widget_show_all(widgets->TerminalRevealer); + } + +#endif + + // dictionary *yon_gtk_app_chooser_create(GtkBuilder *builder){ // GtkWidget *chooserWindow=gtk_window_new(GTK_WINDOW_TOPLEVEL); // GtkWidget *Box=gtk_box_new(GTK_ORIENTATION_VERTICAL,5); @@ -953,4 +1024,43 @@ void _yon_ubl_status_box_render(render_data *datav) sleep(2); } } + +void yon_ubl_setup_sockets(GtkWidget *main_window, GtkWidget *left_window, GtkWidget *right_window, int socket_main_id, int socket_left_id, int socket_right_id){ + if (main_window&&socket_main_id>-1){ + gtk_widget_hide(gtk_widget_get_toplevel(main_window)); + GtkWidget *plug_main=gtk_plug_new(socket_main_id); + GtkWidget *plug_left=NULL; + GtkWidget *plug_right=NULL; + g_signal_connect(G_OBJECT(plug_main), "destroy", G_CALLBACK(gtk_main_quit),NULL); + if (socket_left_id>-1&&left_window){ + plug_left=gtk_plug_new(socket_left_id); + g_object_ref(left_window); + gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(left_window)),left_window); + gtk_container_add(GTK_CONTAINER(plug_left),left_window); + gtk_style_context_add_class(gtk_widget_get_style_context(plug_left),"primary-toolbar"); + gtk_style_context_add_class(gtk_widget_get_style_context(left_window),"button"); + gtk_style_context_add_class(gtk_widget_get_style_context(left_window),"opacited"); + gtk_style_context_add_class(gtk_widget_get_style_context(left_window),"color"); + gtk_style_context_add_class(gtk_widget_get_style_context(plug_left),"noborder"); + gtk_widget_show(plug_left); + } + if (socket_right_id>-1&&right_window){ + plug_right=gtk_plug_new(socket_right_id); + g_object_ref(right_window); + gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(right_window)),right_window); + gtk_container_add(GTK_CONTAINER(plug_right),right_window); + gtk_style_context_add_class(gtk_widget_get_style_context(plug_right),"primary-toolbar"); + gtk_style_context_add_class(gtk_widget_get_style_context(right_window),"button"); + gtk_style_context_add_class(gtk_widget_get_style_context(right_window),"opacited"); + gtk_style_context_add_class(gtk_widget_get_style_context(right_window),"color"); + gtk_style_context_add_class(gtk_widget_get_style_context(plug_right),"noborder"); + gtk_widget_show(plug_right); + } + g_object_ref(main_window); + gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(main_window)),main_window); + gtk_container_add(GTK_CONTAINER(plug_main),main_window); + gtk_widget_show(plug_main); + } +} + #endif \ No newline at end of file diff --git a/source/ubl-utils.h b/source/ubl-utils.h index 637c062..aaa4b13 100644 --- a/source/ubl-utils.h +++ b/source/ubl-utils.h @@ -94,6 +94,8 @@ dictionary *yon_dictionary_rip(dictionary *dict); dictionary *yon_dictionary_get_nth(dictionary *dict, int place); +void *yon_dictionary_free_all(dictionary *dictionary,void (data_manipulation)(void*)); + // char functions char *yon_char_get_augumented(char *source, char *append); @@ -147,6 +149,9 @@ int yon_launch(thread_output *thread); // Gtk functions #ifdef __GTK_H__ +#ifdef VTE_TERMINAL +void yon_terminal_integrated_launch(GtkWidget *place_to_show, char* command, void *endwork_function, void* endwork_function_argument); +#endif #define yon_gtk_builder_get_widget(obj, obj2) GTK_WIDGET(gtk_builder_get_object(obj, obj2)) @@ -208,5 +213,6 @@ typedef struct { void _yon_ubl_header_setup(GtkWidget *Overlay, GtkWidget *Head, GtkWidget *Image, char *image_path); void _yon_ubl_status_box_render(render_data *datav); +void yon_ubl_setup_sockets(GtkWidget *main_window, GtkWidget *left_window, GtkWidget *right_window, int socket_main_id, int socket_left_id, int socket_right_id); #endif #endif \ No newline at end of file diff --git a/ubl-settings-video.desktop b/ubl-settings-video.desktop index 96c5448..c19f6f0 100644 --- a/ubl-settings-video.desktop +++ b/ubl-settings-video.desktop @@ -7,7 +7,7 @@ GenericName[ru]=Настройки Видеоадаптера и дисплея Comment=Application for managing video adapter and display settings Comment[ru]=Приложение для управления настройками видеоадаптера и дисплея Type=Application -Exec=ubl-settings-video +Exec=pkexec ubl-settings-video Icon=com.ublinux.ubl-settings-video Terminal=false X-XfcePluggable=true diff --git a/ubl-settings-video.glade b/ubl-settings-video.glade index e379c61..3864ec9 100644 --- a/ubl-settings-video.glade +++ b/ubl-settings-video.glade @@ -108,62 +108,8 @@ - - 800 - 400 - False - 800 - 400 - com.ublinux.ubl-settings-video - - - True - False - vertical - - - - - - - - True - False - True - - - True - False - start - 5 - 5 - 5 - 5 - False - UBlinux Video Configuration - - - - - - - - True - False - 5 - 5 - 5 - 5 - 32 - com.ublinux.ubl-settings-video - - - - - False - О Программе False True center @@ -206,6 +152,20 @@ + + + True + False + True + + + True + False + About ubl-settings-video + + + + 300 @@ -882,6 +842,10 @@ True False 0 + + 60 + 75 + True @@ -2327,7 +2291,7 @@ - + True False @@ -2385,7 +2349,7 @@ - + True False diff --git a/ubl-settings-video.pot b/ubl-settings-video.pot index 292b5f6..1cbfb4d 100644 --- a/ubl-settings-video.pot +++ b/ubl-settings-video.pot @@ -1,358 +1,401 @@ -# Language translations for ubl-settings-manager package. -# Copyright (C) 2022, UBTech LLC -# This file is distributed under the same license as the ubl-settings-manager package. -# UBLinux Team , 2022 +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: ubl-settings-manager 1.0\n" -"Report-Msgid-Bugs-To: info@ublinux.com\n" -"POT-Creation-Date: 2023-04-21 12:33+0000\n" -"PO-Revision-Date: 2023-01-01 00:00+0600\n" -"Last-Translator: UBLinux Team \n" -"Language-Team: UBLinux Team \n" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-05-10 15:53+0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: source/ubl-settings-video.c:323 source/ubl-settings-video.c:366 -#: source/ubl-settings-video.c:923 source/ubl-settings-video.c:934 +#: source/ubl-settings-video.c:298 source/ubl-settings-video.c:354 +#: source/ubl-settings-video-strings.h:62 msgid "Don't use" msgstr "" -#: source/ubl-settings-video.c:615 source/ubl-settings-video-strings.h:38 +#: source/ubl-settings-video.c:581 source/ubl-settings-video-strings.h:40 msgid "UBlinux Video Configuration" msgstr "" -#: source/ubl-settings-video.c:617 +#: source/ubl-settings-video.c:583 msgid "Progect Home Page" msgstr "" -#: source/ubl-settings-video.c:618 +#: source/ubl-settings-video.c:584 msgid "Videocard and monitor configuration manager" msgstr "" -#: source/ubl-settings-video.c:924 source/ubl-settings-video.c:935 -#: source/ubl-settings-video-strings.h:43 -msgid "fbdev" +#: source/ubl-settings-video.h:27 +msgid "Failed to load global configuration" +msgstr "" + +#: source/ubl-settings-video.h:28 +msgid "Failed to load local configuration" +msgstr "" + +#: source/ubl-settings-video.h:30 +msgid "Saving to global configuration Succeeded" +msgstr "" + +#: source/ubl-settings-video.h:31 +msgid "Saving to local configuration Succeeded" msgstr "" #: source/ubl-settings-video-strings.h:1 -msgid "Default settings" +msgid "Version:" msgstr "" #: source/ubl-settings-video-strings.h:2 -msgid "Monitor " +msgid "ubl-settings-video version:" msgstr "" -#: source/ubl-settings-video-strings.h:3 +#: source/ubl-settings-video-strings.h:2 source/ubl-settings-video-strings.h:5 msgid "Video adapter and display settings" msgstr "" +#: source/ubl-settings-video-strings.h:2 +msgid "Usage:" +msgstr "" + +#: source/ubl-settings-video-strings.h:2 +msgid "[OPTIONS]" +msgstr "" + +#: source/ubl-settings-video-strings.h:2 +msgid "Options:" +msgstr "" + +#: source/ubl-settings-video-strings.h:2 +msgid "Show this help" +msgstr "" + +#: source/ubl-settings-video-strings.h:2 +msgid "Show package version" +msgstr "" + +#: source/ubl-settings-video-strings.h:2 +msgid "Lock this help menu" +msgstr "" + +#: source/ubl-settings-video-strings.h:2 +msgid "Lock configration saving" +msgstr "" + +#: source/ubl-settings-video-strings.h:2 +msgid "Lock local configration saving" +msgstr "" + +#: source/ubl-settings-video-strings.h:2 +msgid "Lock global configration saving" +msgstr "" + +#: source/ubl-settings-video-strings.h:2 +msgid "Lock global configration loading" +msgstr "" + +#: source/ubl-settings-video-strings.h:3 +msgid "Default settings" +msgstr "" + #: source/ubl-settings-video-strings.h:4 +msgid "Monitor " +msgstr "" + +#: source/ubl-settings-video-strings.h:6 msgid "Port: " msgstr "" -#: source/ubl-settings-video-strings.h:5 +#: source/ubl-settings-video-strings.h:7 msgid "Resolution (px): " msgstr "" -#: source/ubl-settings-video-strings.h:6 +#: source/ubl-settings-video-strings.h:8 msgid "Frequency (Hz): " msgstr "" -#: source/ubl-settings-video-strings.h:7 +#: source/ubl-settings-video-strings.h:9 msgid "Rotation: " msgstr "" -#: source/ubl-settings-video-strings.h:8 +#: source/ubl-settings-video-strings.h:10 msgid "Position: " msgstr "" -#: source/ubl-settings-video-strings.h:9 +#: source/ubl-settings-video-strings.h:11 msgid "Do not switch off display" msgstr "" -#: source/ubl-settings-video-strings.h:10 +#: source/ubl-settings-video-strings.h:12 msgid "Create modeline for current resolution with CVT" msgstr "" -#: source/ubl-settings-video-strings.h:11 +#: source/ubl-settings-video-strings.h:13 msgid "Use \"CVT Reduced Blanking\"" msgstr "" -#: source/ubl-settings-video-strings.h:12 +#: source/ubl-settings-video-strings.h:14 msgid "Create modeline for current resolution with GTF" msgstr "" -#: source/ubl-settings-video-strings.h:13 +#: source/ubl-settings-video-strings.h:15 msgid "Configure manually through parameter line: " msgstr "" -#: source/ubl-settings-video-strings.h:14 +#: source/ubl-settings-video-strings.h:16 msgid "Main display" msgstr "" -#: source/ubl-settings-video-strings.h:15 +#: source/ubl-settings-video-strings.h:17 msgid "Show unsupported" msgstr "" -#: source/ubl-settings-video-strings.h:16 +#: source/ubl-settings-video-strings.h:18 msgid "Enabled" msgstr "" -#: source/ubl-settings-video-strings.h:17 +#: source/ubl-settings-video-strings.h:19 msgid "Left" msgstr "" -#: source/ubl-settings-video-strings.h:18 +#: source/ubl-settings-video-strings.h:20 msgid "Right" msgstr "" -#: source/ubl-settings-video-strings.h:19 +#: source/ubl-settings-video-strings.h:21 msgid "Inverted" msgstr "" -#: source/ubl-settings-video-strings.h:20 +#: source/ubl-settings-video-strings.h:22 msgid "Left of" msgstr "" -#: source/ubl-settings-video-strings.h:21 +#: source/ubl-settings-video-strings.h:23 msgid "Right of" msgstr "" -#: source/ubl-settings-video-strings.h:22 +#: source/ubl-settings-video-strings.h:24 msgid "Above" msgstr "" -#: source/ubl-settings-video-strings.h:23 +#: source/ubl-settings-video-strings.h:25 msgid "Below " msgstr "" -#: source/ubl-settings-video-strings.h:24 +#: source/ubl-settings-video-strings.h:26 msgid "No rotation" msgstr "" -#: source/ubl-settings-video-strings.h:25 -#: source/ubl-settings-video-strings.h:40 +#: source/ubl-settings-video-strings.h:27 +#: source/ubl-settings-video-strings.h:42 msgid "Save" msgstr "" -#: source/ubl-settings-video-strings.h:26 -#: source/ubl-settings-video-strings.h:58 +#: source/ubl-settings-video-strings.h:28 +#: source/ubl-settings-video-strings.h:60 msgid "Cancel" msgstr "" -#: source/ubl-settings-video-strings.h:27 +#: source/ubl-settings-video-strings.h:29 msgid "Choose port to configure" msgstr "" -#: source/ubl-settings-video-strings.h:28 +#: source/ubl-settings-video-strings.h:30 msgid "1st variant. May cause perfomance drops in video games" msgstr "" -#: source/ubl-settings-video-strings.h:29 +#: source/ubl-settings-video-strings.h:31 msgid "2nd variant. May not work on specific video cards" msgstr "" -#: source/ubl-settings-video-strings.h:30 +#: source/ubl-settings-video-strings.h:32 msgid "Video output configuration" msgstr "" -#: source/ubl-settings-video-strings.h:31 +#: source/ubl-settings-video-strings.h:33 msgid "Failsafe driver nVidia: " msgstr "" -#: source/ubl-settings-video-strings.h:32 +#: source/ubl-settings-video-strings.h:34 msgid "Failsafe driver AMD/ATI: " msgstr "" -#: source/ubl-settings-video-strings.h:33 +#: source/ubl-settings-video-strings.h:35 msgid "Driver" msgstr "" -#: source/ubl-settings-video-strings.h:34 +#: source/ubl-settings-video-strings.h:36 msgid "Monitor configuration" msgstr "" -#: source/ubl-settings-video-strings.h:35 +#: source/ubl-settings-video-strings.h:37 msgid "Hybrid graphics" msgstr "" -#: source/ubl-settings-video-strings.h:36 +#: source/ubl-settings-video-strings.h:38 msgid "Fix frame gap (nVidia)" msgstr "" -#: source/ubl-settings-video-strings.h:37 +#: source/ubl-settings-video-strings.h:39 msgid "Extra" msgstr "" -#: source/ubl-settings-video-strings.h:39 +#: source/ubl-settings-video-strings.h:41 msgid "Load" msgstr "" -#: source/ubl-settings-video-strings.h:41 +#: source/ubl-settings-video-strings.h:43 msgid "On" msgstr "" -#: source/ubl-settings-video-strings.h:42 +#: source/ubl-settings-video-strings.h:44 msgid "Off" msgstr "" -#: source/ubl-settings-video-strings.h:44 +#: source/ubl-settings-video-strings.h:45 +msgid "fbdev" +msgstr "" + +#: source/ubl-settings-video-strings.h:46 msgid "Automatically choose and use driver" msgstr "" -#: source/ubl-settings-video-strings.h:45 +#: source/ubl-settings-video-strings.h:47 msgid "Launch programms through optirun (nVidia): " msgstr "" -#: source/ubl-settings-video-strings.h:46 +#: source/ubl-settings-video-strings.h:48 msgid "Launch programs through primusrun (nVidia): " msgstr "" -#: source/ubl-settings-video-strings.h:47 +#: source/ubl-settings-video-strings.h:49 msgid "discrete video only (AMD/ATI)" msgstr "" -#: source/ubl-settings-video-strings.h:48 +#: source/ubl-settings-video-strings.h:50 msgid "Load from global configuration" msgstr "" -#: source/ubl-settings-video-strings.h:49 +#: source/ubl-settings-video-strings.h:51 msgid "Load from local configuration" msgstr "" -#: source/ubl-settings-video-strings.h:50 -msgid "Save to global an local configuration" +#: source/ubl-settings-video-strings.h:52 +msgid "Save configuration" msgstr "" -#: source/ubl-settings-video-strings.h:51 +#: source/ubl-settings-video-strings.h:53 msgid "Save to global configuration" msgstr "" -#: source/ubl-settings-video-strings.h:52 +#: source/ubl-settings-video-strings.h:54 msgid "Save to local configuration" msgstr "" -#: source/ubl-settings-video-strings.h:53 +#: source/ubl-settings-video-strings.h:55 msgid "Documentation" msgstr "" -#: source/ubl-settings-video-strings.h:54 +#: source/ubl-settings-video-strings.h:56 msgid "About" msgstr "" -#: source/ubl-settings-video-strings.h:55 +#: source/ubl-settings-video-strings.h:57 msgid "Installed" msgstr "" -#: source/ubl-settings-video-strings.h:56 +#: source/ubl-settings-video-strings.h:58 msgid "Package" msgstr "" -#: source/ubl-settings-video-strings.h:57 +#: source/ubl-settings-video-strings.h:59 msgid "Supported Devices" msgstr "" -#: source/ubl-settings-video-strings.h:59 +#: source/ubl-settings-video-strings.h:61 msgid "Accept" msgstr "" -#: source/ubl-settings-video-strings.h:61 +#: source/ubl-settings-video-strings.h:64 msgid "Information" msgstr "" -#: source/ubl-settings-video-strings.h:62 +#: source/ubl-settings-video-strings.h:65 msgid "Drivers" msgstr "" -#: source/ubl-settings-video-strings.h:63 +#: source/ubl-settings-video-strings.h:66 msgid "Main settings" msgstr "" -#: source/ubl-settings-video-strings.h:64 +#: source/ubl-settings-video-strings.h:67 msgid "Devices and drivers" msgstr "" -#: source/ubl-settings-video-strings.h:65 +#: source/ubl-settings-video-strings.h:68 msgid "Driver modules" msgstr "" -#: source/ubl-settings-video-strings.h:80 +#: source/ubl-settings-video-strings.h:83 msgid "Error: Port must be chosen to save" msgstr "" -#: source/ubl-settings-video-strings.h:81 +#: source/ubl-settings-video-strings.h:84 msgid "Monitor configuration succeedeed" msgstr "" -#: source/ubl-settings-video-strings.h:83 +#: source/ubl-settings-video-strings.h:86 msgid "Global configuration loading succseeded." msgstr "" -#: source/ubl-settings-video-strings.h:84 +#: source/ubl-settings-video-strings.h:87 msgid "Local configuration loading succseeded." msgstr "" -#: source/ubl-settings-video-strings.h:86 +#: source/ubl-settings-video-strings.h:89 msgid "Local and global configuration saving succseeded." msgstr "" -#: source/ubl-settings-video-strings.h:87 +#: source/ubl-settings-video-strings.h:90 msgid "Global configuration saving succseeded." msgstr "" -#: source/ubl-settings-video-strings.h:88 +#: source/ubl-settings-video-strings.h:91 msgid "Local configuration saving succseeded." msgstr "" -#: source/ubl-settings-video-strings.h:90 +#: source/ubl-settings-video-strings.h:93 msgid "Yes" msgstr "" -#: source/ubl-settings-video-strings.h:91 +#: source/ubl-settings-video-strings.h:94 msgid "No" msgstr "" -#: source/ubl-settings-video-strings.h:93 +#: source/ubl-settings-video-strings.h:96 msgid "Description" msgstr "" -#: source/ubl-settings-video-strings.h:94 +#: source/ubl-settings-video-strings.h:97 msgid "Vendor" msgstr "" -#: source/ubl-settings-video-strings.h:95 +#: source/ubl-settings-video-strings.h:98 msgid "Model" msgstr "" -#: source/ubl-settings-video-strings.h:96 +#: source/ubl-settings-video-strings.h:99 msgid "Kernel driver in use" msgstr "" -#: source/ubl-settings-video-strings.h:97 +#: source/ubl-settings-video-strings.h:100 msgid "Kernel modules" msgstr "" - -#: source/ubl-settings-video.h:25 -msgid "Failed to load global configuration" -msgstr "" - -#: source/ubl-settings-video.h:26 -msgid "Failed to load local configuration" -msgstr "" - -#: source/ubl-settings-video.h:28 -msgid "Saving to global configuration Succeeded" -msgstr "" - -#: source/ubl-settings-video.h:29 -msgid "Saving to local configuration Succeeded" -msgstr "" - - -msgid "VGA compitable controller" -msgstr "" \ No newline at end of file diff --git a/ubl-settings-video_ru.po b/ubl-settings-video_ru.po index 685a775..1db1896 100644 --- a/ubl-settings-video_ru.po +++ b/ubl-settings-video_ru.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: ubl-settings-manager 1.0\n" -"Report-Msgid-Bugs-To: info@ublinux.com\n" -"POT-Creation-Date: 2023-04-21 12:33+0000\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-05-10 15:53+0600\n" "PO-Revision-Date: 2023-01-01 00:00+0600\n" "Last-Translator: UBLinux Team \n" "Language-Team: Russian - UBLinux Team \n" @@ -17,347 +17,398 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: source/ubl-settings-video.c:323 source/ubl-settings-video.c:366 -#: source/ubl-settings-video.c:923 source/ubl-settings-video.c:934 +#: source/ubl-settings-video.c:298 source/ubl-settings-video.c:354 +#: source/ubl-settings-video-strings.h:62 msgid "Don't use" msgstr "Не использовать" -#: source/ubl-settings-video.c:615 source/ubl-settings-video-strings.h:38 +#: source/ubl-settings-video.c:581 source/ubl-settings-video-strings.h:40 msgid "UBlinux Video Configuration" msgstr "Видеокарта/Экран" -#: source/ubl-settings-video.c:617 +#: source/ubl-settings-video.c:583 msgid "Progect Home Page" msgstr "Домашняя страница проекта" -#: source/ubl-settings-video.c:618 +#: source/ubl-settings-video.c:584 msgid "Videocard and monitor configuration manager" msgstr "Настройка вывода изображения" -#: source/ubl-settings-video.c:924 source/ubl-settings-video.c:935 -#: source/ubl-settings-video-strings.h:43 -msgid "fbdev" -msgstr "fbdev" +#: source/ubl-settings-video.h:27 +msgid "Failed to load global configuration" +msgstr "Ошибка загрузки глобальной конфигурации" + +#: source/ubl-settings-video.h:28 +msgid "Failed to load local configuration" +msgstr "Ошибка загрузки локальной конфигурации" + +#: source/ubl-settings-video.h:30 +msgid "Saving to global configuration Succeeded" +msgstr "Успешное сохранение глобальной конфигурации" + +#: source/ubl-settings-video.h:31 +msgid "Saving to local configuration Succeeded" +msgstr "Успешное сохранение локальной конфигурации" #: source/ubl-settings-video-strings.h:1 -msgid "Default settings" -msgstr "По умолчанию" +msgid "Version:" +msgstr "Версия:" #: source/ubl-settings-video-strings.h:2 -msgid "Monitor " -msgstr "Монитор: " +msgid "ubl-settings-video version:" +msgstr "Версия менеджера настроек вывода изображения: " -#: source/ubl-settings-video-strings.h:3 +#: source/ubl-settings-video-strings.h:2 source/ubl-settings-video-strings.h:5 msgid "Video adapter and display settings" msgstr "Настройка вывода изображения и установка драйвера видеокарты" +#: source/ubl-settings-video-strings.h:2 +msgid "Usage:" +msgstr "Использование:" + +#: source/ubl-settings-video-strings.h:2 +msgid "[OPTIONS]" +msgstr "[АРГУМЕНТЫ]" + +#: source/ubl-settings-video-strings.h:2 +msgid "Options:" +msgstr "Аргументы:" + +#: source/ubl-settings-video-strings.h:2 +msgid "Show this help" +msgstr "Показать эту справку" + +#: source/ubl-settings-video-strings.h:2 +msgid "Show package version" +msgstr "Показать версию пакета" + +#: source/ubl-settings-video-strings.h:2 +msgid "Lock this help menu" +msgstr "Запретить вывод этой справки" + +#: source/ubl-settings-video-strings.h:2 +#, fuzzy +msgid "Lock configration saving" +msgstr "Запретить сохранение конфигурации" + +#: source/ubl-settings-video-strings.h:2 +#, fuzzy +msgid "Lock local configration saving" +msgstr "Запретить сохранение локальной конфигурации" + +#: source/ubl-settings-video-strings.h:2 +#, fuzzy +msgid "Lock global configration saving" +msgstr "Запретить сохранение глобальной конфигурации" + +#: source/ubl-settings-video-strings.h:2 +#, fuzzy +msgid "Lock global configration loading" +msgstr "Запретить загрузку глобальной конфигурации" + +#: source/ubl-settings-video-strings.h:3 +msgid "Default settings" +msgstr "По умолчанию" + #: source/ubl-settings-video-strings.h:4 +msgid "Monitor " +msgstr "Монитор " + +#: source/ubl-settings-video-strings.h:6 msgid "Port: " msgstr "Порт: " -#: source/ubl-settings-video-strings.h:5 +#: source/ubl-settings-video-strings.h:7 msgid "Resolution (px): " msgstr "Разрешение (px): " -#: source/ubl-settings-video-strings.h:6 +#: source/ubl-settings-video-strings.h:8 msgid "Frequency (Hz): " msgstr "Обновления (Hz): " -#: source/ubl-settings-video-strings.h:7 +#: source/ubl-settings-video-strings.h:9 msgid "Rotation: " msgstr "Вращение: " -#: source/ubl-settings-video-strings.h:8 +#: source/ubl-settings-video-strings.h:10 msgid "Position: " msgstr "Положение: " -#: source/ubl-settings-video-strings.h:9 +#: source/ubl-settings-video-strings.h:11 msgid "Do not switch off display" msgstr "Не выключать дисплей" -#: source/ubl-settings-video-strings.h:10 +#: source/ubl-settings-video-strings.h:12 msgid "Create modeline for current resolution with CVT" msgstr "Создать modeline для укащанного разрешения с помощью CVT" -#: source/ubl-settings-video-strings.h:11 +#: source/ubl-settings-video-strings.h:13 msgid "Use \"CVT Reduced Blanking\"" msgstr "" "Использовать \"CVT Reduced Blanking\" уменьшения пропускной способности\n" "для дисплеев с высоким разрешением" -#: source/ubl-settings-video-strings.h:12 +#: source/ubl-settings-video-strings.h:14 msgid "Create modeline for current resolution with GTF" msgstr "Создать modeline для указанного разрешения с помощью GTF" -#: source/ubl-settings-video-strings.h:13 +#: source/ubl-settings-video-strings.h:15 msgid "Configure manually through parameter line: " msgstr "Настроить вручную через строку параметра: " -#: source/ubl-settings-video-strings.h:14 +#: source/ubl-settings-video-strings.h:16 msgid "Main display" msgstr "Основной дисплей" -#: source/ubl-settings-video-strings.h:15 +#: source/ubl-settings-video-strings.h:17 msgid "Show unsupported" msgstr "Все видеорежимы" -#: source/ubl-settings-video-strings.h:16 +#: source/ubl-settings-video-strings.h:18 msgid "Enabled" msgstr "Включён" -#: source/ubl-settings-video-strings.h:17 +#: source/ubl-settings-video-strings.h:19 msgid "Left" msgstr "Влево" -#: source/ubl-settings-video-strings.h:18 +#: source/ubl-settings-video-strings.h:20 msgid "Right" msgstr "Вправо" -#: source/ubl-settings-video-strings.h:19 +#: source/ubl-settings-video-strings.h:21 msgid "Inverted" msgstr "Инвертирован" -#: source/ubl-settings-video-strings.h:20 +#: source/ubl-settings-video-strings.h:22 msgid "Left of" msgstr "Слева от" -#: source/ubl-settings-video-strings.h:21 +#: source/ubl-settings-video-strings.h:23 msgid "Right of" msgstr "Справа от" -#: source/ubl-settings-video-strings.h:22 +#: source/ubl-settings-video-strings.h:24 msgid "Above" msgstr "Над" -#: source/ubl-settings-video-strings.h:23 +#: source/ubl-settings-video-strings.h:25 msgid "Below " msgstr "Под " -#: source/ubl-settings-video-strings.h:24 +#: source/ubl-settings-video-strings.h:26 msgid "No rotation" msgstr "Не поворачивать" -#: source/ubl-settings-video-strings.h:25 -#: source/ubl-settings-video-strings.h:40 +#: source/ubl-settings-video-strings.h:27 +#: source/ubl-settings-video-strings.h:42 msgid "Save" msgstr "Сохранить" -#: source/ubl-settings-video-strings.h:26 -#: source/ubl-settings-video-strings.h:58 +#: source/ubl-settings-video-strings.h:28 +#: source/ubl-settings-video-strings.h:60 msgid "Cancel" msgstr "Отмена" -#: source/ubl-settings-video-strings.h:27 +#: source/ubl-settings-video-strings.h:29 msgid "Choose port to configure" msgstr "Выбрать порт для настройки" -#: source/ubl-settings-video-strings.h:28 +#: source/ubl-settings-video-strings.h:30 msgid "1st variant. May cause perfomance drops in video games" msgstr "1 вариант. Может снизить производительность в играх" -#: source/ubl-settings-video-strings.h:29 +#: source/ubl-settings-video-strings.h:31 msgid "2nd variant. May not work on specific video cards" msgstr "2 вариант. Не на каждой карте может сработать" -#: source/ubl-settings-video-strings.h:30 +#: source/ubl-settings-video-strings.h:32 msgid "Video output configuration" msgstr "Настройка вывода изображения" -#: source/ubl-settings-video-strings.h:31 +#: source/ubl-settings-video-strings.h:33 msgid "Failsafe driver nVidia: " msgstr "Отказоучтойчивый драйвер nVidia: " -#: source/ubl-settings-video-strings.h:32 +#: source/ubl-settings-video-strings.h:34 msgid "Failsafe driver AMD/ATI: " msgstr "Отказоустойчивый драйвер AMD/ATI: " -#: source/ubl-settings-video-strings.h:33 +#: source/ubl-settings-video-strings.h:35 msgid "Driver" msgstr "Драйвер" -#: source/ubl-settings-video-strings.h:34 +#: source/ubl-settings-video-strings.h:36 msgid "Monitor configuration" msgstr "Настройка экрана" -#: source/ubl-settings-video-strings.h:35 +#: source/ubl-settings-video-strings.h:37 msgid "Hybrid graphics" msgstr "Гибридная графика" -#: source/ubl-settings-video-strings.h:36 +#: source/ubl-settings-video-strings.h:38 msgid "Fix frame gap (nVidia)" msgstr "Исправить разрыв кадров (nVidia)" -#: source/ubl-settings-video-strings.h:37 +#: source/ubl-settings-video-strings.h:39 msgid "Extra" msgstr "Дополнительно" -#: source/ubl-settings-video-strings.h:39 +#: source/ubl-settings-video-strings.h:41 msgid "Load" msgstr "Загрузить" -#: source/ubl-settings-video-strings.h:41 +#: source/ubl-settings-video-strings.h:43 msgid "On" msgstr "Включить" -#: source/ubl-settings-video-strings.h:42 +#: source/ubl-settings-video-strings.h:44 msgid "Off" msgstr "Выключить" -#: source/ubl-settings-video-strings.h:44 +#: source/ubl-settings-video-strings.h:45 +msgid "fbdev" +msgstr "fbdev" + +#: source/ubl-settings-video-strings.h:46 msgid "Automatically choose and use driver" msgstr "Автоматический выбор и использование драйвера" -#: source/ubl-settings-video-strings.h:45 +#: source/ubl-settings-video-strings.h:47 msgid "Launch programms through optirun (nVidia): " msgstr "Запуск программ через optirun (nVidia)" -#: source/ubl-settings-video-strings.h:46 +#: source/ubl-settings-video-strings.h:48 msgid "Launch programs through primusrun (nVidia): " msgstr "Запуск программ через primusrun (nVidia)" -#: source/ubl-settings-video-strings.h:47 +#: source/ubl-settings-video-strings.h:49 msgid "discrete video only (AMD/ATI)" msgstr "Только дискретное видео (AMD/ATI)" -#: source/ubl-settings-video-strings.h:48 +#: source/ubl-settings-video-strings.h:50 msgid "Load from global configuration" msgstr "Загрузить глобальную конфигурацию" -#: source/ubl-settings-video-strings.h:49 +#: source/ubl-settings-video-strings.h:51 msgid "Load from local configuration" msgstr "Загрузить локальную конфигуруцию" -#: source/ubl-settings-video-strings.h:50 -msgid "Save to global an local configuration" -msgstr "Сохранить в глобальную и локальную конфигурацию" +#: source/ubl-settings-video-strings.h:52 +msgid "Save configuration" +msgstr "Сохранить конфигурацию" -#: source/ubl-settings-video-strings.h:51 +#: source/ubl-settings-video-strings.h:53 msgid "Save to global configuration" msgstr "Сохранить в глобальную конфигурацию" -#: source/ubl-settings-video-strings.h:52 +#: source/ubl-settings-video-strings.h:54 msgid "Save to local configuration" msgstr "Схоранить в локальную конфигурацию" -#: source/ubl-settings-video-strings.h:53 +#: source/ubl-settings-video-strings.h:55 msgid "Documentation" msgstr "Справка" -#: source/ubl-settings-video-strings.h:54 +#: source/ubl-settings-video-strings.h:56 msgid "About" msgstr "О программе" -#: source/ubl-settings-video-strings.h:55 +#: source/ubl-settings-video-strings.h:57 msgid "Installed" msgstr "Установлено" -#: source/ubl-settings-video-strings.h:56 +#: source/ubl-settings-video-strings.h:58 msgid "Package" msgstr "Пакет" -#: source/ubl-settings-video-strings.h:57 +#: source/ubl-settings-video-strings.h:59 msgid "Supported Devices" msgstr "Устройства" -#: source/ubl-settings-video-strings.h:59 +#: source/ubl-settings-video-strings.h:61 msgid "Accept" msgstr "Принять" -#: source/ubl-settings-video-strings.h:61 +#: source/ubl-settings-video-strings.h:64 msgid "Information" msgstr "Информация" -#: source/ubl-settings-video-strings.h:62 +#: source/ubl-settings-video-strings.h:65 msgid "Drivers" msgstr "Драйвера" -#: source/ubl-settings-video-strings.h:63 +#: source/ubl-settings-video-strings.h:66 msgid "Main settings" msgstr "Основные настройки" -#: source/ubl-settings-video-strings.h:64 +#: source/ubl-settings-video-strings.h:67 msgid "Devices and drivers" msgstr "Устройства и драйвера" -#: source/ubl-settings-video-strings.h:65 +#: source/ubl-settings-video-strings.h:68 msgid "Driver modules" -msgstr "Модули ядра" +msgstr "Модули драйвера" -#: source/ubl-settings-video-strings.h:80 +#: source/ubl-settings-video-strings.h:83 msgid "Error: Port must be chosen to save" msgstr "Ошибка: Выберите порт для сохранения" -#: source/ubl-settings-video-strings.h:81 +#: source/ubl-settings-video-strings.h:84 msgid "Monitor configuration succeedeed" msgstr "Настройки экрана сохранены" -#: source/ubl-settings-video-strings.h:83 +#: source/ubl-settings-video-strings.h:86 msgid "Global configuration loading succseeded." msgstr "Успешная загрузка глобальной конфигурации" -#: source/ubl-settings-video-strings.h:84 +#: source/ubl-settings-video-strings.h:87 msgid "Local configuration loading succseeded." msgstr "Успешная загрузка локальной конфигурации" -#: source/ubl-settings-video-strings.h:86 +#: source/ubl-settings-video-strings.h:89 msgid "Local and global configuration saving succseeded." msgstr "Успешное сохранение глобальной и локальной конфигурации" -#: source/ubl-settings-video-strings.h:87 +#: source/ubl-settings-video-strings.h:90 msgid "Global configuration saving succseeded." msgstr "Успешное сохранение глобальной конфигурации" -#: source/ubl-settings-video-strings.h:88 +#: source/ubl-settings-video-strings.h:91 msgid "Local configuration saving succseeded." msgstr "Успешная загрузка локальной конфигурации" -#: source/ubl-settings-video-strings.h:90 +#: source/ubl-settings-video-strings.h:93 msgid "Yes" msgstr "Да" -#: source/ubl-settings-video-strings.h:91 +#: source/ubl-settings-video-strings.h:94 msgid "No" msgstr "Нет" -#: source/ubl-settings-video-strings.h:93 +#: source/ubl-settings-video-strings.h:96 msgid "Description" msgstr "Описание" -#: source/ubl-settings-video-strings.h:94 +#: source/ubl-settings-video-strings.h:97 msgid "Vendor" msgstr "Производитель" -#: source/ubl-settings-video-strings.h:95 +#: source/ubl-settings-video-strings.h:98 msgid "Model" msgstr "Модель" -#: source/ubl-settings-video-strings.h:96 +#: source/ubl-settings-video-strings.h:99 msgid "Kernel driver in use" msgstr "Используемый драйвер ядра" -#: source/ubl-settings-video-strings.h:97 +#: source/ubl-settings-video-strings.h:100 msgid "Kernel modules" msgstr "Модули ядра" -#: source/ubl-settings-video.h:25 -msgid "Failed to load global configuration" -msgstr "Ошибка загрузки глобальной конфигурации" - -#: source/ubl-settings-video.h:26 -msgid "Failed to load local configuration" -msgstr "Ошибка загрузки локальной конфигурации" - -#: source/ubl-settings-video.h:28 -msgid "Saving to global configuration Succeeded" -msgstr "Успешное сохранение глобальной конфигурации" - -#: source/ubl-settings-video.h:29 -msgid "Saving to local configuration Succeeded" -msgstr "Успешное сохранение локальной конфигурации" - +#~ msgid "VGA compitable controller" +#~ msgstr "VGA-совместимый адаптер" -msgid "VGA compitable controller" -msgstr "VGA-совместимый адаптер" #~ msgid "Configuration has been loaded" #~ msgstr "Конфигурация была загружена" diff --git a/video-drivers.csv b/video-drivers.csv index 9fa002b..78f380e 100644 --- a/video-drivers.csv +++ b/video-drivers.csv @@ -1,8 +1,8 @@ -VERSION_ID:DRV_PAСKAGE:DRV_NAME:DRV_DESCRIPTION:DRV_SUPPORT -2204:ubm-nvidia-340:nvidia-340:Пакет с модулем драйвера и утилиты NVIDIA 340xx:Драйвер видеокарт nVidia серий 8XXX, 9XXX, 1XX, 2XX, 3XX, 4XX, 5XX, 6XX, 7XX -2204:ubm-nvidia-390:nvidia-390:Пакет с модулем драйвера и утилиты NVIDIA 390xx:Драйвер видеокарт nVidia серий 4XX, 5XX, 6XX, 7XX, 9XX, 10XX -2204:ubm-nvidia-430:nvidia-430:Пакет с модулем включает в себя драйвер NVIDIA 430xx и утилиты:Драйвер видеокарт nVidia серий 6XX, 7XX, 9XX, 10XX, 16XX -2204:ubm-nvidia-470:nvidia-470:Пакет с модулем драйвера и утилиты NVIDIA 470xx:Драйвер видеокарт nVidia серий NVS, Quadro Sync, Quadro NVS, Quadro Blade/Embedded, Quadro, Quadro RTX, NVIDIA RTX -2204:ubm-nvidia-510:nvidia-510:Пакет с модулем драйвера и утилиты NVIDIA 510xx:Драйвер видеокарт nVidia серий NVS, Quadro Sync, Quadro NVS, Quadro Blade/Embedded, Quadro, Quadro RTX, NVIDIA RTX -2204:ubm-nvidia-515:nvidia-515:Пакет с модулем драйвера и утилиты NVIDIA 515xx:Драйвер видеокарт nVidia серий NVS, Quadro Sync, Quadro NVS, Quadro Blade/Embedded, Quadro, Quadro RTX, NVIDIA RTX -2204:ubm-nvidia-optimus:nvidia-optimus:Пакет с модулем включает в себя NVIDIA Optimus: +VERSION_ID;DRV_PAСKAGE;DRV_NAME;DRV_DESCRIPTION;DRV_SUPPORT +2204;ubm-nvidia-340;nvidia-340;Пакет с модулем драйвера и утилиты NVIDIA 340xx;Драйвер видеокарт nVidia серий 8XXX, 9XXX, 1XX, 2XX, 3XX, 4XX, 5XX, 6XX, 7XX +2204;ubm-nvidia-390;nvidia-390;Пакет с модулем драйвера и утилиты NVIDIA 390xx;Драйвер видеокарт nVidia серий 4XX, 5XX, 6XX, 7XX, 9XX, 10XX +2204;ubm-nvidia-430;nvidia-430;Пакет с модулем включает в себя драйвер NVIDIA 430xx и утилиты;Драйвер видеокарт nVidia серий 6XX, 7XX, 9XX, 10XX, 16XX +2204;ubm-nvidia-470;nvidia-470;Пакет с модулем драйвера и утилиты NVIDIA 470xx;Драйвер видеокарт nVidia серий NVS, Quadro Sync, Quadro NVS, Quadro Blade/Embedded, Quadro, Quadro RTX, NVIDIA RTX +2204;ubm-nvidia-510;nvidia-510;Пакет с модулем драйвера и утилиты NVIDIA 510xx;Драйвер видеокарт nVidia серий NVS, Quadro Sync, Quadro NVS, Quadro Blade/Embedded, Quadro, Quadro RTX, NVIDIA RTX +2204;ubm-nvidia-515;nvidia-515;Пакет с модулем драйвера и утилиты NVIDIA 515xx;Драйвер видеокарт nVidia серий NVS, Quadro Sync, Quadro NVS, Quadro Blade/Embedded, Quadro, Quadro RTX, NVIDIA RTX +2204;ubm-nvidia-optimus;nvidia-optimus;Пакет с модулем включает в себя NVIDIA Optimus;