Initramfs window changes

pull/51/head
parent 5725f630e4
commit ff35f6f5a6

@ -420,6 +420,12 @@ info_window *yon_info_window_new(){
return window; return window;
} }
void on_basic_toggled(GtkSwitch *,int state, install_window *window){
gtk_menu_button_set_direction(GTK_MENU_BUTTON(window->ArrowButton),state?GTK_ARROW_UP:GTK_ARROW_DOWN);
gtk_revealer_set_transition_type(GTK_REVEALER(window->ShowRevealer),state?GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN:GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP);
gtk_revealer_set_reveal_child(GTK_REVEALER(window->ShowRevealer), state);
}
install_window *yon_install_window_new(){ install_window *yon_install_window_new(){
install_window *window = malloc(sizeof(install_window)); install_window *window = malloc(sizeof(install_window));
@ -438,8 +444,12 @@ install_window *yon_install_window_new(){
window->BasicCurrentSwitch = yon_gtk_builder_get_widget(builder,"BasicCurrentSwitch"); window->BasicCurrentSwitch = yon_gtk_builder_get_widget(builder,"BasicCurrentSwitch");
window->DebugSwitch = yon_gtk_builder_get_widget(builder,"DebugSwitch"); window->DebugSwitch = yon_gtk_builder_get_widget(builder,"DebugSwitch");
window->UniversalSwitch = yon_gtk_builder_get_widget(builder,"UniversalSwitch"); window->UniversalSwitch = yon_gtk_builder_get_widget(builder,"UniversalSwitch");
window->BackgroundFrame = yon_gtk_builder_get_widget(builder,"BackgroundFrame");
window->ArrowButton = yon_gtk_builder_get_widget(builder,"ArrowButton");
window->ShowRevealer = yon_gtk_builder_get_widget(builder,"ShowRevealer");
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_signal_connect(G_OBJECT(window->BasicSwitch),"state-set",G_CALLBACK(on_basic_toggled),window);
return window; return window;
} }
@ -1303,10 +1313,10 @@ void on_changelog_clicked(GtkWidget *, kernels_tab *tab){
void on_build_execute(GtkWidget *, dictionary *dict){ void on_build_execute(GtkWidget *, dictionary *dict){
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*); main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
install_window *window = yon_dictionary_get_data(dict->first->next,install_window*); install_window *window = yon_dictionary_get_data(dict->first->next,install_window*);
int basic = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->BasicSwitch)); // int basic = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->BasicSwitch));
int drivers = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->BasicCurrentSwitch)); int drivers = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->BasicCurrentSwitch));
int debug = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DebugSwitch)); int debug = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DebugSwitch));
int universal = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UniversalSwitch)); // int universal = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UniversalSwitch));
char *target = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->KernelVersionCombo)); char *target = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->KernelVersionCombo));
char *filename = (char*)gtk_entry_get_text(GTK_ENTRY(window->FilenameEntry)); char *filename = (char*)gtk_entry_get_text(GTK_ENTRY(window->FilenameEntry));
char *command = build_command(target,filename,debug,drivers); char *command = build_command(target,filename,debug,drivers);

@ -141,6 +141,9 @@ typedef struct {
GtkWidget *BasicCurrentSwitch; GtkWidget *BasicCurrentSwitch;
GtkWidget *DebugSwitch; GtkWidget *DebugSwitch;
GtkWidget *UniversalSwitch; GtkWidget *UniversalSwitch;
GtkWidget *BackgroundFrame;
GtkWidget *ShowRevealer;
GtkWidget *ArrowButton;
}install_window; }install_window;
typedef struct { typedef struct {
@ -284,5 +287,7 @@ void on_boot_toggled(GtkWidget *, char *path, main_window *widgets);
void on_terminal_revealer_open(GtkWidget *, main_window *widgets); void on_terminal_revealer_open(GtkWidget *, main_window *widgets);
void on_basic_toggled(GtkSwitch *self,int state, install_window *window);
info_window *yon_info_window_new(); info_window *yon_info_window_new();
install_window *yon_install_window_new(); install_window *yon_install_window_new();

@ -24,7 +24,11 @@
#define KERNEL_VERSION_LABEL _("Kernel version:") #define KERNEL_VERSION_LABEL _("Kernel version:")
#define IMAGE_FILE_LABEL _("Image file:") #define IMAGE_FILE_LABEL _("Image file:")
#define ADD_DEBUG_LABEL _("Add debug components") #define ADD_DEBUG_LABEL _("Add debug components")
#define ADD_DRIVERS_LABEL _("Add drivers for current hardware components only") #define BUILD_BASIC_LABEL _("Build basic image")
#define BUILD_BASIC_CURRENT_LABEL _("Build basic image with drivers for current hardware components only")
#define BUILD_UNIVERSAL_LABEL _("Build universal drivers for hardware components")
#define BUILD_SUCCESS_STATUS_LABEL _("Building has succeeded")
#define BUILD_FAILED_STATUS_LABEL _("Building has failed")
#define INSTALL_MODULE_LABEL _("Install module") #define INSTALL_MODULE_LABEL _("Install module")
#define REMOVE_MODULE_LABEL _("Remove module") #define REMOVE_MODULE_LABEL _("Remove module")
@ -90,7 +94,4 @@
#define REMOVE_ADDITION_PACKAGE_TITLE_LABEL _("Remove addition package") #define REMOVE_ADDITION_PACKAGE_TITLE_LABEL _("Remove addition package")
#define UPDATE_ADDITION_MODULE_TITLE_LABEL _("Update addition module") #define UPDATE_ADDITION_MODULE_TITLE_LABEL _("Update addition module")
#define UPDATE_ADDITION_PACKAGE_TITLE_LABEL _("Update addition package") #define UPDATE_ADDITION_PACKAGE_TITLE_LABEL _("Update addition package")
#define BUILD_SUCCESS_STATUS_LABEL _("Building has succeeded") #define KERNEL_PACKAGE_INSTALL_ATTENTION_LABEL _("Attention! If you work in sandbox mode, you must install the package with the module!")
#define BUILD_FAILED_STATUS_LABEL _("Building has failed")
#define KERNEL_PACKAGE_INSTALL_ATTENTION_LABEL _("Attention! If you work in sandbox mode, you must install the package with the module!")
#define DEPENDS_LABEL(target) yon_char_unite(_("Some of chosen dependent packages have been in dependences for another packages"),": ",target,_(". Do you really want to remove them?"),NULL)

@ -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-kernel"> <interface domain="ubl-settings-kernel">
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubl-settings-kernel.css --> <!-- interface-css-provider-path ubl-settings-kernel.css -->
@ -115,7 +115,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkFrame"> <object class="GtkFrame" id="BackgroundFrame">
<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-xalign">0</property> <property name="label-xalign">0</property>
@ -152,9 +152,19 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSwitch" id="BasicSwitch"> <object class="GtkMenuButton" id="ArrowButton">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<child>
<placeholder/>
</child>
<style>
<class name="thin"/>
<class name="nobackground"/>
<class name="noborder"/>
</style>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -163,6 +173,18 @@
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkSwitch" id="BasicSwitch">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">2</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -171,55 +193,79 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkExpander"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">False</property>
<property name="expanded">True</property> <property name="orientation">vertical</property>
<property name="label-fill">True</property>
<property name="resize-toplevel">True</property>
<child> <child>
<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="spacing">5</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkSeparator">
<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">Build basic image with drivers for current hardware components only</property> <property name="valign">center</property>
<property name="wrap">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkSwitch" id="BasicCurrentSwitch">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
</object> </object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child> </child>
<child type="label"> <child>
<object class="GtkLabel"> <object class="GtkRevealer" id="ShowRevealer">
<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">&lt;s&gt;--------------------------------------------------------------&lt;/s&gt;</property> <child>
<property name="use-markup">True</property> <object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</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">Build basic image with drivers for current hardware components only</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="BasicCurrentSwitch">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object> </object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child> </child>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>

@ -56,12 +56,11 @@ background:transparent;
background:@theme_base_color; background:@theme_base_color;
} }
.bggrey{ .bggrey{
background-color: @insensitive_fg_color;
border-radius:5px; border-radius:5px;
border-color:@theme_text_color; border-color:@theme_text_color;
border-style:solid; border-style:solid;
border-width:0.55px; border-width:0.3px;
color:@theme_bg_color; box-shadow: 1px 4px 4px rgba(0, 0, 0, 0.3);
} }
.menuitembottom{ .menuitembottom{
margin-top:0px; margin-top:0px;

@ -247,7 +247,7 @@ msgstr ""
msgid "Are you sure want to install module with addition package" msgid "Are you sure want to install module with addition package"
msgstr "" msgstr ""
source/ubl-strings.h:72 #: source/ubl-strings.h:72
msgid "Are you sure want to install addition package" msgid "Are you sure want to install addition package"
msgstr "" msgstr ""
@ -335,15 +335,28 @@ msgid "Update addition package"
msgstr "" msgstr ""
#: source/ubl-strings.h:93 #: source/ubl-strings.h:93
msgid "Building has succeeded" msgid "Build basic image"
msgstr "" msgstr ""
#: source/ubl-strings.h:94 #: source/ubl-strings.h:94
msgid "Building has failed" msgid "Build basic image with drivers for current hardware components only"
msgstr "" msgstr ""
#: source/ubl-strings.h:95 #: source/ubl-strings.h:95
msgid "Build universal drivers for hardware components"
msgstr ""
#: source/ubl-strings.h:96
msgid "Building has succeeded"
msgstr ""
#: source/ubl-strings.h:97
msgid "Building has failed"
msgstr ""
#: source/ubl-strings.h:98
msgid "" msgid ""
"Attention! If you work in sandbox mode, you must install the package with " "Attention! If you work in sandbox mode, you must install the package with "
"the module!" "the module!"
msgstr "" msgstr ""

@ -346,15 +346,29 @@ msgid "Update addition package"
msgstr "Обновить пакет с дополнением" msgstr "Обновить пакет с дополнением"
#: source/ubl-strings.h:93 #: source/ubl-strings.h:93
msgid "Build basic image"
msgstr "Собрать базовый образ"
#: source/ubl-strings.h:94
msgid "Build basic image with drivers for current hardware components only"
msgstr "Собрать базовый образ только с текущими драйверами аппаратных компонентов"
#: source/ubl-strings.h:95
msgid "Build universal drivers for hardware components"
msgstr "Собрать универсальные драйвера аппаратных компонентов"
#: source/ubl-strings.h:96
msgid "Building has succeeded" msgid "Building has succeeded"
msgstr "Сборка прошла успешно" msgstr "Сборка прошла успешно"
#: source/ubl-strings.h:94 #: source/ubl-strings.h:97
msgid "Building has failed" msgid "Building has failed"
msgstr "Ошибка сборки ядра" msgstr "Ошибка сборки ядра"
#: source/ubl-strings.h:95 #: source/ubl-strings.h:98
msgid "" msgid ""
"Attention! If you work in sandbox mode, you must install the package with " "Attention! If you work in sandbox mode, you must install the package with "
"the module!" "the module!"
msgstr "Внимание! Если вы работаете в режиме песочницы, необходимо установить пакет с модулем!" msgstr ""
"Внимание! Если вы работаете в режиме песочницы, необходимо установить пакет "
"с модулем!"

Loading…
Cancel
Save