Merge pull request 'master' (#148) from YanTheKaller/ubl-settings-video:master into master

Reviewed-on: #148
pull/150/head
Dmitry Razumov 4 weeks ago
commit b93fc6bf01

@ -109,3 +109,9 @@ msgstr ""
msgid "Intel i810/i830/i915/945G/G965+, except GMA 3600" msgid "Intel i810/i830/i915/945G/G965+, except GMA 3600"
msgstr "" msgstr ""
msgid "NVIDIA 340xx driver and utilities"
msgstr ""
msgid "NVIDIA Open 575xx driver and utilities"
msgstr ""

@ -110,3 +110,11 @@ msgstr "Пакет с драйвером и утилитами NVIDIA 575xx"
msgid "Intel i810/i830/i915/945G/G965+, except GMA 3600" msgid "Intel i810/i830/i915/945G/G965+, except GMA 3600"
msgstr "" msgstr ""
"Intel i810/i830/i915/945G/G965+, кроме GMA 3600" "Intel i810/i830/i915/945G/G965+, кроме GMA 3600"
msgid "NVIDIA 340xx driver and utilities"
msgstr ""
"Драйвер и утилиты NVIDIA 340xx"
msgid "NVIDIA Open 575xx driver and utilities"
msgstr ""
"Драйвер и утилиты NVIDIA Open 575xx"

@ -74,7 +74,7 @@ void on_terminal_done(GtkWidget *, int , main_window *widgets){
const char cancel_signal = 3; const char cancel_signal = 3;
char *command = yon_char_new(" "); char *command = yon_char_new(" ");
command[0]=cancel_signal; command[0]=cancel_signal;
char *tmp = yon_char_unite(command,"; exit 0\n",NULL); char *tmp = yon_char_unite(command,"\n exit 0\n",NULL);
on_pacman_db_unlock(); on_pacman_db_unlock();
free(command); free(command);
vte_terminal_feed_child(VTE_TERMINAL(widgets->InstallTerminal),tmp,strlen(tmp)); vte_terminal_feed_child(VTE_TERMINAL(widgets->InstallTerminal),tmp,strlen(tmp));

@ -234,36 +234,40 @@ void yon_interface_update(){
void yon_load_proceed(YON_CONFIG_TYPE type){ void yon_load_proceed(YON_CONFIG_TYPE type){
if (type!=YON_CONFIG_CUSTOM){ if (type!=YON_CONFIG_CUSTOM){
yon_config_clean(); yon_config_clean();
}
if (!yon_char_is_empty(config_get_default_command)) if (!yon_char_is_empty(config_get_default_command))
yon_config_load_config(YON_CONFIG_DEFAULT,config_get_default_command,NULL); yon_config_load_config(YON_CONFIG_DEFAULT,config_get_default_command,NULL);
switch (type){ }
case YON_CONFIG_GLOBAL: if (type==YON_CONFIG_GLOBAL){
yon_config_load_config(type,config_get_command("global"),NULL); yon_config_load_config(type,config_get_command("global"),NULL);
yon_ubl_status_box_render(yon_char_get_localised_from_lib(GLOBAL_LOAD_SUCCESS_LABEL),BACKGROUND_IMAGE_SUCCESS_TYPE); } else if (type==YON_CONFIG_LOCAL){
break;
case YON_CONFIG_LOCAL:
yon_config_load_config(type,config_get_command("system"),NULL); yon_config_load_config(type,config_get_command("system"),NULL);
yon_ubl_status_box_render(yon_char_get_localised_from_lib(LOCAL_LOAD_SUCCESS_LABEL),BACKGROUND_IMAGE_SUCCESS_TYPE); } else if (type==YON_CONFIG_CUSTOM){
break; char *path="";
case YON_CONFIG_CUSTOM: textdomain(template_ui_LocaleName);
char *path = NULL; GtkWidget *dialog = gtk_file_chooser_dialog_new(template_app_information.app_title,NULL,GTK_FILE_CHOOSER_ACTION_SAVE,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
path=yon_custom_config_init(GTK_FILE_CHOOSER_ACTION_OPEN); textdomain(LocaleName);
yon_char_remove_brackets(path); gtk_window_set_icon_name(GTK_WINDOW(dialog),"com.ublinux.ubl-settings-services");
if (!yon_char_is_empty(path)){ gtk_window_set_title(GTK_WINDOW(dialog),TITLE_LABEL);
if ((access(path,0)==F_OK&&access(path,4)!=F_OK)){ GtkFileFilter *filter = gtk_file_filter_new();
if (yon_status_box_is_set()){ gtk_file_filter_add_pattern(filter,"*.ini");
yon_ubl_status_box_render(ACCESS_DENIED_LABEL(path),BACKGROUND_IMAGE_FAIL_TYPE); gtk_file_filter_set_name(filter, "*.ini");
return; gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog),filter);
} gtk_widget_show(dialog);
int response = gtk_dialog_run(GTK_DIALOG(dialog));
if (response == GTK_RESPONSE_ACCEPT){
char *file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
if (!yon_char_is_empty(file)){
path=file;
} }
yon_config_clean(); yon_config_clean();
yon_config_load_config(type,config_get_command(path),NULL); if (!yon_char_is_empty(config_get_default_command))
yon_ubl_status_box_render(yon_char_get_localised_from_lib(LOCAL_LOAD_SUCCESS_LABEL),BACKGROUND_IMAGE_SUCCESS_TYPE); yon_config_load_config(YON_CONFIG_DEFAULT,config_get_default_command,NULL);
char *command = config_get_command(path);
yon_config_load_config(type,command,NULL);
gtk_widget_destroy(dialog);
} else {
gtk_widget_destroy(dialog);
} }
break;
default:
break;
} }
} }
@ -361,7 +365,7 @@ void yon_proprietary_local_get(main_window *widgets){
target->package = current[2]; target->package = current[2];
target->kernel = current[0]; target->kernel = current[0];
target->devices = current_size>5?current[5]:NULL; target->devices = current_size>5?current[5]:NULL;
target->description = current[4]; target->description = _(current[4]);
target->module_installed = yon_packages_check_installed(current[1]); target->module_installed = yon_packages_check_installed(current[1]);
target->package_installed = yon_packages_check_installed(current[2]); target->package_installed = yon_packages_check_installed(current[2]);
target->module_exist = yon_packages_check_exist(current[1]); target->module_exist = yon_packages_check_exist(current[1]);

@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 --> <!-- Generated with glade 3.38.2 -->
<interface> <interface>
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<object class="GtkOverlay" id="ScreenOverlay"> <object class="GtkOverlay" id="ScreenOverlay">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child> <child>
<object class="GtkImage" id="MonitorImage"> <object class="GtkImage" id="MonitorImage">
<property name="visible">True</property> <property name="visible">True</property>
@ -52,6 +54,7 @@
<object class="GtkBox" id="MonitorInfoBox"> <object class="GtkBox" id="MonitorInfoBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="valign">start</property>
<property name="margin-left">3</property> <property name="margin-left">3</property>
<property name="margin-right">3</property> <property name="margin-right">3</property>
<property name="margin-start">5</property> <property name="margin-start">5</property>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 --> <!-- Generated with glade 3.38.2 -->
<interface domain="ubl-settings-video"> <interface domain="ubl-settings-video">
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<requires lib="vte-2.91" version="0.76"/> <requires lib="vte-2.91" version="0.76"/>
@ -205,6 +205,7 @@
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel" id="label4"> <object class="GtkLabel" id="label4">
@ -247,6 +248,7 @@
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel" id="label5"> <object class="GtkLabel" id="label5">
@ -302,12 +304,14 @@
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Free drivers:</property> <property name="label" translatable="yes">Free drivers:</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -345,12 +349,14 @@
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Failsafe AMD/ATI driver:</property> <property name="label" translatable="yes">Failsafe AMD/ATI driver:</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -431,7 +437,8 @@
<object class="GtkFlowBox" id="MonitorsBox"> <object class="GtkFlowBox" id="MonitorsBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="max-children-per-line">150</property> <property name="homogeneous">True</property>
<property name="max-children-per-line">20</property>
<property name="selection-mode">none</property> <property name="selection-mode">none</property>
<property name="activate-on-single-click">False</property> <property name="activate-on-single-click">False</property>
</object> </object>

Loading…
Cancel
Save