Lists building rework; Update button

pull/9/head
parent a6d878beb2
commit 119a3ba17b

@ -118,9 +118,7 @@ void on_config_custom_load(GtkWidget *,main_window *widgets){
yon_interface_update(widgets);
}
void *yon_interface_update(main_window *widgets){
g_mutex_lock(&main_config.mutex);
gboolean yon_clear_interface(main_window *widgets){
if (!main_config.kernel_tabs){
GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->KernelsPackageBox));
for (guint i=0;i<g_list_length(list);i++){
@ -135,7 +133,74 @@ void *yon_interface_update(main_window *widgets){
}
g_list_free(list);
}
return G_SOURCE_REMOVE;
}
gboolean yon_tab_create_tags(kernels_tab *tab){
GList *list = gtk_container_get_children(GTK_CONTAINER(tab->install_tags_box));
for (guint i=0;i<g_list_length(list);i++){
gtk_widget_destroy(g_list_nth_data(list,i));
}
g_list_free(list);
if (!getuid()){
if (tab->module_installed){
yon_tag_add(GTK_BOX(tab->install_tags_box),MODULE_INSTALLED_LABEL,"tag_green",NULL);
gtk_image_set_from_icon_name(GTK_IMAGE(tab->module_icon),module_icon_path,GTK_ICON_SIZE_BUTTON);
gtk_widget_show(tab->remove_module_button);
gtk_widget_show(tab->remove_package_button);
gtk_widget_show(tab->update_module_button);
gtk_widget_show(tab->update_package_button);
gtk_widget_hide(tab->install_module_button);
gtk_widget_hide(tab->install_package_button);
}
{
if (tab->package_installed){
yon_tag_add(GTK_BOX(tab->install_tags_box),PACKAGE_INSTALLED_LABEL,"tag_green",NULL);
gtk_image_set_from_icon_name(GTK_IMAGE(tab->package_icon),package_icon_path,GTK_ICON_SIZE_BUTTON);
gtk_widget_hide(tab->install_package_button);
gtk_widget_show(tab->remove_package_button);
gtk_widget_show(tab->update_package_button);
}
}
gtk_widget_set_sensitive(tab->update_module_button,!tab->module_updated);
gtk_widget_set_sensitive(tab->update_package_button,!tab->package_updated);
} else {
yon_tag_add(GTK_BOX(tab->install_tags_box),UNKNOWN_LABEL,"tag_grey",NULL);
}
gtk_widget_show(tab->main_box);
return G_SOURCE_REMOVE;
}
void *yon_tab_set_installed(kernels_tab *tab){
char *check_install_command = get_package_is_installed_command(tab->module);
if (!system(check_install_command)){
tab->module_installed=1;
} else tab->module_installed=0;
free(check_install_command);
check_install_command = get_package_is_installed_command(tab->package);
if (!system(check_install_command)){
tab->package_installed=1;
} else tab->package_installed=0;
free(check_install_command);
check_install_command = get_package_is_updated_command(tab->module);
if (!system(check_install_command)){
tab->module_updated = 0;
} else tab->module_updated = 1;
free(check_install_command);
check_install_command = get_package_is_updated_command(tab->package);
if (!system(check_install_command)){
tab->package_updated = 0;
} else tab->package_updated = 1;
free(check_install_command);
gdk_threads_add_idle((GSourceFunc)yon_tab_create_tags,tab);
return NULL;
}
void *yon_interface_update(main_window *widgets){
gdk_threads_add_idle((GSourceFunc)yon_clear_interface,widgets);
int kernels_size;
config_str kernels = yon_resource_open_file(kernels_path, &kernels_size);
@ -151,6 +216,7 @@ void *yon_interface_update(main_window *widgets){
for (int i=1;i<kernels_size;i++){
kernels_tab *tab = yon_tab_row_new(GTK_LIST_BOX(widgets->KernelsPackageBox),kernels[i],widgets);
g_thread_new("tags_install_tread",(GThreadFunc)yon_tab_set_installed,tab);
{
GList *list = gtk_container_get_children(GTK_CONTAINER(tab->run_tags_box));
for (guint i=0;i<g_list_length(list);i++){
@ -176,9 +242,9 @@ void *yon_interface_update(main_window *widgets){
kernels = yon_resource_open_file(kernels_addon_path, &kernels_size);
for (int i=1;i<kernels_size;i++){
additions_kernels_tab *tab = yon_additions_tab_row_new(GTK_LIST_BOX(widgets->AdditionsPackageBox),kernels[i],widgets);
g_thread_new("tags_install_tread",(GThreadFunc)yon_tab_set_installed,tab);
gtk_widget_set_can_focus(gtk_widget_get_parent(tab->main_box),0);
}
g_mutex_unlock(&main_config.mutex);
return NULL;
}
@ -234,9 +300,6 @@ int yon_tag_add(GtkBox *target,char *tag_label, char *tag_style, char *icon_name
}
gboolean on_command_execute_success(GtkWidget *,gint status,main_window *widgets){
g_mutex_lock(&main_config.pulse_mutex);
main_config.pulse_active=0;
g_mutex_unlock(&main_config.pulse_mutex);
g_mutex_lock(&main_config.progress_mutex);
main_config.progress_active=0;
g_mutex_unlock(&main_config.progress_mutex);
@ -252,20 +315,25 @@ gboolean on_command_execute_success(GtkWidget *,gint status,main_window *widgets
gboolean yon_terminal_get_progress(main_window *widgets){
char *text = vte_terminal_get_text_format(VTE_TERMINAL(widgets->InstallTerminal),VTE_FORMAT_TEXT);
GRegex *regex = g_regex_new("\\d?\\d\\d%",0,0,NULL);
GRegex *regex = g_regex_new("\\d?\\d?\\d%",0,0,NULL);
GMatchInfo *match = NULL;
g_regex_match(regex,text,0,&match);
g_regex_unref(regex);
char *target = g_match_info_fetch(match,0);
g_match_info_unref(match);
config_str target = g_match_info_fetch_all(match);
double percentage = 0.0;
if (!yon_char_is_empty(target)) {
target[strlen(target)-1]='\0';
double percentage = atof(target);
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress),percentage/100);
if (target){
int i;
for (i=0;target[i];i++){
target[i][strlen(target[i])-1]='\0';
percentage = atof(target[i]);
}
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress),percentage/i/100);
}
g_match_info_unref(match);
g_mutex_lock(&main_config.progress_mutex);
if (!main_config.progress_active){
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress),0);
@ -493,11 +561,6 @@ kernels_tab *yon_tab_row_new(GtkListBox *target, char *target_string, main_windo
kernels_tab *tab = NULL;
if (cur){
tab = (kernels_tab*)cur->data;
GList *list = gtk_container_get_children(GTK_CONTAINER(tab->install_tags_box));
for (guint i=0;i<g_list_length(list);i++){
gtk_widget_destroy(g_list_nth_data(list,i));
}
g_list_free(list);
gtk_widget_hide(tab->changelog_button);
gtk_widget_show(tab->launch_button);
gtk_image_set_from_icon_name(GTK_IMAGE(tab->module_icon),"",GTK_ICON_SIZE_BUTTON);
@ -547,6 +610,8 @@ kernels_tab *yon_tab_row_new(GtkListBox *target, char *target_string, main_windo
tab->description_label = yon_gtk_builder_get_widget(builder,"DescriptionLabel");
tab->remove_module_button = yon_gtk_builder_get_widget(builder,"RemoveModuleButton");
tab->remove_package_button = yon_gtk_builder_get_widget(builder,"RemovePackageButton");
tab->update_module_button = yon_gtk_builder_get_widget(builder,"ModuleUpdateButton");
tab->update_package_button = yon_gtk_builder_get_widget(builder,"PackageUpdateButton");
tab->install_module_button = yon_gtk_builder_get_widget(builder,"InstallModuleButton");
tab->install_package_button = yon_gtk_builder_get_widget(builder,"InstallPackageButton");
tab->changelog_button = yon_gtk_builder_get_widget(builder,"ChangelogButton");
@ -604,35 +669,7 @@ kernels_tab *yon_tab_row_new(GtkListBox *target, char *target_string, main_windo
}
tab->module_requirements = yon_char_parse(parsed[3],&tab->module_requirements_size,",");
tab->package_requirements = yon_char_parse(parsed[4],&tab->package_requirements_size,",");
char *check_install_command = get_package_is_installed_command(tab->module);
if (!getuid()){
if (!system(check_install_command)){
yon_tag_add(GTK_BOX(tab->install_tags_box),MODULE_INSTALLED_LABEL,"tag_green",NULL);
tab->module_installed=1;
gtk_image_set_from_icon_name(GTK_IMAGE(tab->module_icon),module_icon_path,GTK_ICON_SIZE_BUTTON);
gtk_widget_show(tab->remove_module_button);
gtk_widget_hide(tab->install_module_button);
gtk_widget_show(tab->changelog_button);
gtk_widget_show(tab->launch_button);
} else tab->module_installed=0;
{
free(check_install_command);
check_install_command = get_package_is_installed_command(tab->package);
if (!system(check_install_command)){
tab->package_installed=1;
yon_tag_add(GTK_BOX(tab->install_tags_box),PACKAGE_INSTALLED_LABEL,"tag_green",NULL);
gtk_image_set_from_icon_name(GTK_IMAGE(tab->package_icon),package_icon_path,GTK_ICON_SIZE_BUTTON);
gtk_widget_hide(tab->install_package_button);
gtk_widget_show(tab->remove_package_button);
gtk_widget_show(tab->changelog_button);
gtk_widget_show(tab->launch_button);
} else tab->package_installed=0;
}
} else {
yon_tag_add(GTK_BOX(tab->install_tags_box),UNKNOWN_LABEL,"tag_grey",NULL);
}
yon_char_parsed_free(types_parsed,types_size);
gtk_label_set_markup(GTK_LABEL(tab->name_label),name);
gtk_label_set_markup(GTK_LABEL(tab->module_label),module);
@ -661,31 +698,30 @@ additions_kernels_tab *yon_additions_tab_row_new(GtkListBox *target, char *targe
additions_kernels_tab *tab = NULL;
if (cur){
tab = (additions_kernels_tab*)cur->data;
GList *list = gtk_container_get_children(GTK_CONTAINER(tab->install_tags_box));
for (guint i=0;i<g_list_length(list);i++){
gtk_widget_destroy(g_list_nth_data(list,i));
}
gtk_image_set_from_icon_name(GTK_IMAGE(tab->module_icon),"",GTK_ICON_SIZE_BUTTON);
gtk_image_set_from_icon_name(GTK_IMAGE(tab->package_icon),"",GTK_ICON_SIZE_BUTTON);
g_list_free(list);
if (tab->module_installed){
gtk_widget_show(tab->remove_module_button);
gtk_widget_hide(tab->install_module_button);
gtk_widget_show(tab->update_module_button);
gtk_widget_show(tab->remove_module_button);
yon_tag_add(GTK_BOX(tab->install_tags_box),MODULE_INSTALLED_LABEL,"tag_green",NULL);
gtk_image_set_from_icon_name(GTK_IMAGE(tab->module_icon),module_icon_path,GTK_ICON_SIZE_BUTTON);
} else {
gtk_widget_hide(tab->update_module_button);
gtk_widget_hide(tab->remove_module_button);
gtk_widget_show(tab->install_module_button);
}
if (tab->package_installed){
gtk_widget_show(tab->update_package_button);
gtk_widget_show(tab->remove_package_button);
gtk_widget_hide(tab->install_package_button);
yon_tag_add(GTK_BOX(tab->install_tags_box),PACKAGE_INSTALLED_LABEL,"tag_green",NULL);
gtk_image_set_from_icon_name(GTK_IMAGE(tab->package_icon),package_icon_path,GTK_ICON_SIZE_BUTTON);
} else {
gtk_widget_hide(tab->update_package_button);
gtk_widget_hide(tab->remove_package_button);
gtk_widget_show(tab->install_package_button);
@ -708,10 +744,14 @@ additions_kernels_tab *yon_additions_tab_row_new(GtkListBox *target, char *targe
tab->remove_package_button = yon_gtk_builder_get_widget(builder,"RemovePackageButton");
tab->install_module_button = yon_gtk_builder_get_widget(builder,"InstallModuleButton");
tab->install_package_button = yon_gtk_builder_get_widget(builder,"InstallPackageButton");
tab->update_module_button = yon_gtk_builder_get_widget(builder,"ModuleUpdateButton");
tab->update_package_button = yon_gtk_builder_get_widget(builder,"PackageUpdateButton");
dictionary *dict = NULL;
yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets);
yon_dictionary_add_or_create_if_exists_with_data(dict,"tab",tab);
g_signal_connect(G_OBJECT(tab->update_module_button),"clicked",G_CALLBACK(on_module_install_clicked),dict);
g_signal_connect(G_OBJECT(tab->update_package_button),"clicked",G_CALLBACK(on_package_install_clicked),dict);
g_signal_connect(G_OBJECT(tab->install_module_button),"clicked",G_CALLBACK(on_module_install_clicked),dict);
g_signal_connect(G_OBJECT(tab->install_package_button),"clicked",G_CALLBACK(on_package_install_clicked),dict);
g_signal_connect(G_OBJECT(tab->remove_module_button),"clicked",G_CALLBACK(on_module_remove_clicked),dict);
@ -727,31 +767,9 @@ additions_kernels_tab *yon_additions_tab_row_new(GtkListBox *target, char *targe
char *name = yon_char_unite("<b>",tab->name,"</b>",NULL);
char *module = yon_char_unite("<i>",MODULE_LABEL," ",tab->module,"</i>",NULL);
char *package = yon_char_unite("<i>",PACKAGE_LABEL," ",tab->package,"</i>",NULL);
char *check_install_command = get_package_is_installed_command(tab->module);
yon_dictionary_add_or_create_if_exists_with_data(main_config.addition_tabs,tab->package,tab);
if (!system(check_install_command)){
tab->module_installed=1;
yon_tag_add(GTK_BOX(tab->install_tags_box),MODULE_INSTALLED_LABEL,"tag_green",NULL);
gtk_image_set_from_icon_name(GTK_IMAGE(tab->module_icon),module_icon_path,GTK_ICON_SIZE_BUTTON);
gtk_widget_show(tab->remove_module_button);
gtk_widget_show(tab->remove_package_button);
gtk_widget_hide(tab->install_module_button);
gtk_widget_hide(tab->install_package_button);
} else tab->module_installed=0;
{
free(check_install_command);
check_install_command = get_package_is_installed_command(tab->package);
if (!system(check_install_command)){
tab->package_installed=1;
yon_tag_add(GTK_BOX(tab->install_tags_box),PACKAGE_INSTALLED_LABEL,"tag_green",NULL);
gtk_image_set_from_icon_name(GTK_IMAGE(tab->package_icon),package_icon_path,GTK_ICON_SIZE_BUTTON);
gtk_widget_hide(tab->install_package_button);
gtk_widget_show(tab->remove_package_button);
} else tab->package_installed=0;
}
gtk_label_set_markup(GTK_LABEL(tab->name_label),name);
gtk_label_set_markup(GTK_LABEL(tab->module_label),module);
gtk_label_set_markup(GTK_LABEL(tab->package_label),package);
@ -788,7 +806,6 @@ void config_init(){
main_config.load_mode=1;
main_config.save_config=1;
main_config.kernel_tabs=NULL;
main_config.pulse_active=0;
main_config.progress_active=0;
}
@ -858,17 +875,6 @@ void on_changelog_clicked(GtkWidget *, kernels_tab *tab){
gtk_widget_show(window->window);
}
gboolean yon_pulse_run(main_window *widgets){
gtk_progress_bar_pulse(GTK_PROGRESS_BAR(widgets->InstallationProgress));
g_mutex_lock(&main_config.pulse_mutex);
gboolean ret;
if (main_config.pulse_active) ret = 0;
else ret = 1;
g_mutex_unlock(&main_config.pulse_mutex);
return ret;
}
void on_build_execute(GtkWidget *, dictionary *dict){
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
install_window *window = yon_dictionary_get_data(dict->first->next,install_window*);
@ -877,12 +883,8 @@ void on_build_execute(GtkWidget *, dictionary *dict){
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 *command = build_command(target,filename,debug,drivers);
yon_command_execute_async(command,widgets);
yon_terminal_window_launch(GTK_WINDOW(widgets->Window),command);
gtk_widget_destroy(window->window);
g_mutex_lock(&main_config.pulse_mutex);
main_config.pulse_active=1;
g_mutex_unlock(&main_config.pulse_mutex);
g_timeout_add(1000,(GSourceFunc)yon_pulse_run,widgets);
}
void on_building_clicked(GtkWidget *, main_window *widgets){

@ -46,6 +46,7 @@
#define get_kernel_changelog_command(target) yon_char_unite("find /usr/lib/modules/ -maxdepth 2 -type f -iname \"pkgbase\" -exec grep -il \"",target,"\" {} + | xargs dirname | xargs -I {} cat \"{}/changelog\"", NULL)
#define get_package_info_command(target) yon_char_append("pacman -Si ",target)
#define get_package_is_installed_command(target) yon_char_append("pacman -Qq ",target)
#define get_package_is_updated_command(target) yon_char_append("pacman -Qu ",target)
#define install_command(target) yon_char_append("pacman -S --noconfirm ",target)
#define remove_command(target) yon_char_append("pacman -R --noconfirm ",target)
@ -77,8 +78,6 @@ typedef struct {
int save_config;
dictionary *kernel_tabs;
dictionary *addition_tabs;
GMutex pulse_mutex;
int pulse_active;
GMutex progress_mutex;
int progress_active;
config_str launch_arguments;
@ -146,6 +145,8 @@ typedef struct {
char *name;
int module_installed;
int package_installed;
int module_updated;
int package_updated;
GtkWidget *main_box;
GtkWidget *name_label;
GtkWidget *module_label;
@ -153,15 +154,17 @@ typedef struct {
GtkWidget *module_icon;
GtkWidget *package_icon;
GtkWidget *install_tags_box;
GtkWidget *run_tags_box;
GtkWidget *tags_box;
GtkWidget *description_label;
GtkWidget *remove_module_button;
GtkWidget *remove_package_button;
GtkWidget *update_module_button;
GtkWidget *update_package_button;
GtkWidget *install_module_button;
GtkWidget *install_package_button;
GtkWidget *changelog_button;
GtkWidget *launch_button;
GtkWidget *run_tags_box;
GtkWidget *tags_box;
config_str module_requirements;
int module_requirements_size;
config_str package_requirements;
@ -175,6 +178,8 @@ typedef struct {
char *name;
int module_installed;
int package_installed;
int module_updated;
int package_updated;
GtkWidget *main_box;
GtkWidget *name_label;
GtkWidget *module_label;
@ -185,6 +190,8 @@ typedef struct {
GtkWidget *description_label;
GtkWidget *remove_module_button;
GtkWidget *remove_package_button;
GtkWidget *update_module_button;
GtkWidget *update_package_button;
GtkWidget *install_module_button;
GtkWidget *install_package_button;
@ -204,6 +211,9 @@ typedef struct {
void on_save_done(main_window *widgets, config_str output, int size);
gboolean yon_clear_interface(main_window *widgets);
gboolean yon_tab_create_tags(kernels_tab *tab);
void *yon_tab_set_installed(kernels_tab *tab);
void *yon_interface_update(main_window *widgets);
@ -249,7 +259,6 @@ void on_info_clicked(GtkWidget *, main_window *widgets);
void on_changelog_clicked(GtkWidget *, kernels_tab *tab);
gboolean yon_pulse_run(main_window *widgets);
void on_build_execute(GtkWidget *, dictionary *dict);
void on_building_clicked(GtkWidget *, main_window *widgets);

@ -3,6 +3,16 @@
<interface domain="ubl-settings-kernel">
<requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubl-settings-kernel.css -->
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk.update-cloud-symbolic</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk.update-cloud-symbolic</property>
</object>
<object class="GtkBox" id="TableRowLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
@ -176,13 +186,42 @@
</packing>
</child>
<child>
<object class="GtkButton" id="RemoveModuleButton">
<property name="label" translatable="yes">Remove module</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<style>
<class name="buttonlistfx"/>
</style>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkButton" id="ModuleUpdateButton">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<style>
<class name="thin"/>
<class name="updatebutton"/>
<class name="buttonlistfx"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="RemoveModuleButton">
<property name="label" translatable="yes">Remove module</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<style>
<class name="buttonlistfx"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -207,13 +246,42 @@
</packing>
</child>
<child>
<object class="GtkButton" id="RemovePackageButton">
<property name="label" translatable="yes">Remove package</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<style>
<class name="buttonlistfx"/>
</style>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkButton" id="PackageUpdateButton">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<style>
<class name="thin"/>
<class name="updatebutton"/>
<class name="buttonlistfx"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="RemovePackageButton">
<property name="label" translatable="yes">Remove package</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<style>
<class name="buttonlistfx"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>

@ -3,6 +3,16 @@
<interface domain="ubl-settings-kernel">
<requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubl-settings-kernel.css -->
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk.update-cloud-symbolic</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk.update-cloud-symbolic</property>
</object>
<object class="GtkBox" id="TableRowLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
@ -212,13 +222,42 @@
</packing>
</child>
<child>
<object class="GtkButton" id="RemoveModuleButton">
<property name="label" translatable="yes">Remove module</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<style>
<class name="buttonlistfx"/>
</style>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkButton" id="ModuleUpdateButton">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<style>
<class name="thin"/>
<class name="updatebutton"/>
<class name="buttonlistfx"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="RemoveModuleButton">
<property name="label" translatable="yes">Remove module</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<style>
<class name="buttonlistfx"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -243,13 +282,42 @@
</packing>
</child>
<child>
<object class="GtkButton" id="RemovePackageButton">
<property name="label" translatable="yes">Remove package</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<style>
<class name="buttonlistfx"/>
</style>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkButton" id="PackageUpdateButton">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<style>
<class name="thin"/>
<class name="updatebutton"/>
<class name="buttonlistfx"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="RemovePackageButton">
<property name="label" translatable="yes">Remove package</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<style>
<class name="buttonlistfx"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>

@ -139,7 +139,14 @@ background:transparent;
}
.listfix row:selected * .buttonlistfx:active * {
background-color: @theme_selected_fg_color;
color: @theme_fg_color;
transition:100ms;
}
.listfix row:selected * .buttonlistfx:active {
background-color: @theme_selected_fg_color;
color: @theme_fg_color;
transition:100ms;
}
@ -205,4 +212,31 @@ background:transparent;
color:#2f2f2f;
background-color:#999999
}
.updatebutton {
background-color: #ef7a7a;
color: @theme_bg_color;
border-color: #aa5555;
}
.updatebutton *{
background-color: #ef7a7a;
color: @theme_bg_color;
}
.updatebutton:active {
background-color: @theme_selected_bg_color;
color: @theme_bg_color;
border-color: @theme_selected_bg_color;
}
.updatebutton:active *{
background-color: @theme_selected_bg_color;
color: @theme_bg_color;
}
.updatebutton:disabled {
background-color: #ffcfcf;
border-color: @insensitive_fg_color;
border-width:0.5px;
}
.updatebutton *:disabled {
background-color: #ffcfcf;
color: @insensitive_fg_color;
}

@ -347,6 +347,9 @@
<object class="GtkListBox" id="AdditionsPackageBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<style>
<class name="listfix"/>
</style>
</object>
</child>
</object>

Loading…
Cancel
Save