master #148

Merged
asmeron merged 5 commits from YanTheKaller/ubl-settings-video:master into master 4 weeks ago

@ -109,3 +109,9 @@ msgstr ""
msgid "Intel i810/i830/i915/945G/G965+, except GMA 3600"
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"
msgstr ""
"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;
char *command = yon_char_new(" ");
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();
free(command);
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){
if (type!=YON_CONFIG_CUSTOM){
yon_config_clean();
}
if (!yon_char_is_empty(config_get_default_command))
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_ubl_status_box_render(yon_char_get_localised_from_lib(GLOBAL_LOAD_SUCCESS_LABEL),BACKGROUND_IMAGE_SUCCESS_TYPE);
break;
case YON_CONFIG_LOCAL:
} else if (type==YON_CONFIG_LOCAL){
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);
break;
case YON_CONFIG_CUSTOM:
char *path = NULL;
path=yon_custom_config_init(GTK_FILE_CHOOSER_ACTION_OPEN);
yon_char_remove_brackets(path);
if (!yon_char_is_empty(path)){
if ((access(path,0)==F_OK&&access(path,4)!=F_OK)){
if (yon_status_box_is_set()){
yon_ubl_status_box_render(ACCESS_DENIED_LABEL(path),BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
} else if (type==YON_CONFIG_CUSTOM){
char *path="";
textdomain(template_ui_LocaleName);
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);
textdomain(LocaleName);
gtk_window_set_icon_name(GTK_WINDOW(dialog),"com.ublinux.ubl-settings-services");
gtk_window_set_title(GTK_WINDOW(dialog),TITLE_LABEL);
GtkFileFilter *filter = gtk_file_filter_new();
gtk_file_filter_add_pattern(filter,"*.ini");
gtk_file_filter_set_name(filter, "*.ini");
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_load_config(type,config_get_command(path),NULL);
yon_ubl_status_box_render(yon_char_get_localised_from_lib(LOCAL_LOAD_SUCCESS_LABEL),BACKGROUND_IMAGE_SUCCESS_TYPE);
if (!yon_char_is_empty(config_get_default_command))
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->kernel = current[0];
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->package_installed = yon_packages_check_installed(current[2]);
target->module_exist = yon_packages_check_exist(current[1]);

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

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

Loading…
Cancel
Save